WO2021254134A1 - 一种隐私遮蔽处理方法、装置、电子设备及监控系统 - Google Patents

一种隐私遮蔽处理方法、装置、电子设备及监控系统 Download PDF

Info

Publication number
WO2021254134A1
WO2021254134A1 PCT/CN2021/097376 CN2021097376W WO2021254134A1 WO 2021254134 A1 WO2021254134 A1 WO 2021254134A1 CN 2021097376 W CN2021097376 W CN 2021097376W WO 2021254134 A1 WO2021254134 A1 WO 2021254134A1
Authority
WO
WIPO (PCT)
Prior art keywords
image block
video frame
image
location area
target
Prior art date
Application number
PCT/CN2021/097376
Other languages
English (en)
French (fr)
Inventor
牛启飞
Original Assignee
杭州海康威视数字技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Priority to EP21825245.0A priority Critical patent/EP4090036B1/en
Publication of WO2021254134A1 publication Critical patent/WO2021254134A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4318Generation of visual interfaces for content selection or interaction; Content or additional data rendering by altering the content in the rendering process, e.g. blanking, blurring or masking an image region
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/454Content or additional data filtering, e.g. blocking advertisements
    • H04N21/4545Input to filtering algorithms, e.g. filtering a region of the image
    • H04N21/45455Input to filtering algorithms, e.g. filtering a region of the image applied to a region of the image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/188Capturing isolated or intermittent images triggered by the occurrence of a predetermined event, e.g. an object reaching a predetermined position

