A method, device, equipment and storage medium for detecting occlusion behavior

By generating images and pixel points in the back kitchen camera video, calculating the proportion of occlusion pixels, and automatically identifying occlusion behavior, the problem of low supervision efficiency of "open kitchen and bright stove" videos is solved, intelligent and unmanned supervision analysis is realized, and supervision efficiency is improved.

CN115019221BActive Publication Date: 2025-03-18PINGAN INT SMART CITY TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210416457.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-20
Publication Date
2025-03-18
Estimated Expiration
2042-04-20

AI Technical Summary

Technical Problem

In the prior art, the video supervision efficiency of "open kitchen and bright stove" is low, resulting in a low utilization rate of video data resources, wasted supervision resources, and catering companies may reduce violation alarms by blocking cameras.

Method used

By obtaining the video collected by the kitchen camera, a target image set and a target pixel point set are generated, and the ratio of occluded pixel points of each image is calculated. When the ratio exceeds the preset range, it is marked as an occluded image. If the number of occluded images exceeds the second preset range, it is determined that the video has occluded behavior and is marked as an abnormal video.

Benefits of technology

Remote, intelligent and unmanned identification analysis of a large number of videos is realized, and automatic identification of whether there are violations of occluding cameras in the kitchen of catering companies, providing effective clues for supervisors, reducing the workload of supervisors, and improving supervision efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115019221B_ABST
    Figure CN115019221B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for detecting occlusion behavior; the detection method includes obtaining a target video and a target address corresponding to the target video; generating a target image set based on the target video; generating a target pixel point set corresponding to each of the target images based on the target image set; determining the occlusion pixel point ratio of each of the target images based on the target pixel point set; when the occlusion pixel point ratio of the target image exceeds a first preset range, setting the target image as an occlusion image; when the number of occlusion images exceeds a second preset range, setting the target video as an abnormal video with occlusion behavior, and setting the target address as an abnormal address. The present application can automatically identify whether there is an illegal behavior of blocking the camera in the back kitchen of a catering enterprise, greatly reducing the workload of supervisors and improving the efficiency of supervisors' supervision of catering enterprises.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of security monitoring technology, and in particular to a method, device, equipment and storage medium for detecting occlusion behavior. Background Art

[0002] As provinces and cities gradually implement the "open kitchen and bright stove" project, the back kitchens of catering companies have gradually become transparent. However, in the process of popularizing "open kitchen and bright stove", the limitations of its supervision have gradually been exposed. Many catering companies have problems such as "video is not open", "open but not guarded", "transparent but not clean" and "inadequate transformation". In order to prevent their own catering companies from being inspected by the police, many practitioners will cover the back kitchen cameras, thereby reducing their own violation alarms.

[0003] At present, the massive amount of video data generated by "open kitchens and bright stoves" every day is monitored and managed manually, but the supervisors are short of manpower and have limited time and energy, and are unable to manually check the video data generated by "open kitchens and bright stoves" one by one, resulting in low utilization of video data resources and waste of supervisory resources. Summary of the invention

[0004] In view of the problem of low efficiency of existing video monitoring, the present application is proposed to provide a detection method, device, equipment and storage medium for occlusion behavior that overcomes the problem or at least partially solves the problem, including:

[0005] A method for detecting occlusion behavior is used to detect a video collected by a back kitchen camera, comprising:

[0006] Obtain a target video and a target address corresponding to the target video;

[0007] Generate a target image set according to the target video; the target image set includes a plurality of target images;

[0008] Generating a target pixel point set corresponding to each of the target images according to the target image set; each of the target pixel point sets includes a plurality of target pixel points;

[0009] Determining the proportion of occluded pixels of each target image according to the target pixel set;

[0010] When the proportion of the blocked pixels of the target image exceeds a first preset range, setting the target image as a blocked image;

[0011] When the number of the occluding images exceeds a second preset range, the target video is set as an abnormal video with occluding behavior, and the target address is set as an abnormal address.

[0012] Preferably, the step of generating a target image set based on the target video includes:

[0013] Generate an initial image set according to the target video; the initial image set includes each frame of the initial image in the target video;

[0014] Generating a correction image set according to the initial image set; the correction image set includes a correction image corresponding to each of the initial images;

