Video analysis system and method for food processing violation behaviors of restaurants in colleges and universities

Video analysis system and method for food processing violation behaviors of restaurants in colleges and universities

  • CN 109,089,160 B
  • Filed: 09/19/2018
  • Issued: 11/03/2020
  • Est. Priority Date: 09/19/2018
  • Status: Active Grant
First Claim
Patent Images

1. A video analysis method for food processing violation behaviors of restaurants in colleges and universities is characterized by comprising the following steps:

  • the video analysis system for the food processing violation behaviors of the restaurants in colleges and universities is adopted and comprises a hardware system and a software system;

    wherein the content of the first and second substances,the hardware system comprises a camera, an access switch, an optical module, a convergence switch, a network video recorder, a monitor and a video analysis workstation;

    the video camera, the access switch, the optical module, the convergence switch, the network video recorder and the monitor are sequentially connected through an optical cable or a network cable, and the video analysis workstation is connected with the convergence switch through the network cable;

    the software system comprises a video analysis subsystem which runs on a hardware platform of the video analysis workstation;

    the video analysis subsystem comprises a real-time video reading module, a video analysis module, an illegal action picture storage module, a mobile phone short message alarm module, a log recording module and a parameter configuration module;

    the real-time video reading module is configured for reading a configuration file and then reading a video from the network video recorder in real time;

    the video analysis module is configured for detecting possible illegal behaviors in the food processing process;

    the violation behavior picture storage module is configured to store a picture of the detected violation behavior;

    the mobile phone short message alarm module is configured for automatically sending a short message to a manager for alarming when detecting the violation;

    the log recording module is configured for recording information including time, place and behavior type when the violation behavior occurs and automatically maintaining and displaying access records of the database;

    the parameter configuration module is configured for configuring various parameters by a user;

    the system is provided with N cameras, a video analysis workstation is provided with M CPU cores, N is more than M, the integer quotient of N divided by M is K, the remainder is L, L is more than or equal to 0 and less than M, i represents the number of the CPU core to be read and processed currently, and i is more than or equal to 1 and less than or equal to M;

    when K and L are determined, P is a variable associated with i and has;

    when L <

    i, P ═

    K-1;

    when L is larger than or equal to i, P is K;

    the 1 st CPU core is responsible for video analysis work of videos collected by the 1 st, M +1 st, 2M +1 st, … and

    PM +1 st cameras, the 2 nd CPU core is responsible for video analysis work of videos collected by the 2 nd, M +2 nd, 2M +2 nd, … and

    PM +2 nd cameras, …

    , and the Mth CPU core is responsible for video analysis work of videos collected by the Mth, 2 Mth, 3 Mth, … and

    (P +1) th cameras;

    the method specifically comprises the following steps;

    step 1;

    setting i to be 1;

    step 2;

    reading the configuration file through a real-time video reading module, acquiring the video analysis period and the number of the behavior to be detected of each camera in charge of the ith CPU core, and recording the camera set as Ci(ii) a The behavior type to be detected of each camera is stored in a configuration file in advance through a parameter configuration module;

    and step 3;

    reading C by real-time video reading moduleiWhen an illegal action is found, the illegal action picture storage module stores the illegal action picture, the short message alarm module sends a short message to a manager for alarming, and the log recording module finishes log recording;

    and 4, step 4;

    sequentially reading C through the real-time video reading moduleiPictures corresponding to the 1 st video frames of other cameras in the system, sequentially detecting corresponding behaviors through a video analysis module according to behaviors needing to be detected of the cameras, storing violation pictures through a violation picture storage module and reporting the violation pictures through a short message of a mobile phone when violation behaviors are foundThe alarm module sends a short message to a manager for alarming and finishes log recording through the log recording module;

    and 5;

    according to CiDetermining the sequence of video analysis of the cameras according to the respective video analysis period of each camera;

    step 6;

    according to the analysis sequence, video analysis of other video frames of each camera is sequentially completed, when illegal behaviors are found, illegal pictures are stored through an illegal behavior picture storage module, short messages are sent to managers through a mobile phone short message alarm module to give an alarm, and log recording is completed through a log recording module;

    and 7;

    repeating the steps 2-6 until the video analysis work of the cameras which are responsible for all the M CPU cores is completed;

    illegal behaviors, including behaviors that employees do not wear working clothes and behaviors that employees process raw meat with vegetarian chopping boards;

    the video analysis method for the behavior of the staff without the work clothes comprises the following steps;

    step S01;

    reading a video frame of a camera to generate a picture to be analyzed;

    step S02;

    reading the information of the effective area in the database, and only reserving the effective area of the picture to be analyzed;

    step S03;

    carrying out face detection on the picture to be analyzed;

    step S04;

    judging whether a face area is detected;

    if;

    if the judgment result is that the human face area is detected, determining the jacket area according to the length and the width of the detected human face area and the proportion and the distance, and finishing graying;

    or judging that no violation behavior exists if the human face area is not detected according to the judgment result, and ending;

    step S05;

    reading a work clothes template picture and finishing graying;

    step S06;

    judging whether the jacket area is smaller than the working clothes template;

    if;

    if the judgment result is that the jacket area is smaller than the working clothes template, the length and the width of the working clothes template picture are reduced in the same proportion;

    if the upper garment area is greater than or equal to the work garment template, executing step S07;

    step S07;

    according to the cross-correlation formula (1), calculating a cross-correlation result value, and performing template matching on the coat region picture and the work clothes template picture;

View all claims
    ×
    ×

    Thank you for your feedback

    ×
    ×