Definitions

  • This application relates to the field of monitoring technology, and in particular to a privacy masking processing method, device, electronic equipment, and monitoring system.
  • Privacy masking refers to a method of masking or obscuring areas related to personal privacy, such as faces and license plates in surveillance images, in order to protect personal privacy.
  • the main method of artificial intelligence is to detect the target of the surveillance image, detect the area of the surveillance image containing the target such as human face, license plate, etc., and perform unified privacy masking processing on the detected area .
  • the purpose of the embodiments of the present application is to provide a privacy masking processing method, device, electronic equipment, and monitoring system, so as to achieve the purpose of privacy masking processing for partially blocked targets.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides a privacy masking processing method.
  • the method includes: obtaining a video frame image to be processed; obtaining motion vector information of each image block generated during video encoding from the video frame image to be processed; The location information of each image block, where the video includes multiple video frame images, and each video frame image includes multiple pre-divided image blocks; according to the motion vector information and location information of each image block, identify whether each image block is located A moving target image block in a designated location area, where the designated location area includes: a preset location area in the video frame image where the target will be occluded; A privacy masking process.
  • the step of identifying whether each image block is a moving target image block located in a designated location area according to the motion vector information and position information of each image block includes: identifying whether each image block is Motion change occurs; for an image block that undergoes a motion change, according to the location information of the image block, identify whether the image block is located in the specified location area; for the image block located in the specified location area, if the image block is determined based on the motion vector information of the image block When the motion vector of the image block reaches the preset threshold, it is determined that the image block is a moving target image block located in the designated location area.
  • the method further includes: for any image block, if the image block does not have a motion change, then maintaining the image The display content of the block remains unchanged; after the step of identifying whether the image block is located in the designated location area according to the position information of the image block that has undergone a motion change, the method further includes: if the image block is not located in the designated location Area, the display content of the image block remains unchanged; if the image block is located in the designated location area, and the motion vector information of the image block determines that the motion vector of the image block does not reach the preset threshold, then the image block’s display content is maintained The display content remains unchanged.
  • the designated location area further includes: a location area in the video frame image where the target will not be occluded; the step of performing the first privacy masking process on the moving target image block located in the specified location area in the video frame image to be processed includes: The first privacy masking process is performed on the moving target image blocks in the position area where the target will be occluded and the position area where the target will not be occluded in the video frame image to be processed.
  • the method further includes: inputting the video frame image to be processed in advance
  • the trained target detection model detects the target area in the video frame image to be processed; performs the second privacy masking process on the target area in the video frame image to be processed; or, the moving target located in the designated location area in the video frame image to be processed
  • the method further includes: inputting the pre-trained target detection model to the to-be-processed video frame image after the first privacy masking process is completed, and detecting the target in the to-be-processed video image Area; the target area in the video frame image to be processed is subjected to the second privacy masking process.
  • the preset position area in the video frame image where the target will be occluded is: a preset edge area of the video frame image; and/or, a fixed reference object in the preset video frame image Edge area.
  • an embodiment of the present application provides a privacy masking processing device, which includes: an acquisition module for acquiring a video frame image to be processed; from the video frame image to be processed, each image block generated during video encoding is acquired The motion vector information of each image block and the position information of each image block.
  • the video includes multiple video frame images, and each video frame image includes multiple pre-divided image blocks; the recognition module is used to identify the motion vector information of each image block and Location information, identifying whether each image block is a moving target image block located in a designated location area, where the designated location area includes: a preset location area in the video frame image where the target will be occluded; a processing module for processing The moving target image block located in the designated location area in the video frame image undergoes the first privacy masking process.
  • the recognition module is specifically used to identify whether each image block has a motion change according to the motion vector information of each image block; for the image block that has a motion change, according to the position information of the image block, identify whether the image block is located Designated location area; for an image block located in the designated location area, if the motion vector of the image block is determined to reach a preset threshold according to the motion vector information of the image block, the image block is determined to be a moving target image block located in the specified location area.
  • the recognition module is also used for any image block, if the image block does not change in motion, keep the display content of the image block unchanged; for any image block, if the image block changes in motion, And the image block is not located in the designated location area, the display content of the image block remains unchanged; for any image block, if the image block changes in motion, the image block is located in the designated location area, and according to the motion of the image block
  • the vector information determines that the motion vector of the image block has not reached the preset threshold, and the display content of the image block is kept unchanged.
  • the designated location area also includes: the location area in the video frame image where the target will not be occluded; the processing module is specifically used to locate the location area where the target will be occluded and the location in the video frame image to be processed.
  • the moving target image block in the location area where the target is occluded is subjected to the first privacy masking process.
  • the device further includes: a detection module for inputting the to-be-processed video frame image into a pre-trained target detection model to detect the target area in the to-be-processed video frame image; or, the first privacy masking process will be completed
  • the subsequent video frame image to be processed is input to the pre-trained target detection model to detect the target area in the video image to be processed; the processing module is also used to perform the second privacy masking process on the target area in the video frame image to be processed.
  • the preset position area in the video frame image where the target will be occluded is: a preset edge area of the video frame image; and/or, a fixed reference object in the preset video frame image Edge area.
  • an embodiment of the present application provides an electronic device, including a processor and a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is executed by the machine-executable instructions Prompt: to implement the method provided in the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a machine-readable storage medium that stores machine-executable instructions that, when called and executed by a processor, implement the method provided in the first aspect of the embodiments of the present application.
  • the embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the method provided in the first aspect of the embodiments of the present application.
  • the embodiments of the present application provide a monitoring system that includes multiple monitoring devices and servers; multiple monitoring devices are used to collect video, encode the video, and send the encoded video to the server ; Server, used to receive the video sent by multiple monitoring equipment, to obtain the video frame image to be processed in the video, from the video frame image to be processed, to obtain the motion vector information of each image block generated during video encoding and the information of each image block Location information, where the video includes multiple video frame images, and each video frame image includes multiple pre-divided image blocks; according to the motion vector information and location information of each image block, identify whether each image block is a motion at a specified position
  • the target image block, where the designated location area includes: a preset location area in the video frame image where the target will be occluded; the moving target image block located in the specified location area in the video frame image to be processed is subjected to the first privacy masking process; Display the to-be-processed video frame images after privacy masking processing.
  • the embodiments of the present application provide a privacy masking processing method, device, electronic equipment, and monitoring system, wherein the privacy masking processing method includes: obtaining a video frame image to be processed, and obtaining a video frame image generated during video encoding from the video frame image to be processed
  • the motion vector information of each image block and the position information of each image block identify whether each image block is a moving target image block located in the designated location area, and the video frame image to be processed is located
  • the moving target image block in the designated location area undergoes the first privacy masking process.
  • each video frame image in the video is divided into multiple image blocks, and the motion vector information and position information of each image block are generated.
  • the motion vector information of an image block indicates that the image block is encoding
  • the position offset in the reference video frame image as the above-mentioned reference video frame image can be the adjacent previous video frame image
  • FIG. 1 is a schematic flowchart of a privacy masking processing method provided by an embodiment of this application
  • FIG. 2 is a schematic diagram of another flow chart of a privacy masking processing method provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of still another flow chart of the privacy masking processing method provided by an embodiment of this application.
  • FIG. 4 is a schematic flow chart of performing privacy masking processing on moving targets in the edge area of a video frame image provided by an embodiment of the application;
  • Figure 5 is an example of a video frame image
  • FIG. 6 is a schematic flowchart of a privacy masking process for a moving target located in the edge area of a fixed reference object provided by an embodiment of the application;
  • Figure 7 is another example of a video frame image
  • FIG. 8 is a schematic structural diagram of a privacy masking processing device provided by an embodiment of the application.
  • FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • Fig. 10 is a schematic structural diagram of a monitoring system provided by an embodiment of the application.
  • multiple monitoring points are arranged (one monitoring point is provided with one camera), and these monitoring points are usually arranged in different corners of the scene, which can realize the monitoring of the same scene without blind spots.
  • the monitoring screen in the scene can be displayed to the public.
  • the people in the screen The facial features cannot be shown to the public, and the sensitive areas in the screen cannot be shown to the public. People and sensitive locations in the monitoring points need to be protected for privacy.
  • embodiments of the present application provide a privacy masking processing method, device, electronic equipment, and monitoring system.
  • the privacy masking processing method provided by the embodiment of the present application is first introduced. This method is applied to electronic equipment.
  • the electronic equipment can be a monitoring device (such as the above-mentioned camera) or a server used for image processing in the background, which is not specifically limited here.
  • the privacy masking processing method provided in the embodiments of the present application can be implemented by at least one of software, hardware circuit, and logic circuit provided in an electronic device.
  • a flow of the privacy masking processing method provided by the embodiment of the present application may include the following steps.
  • S101 Acquire a video frame image to be processed.
  • each image block According to the motion vector information and location information of each image block, identify whether each image block is a moving target image block located in a designated location area, where the designated location area includes: a preset target in the video frame image that will occur occlusion Location area.
  • S104 Perform a first privacy masking process on a moving target image block located in a designated location area in the video frame image to be processed.
  • the motion vector information of an image block indicates that the image block is encoding
  • the position offset in the reference video frame image as the above-mentioned reference video frame image can be the adjacent previous video frame image
  • the surveillance equipment After the surveillance equipment collects the video, it will encode the video.
  • the encoding used is generally H264, H265 and other encoding standards. These encoding standards all use motion estimation as an important part of the video compression process, and predictive encoding between frames Since the moving objects in the two video frame images have a certain correlation, generally for scenes containing multiple moving objects, the commonly used method is to divide a video frame image into multiple image blocks, so that each The motion of the image block can be well characterized by a parameterized model. After dividing a video frame image into multiple image blocks, the position of each image block in the reference video frame image is searched out, and the relative offset between the two positions is obtained. The relative offset obtained is the motion vector .
  • the video frame image to be processed is a video frame image in the encoded video.
  • the video frame image to be processed carries the motion vector of each image block compared to the reference video frame image and the position information of each image block. Therefore, you can The motion vector information of each image block and the position information of each image block generated during video encoding are obtained from the video frame image to be processed.
  • the motion vector information and position information of each image block can also be transmitted together with the video in the form of encoding information, and the video frame image to be processed can be obtained from the encoding information accordingly.
  • the motion vector information of each image block and the position information of each image block can be obtained from the encoding information accordingly.
  • the motion vector information characterizes whether the image block is moving, and the position information indicates the specific position of the image block in the video frame image. Therefore, according to the motion vector information and position information of each image block, it is possible to identify whether each image block is located
  • the moving target image block in the specified location area includes: the location area in the video frame image where the target will be occluded, such as the edge area of the video frame image, the area near a large obstacle, and so on.
  • the preset position area in the video frame image where the target will be occluded is: a preset edge area of the video frame image; and/or, a fixed reference object in the preset video frame image Edge area.
  • the fixed reference objects mentioned here can be large obstacles, buildings, plants, etc., and the edge area is the area near the outer contour.
  • each image block is a moving target image block located in a designated location area.
  • the recognition of whether each image block is a moving target image block located in a designated location area is realized by determining whether the image block is a moving target image block according to the motion vector information, and determining whether the image block is located in the designated location area according to the position information. These judgments can be executed at the same time or in a sequential order, and there is no specific limitation here.
  • S103 may be specifically implemented through the following steps:
  • the first step is to identify whether each image block has a motion change according to the motion vector information of each image block.
  • the second step is to identify whether the image block is located in the designated location area according to the location information of the image block that has undergone a motion change.
  • the image block located in the designated location area if it is determined that the motion vector of the image block reaches the preset threshold according to the motion vector information of the image block, then the image block is determined to be a moving target image block located in the specified location area.
  • the identification of whether each image block is a moving target image block located in a designated location area is performed sequentially, that is, first, according to the motion vector information of each image block, identify whether each image block is When a motion change occurs, the specific way to identify whether each image block has a motion change is to determine whether the motion vector of the same image block in the reference video frame image is equal to 0. If it is not equal to 0, it means that the image block has a motion change, or, It can also be used to determine whether the motion vector of the same image block in the reference video frame image is less than a minimal threshold.
  • the threshold it means that the image block has undergone a motion change; if an image block has a motion change, it is based on the The position information of the image block is used to identify whether the image block is located in the designated location area; if an image block is located in the designated location area, it is determined whether the motion vector of the image block reaches the preset threshold (greater than the above minimum threshold), and if it reaches the preset threshold Set a threshold, that is, if the motion distance calculated according to the components of the motion vector in different directions reaches the preset threshold, it means that the image block belongs to the moving target. It can be determined that the image block is the moving target image block located in the specified location area. Setting a threshold means that the image block does not belong to the moving target, it may be misdetected and cannot be used as the moving target image block.
  • the motion vector information determines that the motion vector of the image block does not reach the preset threshold, and the display content of the image block is kept unchanged.
  • the traditional privacy masking processing method can be used to process this type of image block, or the traditional privacy masking can be used before The processing method has processed this type of image block, so the display content of the image block can be kept unchanged, and there is no need to perform privacy masking processing on the image block; if it is recognized that an image block has a motion change, the image block is located in the designated Location area, but the motion vector does not reach the preset threshold, it means that the image block is a falsely detected moving target image block, not a real moving target image block, and the display content of the image block needs to be kept unchanged.
  • the image block is processed for privacy masking.
  • the first privacy masking process can be any of privacy masking processing methods such as occlusion and blurring.
  • the purpose of privacy masking for partially obscured targets can be determined, and adjacent image blocks form a target frame.
  • the target frame can be subjected to overall privacy masking processing.
  • the designated location area may also include: a location area in the video frame image where the target will not be occluded, and S104 may specifically be: the location in the video frame image to be processed where the target is likely to be occluded
  • the occluded location area and the moving target image block in the location area where the target will not be occluded are subjected to the first privacy masking process.
  • the video frame image has not been subjected to any privacy masking processing before, and if it is recognized that an image block is a moving target image block that is not located in the designated location area, that is, the image block belongs to the moving target , But not located in the designated location area, you can also perform privacy masking processing on the image block to achieve the purpose of privacy masking processing for all moving targets in the video frame image.
  • the privacy masking processing method provided by the embodiment of the application does not need to perform target detection, but based on the acquired motion vector information of each image block and the information of each image block. Location information, identify moving target image blocks located in the designated location area, and perform privacy masking processing on these image blocks. It can be seen that the embodiments of the present application can use less processing resources to realize privacy masking processing for partially masked targets.
  • another process of the privacy masking processing method provided by the embodiment of the present application may include the following steps.
  • S202 Input the to-be-processed video frame image into a pre-trained target detection model, and detect the target area in the to-be-processed video frame image.
  • S203 Perform a second privacy masking process on the target area in the video frame image to be processed.
  • S204 Obtain the motion vector information of each image block and the position information of each image block generated during video encoding from the video frame image to be processed, where the video includes multiple video frame images, and each video frame image includes multiple pre- The divided image block.
  • S205 According to the motion vector information and position information of each image block, identify whether each image block is a moving target image block located in a designated location area, where the designated location area includes: a preset target in the video frame image that will occur when the target is blocked Location area.
  • S206 Perform a first privacy masking process on the moving target image block located in the designated location area in the video frame image to be processed.
  • artificial intelligence may be used to detect the target of the video frame image to be processed, and perform the second privacy masking process on the detected target area; and then according to the motion vector of each image block The information and the location information of each image block are subjected to the first privacy masking process for the moving target image block located in the designated location area in the video frame image to be processed.
  • the specific artificial intelligence method is: input the to-be-processed video frame image into a pre-trained target detection model, and detect the target area in the to-be-processed video frame image.
  • the target detection model is pre-trained based on the sample image, and has target detection.
  • the function of the target detection model can be a network model based on deep learning, and a traditional deep learning model can be used.
  • the specific training process can use the traditional back propagation method, which will not be repeated here.
  • the target If the target appears on the edge of the video frame image, or the target is blocked by an obstacle 2/3, the remaining 1/3 appears in the video frame image, etc., and the privacy masking process using artificial intelligence must be complete
  • the target can only be detected when the target appears in the video frame image. At this time, the target cannot be detected, that is, the privacy masking process of the occluded target cannot be realized.
  • the method shown in FIG. The moving target image block located in the designated location area is subjected to the first privacy masking process, where the first privacy masking process and the second privacy masking process are any one of privacy masking processing methods such as occlusion and blurring, which can be the same. It can also be different. In this way, it not only ensures that the target in the general position in the video frame image is processed by privacy masking, but also ensures that the moving target in the designated location area is processed by privacy masking.
  • another process of the privacy masking processing method provided by the embodiment of the present application, as shown in FIG. 3, may include the following steps.
  • S301 Acquire a video frame image to be processed.
  • S302 Obtain the motion vector information of each image block and the position information of each image block generated during video encoding from the video frame image to be processed, where the video includes multiple video frame images, and each video frame image includes multiple preset images.
  • the divided image block is Obtain the motion vector information of each image block and the position information of each image block generated during video encoding from the video frame image to be processed, where the video includes multiple video frame images, and each video frame image includes multiple preset images. The divided image block.
  • S303 According to the motion vector information and location information of each image block, identify whether each image block is a moving target image block located in a designated location area, where the designated location area includes: a preset target in the video frame image that will occur Location area.
  • S304 Perform a first privacy masking process on a moving target image block located in a designated location area in the video frame image to be processed.
  • S305 Input the pre-trained target detection model to the to-be-processed video frame image after the first privacy masking process is completed, and detect the target area in the to-be-processed video image.
  • S306 Perform a second privacy masking process on the target area in the video frame image to be processed.
  • the method shown in FIG. 1 may be used to identify the moving target image block located in the designated location area, and the recognized moving target image block located in the designated location area may be subjected to the first A privacy masking process. Then, using artificial intelligence, target detection is performed on the to-be-processed video frame image that has completed the first privacy masking process, and the second privacy masking process is performed on the detected target area. In this way, it not only ensures that the target in the general position in the video frame image is processed by privacy masking, but also ensures that the moving target in the designated location area is processed by privacy masking.
  • the designated location area may be an edge area of a video frame image.
  • FIG. 4 the flow of privacy masking processing for moving targets in the edge area of the video frame image is shown in Figure 4, and includes the following steps:
  • S402 Determine whether the image block generates a motion vector; if yes, perform S403; if not, perform S405.
  • the motion vector information and position information of each image block in the video frame image to be processed can be obtained first; according to the motion vector information of each image block, it is determined whether a motion vector is generated, that is, whether the image block has a motion change.
  • S403 Determine whether the image block is at the edge of the screen; if yes, execute S404; if not, execute S405.
  • this step when a motion vector is generated, it is determined whether the image block is at the edge of the screen according to the position information of each image block; that is, it is determined whether the image block is located in the edge area of the video frame image.
  • this step when the image block is at the edge of the picture, it is determined whether the motion vector meets the requirement according to the motion vector information of the image block. Specifically, it can be determined whether the motion vector of the image block reaches a preset threshold.
  • S406 Perform privacy masking processing on the corresponding target.
  • the privacy masking process is performed on the corresponding target, that is, the image block that generates the motion vector, is at the edge of the screen and the motion vector meets the requirements Perform privacy masking processing.
  • the image block can be divided according to the change of the pixel point, and the similar pixels are divided into the same image block, and the position information of each image block is obtained.
  • the video frame image The display range can be determined.
  • the distance between the image block and the edge of the video frame image can be determined according to the position information of the image block. If the distance is less than a certain threshold, it can be determined that the image block is at the edge of the screen.
  • the distance between image block 1 and the edge of the video frame is less than the threshold, and the distance between image block 2 and the edge of the video frame is greater than the threshold, it can be determined that image block 1 is at the edge of the screen, and image block 2 is not at the edge of the screen.
  • the designated location area may be the edge area of the fixed reference object in the video frame image.
  • Fig. 6 the flow of privacy masking processing for the moving target in the edge area of the fixed reference object is shown in Fig. 6, and includes the following steps:
  • S601 Encode a video frame image.
  • S602 Determine whether the image block generates a motion vector; if yes, perform S603; if not, perform S605.
  • the motion vector information and position information of each image block in the video frame image to be processed can be obtained first; according to the motion vector information of each image block, it is determined whether a motion vector is generated, that is, whether the image block has a motion change.
  • S603 Determine whether the image block is in the edge area of the fixed reference object; if so, perform S604; if not, perform S605.
  • S604 Determine whether the motion vector meets the requirement; if so, perform S606; if not, perform S605.
  • this step when the image block is in the edge area of the fixed reference object, it is determined whether the motion vector meets the requirement according to the motion vector information of the image block. Specifically, it can be determined whether the motion vector of the image block reaches a preset threshold.
  • S606 Perform privacy masking processing on the corresponding target.
  • the privacy masking process is performed on the corresponding target, that is, the motion vector is generated, the image block is in the edge area of the fixed reference object and the motion vector meets the requirements.
  • the image blocks whose vectors meet the requirements are subjected to privacy masking processing.
  • the image block can be divided according to the change of the pixel point, and the similar pixels can be divided into the same image block, or the image block can be divided based on the image block cutting strategy defined in the coding standards such as H264, H265; acquisition;
  • the image block cutting strategy defined in the coding standards such as H264, H265; acquisition;
  • To the location information of each image block there are some fixed reference objects (such as buildings, large obstacles, trees, etc.) in the actual scene. These fixed reference objects have outer contours, and the position information of the outer contours of the fixed reference objects can be obtained.
  • the distance between the image block and the outer contour of the fixed reference object can be determined according to the position information of the image block. If the distance is less than a certain threshold, it can be determined that the image block is in the edge area of the fixed reference object.
  • the distance between the image block 3 and the outer contour of the fixed reference object X is less than the threshold, and the distance between the image block 4 and the outer contour of the fixed reference object X is greater than the threshold, it can be determined that the image block 3 is in the edge area of the fixed reference object, and The image block 4 is not in the edge area of the fixed reference object.
  • an embodiment of the present application provides a privacy masking processing device.
  • the device may include:
  • the obtaining module 810 is used to obtain the video frame image to be processed; from the video frame image to be processed, the motion vector information of each image block and the position information of each image block generated during video encoding are obtained, where the video includes multiple video frames Image, each video frame image includes a plurality of pre-divided image blocks;
  • the identification module 820 is used to identify whether each image block is a moving target image block located in a designated location area according to the motion vector information and location information of each image block, where the designated location area includes: a preset meeting in the video frame image The location area where the target is occluded;
  • the processing module 830 is configured to perform the first privacy masking process on the moving target image block located in the designated location area in the video frame image to be processed.
  • the identification module 820 can be specifically used for:
  • each image block According to the motion vector information of each image block, identify whether each image block has a motion change
  • the location information of the image block For the image block undergoing motion changes, according to the location information of the image block, identify whether the image block is located in the designated location area;
  • the image block For an image block located in the designated location area, if it is determined according to the motion vector information of the image block that the motion vector of the image block reaches a preset threshold, the image block is determined to be a moving target image block located in the specified location area.
  • the identification module 820 can also be used for:
  • any image block if the image block has a motion change and the image block is not located in the designated location area, keep the display content of the image block unchanged;
  • the image block For any image block, if the image block changes in motion, the image block is located in the designated location area, and the motion vector information of the image block determines that the motion vector of the image block does not reach the preset threshold, the image block’s The display content remains unchanged.
  • the designated location area may also include: a location area in the video frame image where the target will not be occluded;
  • the processing module 830 may be specifically configured to perform the first privacy masking process on the moving target image blocks located in the location area where the target is occluded and the location area where the target will not be occluded in the video frame image to be processed.
  • the device may further include: a detection module for inputting the to-be-processed video frame image into a pre-trained target detection model to detect the target area in the to-be-processed video frame image; or, the first privacy mask will be completed
  • the processed video frame image to be processed is input to the pre-trained target detection model to detect the target area in the video image to be processed;
  • the processing module 830 may also be used to perform a second privacy masking process on the target area in the video frame image to be processed.
  • the preset location area in the video frame image where the target will be occluded may be: a preset edge area of the video frame image; and/or a fixed reference object in the preset video frame image The edge area.
  • the motion vector information of an image block indicates that the image block is encoding
  • the position offset in the reference video frame image as the above-mentioned reference video frame image can be the adjacent previous video frame image
  • the embodiment of the present application also provides an electronic device. As shown in FIG. 9, it includes a processor 901 and a machine-readable storage medium 902.
  • the machine-readable storage medium 902 stores machine executable instructions that can be executed by the processor 901.
  • the processor 901 is prompted by machine executable instructions to implement the privacy masking processing method provided by any of the foregoing embodiments.
  • the above-mentioned machine-readable storage medium may include RAM (Random Access Memory, random access memory), and may also include NVM (Non-Volatile Memory, non-volatile memory), such as at least one disk storage.
  • NVM Non-Volatile Memory, non-volatile memory
  • the machine-readable storage medium may also be at least one storage device located far away from the foregoing processor.
  • the above-mentioned processor may be a general-purpose processor, including CPU (Central Processing Unit), NP (Network Processor, network processor), etc.; it may also be DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array, Field Programmable Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor, network processor
  • DSP Digital Signal Processing, digital signal processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array, Field Programmable Gate Array
  • other programmable logic devices discrete gates or transistor logic devices, discrete hardware components.
  • the machine-readable storage medium 902 and the processor 901 may perform data transmission through a wired connection or a wireless connection, and the electronic device may communicate with other devices through a wired communication interface or a wireless communication interface. What is shown in FIG. 9 is only an example of data transmission between the processor 901 and the machine-readable storage medium 902 through a bus, and is not intended to limit the specific connection manner.
  • the electronic device obtains the video frame image to be processed, and obtains the motion vector information of each image block generated during video encoding and the position information of each image block from the video frame image to be processed, according to the motion of each image block
  • Vector information and location information are used to identify whether each image block is a moving target image block located in a specified location area, and the moving target image block located in the specified location area in the video frame image to be processed is subjected to the first privacy masking process.
  • each video frame image in the video is divided into multiple image blocks, and the motion vector information and position information of each image block are generated.
  • the motion vector information of an image block indicates that the image block is encoding
  • the position offset in the reference video frame image as the above-mentioned reference video frame image can be the adjacent previous video frame image
  • An embodiment of the present application also provides a machine-readable storage medium that stores machine-executable instructions, which when called and executed by a processor, implement the privacy masking processing method provided by any of the foregoing embodiments.
  • a computer program product containing instructions is also provided, which when running on a computer, causes the computer to execute the privacy masking processing method provided by any of the foregoing embodiments.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD (Digital Versatile Disc, digital versatile disc)), or a semiconductor medium (such as an SSD (Solid State Disk, solid state hard disk)), etc. .
  • the embodiment of the present application also provides a monitoring system.
  • the monitoring system includes a plurality of monitoring devices 1001 and a server 1002;
  • Multiple monitoring devices 1001 are used to collect video, encode the video, and send the encoded video to the server 1002;
  • the server 1002 is configured to receive videos sent by multiple monitoring devices 1001, obtain the to-be-processed video frame images in the video, and obtain the motion vector information of each image block generated during video encoding and each image block from the to-be-processed video frame image Location information, where the video includes multiple video frame images, and each video frame image includes multiple pre-divided image blocks; according to the motion vector information and location information of each image block, identify whether each image block is located at a specified position
  • the moving target image block, where the designated location area includes: the preset location area in the video frame image where the target will be blocked; the moving target image block located in the specified location area in the video frame image to be processed undergoes the first privacy masking process ; Display the to-be-processed video frame image after privacy masking processing.
  • multiple monitoring devices collect video, encode the video, and send the encoded video to the server.
  • the server receives the video sent by the multiple monitoring devices, obtains the to-be-processed video frame images in the video, and obtains the video from the In processing video frame images, obtain the motion vector information of each image block generated during video encoding and the position information of each image block, and identify whether each image block is located in the designated location area according to the motion vector information and position information of each image block
  • the moving target image block performs the first privacy masking process on the moving target image block located in the designated location area in the video frame image to be processed.
  • each video frame image in the video is divided into multiple image blocks, and the motion vector information and position information of each image block are generated.
  • the motion vector information of an image block indicates that the image block is encoding
  • the position offset in the reference video frame image as the above-mentioned reference video frame image can be the adjacent previous video frame image
  • the monitoring system in the embodiment of the present application may be a device or a distributed system, that is, multiple monitoring devices and servers may be different components in a device, or may be separated devices arranged in a distributed manner, which is not specifically limited here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Analysis (AREA)