[0015] The target image set is generated according to the corrected image set; the target image set includes the corrected images of a first preset ratio.

[0016] Preferably, the step of generating a target pixel point set corresponding to each target image according to the target image set comprises:

[0017] Generating an initial pixel point set corresponding to each of the target images according to the target image set; the initial pixel point set includes each initial pixel point in the target image;

[0018] The target pixel point set is generated according to the initial pixel point set; the target pixel point set includes the initial pixel points in a second preset ratio.

[0019] Preferably, the step of determining the proportion of occluded pixels of each target image based on the target pixel set comprises:

[0020] Filter out blocked pixels from each of the target pixel sets in turn;

[0021] The occluded pixel ratio of each of the target images is determined according to the number of the occluded pixel points and the number of the target pixel points in the target pixel point set corresponding to the target image.

[0022] Preferably, the step of sequentially screening out occluded pixel points from each of the target pixel point sets comprises:

[0023] Calculating the color value of each target pixel in each target pixel set in sequence;

[0024] When the color value of the target pixel exceeds a third preset range, the target pixel is set as the blocked pixel.

[0025] Preferably, the color value includes a red value, a green value and a blue value; when the color value of the target pixel exceeds a third preset range, the step of setting the target pixel as the blocked pixel comprises:

[0026] When the red value of the target pixel exceeds a fourth preset range, the green value exceeds a fifth preset range, and the blue value exceeds a sixth preset range, the target pixel is set as the blocked pixel.

[0027] Preferably, it also includes:

[0028] The abnormal video and the abnormal address are sent to a supervision port.

[0029] A device for detecting occlusion behavior, used for detecting a video collected by a back kitchen camera, comprising:

[0030] A target video acquisition module, used to acquire a target video and a target address corresponding to the target video;

[0031] A target image generation module, used to generate a target image set according to the target video; the target image set includes a plurality of target images;

[0032] A target pixel point generating module, used for generating a target pixel point set corresponding to each of the target images according to the target image set; each of the target pixel point sets includes a plurality of target pixel points;

[0033] An occluded pixel ratio determination module, used to determine the occluded pixel ratio of each of the target images according to the target pixel set;

[0034] An occluded image determining module, configured to set the target image as an occluded image when the occluded pixel ratio of the target image exceeds a first preset range;

[0035] The occlusion behavior determination module is used to set the target video as an abnormal video with occlusion behavior and set the target address as an abnormal address when the number of the occlusion images exceeds a second preset range.

[0036] A computer device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the above-mentioned method for detecting occlusion behavior when executed by the processor.

[0037] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for detecting occlusion behavior are implemented.

[0038] This application has the following advantages:

[0039] In an embodiment of the present application, a target video and a target address corresponding to the target video are obtained; a target image set is generated based on the target video; the target image set includes a plurality of target images; a target pixel point set corresponding to each of the target images is generated based on the target image set; each of the target pixel point sets includes a plurality of target pixels; based on the target pixel point set, the occluded pixel point ratio of each of the target images is determined; when the occluded pixel point ratio of the target image exceeds a first preset range, the target image is set as an occluded image; when the number of occluded images exceeds a second preset range, the target video is set as an abnormal video with occlusion behavior, and the target address is set as an abnormal address, a large number of videos can be remotely, intelligently and unmannedly identified and analyzed, and whether there is any violation of blocking the camera in the back kitchen of a catering enterprise can be automatically identified, providing effective clues for supervisors, greatly reducing the workload of supervisors, and improving the efficiency of supervisors' supervision of catering enterprises. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 is a flowchart of a method for detecting an occlusion behavior provided in an embodiment of the present application;

[0042] Figure 2 is a flowchart of a method for detecting an occlusion behavior provided in another embodiment of the present application;

[0043] Figure 3 is a structural block diagram of a detection device for occlusion behavior provided by an embodiment of the present application;

[0044] Figure 4 is a structural block diagram of a detection device for occlusion behavior provided by another embodiment of the present application;

[0045] Figure 5 It is a structural diagram of a computer device provided in one embodiment of the present application.

[0046] The reference numerals in the drawings of the specification are as follows:

[0047] 12. Computer equipment; 14. External devices; 16. Processing unit; 18. Bus; 20. Network adapter; 22. I / O interface; 24. Display; 28. Memory; 30. Random access memory; 32. Cache memory; 34. Storage system; 40. Program / utility; 42. Program module. DETAILED DESCRIPTION