Abstract

本申请公开了一种隐私遮蔽处理方法、装置、电子设备及监控系统,获取待处理视频帧图像,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,对位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。若一个图像块是位于指定位置区域的运动目标图像块,则说明该图像块出现在视频帧图像中会发生目标被遮挡的位置,且该图像块属于运动目标,因此,通过对位于指定位置区域的运动目标图像块进行隐私遮蔽处理,实现了对部分被遮挡的目标进行隐私遮蔽处理的目的。

Description

一种隐私遮蔽处理方法、装置、电子设备及监控系统
本申请要求于2020年06月19日提交中国专利局、申请号为202010568351.8发明名称为“一种隐私遮蔽处理方法、装置、电子设备及监控系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及监控技术领域,尤其涉及一种隐私遮蔽处理方法、装置、电子设备及监控系统。
背景技术
随着公众对隐私保护的日益重视,隐私遮蔽在视频监控领域中的应用越来越广泛。隐私遮蔽是指为了保护个人隐私,对监控图像中的人脸、车牌等涉及个人隐私的区域进行遮挡或者模糊化处理的方法。
在当前的隐私遮蔽处理方法中,主要是通过人工智能的方式,对监控图像进行目标检测,检测出监控图像中包含人脸、车牌等目标的区域,对检测出的区域进行统一的隐私遮蔽处理。
然而,在利用人工智能的方式进行目标检测时,要求监控图像中出现的必须是完整的目标,如果发生目标部分被遮挡的情况,则无法准确检测出该目标,也就无法对这一类目标进行隐私遮蔽处理。
发明内容
本申请实施例的目的在于提供一种隐私遮蔽处理方法、装置、电子设备及监控系统,以实现对部分被遮挡的目标进行隐私遮蔽处理的目的。具体技术方案如下:
第一方面,本申请实施例提供了一种隐私遮蔽处理方法,该方法包括:获取待处理视频帧图像;从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,其中,视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块;根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,其中,指定位置区域包括:视频帧图像中预先设定的会发生目标被遮 挡的位置区域;对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。
可选的,根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块的步骤,包括:根据各图像块的运动矢量信息,识别各图像块是否发生运动变化;针对发生运动变化的图像块,根据该图像块的位置信息,识别该图像块是否位于指定位置区域;针对位于指定位置区域的图像块,若根据该图像块的运动矢量信息确定该图像块的运动矢量达到预设阈值,则确定该图像块为位于指定位置区域的运动目标图像块。
可选的,在根据各图像块的运动矢量信息,识别各图像块是否发生运动变化的步骤之后,该方法还包括:针对任一图像块,若该图像块未发生运动变化,则保持该图像块的显示内容不变;在针对发生运动变化的图像块,根据该图像块的位置信息,识别该图像块是否位于指定位置区域的步骤之后,该方法还包括:若该图像块不位于指定位置区域,则保持该图像块的显示内容不变;若该图像块位于指定位置区域,且根据该图像块的运动矢量信息确定该图像块的运动矢量未达到预设阈值,则保持该图像块的显示内容不变。
可选的,指定位置区域还包括:视频帧图像中不会发生目标被遮挡的位置区域;对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理的步骤,包括:对待处理视频帧图像中位于会发生目标被遮挡的位置区域和位于不会发生目标被遮挡的位置区域的运动目标图像块进行第一隐私遮蔽处理。
可选的,在从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息的步骤之前,该方法还包括:将待处理视频帧图像输入预先训练的目标检测模型,检测出待处理视频帧图像中的目标区域;对待处理视频帧图像中的目标区域进行第二隐私遮蔽处理;或者,在对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理的步骤之后,该方法还包括:将完成了第一隐私遮蔽处理后的待处理视频帧图像,输入预先训练的目标检测模型,检测出待处理视频图像中的目标区域;对待处理视频帧图像中的目标区域进行第二隐私遮蔽处理。
可选的,视频帧图像中预先设定的会发生目标被遮挡的位置区域,为:预先设定的视频帧图像的边缘区域;和/或,预先设定的视频帧图像中固定参 考物的边缘区域。
第二方面,本申请实施例提供了一种隐私遮蔽处理装置,该装置包括:获取模块,用于获取待处理视频帧图像;从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,其中,视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块;识别模块,用于根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,其中,指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域;处理模块,用于对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。
可选的,识别模块,具体用于根据各图像块的运动矢量信息,识别各图像块是否发生运动变化;针对发生运动变化的图像块,根据该图像块的位置信息,识别该图像块是否位于指定位置区域;针对位于指定位置区域的图像块,若根据该图像块的运动矢量信息确定该图像块的运动矢量达到预设阈值,则确定该图像块为位于指定位置区域的运动目标图像块。
可选的,识别模块,还用于针对任一图像块,若该图像块未发生运动变化,则保持该图像块的显示内容不变;针对任一图像块,若该图像块发生运动变化、且该图像块不位于指定位置区域,则保持该图像块的显示内容不变;针对任一图像块,若该图像块发生运动变化、该图像块位于指定位置区域,且根据该图像块的运动矢量信息确定该图像块的运动矢量未达到预设阈值,则保持该图像块的显示内容不变。
可选的,指定位置区域还包括:视频帧图像中不会发生目标被遮挡的位置区域;处理模块,具体用于对待处理视频帧图像中位于会发生目标被遮挡的位置区域和位于不会发生目标被遮挡的位置区域的运动目标图像块进行第一隐私遮蔽处理。
可选的,该装置还包括:检测模块,用于将待处理视频帧图像输入预先训练的目标检测模型,检测出待处理视频帧图像中的目标区域;或者,将完成了第一隐私遮蔽处理后的待处理视频帧图像,输入预先训练的目标检测模型,检测出待处理视频图像中的目标区域;处理模块,还用于对待处理视频帧图像中的目标区域进行第二隐私遮蔽处理。
可选的,视频帧图像中预先设定的会发生目标被遮挡的位置区域,为:预先设定的视频帧图像的边缘区域;和/或,预先设定的视频帧图像中固定参 考物的边缘区域。
第三方面,本申请实施例提供了一种电子设备,包括处理器和机器可读存储介质,机器可读存储介质存储有能够被处理器执行的机器可执行指令,处理器被机器可执行指令促使:实现本申请实施例第一方面所提供的方法。
第四方面,本申请实施例提供了一种机器可读存储介质,存储有机器可执行指令,在被处理器调用和执行时,实现本申请实施例第一方面所提供的方法。
第五方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行本申请实施例第一方面所提供的方法。
第六方面,本申请实施例提供了一种监控系统,该监控系统包括多个监控设备和服务器;多个监控设备,用于采集视频,对视频进行编码,并将编码后的视频发送至服务器;服务器,用于接收多个监控设备发送的视频,获取视频中的待处理视频帧图像,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,其中,视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块;根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置的运动目标图像块,其中,指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域;对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理;展示隐私遮蔽处理后的待处理视频帧图像。
本申请实施例提供了一种隐私遮蔽处理方法、装置、电子设备及监控系统,其中,隐私遮蔽处理方法包括:获取待处理视频帧图像,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。在对视频进行编码时,会将视频中每个视频帧图像划分成多个图像块,并生成各图像块的运动矢量信息和位置信息,一个图像块的运动矢量信息表征了该图像块在编码时所采用参考视频帧图像中的位置偏移,如上述参考视频帧图像可以是邻近的前一个视频帧图像,根据一个图像块的运动矢量信息和位置信息,能够确定出该图像块是否为位于指定位置区域的运动目标图像块,若一个图像块是位于指定位置区域的运动目标图像块,则说明该图像块出现在图像中会发生目标被遮挡 的位置区域,且该图像块属于运动目标,因此,通过对位于指定位置区域的运动目标图像块进行隐私遮蔽处理,实现了对部分被遮挡的目标进行隐私遮蔽处理的目的。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的隐私遮蔽处理方法的一种流程示意图;
图2为本申请实施例提供的隐私遮蔽处理方法的另一种流程示意图;
图3为本申请实施例提供的隐私遮蔽处理方法的再一种流程示意图;
图4为本申请实施例提供的对处于视频帧图像边缘区域的运动目标进行隐私遮蔽处理的流程示意图;
图5为一视频帧图像示例;
图6为本申请实施例提供的对处于固定参考物边缘区域的运动目标进行隐私遮蔽处理的流程示意图;
图7为另一视频帧图像示例;
图8为本申请实施例提供的隐私遮蔽处理装置的结构示意图;
图9为本申请实施例提供的电子设备的结构示意图;
图10为本申请实施例提供的监控系统的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本申请实施例的一种场景下,布置有多个监控点(一个监控点设置一台摄像机),这些监控点通常布置在场景中的不同角落,可以实现同一场景无死角的监控。通过将这些监控点接入到后台用于图像处理的电子设备,利用 与该电子设备配套的客户端,能够把场景中的监控画面向公众进行展示,出于对人的隐私保护,画面中人员的脸部特征是不能向公众展示的,画面中的敏感区域也是不能向公众展示的,需要对监控点里出现的人员以及敏感位置进行隐私遮蔽保护。
对于向公众实时展示,但是画面边缘或者被障碍物遮挡一部分目标需要隐私遮蔽的场景,例如大型超市等画面大且人流量大的场景,画面边缘或者被货物架遮挡的地方,会出现售卖员或者顾客只有半个身位在画面中的情况,由于没有完整的人体目标,使用人工智能的方式进行人体目标检测时,无法检测出相应的人体目标,因此,无法实现画面边缘或被障碍物遮挡一部分目标的隐私遮蔽。
为了实现对部分被遮挡的目标进行隐私遮蔽处理的目的,本申请实施例提供了一种隐私遮蔽处理方法、装置、电子设备及监控系统。下面,首先对本申请实施例提供的隐私遮蔽处理方法进行介绍。该方法应用于电子设备,电子设备可以是监控设备(如上述摄像机),也可以是后台用于图像处理的服务器,这里不做具体限定。本申请实施例所提供的隐私遮蔽处理方法可以被设置于电子设备中的软件、硬件电路和逻辑电路中的至少一种实现。
如图1所示,本申请实施例所提供的隐私遮蔽处理方法的一种流程,可以包括如下步骤。
S101,获取待处理视频帧图像。
S102,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,其中,视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块。
S103,根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,其中,指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域。
S104,对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。
应用本申请实施例,获取待处理视频帧图像,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,对待处理视频帧图像中位于指定位置区域的运动 目标图像块进行第一隐私遮蔽处理。在对视频进行编码时,会将视频中每个视频帧图像划分成多个图像块,并生成各图像块的运动矢量信息和位置信息,一个图像块的运动矢量信息表征了该图像块在编码时所采用参考视频帧图像中的位置偏移,如上述参考视频帧图像可以是邻近的前一个视频帧图像,根据一个图像块的运动矢量信息和位置信息,能够确定出该图像块是否为位于指定位置区域的运动目标图像块,若一个图像块是位于指定位置区域的运动目标图像块,则说明该图像块出现在图像中会发生目标被遮挡的位置区域,且该图像块属于运动目标,因此,通过对位于指定位置区域的运动目标图像块进行隐私遮蔽处理,实现了对部分被遮挡的目标进行隐私遮蔽处理的目的。
监控设备在采集视频后,会对视频进行编码,编码所采用的一般为H264、H265等编码标准,这些编码标准中均使用了运动估计作为视频压缩处理的一个重要组成部分,在帧间预测编码中,由于两个视频帧图像中的运动物体存在一定的相关性,因此,一般对于包含多个运动物体的场景,普遍采用的方法是把一个视频帧图像划分成多个图像块,使得每个图像块的运动可以很好地用一个参数化模型表征。将一个视频帧图像划分成多个图像块之后,搜索出每个图像块在参考视频帧图像中的位置,得出两者之间位置的相对偏移量,得到的相对偏移量就是运动矢量。
待处理视频帧图像为编码后的视频中的一个视频帧图像,待处理视频帧图像中携带有各图像块相较于参考视频帧图像的运动矢量以及各图像块的位置信息,因此,可以从待处理视频帧图像中获取到视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息。当然,在传输编码后的视频时,还可以将各图像块的运动矢量信息和位置信息以编码信息的方式和视频一同传输,则可以基于待处理视频帧图像,相应的从编码信息中获取到各图像块的运动矢量信息以及各图像块的位置信息。
运动矢量信息表征了图像块是否是运动的,位置信息指示了图像块在视频帧图像中的具体位置,因此,根据各图像块的运动矢量信息及位置信息,可以识别出各图像块是否为位于指定位置区域的运动目标图像块。这里所设定的指定位置区域包括:视频帧图像中会发生目标被遮挡的位置区域,例如视频帧图像边缘区域、大型障碍物附近区域等。
可选的,视频帧图像中预先设定的会发生目标被遮挡的位置区域,为:预先设定的视频帧图像的边缘区域;和/或,预先设定的视频帧图像中固定参 考物的边缘区域。
这里所提及的固定参考物可以为大型障碍物、建筑物、植物等,其边缘区域即为外轮廓附近区域。
对各图像块是否为位于指定位置区域的运动目标图像块的识别,是分别根据运动矢量信息判断图像块是否为运动目标图像块、根据位置信息判断图像块是否位于指定位置区域实现的,这两个判断可以是同时执行或者按照先后顺序执行的,这里不做具体限定。
在本申请实施例的一种实现方式中,S103具体可以通过如下步骤实现:
第一步,根据各图像块的运动矢量信息,识别各图像块是否发生运动变化。
第二步,针对发生运动变化的图像块,根据该图像块的位置信息,识别该图像块是否位于指定位置区域。
第三步,针对位于指定位置区域的图像块,若根据该图像块的运动矢量信息确定该图像块的运动矢量达到预设阈值,则确定该图像块为位于指定位置区域的运动目标图像块。
在本申请实施例的一种实现方式中,对于各图像块是否为位于指定位置区域的运动目标图像块的识别是顺序执行的,即先根据各图像块的运动矢量信息,识别各图像块是否发生运动变化,具体识别各图像块是否发生运动变化的方式,就是判断同一图像块在参考视频帧图像的运动矢量是否等于0,如果不等于0,则说明该图像块发生了运动变化,或者,还可以是判断同一图像块在参考视频帧图像的运动矢量是否小于一个极小的阈值,如果不小于该阈值,则说明该图像块发生了运动变化;如果一个图像块发生运动变化,则根据该图像块的位置信息,识别该图像块是否位于指定位置区域;如果一个图像块位于指定位置区域,则判断该图像块的运动矢量是否达到预设阈值(大于上述极小的阈值),如果达到预设阈值,即根据运动矢量不同方向的分量计算出来的运动距离达到预设阈值,则说明该图像块属于运动目标,可以确定该图像块为位于指定位置区域的运动目标图像块,如果未达到预设阈值,则说明该图像块并不属于运动目标,可能是误检测,不能作为运动目标图像块。
在本申请实施例的一种实现方式中,在执行上述第一步之后,还可以执行:针对任一图像块,若该图像块未发生运动变化,则保持该图像块的显示内容不变。
在执行上述第二步之后,还可以执行:若该图像块不位于指定位置区域,则保持该图像块的显示内容不变;或者,若该图像块位于指定位置区域,且根据该图像块的运动矢量信息确定该图像块的运动矢量未达到预设阈值,则保持该图像块的显示内容不变。
基于上述分析,如果识别出一个图像块未发生运动变化,则说明该图像块是静态的图像块,不属于运动目标,因此需要保持该图像块的显示内容不变,无需对该图像块进行隐私遮蔽处理;如果识别出一个图像块发生了运动变化,但是不位于指定位置区域,则后续可以采用传统的隐私遮蔽处理方式对这类图像块进行处理,或者在之前可以已经采用了传统的隐私遮蔽处理方式对这类图像块进行过处理,因此,可以保持该图像块的显示内容不变,无需对该图像块进行隐私遮蔽处理;如果识别出一个图像块发生了运动变化、该图像块位于指定位置区域,但是运动矢量未达到预设阈值,则说明该图像块为误检测的运动目标图像块,并不是真正的运动目标图像块,则需要保持该图像块的显示内容不变,无需对该图像块进行隐私遮蔽处理。
在确定出位于指定位置区域的运动目标图像块之后,对这些图像块进行第一隐私遮蔽处理,第一隐私遮蔽处理可以是遮挡、模糊化等隐私遮蔽处理方式中的任一种,实现了对部分被遮挡的目标进行隐私遮蔽处理的目的。在具体实现时,可以确定出多个位于指定位置区域的运动目标图像块,邻近的图像块组成一个目标框,在进行隐私遮蔽处理时,可以对目标框进行整体的隐私遮蔽处理。
在本申请实施例的一种实现方式中,指定位置区域还可以包括:视频帧图像中不会发生目标被遮挡的位置区域,则S104具体可以为:对待处理视频帧图像中位于会发生目标被遮挡的位置区域和位于不会发生目标被遮挡的位置区域的运动目标图像块进行第一隐私遮蔽处理。
本申请实施例的一种场景下,之前并未对视频帧图像进行过任何隐私遮蔽处理,则如果识别出一个图像块是不位于指定位置区域的运动目标图像块,即该图像块属于运动目标,但是并不位于指定位置区域,则也可以对该图像块进行隐私遮蔽处理,以达到对视频帧图像中所有的运动目标均进行隐私遮蔽处理的目的。
相较于利用人工智能的方式进行目标检测,本申请实施例所提供的隐私遮蔽处理方法中,无需进行目标检测,而是根据获取到的各图像块的运动矢 量信息以及所述各图像块的位置信息,识别出位于指定位置区域的运动目标图像块,对这些图像块进行隐私遮蔽处理。可见,本申请实施例可以使用较少的处理资源,实现对部分被遮挡的目标进行隐私遮蔽处理。
基于图1所示实施例,本申请实施例所提供的隐私遮蔽处理方法的另一种流程,如图2所示,可以包括如下步骤。
S201,获取待处理视频帧图像。
S202,将待处理视频帧图像输入预先训练的目标检测模型,检测出待处理视频帧图像中的目标区域。
S203,对待处理视频帧图像中的目标区域进行第二隐私遮蔽处理。
S204,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,其中,视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块。
S205,根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,其中,指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域。
S206,对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。
在本申请实施例的一种实现方式中,可以先采用人工智能的方式,对待处理视频帧图像进行目标检测,对检测出的目标区域进行第二隐私遮蔽处理;再根据各图像块的运动矢量信息以及各图像块的位置信息,对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。具体的人工智能的方式是:将待处理视频帧图像输入预先训练的目标检测模型,检测出待处理视频帧图像中的目标区域,其中目标检测模型是基于样本图像预先训练得到的,具有目标检测的功能,目标检测模型可以为基于深度学习的网络模型,可以采用传统的深度学习模型,具体的训练过程可以采用传统的反向传播的方式,这里不再做赘述。
如果发生目标出现在视频帧图像边缘,或者是目标被某个障碍物遮挡2/3、剩余1/3出现在视频帧图像中等情况,而采用人工智能的方式进行隐私遮蔽处理,必须是完整的目标都出现在视频帧图像中,才能检测出目标,此时则无法检测出目标,即无法实现对被遮挡目标的隐私遮蔽处理。
因此,本实施例在采用人工智能的方式,对待处理视频帧图像进行第二 隐私遮蔽处理之后,可以继续采用图1所示的方式,对位于指定位置区域的运动目标图像块进行识别,对识别出的位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理,其中,第一隐私遮蔽处理和第二隐私遮蔽处理是遮挡、模糊化等隐私遮蔽处理方式中的任一种,可以相同,也可以不同。这样,既保证视频帧图像中一般位置的目标被隐私遮蔽处理,又保证位于指定位置区域的运动目标被隐私遮蔽处理。
基于图1所示实施例,本申请实施例所提供的隐私遮蔽处理方法的再一种流程,如图3所示,可以包括如下步骤。
S301,获取待处理视频帧图像。
S302,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,其中,视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块。
S303,根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,其中,指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域。
S304,对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。
S305,将完成了第一隐私遮蔽处理后的待处理视频帧图像,输入预先训练的目标检测模型,检测出待处理视频图像中的目标区域。
S306,对待处理视频帧图像中的目标区域进行第二隐私遮蔽处理。
在本申请实施例的一种实现方式中,可以先采用图1所示的方式,对位于指定位置区域的运动目标图像块进行识别,对识别出的位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。再采用人工智能的方式,对完成了第一隐私遮蔽处理的待处理视频帧图像进行目标检测,对检测出的目标区域进行第二隐私遮蔽处理。这样,既保证视频帧图像中一般位置的目标被隐私遮蔽处理,又保证位于指定位置区域的运动目标被隐私遮蔽处理。
在本申请实施例中,针对不位于指定位置区域的运动目标图像块,由于采用人工智能的方式进行目标检测和隐私遮蔽处理,则无需对这类图像块再进行一次隐私遮蔽处理。
在一种具体实施方式中,指定位置区域可以是视频帧图像的边缘区域。
具体的,针对处于视频帧图像边缘区域的运动目标进行隐私遮蔽处理的 流程如图4所示,包括如下步骤:
S401,对视频帧图像进行编码。
S402,判断图像块是否产生运动矢量;如果是,则执行S403;如果否,则执行S405。
本步骤中,可以先获得待处理视频帧图像中各图像块的运动矢量信息和位置信息;根据各图像块的运动矢量信息,判断是否产生运动矢量,也就是判断图像块是否发生运动变化。
S403,判断图像块是否在画面边缘;如果是,则执行S404;如果否,则执行S405。
本步骤中,在产生运动矢量的情况下,根据各图像块的位置信息,判断图像块是否在画面边缘;即判断图像块是否位于视频帧图像的边缘区域。
S404,判断运动矢量是否满足要求;如果是,则执行S406;如果否,则执行S405。
本步骤中,在图像块在画面边缘的情况下,根据该图像块的运动矢量信息,判断运动矢量是否满足要求,具体的,可以判断图像块的运动矢量是否达到预设阈值。
S405,不进行隐私遮蔽处理。
本步骤中,在未产生运动矢量或图像块没有在画面边缘或运动矢量不满足要求的情况下,不进行隐私遮蔽处理。
S406,对相应目标进行隐私遮蔽处理。
本步骤中,在产生运动矢量、图像块在画面边缘,且运动矢量满足要求的情况下,对相应目标进行隐私遮蔽处理,也就是对产生运动矢量、在画面边缘且运动矢量满足要求的图像块进行隐私遮蔽处理。
在具体实现时,可以按照像素点变化情况进行图像块划分,相近的像素点划分到同一个图像块中,获取到每个图像块的位置信息,在图像采集设备架设好后,视频帧图像的显示范围即可确定。在视频帧图像中,可根据图像块的位置信息,判断图像块与视频帧图像边缘的距离,如果距离小于一定的阈值,则可以确定该图像块在画面边缘。如图5所示,图像块1与视频帧图像边缘的距离小于阈值,图像块2与视频帧图像边缘的距离大于阈值,则可以确定图像块1在画面边缘,而图像块2不在画面边缘。
在另一种具体实施方式中,指定位置区域可以是视频帧图像中固定参考 物的边缘区域。
具体的,针对处于固定参考物边缘区域的运动目标进行隐私遮蔽处理的流程如图6所示,包括如下步骤:
S601,对视频帧图像进行编码。
S602,判断图像块是否产生运动矢量;如果是,则执行S603;如果否,则执行S605。
本步骤中,可以先获得待处理视频帧图像中各图像块的运动矢量信息和位置信息;根据各图像块的运动矢量信息,判断是否产生运动矢量,也就是判断图像块是否发生运动变化。
S603,判断图像块是否处于固定参考物边缘区域;如果是,则执行S604;如果否,则执行S605。
本步骤中,在产生运动矢量的情况下,根据各图像块的位置信息,判断图像块是否处于固定参考物边缘区域。
S604,判断运动矢量是否满足要求;如果是,则执行S606;如果否,则执行S605。
本步骤中,在图像块处于固定参考物边缘区域的情况下,根据该图像块的运动矢量信息,判断运动矢量是否满足要求,具体的,可以判断图像块的运动矢量是否达到预设阈值。
S605,不进行隐私遮蔽处理。
本步骤中,在未产生运动矢量或图像块没有处于固定参考物边缘区域或运动矢量不满足要求的情况下,不进行隐私遮蔽处理。
S606,对相应目标进行隐私遮蔽处理。
本步骤中,在产生运动矢量、图像块处于固定参考物边缘区域,且运动矢量满足要求的情况下,对相应目标进行隐私遮蔽处理,也就是对产生运动矢量、处于固定参考物边缘区域且运动矢量满足要求的图像块进行隐私遮蔽处理。
在具体实现时,可以按照像素点变化情况进行图像块划分,相近的像素点划分到同一个图像块中,或者可以基于H264、H265等编码标准中限定的图像块切割策略进行图像块划分;获取到每个图像块的位置信息,在实际场景中存在一些固定参考物(例如建筑物、大型障碍物、树木等),这些固定参考物具有外轮廓,能够获知固定参考物外轮廓的位置信息,在视频帧图像中, 可根据图像块的位置信息,判断图像块与固定参考物外轮廓的距离,如果距离小于一定的阈值,则可以确定该图像块处于固定参考物边缘区域。如图7所示,图像块3与固定参考物X外轮廓的距离小于阈值,图像块4与固定参考物X外轮廓的距离大于阈值,则可以确定图像块3处于固定参考物边缘区域,而图像块4不处于固定参考物边缘区域。
基于上述方法实施例,本申请实施例提供了一种隐私遮蔽处理装置,如图8所示,该装置可以包括:
获取模块810,用于获取待处理视频帧图像;从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,其中,视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块;
识别模块820,用于根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,其中,指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域;
处理模块830,用于对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。
可选的,识别模块820,具体可以用于:
根据各图像块的运动矢量信息,识别各图像块是否发生运动变化;
针对发生运动变化的图像块,根据该图像块的位置信息,识别该图像块是否位于指定位置区域;
针对位于指定位置区域的图像块,若根据该图像块的运动矢量信息确定该图像块的运动矢量达到预设阈值,则确定该图像块为位于指定位置区域的运动目标图像块。
可选的,识别模块820,还可以用于:
针对任一图像块,若该图像块未发生运动变化,则保持该图像块的显示内容不变;
针对任一图像块,若该图像块发生运动变化、且该图像块不位于指定位置区域,则保持该图像块的显示内容不变;
针对任一图像块,若该图像块发生运动变化、该图像块位于指定位置区域,且根据该图像块的运动矢量信息确定该图像块的运动矢量未达到预设阈值,则保持该图像块的显示内容不变。
可选的,指定位置区域还可以包括:视频帧图像中不会发生目标被遮挡 的位置区域;
处理模块830,具体可以用于对待处理视频帧图像中位于会发生目标被遮挡的位置区域和位于不会发生目标被遮挡的位置区域的运动目标图像块进行第一隐私遮蔽处理。
可选的,该装置还可以包括:检测模块,用于将待处理视频帧图像输入预先训练的目标检测模型,检测出待处理视频帧图像中的目标区域;或者,将完成了第一隐私遮蔽处理后的待处理视频帧图像,输入预先训练的目标检测模型,检测出待处理视频图像中的目标区域;
处理模块830,还可以用于对待处理视频帧图像中的目标区域进行第二隐私遮蔽处理。
可选的,视频帧图像中预先设定的会发生目标被遮挡的位置区域,可以为:预先设定的视频帧图像的边缘区域;和/或,预先设定的视频帧图像中固定参考物的边缘区域。
应用本申请实施例,获取待处理视频帧图像,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。在对视频进行编码时,会将视频中每个视频帧图像划分成多个图像块,并生成各图像块的运动矢量信息和位置信息,一个图像块的运动矢量信息表征了该图像块在编码时所采用参考视频帧图像中的位置偏移,如上述参考视频帧图像可以是邻近的前一个视频帧图像,根据一个图像块的运动矢量信息和位置信息,能够确定出该图像块是否为位于指定位置区域的运动目标图像块,若一个图像块是位于指定位置区域的运动目标图像块,则说明该图像块出现在图像中会发生目标被遮挡的位置区域,且该图像块属于运动目标,因此,通过对位于指定位置区域的运动目标图像块进行隐私遮蔽处理,实现了对部分被遮挡的目标进行隐私遮蔽处理的目的。
本申请实施例还提供了一种电子设备,如图9所示,包括处理器901和机器可读存储介质902,机器可读存储介质902存储有能够被处理器901执行的机器可执行指令,处理器901被机器可执行指令促使:实现上述任一实施例提供的隐私遮蔽处理方法。
上述机器可读存储介质可以包括RAM(Random Access Memory,随机存 取存储器),也可以包括NVM(Non-Volatile Memory,非易失性存储器),例如至少一个磁盘存储器。可选的,机器可读存储介质还可以是至少一个位于远离上述处理器的存储装置。
上述处理器可以是通用处理器,包括CPU(Central Processing Unit,中央处理器)、NP(Network Processor,网络处理器)等;还可以是DSP(Digital Signal Processing,数字信号处理器)、ASIC(Application Specific Integrated Circuit,专用集成电路)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
机器可读存储介质902与处理器901之间可以通过有线连接或者无线连接的方式进行数据传输,并且电子设备可以通过有线通信接口或者无线通信接口与其他的设备进行通信。图9所示的仅为处理器901与机器可读存储介质902之间通过总线进行数据传输的示例,不作为具体连接方式的限定。
应用本申请实施例,电子设备获取待处理视频帧图像,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。在对视频进行编码时,会将视频中每个视频帧图像划分成多个图像块,并生成各图像块的运动矢量信息和位置信息,一个图像块的运动矢量信息表征了该图像块在编码时所采用参考视频帧图像中的位置偏移,如上述参考视频帧图像可以是邻近的前一个视频帧图像,根据一个图像块的运动矢量信息和位置信息,能够确定出该图像块是否为位于指定位置区域的运动目标图像块,若一个图像块是位于指定位置区域的运动目标图像块,则说明该图像块出现在图像中会发生目标被遮挡的位置区域,且该图像块属于运动目标,因此,通过对位于指定位置区域的运动目标图像块进行隐私遮蔽处理,实现了对部分被遮挡的目标进行隐私遮蔽处理的目的。
本申请实施例还提供了一种机器可读存储介质,存储有机器可执行指令,在被处理器调用和执行时,实现上述任一实施例提供的隐私遮蔽处理方法。
在本申请实施例提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行实现上述任一实施例提供的隐私遮蔽处理方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、DSL(Digital Subscriber Line,数字用户线))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如软盘、硬盘、磁带)、光介质(例如DVD(Digital Versatile Disc,数字多功能光盘))、或者半导体介质(例如SSD(Solid State Disk,固态硬盘))等。
本申请实施例还提供了一种监控系统,如图10所示,该监控系统包括多个监控设备1001和服务器1002;
多个监控设备1001,用于采集视频,对视频进行编码,并将编码后的视频发送至服务器1002;
服务器1002,用于接收多个监控设备1001发送的视频,获取视频中的待处理视频帧图像,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,其中,视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块;根据各图像块的运动矢量信息及位置信息,识别各图像块是否为位于指定位置的运动目标图像块,其中,指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域;对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理;展示隐私遮蔽处理后的待处理视频帧图像。
应用本申请实施例,多个监控设备采集视频,对视频进行编码,并将编码后的视频发送至服务器,服务器接收多个监控设备发送的视频,获取视频中的待处理视频帧图像,从待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及各图像块的位置信息,根据各图像块的运动矢量 信息及位置信息,识别各图像块是否为位于指定位置区域的运动目标图像块,对待处理视频帧图像中位于指定位置区域的运动目标图像块进行第一隐私遮蔽处理。在对视频进行编码时,会将视频中每个视频帧图像划分成多个图像块,并生成各图像块的运动矢量信息和位置信息,一个图像块的运动矢量信息表征了该图像块在编码时所采用参考视频帧图像中的位置偏移,如上述参考视频帧图像可以是邻近的前一个视频帧图像,根据一个图像块的运动矢量信息和位置信息,能够确定出该图像块是否为位于指定位置区域的运动目标图像块,若一个图像块是位于指定位置区域的运动目标图像块,则说明该图像块出现在图像中会发生目标被遮挡的位置区域,且该图像块属于运动目标,因此,通过对位于指定位置区域的运动目标图像块进行隐私遮蔽处理,实现了对部分被遮挡的目标进行隐私遮蔽处理的目的,满足在展示视频时的隐私遮蔽需求。
本申请实施例的监控系统可以是一个设备或者分布式系统,即多个监控设备和服务器可以为一个设备中的不同部件,也可以为分布式布置的分离设备,这里不做具体限定。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备、机器可读存储介质、计算机程序产品和监控系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (15)

  1. 一种隐私遮蔽处理方法,其特征在于,所述方法包括:
    获取待处理视频帧图像;
    从所述待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及所述各图像块的位置信息,其中,所述视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块;
    根据所述各图像块的运动矢量信息及位置信息,识别所述各图像块是否为位于指定位置区域的运动目标图像块,所述指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域;
    对所述待处理视频帧图像中位于所述指定位置区域的运动目标图像块进行第一隐私遮蔽处理。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述各图像块的运动矢量信息及位置信息,识别所述各图像块是否为位于指定位置区域的运动目标图像块的步骤,包括:
    根据所述各图像块的运动矢量信息,识别所述各图像块是否发生运动变化;
    针对发生运动变化的图像块,根据该图像块的位置信息,识别该图像块是否位于指定位置区域;
    针对位于所述指定位置区域的图像块,若根据该图像块的运动矢量信息确定该图像块的运动矢量达到预设阈值,则确定该图像块为位于所述指定位置区域的运动目标图像块。
  3. 根据权利要求2所述的方法,其特征在于,在所述根据所述各图像块的运动矢量信息,识别所述各图像块是否发生运动变化的步骤之后,所述方法还包括:
    针对任一图像块,若该图像块未发生运动变化,则保持该图像块的显示内容不变;
    在所述针对发生运动变化的图像块,根据该图像块的位置信息,识别该图像块是否位于指定位置区域的步骤之后,所述方法还包括:
    若该图像块不位于所述指定位置区域,则保持该图像块的显示内容不变;
    若该图像块位于所述指定位置区域,且根据该图像块的运动矢量信息确定该图像块的运动矢量未达到所述预设阈值,则保持该图像块的显示内容不变。
  4. 根据权利要求1所述的方法,其特征在于,所述指定位置区域还包括:视频帧图像中不会发生目标被遮挡的位置区域;
    所述对所述待处理视频帧图像中位于所述指定位置区域的运动目标图像块进行第一隐私遮蔽处理的步骤,包括:
    对所述待处理视频帧图像中位于会发生目标被遮挡的位置区域和位于不会发生目标被遮挡的位置区域的运动目标图像块进行第一隐私遮蔽处理。
  5. 根据权利要求1所述的方法,其特征在于,
    在所述从所述待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及所述各图像块的位置信息的步骤之前,所述方法还包括:
    将所述待处理视频帧图像输入预先训练的目标检测模型,检测出所述待处理视频帧图像中的目标区域;
    对所述待处理视频帧图像中的目标区域进行第二隐私遮蔽处理;或者,
    在对所述待处理视频帧图像中位于所述指定位置区域的运动目标图像块进行第一隐私遮蔽处理的步骤之后,所述方法还包括:
    将完成了第一隐私遮蔽处理后的所述待处理视频帧图像,输入预先训练的目标检测模型,检测出所述待处理视频图像中的目标区域;
    对所述待处理视频帧图像中的目标区域进行第二隐私遮蔽处理。
  6. 根据权利要求1~5任一项所述的方法,其特征在于,所述视频帧图像中预先设定的会发生目标被遮挡的位置区域,为:预先设定的视频帧图像的边缘区域;和/或,预先设定的视频帧图像中固定参考物的边缘区域。
  7. 一种隐私遮蔽处理装置,其特征在于,所述装置包括:
    获取模块,用于获取待处理视频帧图像;从所述待处理视频帧图像中,获取视频编码时生成的各图像块的运动矢量信息以及所述各图像块的位置信息,其中,所述视频包括多个视频帧图像,每个视频帧图像包括多个预先划 分的图像块;
    识别模块,用于根据所述各图像块的运动矢量信息及位置信息,识别所述各图像块是否为位于指定位置区域的运动目标图像块,所述指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域;
    处理模块,用于对所述待处理视频帧图像中位于所述指定位置区域的运动目标图像块进行第一隐私遮蔽处理。
  8. 根据权利要求7所述的装置,其特征在于,所述识别模块,具体用于根据所述各图像块的运动矢量信息,识别所述各图像块是否发生运动变化;针对发生运动变化的图像块,根据该图像块的位置信息,识别该图像块是否位于指定位置区域;针对位于所述指定位置区域的图像块,若根据该图像块的运动矢量信息确定该图像块的运动矢量达到预设阈值,则确定该图像块为位于所述指定位置区域的运动目标图像块。
  9. 根据权利要求8所述的装置,其特征在于,所述识别模块,还用于针对任一图像块,若该图像块未发生运动变化,则保持该图像块的显示内容不变;针对任一图像块,若该图像块发生运动变化、且该图像块不位于所述指定位置区域,则保持该图像块的显示内容不变;针对任一图像块,若该图像块发生运动变化、该图像块位于所述指定位置区域,且根据该图像块的运动矢量信息确定该图像块的运动矢量未达到所述预设阈值,则保持该图像块的显示内容不变。
  10. 根据权利要求7所述的装置,其特征在于,所述指定位置区域还包括:视频帧图像中不会发生目标被遮挡的位置区域;
    所述处理模块,具体用于对所述待处理视频帧图像中位于会发生目标被遮挡的位置区域和位于不会发生目标被遮挡的位置区域的运动目标图像块进行第一隐私遮蔽处理。
  11. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    检测模块,用于将所述待处理视频帧图像输入预先训练的目标检测模型,检测出所述待处理视频帧图像中的目标区域;或者,将完成了第一隐私遮蔽处理后的所述待处理视频帧图像,输入预先训练的目标检测模型,检测出所 述待处理视频图像中的目标区域;
    所述处理模块,还用于对所述待处理视频帧图像中的目标区域进行第二隐私遮蔽处理。
  12. 根据权利要求7~11任一项所述的装置,其特征在于,所述视频帧图像中预先设定的会发生目标被遮挡的位置区域,为:预先设定的视频帧图像的边缘区域;和/或,预先设定的视频帧图像中固定参考物的边缘区域。
  13. 一种电子设备,其特征在于,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器被所述机器可执行指令促使:实现权利要求1~6任一项所述的方法。
  14. 一种机器可读存储介质,其特征在于,存储有机器可执行指令,在被处理器调用和执行时,实现权利要求1~6任一项所述的方法。
  15. 一种监控系统,其特征在于,包括多个监控设备和服务器;
    所述多个监控设备,用于采集视频,对所述视频进行编码,并将编码后的所述视频发送至所述服务器;
    所述服务器,用于接收所述多个监控设备发送的所述视频,获取所述视频中的待处理视频帧图像,从所述待处理视频帧图像中,获取所述视频编码时生成的各图像块的运动矢量信息以及所述各图像块的位置信息,其中,所述视频包括多个视频帧图像,每个视频帧图像包括多个预先划分的图像块;根据所述各图像块的运动矢量信息及位置信息,识别所述各图像块是否为位于指定位置区域的运动目标图像块,所述指定位置区域包括:视频帧图像中预先设定的会发生目标被遮挡的位置区域;对所述待处理视频帧图像中位于所述指定位置区域的运动目标图像块进行第一隐私遮蔽处理;展示隐私遮蔽处理后的所述待处理视频帧图像。