[0048] In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0049] It should be noted that in any embodiment of the present application, the detection method is used to detect the video collected by the back kitchen camera; the back kitchen camera is a camera installed in the back kitchen of a catering enterprise, which is used to monitor the back kitchen screen of the catering enterprise in real time. The back kitchen camera can be an IPC (IP Camera, network camera), that is, a new type of camera generated by combining traditional cameras with network technology, which can be combined with routers, switches, NVR (Network Video Recorder, network hard disk recorder) and other devices to form a monitoring system, with audio and video encoding (i.e. collecting digital audio and video signals and encoding and compressing them), caching (i.e. temporarily storing compressed audio and video data in a local storage device), network transmission (i.e. transmitting the encoded and compressed audio and video signals through the network), visual parameter adjustment (i.e. automatically adjusting the saturation, contrast, brightness and other parameters of the video) and encoding parameter adjustment (i.e. adjusting the encoding parameters of the video such as frame rate, resolution and bit rate) and other functions; the traditional camera can be any one of a telephoto camera, a wide-angle camera or an ordinary camera, preferably a wide-angle camera, which can obtain a larger field of view to improve the recognition accuracy of occlusion behavior.

[0050] Reference Figure 1 , shows a method for detecting occlusion behavior provided by an embodiment of the present application, comprising the following steps:

[0051] S110, obtaining a target video and a target address corresponding to the target video;

[0052] S120, generating a target image set according to the target video; the target image set includes a plurality of target images;

[0053] S130, generating a target pixel point set corresponding to each of the target images according to the target image set; each of the target pixel point sets includes a plurality of target pixel points;

[0054] S140, determining the proportion of blocked pixels of each target image according to the target pixel set;

[0055] S150, when the proportion of the blocked pixels of the target image exceeds a first preset range, setting the target image as a blocked image;

[0056] S160: When the number of the occluding images exceeds a second preset range, the target video is set as an abnormal video with occluding behavior, and the target address is set as an abnormal address.

[0057] In an embodiment of the present application, a target video and a target address corresponding to the target video are obtained; a target image set is generated based on the target video; the target image set includes a plurality of target images; a target pixel point set corresponding to each of the target images is generated based on the target image set; each of the target pixel point sets includes a plurality of target pixels; based on the target pixel point set, the occluded pixel point ratio of each of the target images is determined; when the occluded pixel point ratio of the target image exceeds a first preset range, the target image is set as an occluded image; when the number of occluded images exceeds a second preset range, the target video is set as an abnormal video with occlusion behavior, and the target address is set as an abnormal address, a large number of videos can be remotely, intelligently and unmannedly identified and analyzed, and whether there is any violation of blocking the camera in the back kitchen of a catering enterprise can be automatically identified, providing effective clues for supervisors, greatly reducing the workload of supervisors, and improving the efficiency of supervisors' supervision of catering enterprises.

[0058] Next, a method for detecting an occlusion behavior in this exemplary embodiment will be further described.

[0059] As described in step S110, a target video and a target address corresponding to the target video are obtained.

[0060] The plurality of videos captured by the back kitchen camera are obtained through the streaming media server and forwarded to the business system. The business system is preset with an opencv computer vision library, and the plurality of videos are read through the opencv computer vision library, wherein each of the videos corresponds to a processing logic queue in the opencv computer vision library. By processing each queue in parallel through the opencv computer vision library, simultaneous analysis of a plurality of the videos can be achieved. The target video is any one of the plurality of videos; the video can be real-time data or historical data. In order to save server costs, an asynchronous processing service can be used, that is, the recognition result does not need to be returned in real time, but is returned after a period of time after the video is acquired. The target address is the port information corresponding to the target video, and may include the collection location of the video data, such as the address of the catering company where the back kitchen camera is located.

[0061] As described in step S120, a target image set is generated according to the target video; the target image set includes a plurality of target images.

[0062] The target video is read using the opencv computer vision library, and a number of the target images, i.e., frame data (i.e., mat objects), are extracted from the target video at a first preset interval to form the target image set; the first preset interval can be the lowest frame interval (i.e., the inverse of the frame rate) of the target video or any multiple of the lowest frame interval, and can be specifically pre-set according to the detection level. The higher the detection level, the smaller the first preset interval; when the first preset interval is the lowest frame interval, each frame in the target video is converted into the target image, and the highest level of detection of the target video can be achieved at this time; when the first preset interval is greater than the lowest frame interval, some frames in the target video are extracted and converted into the target image, and the task processing amount can be reduced at this time, thereby obtaining the recognition result faster.

[0063] As described in step S130, a target pixel point set corresponding to each target image is generated according to the target image set; each target pixel point set includes a plurality of target pixel points.

[0064] A number of target pixels are extracted from the target image at a second preset interval to form a set of target pixels; the second preset interval can be any natural number, and can be specifically pre-set according to the detection level. The higher the detection level, the smaller the second preset interval; when the first preset interval is zero, each pixel in the target image is converted into the target pixel, and the highest level of detection of the target video can be achieved at this time; when the first preset interval is greater than zero, some pixels in the target image are extracted and converted into the target pixel, and the task processing amount can be reduced at this time, thereby obtaining the recognition result faster.

[0065] As described in step S140 , the proportion of blocked pixels of each target image is determined according to the target pixel set.

[0066] Using the QImage technology in the opencv computer vision library, the color value of each target pixel in each target pixel set is calculated in turn. When the color value of the target pixel exceeds a third preset range, the target pixel is marked as an occluded pixel. The number of occluded pixels corresponding to the target image is divided by the number of target pixels corresponding thereto to obtain the occluded pixel ratio of each target image.

[0067] As described in step S150, when the proportion of the blocked pixels of the target image exceeds a first preset range, the target image is set as a blocked image.

[0068] When the proportion of the occluded pixels of the target image exceeds the first preset range, the target image is marked as the occluded image. The first preset range can be preset according to the detection level. The higher the detection level, the smaller the first preset range. For example, when the first preset range is set to 50%, it means that a 100*100px target image is occluded by half or more, that is, when 50*100px is occluded, it is considered to belong to the occluded image.

[0069] As described in step S160, when the number of the occluding images exceeds a second preset range, the target video is set as an abnormal video with occluding behavior, and the target address is set as an abnormal address.

[0070] Traverse each of the target images in the target image set, and when the number of the occluded images exceeds a second preset range, mark the target video as an abnormal video with occlusion behavior, and mark the target address as an abnormal address with occlusion behavior. The second preset range can be pre-set according to the detection level. The higher the detection level, the smaller the second preset range. For example, when it is set to 1%, it means that when there are 100 or more occluded images in a target video containing 10,000 target images, it is considered to be an abnormal video.

[0071] In an embodiment of the present application, the step of generating a target image set according to the target video includes:

[0072] Generate an initial image set according to the target video; the initial image set includes each frame of the initial image in the target video. Specifically, use the opencv computer vision library to read the target video, extract a number of the initial images from the target video at the minimum frame interval, and form the initial image set.

[0073] Generate a correction image set based on the initial image set; the correction image set includes correction images corresponding to each of the initial images. Specifically, geometric correction and grayscale correction are performed on each of the initial images to obtain the correction image, forming the correction image set. Image correction refers to the restoration processing of distorted images; the causes of image distortion include: image distortion caused by aberration, distortion, limited bandwidth, etc. of the imaging system, image geometric distortion caused by the shooting posture and scanning nonlinearity of the imaging device, and image distortion caused by motion blur, radiation distortion, introduced noise, etc. The actual restoration process of image correction is to design a filter so that it can calculate the estimate of the real image from the distorted image, so as to be as close to the real image as possible according to a predetermined error criterion.

[0074] The target image set is generated based on the correction image set; the target image set includes the correction images of a first preset ratio. Specifically, the correction images of a first preset ratio are randomly or sequentially extracted from the correction image set as the target images to form the target image set; the first preset ratio can be any value greater than 0 and less than or equal to 100, and can be pre-set according to the detection level. The higher the detection level, the larger the first preset ratio.

[0075] In an embodiment of the present application, the step of generating a target pixel point set corresponding to each target image according to the target image set includes:

[0076] According to the target image set, an initial pixel point set corresponding to each target image is generated; the initial pixel point set includes each initial pixel point in the target image. Specifically, a plurality of target pixel points are extracted from the target image to form the target pixel point set.