PCT/CN2021/097376 2020-06-19 2021-05-31 一种隐私遮蔽处理方法、装置、电子设备及监控系统 WO2021254134A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP21825245.0A EP4090036B1 (en) 2021-05-31 Privacy shielding processing method and apparatus, electronic device, and monitoring system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010568351.8 2020-06-19
CN202010568351.8A CN111654700B (zh) 2020-06-19 2020-06-19 一种隐私遮蔽处理方法、装置、电子设备及监控系统

Publications (1)

Publication Number Publication Date
WO2021254134A1 true WO2021254134A1 (zh) 2021-12-23

Family

ID=72350091

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/097376 WO2021254134A1 (zh) 2020-06-19 2021-05-31 一种隐私遮蔽处理方法、装置、电子设备及监控系统

Country Status (2)

Country Link
CN (1) CN111654700B (zh)
WO (1) WO2021254134A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827706A (zh) * 2022-03-09 2022-07-29 北京旷视科技有限公司 图像处理的方法、计算机程序产品、电子设备及存储介质
CN115379114A (zh) * 2022-07-19 2022-11-22 阿里巴巴(中国)有限公司 全景视频处理方法、装置及电子设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654700B (zh) * 2020-06-19 2022-12-06 杭州海康威视数字技术股份有限公司 一种隐私遮蔽处理方法、装置、电子设备及监控系统
CN112381702B (zh) * 2020-12-02 2024-03-15 北京皮尔布莱尼软件有限公司 一种图像隐私处理方法、计算设备及存储介质
CN112509070B (zh) * 2020-12-04 2024-04-05 武汉大学 一种隐私保护Canny边缘检测方法
CN114339367B (zh) * 2021-12-29 2023-06-27 杭州海康威视数字技术股份有限公司 一种视频帧处理方法、装置及设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090074311A1 (en) * 2007-09-19 2009-03-19 Samsung Electronics Co., Ltd. System and method for detecting visual occlusion based on motion vector density
JP2010237872A (ja) * 2009-03-30 2010-10-21 Sogo Keibi Hosho Co Ltd 人物領域検出装置、人物領域検出方法、及び人物領域検出プログラム
CN101933027A (zh) * 2008-02-01 2010-12-29 罗伯特·博世有限公司 用于视频监视系统的遮蔽模块、用于遮蔽被选择的物体的方法以及计算机程序
CN102375985A (zh) * 2010-08-10 2012-03-14 富士通株式会社 目标检测方法和设备
CN104660975A (zh) * 2013-11-22 2015-05-27 安讯士有限公司 梯度隐私屏蔽
CN111654700A (zh) * 2020-06-19 2020-09-11 杭州海康威视数字技术股份有限公司 一种隐私遮蔽处理方法、装置、电子设备及监控系统

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9210312B2 (en) * 2004-06-02 2015-12-08 Bosch Security Systems, Inc. Virtual mask for use in autotracking video camera images
CN101389005A (zh) * 2007-09-11 2009-03-18 华为技术有限公司 一种对图像特定位置进行遮挡的方法及装置
CN101739686B (zh) * 2009-02-11 2012-05-30 北京智安邦科技有限公司 运动目标跟踪方法及其系统
CN102129695B (zh) * 2010-01-19 2014-03-19 中国科学院自动化研究所 基于遮挡物建模的有遮挡情况下的目标跟踪方法
CN102354364B (zh) * 2011-09-21 2013-03-13 西安理工大学 一种单摄像机监控系统的立体障碍物检测方法
CN103700112A (zh) * 2012-09-27 2014-04-02 中国航天科工集团第二研究院二O七所 一种基于混合预测策略的遮挡目标跟踪方法
CN102902963A (zh) * 2012-09-27 2013-01-30 无锡天授信息科技有限公司 一种基于人脸特征的固定场景运动目标检测系统及方法
CN103093427A (zh) * 2013-01-15 2013-05-08 信帧电子技术(北京)有限公司 人员停留的监控方法及监控系统
CN103440667B (zh) * 2013-07-19 2016-08-10 杭州师范大学 一种遮挡状态下运动目标稳定追踪的自动装置
CN107273822B (zh) * 2017-05-26 2021-06-04 西安电子科技大学 一种基于监控视频多目标跟踪和人脸识别的隐私保护方法
JP7071086B2 (ja) * 2017-10-13 2022-05-18 キヤノン株式会社 画像処理装置、画像処理方法及びコンピュータプログラム
CN109670383B (zh) * 2017-10-16 2021-01-29 杭州海康威视数字技术股份有限公司 视频遮蔽区域选取方法、装置、电子设备及系统
CN108596109B (zh) * 2018-04-26 2021-04-13 浪潮集团有限公司 一种基于神经网络和运动矢量的目标检测方法及装置
CN110944227B (zh) * 2018-09-25 2021-12-17 杭州海康威视数字技术股份有限公司 目标隐私保护方法、装置、硬盘录像机及存储介质
CN111241872B (zh) * 2018-11-28 2023-09-22 杭州海康威视数字技术股份有限公司 视频图像遮挡方法及装置
CN110458862A (zh) * 2019-05-22 2019-11-15 西安邮电大学 一种遮挡背景下的运动目标跟踪方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090074311A1 (en) * 2007-09-19 2009-03-19 Samsung Electronics Co., Ltd. System and method for detecting visual occlusion based on motion vector density
CN101933027A (zh) * 2008-02-01 2010-12-29 罗伯特·博世有限公司 用于视频监视系统的遮蔽模块、用于遮蔽被选择的物体的方法以及计算机程序
JP2010237872A (ja) * 2009-03-30 2010-10-21 Sogo Keibi Hosho Co Ltd 人物領域検出装置、人物領域検出方法、及び人物領域検出プログラム
CN102375985A (zh) * 2010-08-10 2012-03-14 富士通株式会社 目标检测方法和设备
CN104660975A (zh) * 2013-11-22 2015-05-27 安讯士有限公司 梯度隐私屏蔽
CN111654700A (zh) * 2020-06-19 2020-09-11 杭州海康威视数字技术股份有限公司 一种隐私遮蔽处理方法、装置、电子设备及监控系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827706A (zh) * 2022-03-09 2022-07-29 北京旷视科技有限公司 图像处理的方法、计算机程序产品、电子设备及存储介质
CN115379114A (zh) * 2022-07-19 2022-11-22 阿里巴巴(中国)有限公司 全景视频处理方法、装置及电子设备