[0077] The target pixel point set is generated based on the initial pixel point set; the target pixel point set includes the initial pixel points of a second preset ratio. Specifically, the initial pixel points of a second preset ratio are randomly or sequentially extracted from the initial pixel point set as the target pixel points to form the target pixel point set; the second preset ratio can be any value greater than 0 and less than or equal to 100, and can be pre-set according to the detection level. The higher the detection level, the larger the second preset ratio.

[0078] In an embodiment of the present application, the step of determining the proportion of occluded pixels of each target image according to the target pixel set includes:

[0079] The occluded pixels are selected from each of the target pixel sets in turn. Specifically, the color value of each of the target pixel sets is calculated in turn using the QImage technology in the opencv computer vision library. When the color value of the target pixel exceeds a third preset range, the target pixel is marked as the occluded pixel. The color value may include color values ​​of multiple channels, or may be a single value formed by merging the color values ​​of multiple channels.

[0080] The occluded pixel ratio of each target image is determined according to the number of occluded pixel points in the target pixel point set corresponding to the target image and the number of target pixel points. Specifically, the occluded pixel ratio of each target image is obtained by dividing the number of occluded pixel points corresponding to the target image by the number of target pixel points corresponding thereto.

[0081] In an embodiment of the present application, the step of sequentially selecting occluded pixel points from each of the target pixel point sets includes:

[0082] The color value of each target pixel in each target pixel set is calculated in turn; specifically, the color value of each target pixel in each target pixel set is calculated in turn using the QImage technology in the opencv computer vision library.

[0083] When the color value of the target pixel exceeds the third preset range, the target pixel is set as the occluded pixel. Specifically, when the color value of the target pixel exceeds the third preset range, the target pixel is marked as the occluded pixel.

[0084] In an embodiment of the present application, the color value includes a red value, a green value, and a blue value; when the color value of the target pixel exceeds a third preset range, the step of setting the target pixel as the blocked pixel includes:

[0085] When the red value of the target pixel exceeds the fourth preset range, the green value exceeds the fifth preset range, and the blue value exceeds the sixth preset range, the target pixel is set as the occluded pixel. Specifically, the target image is an image in RGB (Red Green Blue) format; the RGB format image includes color values ​​of three channels, namely, red value, green value and blue value, wherein the color value range of each channel is (0, 255), and by specifying the color values ​​of these three channels, it is possible to determine whether the color value of the target pixel belongs to an occlusion situation. For example, when the back kitchen camera is covered by an object with strong light-shielding properties (such as a thicker cloth), its light transmittance is 0, and the RGB value is (0, 0, 0); or when the back kitchen camera is covered by an object with average light-shielding properties (such as a thinner cloth), its light transmittance is low, and the RGB value is between gray (169, 169, 169) and black (0, 0, 0).

[0086] Reference Figure 2 In one embodiment of the present application, it further includes:

[0087] S170, sending the abnormal video and the abnormal address to a supervision port. Specifically, the abnormal video and the abnormal address are stored in a preset database, and a warning message is sent to the corresponding supervisor to supervise the supervisor to rectify and correct the problem.

[0088] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0089] Reference Figure 3 , shows a detection device for occlusion behavior provided by an embodiment of the present application, including:

[0090] A target video acquisition module 210 is used to acquire a target video and a target address corresponding to the target video;

[0091] A target image generation module 220 is used to generate a target image set according to the target video; the target image set includes a plurality of target images;

[0092] A target pixel point generating module 230 is used to generate a target pixel point set corresponding to each of the target images according to the target image set; each of the target pixel point sets includes a plurality of target pixel points;

[0093] The occluded pixel ratio determination module 240 is used to determine the occluded pixel ratio of each target image according to the target pixel set;

[0094] The occluded image determining module 250 is configured to set the target image as an occluded image when the occluded pixel ratio of the target image exceeds a first preset range;

[0095] The occlusion behavior determination module 260 is used to set the target video as an abnormal video with occlusion behavior and set the target address as an abnormal address when the number of the occlusion images exceeds a second preset range.

[0096] In one embodiment of the present application, the target image generation module 220 includes:

[0097] An initial image generation submodule, used to generate an initial image set according to the target video; the initial image set includes each frame of the initial image in the target video;

[0098] A corrected image generation submodule, configured to generate a corrected image set according to the initial image set; the corrected image set includes a corrected image corresponding to each of the initial images;

[0099] The target image generation submodule is used to generate the target image set according to the corrected image set; the target image set includes the corrected images of a first preset ratio.

[0100] In an embodiment of the present application, the target pixel point generating module 230 includes:

[0101] An initial pixel point generation submodule, used to generate an initial pixel point set corresponding to each of the target images according to the target image set; the initial pixel point set includes each initial pixel point in the target image;

[0102] The target pixel point generation submodule is used to generate the target pixel point set according to the initial pixel point set; the target pixel point set includes the initial pixel points of a second preset ratio.

[0103] In an embodiment of the present application, the occluded pixel ratio determination module 240 includes:

[0104] An occluded pixel point determination submodule is used to sequentially select occluded pixel points from each of the target pixel point sets;

[0105] The occluded pixel ratio determination submodule is used to determine the occluded pixel ratio of each target image according to the number of occluded pixels in the target pixel set corresponding to the target image and the number of target pixels.

[0106] In an embodiment of the present application, the occluded pixel determination submodule includes:

[0107] A color value determination submodule, used to sequentially calculate the color value of each target pixel point in each target pixel point set;

[0108] The occluded pixel point determination submodule is used to set the target pixel point as the occluded pixel point when the color value of the target pixel point exceeds a third preset range.

[0109] In an embodiment of the present application, the color value includes a red value, a green value, and a blue value; the occluded pixel point determination submodule includes:

[0110] The multi-channel determination submodule is used to set the target pixel point as the blocked pixel point when the red value of the target pixel point exceeds a fourth preset range, the green value exceeds a fifth preset range, and the blue value exceeds a sixth preset range.

[0111] Reference Figure 4 In one embodiment of the present application, it further includes:

[0112] The blocking behavior sending module 270 sends the abnormal video and the abnormal address to the supervision port.

[0113] Reference Figure 5 , showing a computer device of a method for detecting an occlusion behavior of the present application, which may specifically include the following:

[0114] The computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 connecting different system components (including the memory 28 and the processing unit 16).

[0115] The bus 18 represents one or more of several types of bus 18 structures, including a memory bus 18 or memory controller, a peripheral bus 18, an accelerated graphics port, a processor or a local bus 18 using any of a variety of bus 18 architectures. These architectures include, by way of example, but are not limited to, an Industry Standard Architecture (ISA) bus 18, a Micro Channel Architecture (MAC) bus 18, an Enhanced ISA bus 18, an Audio Video Electronics Standards Association (VESA) local bus 18, and a Peripheral Component Interconnect (PCI) bus 18.

[0116] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0117] Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, which are configured to perform the functions of the various embodiments of the present application.

[0118] A program / utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0119] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), one or more devices that enable an operator to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through the I / O interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and / or public networks (e.g., the Internet) through a network adapter 20. Figure 5 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34, etc.

[0120] The processing unit 16 executes various functional applications and data processing by running the programs stored in the memory 28, such as implementing a method for detecting an occlusion behavior provided in an embodiment of the present application.

[0121] That is, when the processing unit 16 executes the program, it implements: obtaining a target video and a target address corresponding to the target video; generating a target image set based on the target video; the target image set includes a number of target images; generating a target pixel point set corresponding to each of the target images based on the target image set; each of the target pixel point sets includes a number of target pixels; determining the occluded pixel point ratio of each of the target images based on the target pixel point set; when the occluded pixel point ratio of the target image exceeds a first preset range, setting the target image to an occluded image; when the number of occluded images exceeds a second preset range, setting the target video to an abnormal video with occlusion behavior, and setting the target address to an abnormal address.

[0122] In one embodiment of the present application, a computer-readable storage medium is further provided, on which a computer program is stored. When the program is executed by a processor, a method for detecting occlusion behavior as provided in all embodiments of the present application is implemented.

[0123] That is, when the program is executed by the processor, it is implemented as follows: obtaining a target video and a target address corresponding to the target video; generating a target image set based on the target video; the target image set includes a number of target images; generating a target pixel point set corresponding to each of the target images based on the target image set; the target pixel point set includes a number of target pixels; determining the occluded pixel point ratio of each of the target images based on the target pixel point set; when the occluded pixel point ratio of the target image exceeds a first preset range, setting the target image to an occluded image; when the number of occluded images exceeds a second preset range, setting the target video to an abnormal video with occlusion behavior, and setting the target address to an abnormal address.