Also Published As

Publication number Publication date
CN111654700B (zh) 2022-12-06
CN111654700A (zh) 2020-09-11
EP4090036A4 (en) 2023-08-16
EP4090036A1 (en) 2022-11-16

Similar Documents

Publication Publication Date Title
WO2021254134A1 (zh) 一种隐私遮蔽处理方法、装置、电子设备及监控系统
US10185877B2 (en) Systems, processes and devices for occlusion detection for video-based object tracking
US9536321B2 (en) Apparatus and method for foreground object segmentation
US10943357B2 (en) Video based indoor leak detection
US10713798B2 (en) Low-complexity motion detection based on image edges
US20180144476A1 (en) Cascaded-time-scale background modeling
AU2016352215A1 (en) Method and device for tracking location of human face, and electronic equipment
KR102139582B1 (ko) 다중 roi 및 객체 검출 dcnn 기반의 cctv 영상분석장치 및 그 장치의 구동방법
WO2021031954A1 (zh) 对象数量确定方法、装置、存储介质与电子设备
CN107122743B (zh) 安防监控方法、装置和电子设备
CN109447022B (zh) 一种镜头类型识别方法及装置
CN108460319B (zh) 异常人脸检测方法及装置
CN110659627A (zh) 一种基于视频分割的智能视频监控方法
CN114022531A (zh) 图像处理方法、电子设备和存储介质
CN111369557B (zh) 图像处理方法、装置、计算设备和存储介质
CN112672102B (zh) 一种视频生成方法及装置
US20180121729A1 (en) Segmentation-based display highlighting subject of interest
US10916016B2 (en) Image processing apparatus and method and monitoring system
EP4090036B1 (en) Privacy shielding processing method and apparatus, electronic device, and monitoring system
WO2018035768A1 (zh) 一种候选框尺度的获取方法及装置
CN113947795A (zh) 口罩佩戴检测方法、装置、设备及存储介质
TWI499291B (zh) 視訊資料之雜訊估測方法及系統
CN114820692B (zh) 跟踪目标的状态分析方法、装置、存储介质和终端
CN112288774B (zh) 移动侦测方法、装置、电子设备及存储介质
CN111062337B (zh) 人流方向检测方法及装置、存储介质和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21825245

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021825245

Country of ref document: EP

Effective date: 20220810

NENP Non-entry into the national phase

Ref country code: DE