[0124] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0125] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0126] The computer program code for performing the operation of the present application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as an independent software package, partially on the operator's computer, partially on the remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the operator's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.

[0127] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0128] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0129] The above is a detailed introduction to the detection method, device, equipment and storage medium for an occlusion behavior provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for detecting occlusion behavior, used to detect the video collected by the back kitchen camera, characterized in that: include: Obtain a target video and a target address corresponding to the target video; Generate a target image set according to the target video; the target image set includes a plurality of target images; Generating a target pixel point set corresponding to each of the target images according to the target image set; Each of the target pixel point sets includes a number of target pixel points; Determine the proportion of occluded pixels of each target image based on the target pixel set, including: screening out occluded pixels from each target pixel set in turn; determining the proportion of occluded pixels of each target image based on the number of occluded pixels and the number of target pixels in the target pixel set corresponding to the target image; specifically, calculate the color value of each target pixel in each target pixel set in turn; the color value includes a red value, a green value and a blue value; when the red value of the target pixel exceeds a fourth preset range, the green value exceeds a fifth preset range, and the blue value exceeds a sixth preset range, set the target pixel as the occluded pixel; obtain the proportion of occluded pixels of each target image based on the number of occluded pixels corresponding to the target image divided by the number of target pixels corresponding thereto; When the proportion of the blocked pixels of the target image exceeds a first preset range, setting the target image as a blocked image; When the number of the occluding images exceeds a second preset range, the target video is set as an abnormal video with occluding behavior, and the target address is set as an abnormal address.

2. The detection method according to claim 1, characterized in that: The step of generating a target image set according to the target video comprises: Generate an initial image set according to the target video; the initial image set includes each frame of the initial image in the target video; Generating a correction image set according to the initial image set; the correction image set includes a correction image corresponding to each of the initial images; The target image set is generated according to the corrected image set; the target image set includes the corrected images of a first preset ratio.

3. The detection method according to claim 1, characterized in that: The step of generating a target pixel point set corresponding to each target image according to the target image set comprises: Generating an initial pixel point set corresponding to each of the target images according to the target image set; the initial pixel point set includes each initial pixel point in the target image; The target pixel point set is generated according to the initial pixel point set; the target pixel point set includes the initial pixel points in a second preset ratio.

4. The detection method according to claim 1, characterized in that: Also includes: The abnormal video and the abnormal address are sent to a supervision port.

5. A device for detecting occlusion behavior, used to detect the video collected by the back kitchen camera, characterized in that: include: A target video acquisition module, used to acquire a target video and a target address corresponding to the target video; A target image generation module, used to generate a target image set according to the target video; the target image set includes a plurality of target images; A target pixel point generating module, used for generating a target pixel point set corresponding to each of the target images according to the target image set; each of the target pixel point sets includes a plurality of target pixel points; The occluded pixel ratio determination module is used to determine the occluded pixel ratio of each target image based on the target pixel set, including: screening out occluded pixels from each target pixel set in turn; determining the occluded pixel ratio of each target image based on the number of occluded pixels and the number of target pixels in the target pixel set corresponding to the target image; specifically, calculating the color value of each target pixel in each target pixel set in turn; the color value includes a red value, a green value and a blue value; when the red value of the target pixel exceeds a fourth preset range, the green value exceeds a fifth preset range, and the blue value exceeds a sixth preset range, setting the target pixel as the occluded pixel; obtaining the occluded pixel ratio of each target image based on the number of occluded pixels corresponding to the target image divided by the number of target pixels corresponding thereto; An occluded image determining module, configured to set the target image as an occluded image when the occluded pixel ratio of the target image exceeds a first preset range; The occlusion behavior determination module is used to set the target video as an abnormal video with occlusion behavior and set the target address as an abnormal address when the number of the occlusion images exceeds a second preset range.

6. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 4 when executed by the processor.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Kitchen supervision method, device and equipment and storage medium

    CN112464818A

  • Video identification method and related equipment

    CN112752145A

  • Low-Light Camera Occlusion Detection

    US20200160562A1