A privacy shielding method, device and storage medium based on analog video recording device
By receiving and processing privacy masking information in the front-end equipment of the analog video recording device, and directly masking and encoding the video data, the problem of slow privacy masking processing speed in the existing technology is solved, and a faster and simpler privacy masking function is realized.
Patent Information
- Application Number
- CN202011248406.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-10
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2040-11-10
AI Technical Summary
When existing analog video recording devices realize privacy occlusion, they require the back-end equipment to perform complex encoding processing, resulting in slow processing speed and front-end equipment does not participate in occlusion services. Users need to manually configure and save settings.
In the analog video recording device, the front-end device receives the privacy masking information sent by the back-end device, generates masked image data, performs masking processing and encoding on the video data, and directly sends the encoded video stream to the back-end device to realize the privacy masking function of the front-end device. .
Privacy masking processing through front-end devices simplifies the encoding operations of back-end devices, increases the processing speed of privacy masking, and reduces dependence on user profiles.
Smart Images

Figure CN112468823B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video technology, and in particular to a privacy shielding method, device and storage medium based on an analog video recording device. Background Art
[0002] At present, for the analog signal access of the hard disk recorder (DVR, Digital Video Recorder), it supports privacy masking and privacy protection for sensitive areas in the captured video by superimposing black blocks. The general design of this solution is to implement privacy masking based on the back-end, that is, the back-end audio and video encoding module masks the privacy area of the collected analog front-end code stream data. In the existing solution, the privacy masking function of the analog security storage device needs to be configured by the back-end and sent to the audio and video encoding module for encoding. The front-end camera does not participate in the implementation of the privacy masking service. The user needs to manually operate the configuration channel of the privacy masking and save it to the configuration file so that it can be opened and retrieved next time. The privacy masking area parameters are sent to the audio and video encoding module. It is necessary to re-encode based on the data stream collected by the audio and video encoding module and the user's privacy area settings. The purpose of privacy masking is achieved by secondary processing of the video code stream. Summary of the invention
[0003] The present application provides a privacy masking method, device and storage medium based on an analog video recording device, which can improve the processing speed of privacy masking.
[0004] In order to solve the above technical problems, the technical solution adopted in the present application is: to provide a privacy masking method based on an analog recording device, the method is applied to the analog recording device, the analog recording device includes a front-end device and a back-end device connected to each other, the method includes: receiving privacy masking information sent by the back-end device; generating masking image data corresponding to the privacy masking information; obtaining video data, masking the video data based on the masking image data, and encoding the processed data to obtain a coded video stream, and sending the coded video stream to the back-end device.
[0005] In order to solve the above-mentioned technical problems, another technical solution adopted in the present application is: to provide an analog recording device, which includes a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the above-mentioned privacy masking method based on the analog recording device.
[0006] In order to solve the above-mentioned technical problems, another technical solution adopted in the present application is: to provide an analog recording device, which includes: a front-end device and a back-end device, the back-end device is used to generate privacy masking information; the front-end device is connected to the back-end device, and is used to receive the privacy masking information sent by the back-end device; generate masking image data corresponding to the privacy masking information; obtain video data, perform masking processing on the video data based on the masking image data, and encode the processed data to obtain an encoded video stream, and send the encoded video stream to the back-end device.
[0007] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the above-mentioned privacy masking method based on the analog recording device.
[0008] Through the above scheme, the beneficial effects of the present application are: the front-end device can interact with the back-end device, first receive the privacy masking information sent by the back-end device; then generate masking image data corresponding to the privacy masking information; then use the masking image data to perform masking processing on the generated video data, and encode it to generate an encoded video stream; the privacy masking function can be realized using the front-end device, and the raw code stream output by the front-end device contains the privacy masking data, which does not need to be encoded again by the back-end device to realize privacy masking, which can simplify the encoding operation of the back-end device and improve the processing speed of privacy masking. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work. Among them:
[0010] Figure 1 It is a structural schematic diagram of an embodiment of the analog video recording device provided by the present application;
[0011] Figure 2 It is a flowchart of an embodiment of a privacy shielding method based on a simulated video recording device provided by the present application;
[0012] Figure 3 It is a flowchart of another embodiment of the privacy shielding method based on the analog video recording device provided by the present application;
[0013] Figure 4 is a structural schematic diagram of another embodiment of the analog video recording device provided by the present application;
[0014] Figure 5It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0016] The current privacy masking solutions for analog channels are all implemented through back-end devices, which require encoding the original video data twice. The processing process is complicated and increases the workload of the equipment. However, the present application uses front-end devices to perform privacy masking on the original video data, which is simple to implement and does not require reading and writing configuration files generated by users. This reduces the processing tasks of the back-end devices and can improve the processing speed of privacy masking.
[0017] See also Figure 1 , Figure 1 1 is a schematic diagram of the structure of an embodiment of an analog video recording device provided by the present application. The analog video recording device 10 includes: a front-end device 11 and a back-end device 12.
[0018] The back-end device 12 is used to generate privacy masking information and send the privacy masking information to the front-end device 11; specifically, the front-end device 11 can be a front-end analog camera, and the back-end device 12 can include an acquisition encoding circuit 121 and a processing device 122. The processing device 122 can receive instructions input by the user, generate privacy masking information, and send the privacy masking information to the front-end analog camera. The privacy masking information can be which area in the captured video is masked.
[0019] The front-end device 11 is connected to the back-end device 12, and is used to receive the privacy masking information sent by the back-end device 12; generate masking image data corresponding to the privacy masking information; obtain video data, perform masking processing on the video data based on the masking image data, and encode the processed data to obtain an encoded video stream, and send the encoded video stream to the back-end device 12.
[0020] Furthermore, the front-end analog camera can generate video data. After receiving the privacy masking information, it can generate corresponding masking image data according to the privacy masking information, and then use the masking image data to perform masking processing on the video data to obtain the masked video data; then encode the masking video data to generate a coded video stream, and send the coded video stream to the acquisition coding circuit 121; the acquisition coding circuit 121 can directly forward the coded video stream to the processing device 122, or the acquisition coding circuit 121 can acquire the coded video stream, add auxiliary frames to the acquired data, and then encode it, and send the encoded data to the processing device 122; the processing device 122 can display, transmit to other devices or store the data output by the acquisition coding circuit 121; the analog video recording device 10 in this embodiment can be a DVR device.
[0021] In this embodiment, the transmission protocol used for the interaction between the front-end analog camera and the back-end device 12 can be a coaxial protocol. Since the privacy masking of the video can be completed in the front-end analog camera, there is no need to use the processing device 122 to mask the data output by the front-end analog camera. This can simplify the processing process of the processing device 122 and increase the speed of processing privacy masking.
[0022] See also Figure 2 , Figure 2 1 is a flow chart of an embodiment of a privacy shielding method based on an analog video recording device provided by the present application. The method is applied to the analog video recording device in the above embodiment. The analog video recording device includes a front-end device and a back-end device connected to each other. The method includes:
[0023] Step 21: Receive the privacy masking information sent by the backend device.
[0024] The front-end device can be a front-end analog camera. The user can set the area to be blocked through the back-end device, or set an area to be blocked by default, and generate corresponding privacy blocking information; the back-end device can send the privacy blocking information to the front-end analog camera, so that the front-end analog camera can use the privacy blocking information to block the generated video data.
[0025] Step 22: Generate mask image data corresponding to the privacy mask information.
[0026] After receiving the privacy masking information, the front-end analog camera can generate masking image data corresponding to the privacy masking information; specifically, the privacy masking information can be the coordinate value of the area to be masked, and the masking image data can be the pixel value. For example, the size of the video frame captured by the front-end analog camera is 256×256, the shape of the privacy masking area is a rectangle, and the coordinates of the privacy masking area are [12, 18], [30, 18], [12, 60] and [30, 60]. The pixel value of the privacy masking area in the video frame can be set to 255; or the privacy masking information is the coordinate value and size, for example, the coordinate value of the upper left corner of the area to be masked and the length and width of the area.
[0027] Step 23: Acquire video data, perform occlusion processing on the video data based on the occlusion image data, encode the processed data to obtain an encoded video stream, and send the encoded video stream to the back-end device.
[0028] The front-end analog camera can generate corresponding video data by shooting the scene to be shot; after generating the video data, it can perform occlusion processing in combination with the occlusion image data, so as to occlude certain areas in the captured video; after occlusion, the front-end analog camera can encode the video after occlusion processing to generate an encoded video stream, and then send the encoded video stream to the acquisition encoding circuit in the back-end device for preview, storage or distribution by the back-end device.
[0029] This embodiment provides a privacy masking method, which uses a front-end analog camera to implement the privacy masking function. It does not need to read and write configuration files generated by user configuration, and does not rely on the acquisition and encoding circuit in the back-end device to mask and encode the video data. The implementation is simpler, and the dependency between devices can be simplified. The processing process of the acquisition and encoding circuit can be simplified, which helps to improve the processing speed of privacy masking.
[0030] See also Figure 3 , Figure 3 1 is a flow chart of another embodiment of a privacy shielding method based on an analog video recording device provided by the present application. The method is applied to the analog video recording device in the above embodiment. The analog video recording device includes a front-end device and a back-end device connected to each other. The front-end device and the back-end device can be connected via a coaxial cable. The method includes:
[0031] Step 31: Send notification information to the back-end device via the coaxial protocol, so that the back-end device sets at least one picture frame on the preview screen, and then sets the coordinates of the privacy shielding area.
[0032] The front-end analog camera can send a notification message to the processing device through the coaxial protocol, so as to enter the on-screen display (OSD) of the front-end analog camera on the display interface of the processing device. When the front-end OSD (i.e., the on-screen menu of the front-end analog camera) enters the setting interface of the privacy shielding area, the front-end analog camera actively sends information to let the back-end device enter the picture frame state, that is, the back-end device displays a button or icon for the user to draw a frame on the preview screen corresponding to the front-end OSD; specifically, for the convenience of setting, the picture frame can be a rectangular frame, and the privacy shielding information is the coordinates of the rectangular frame; for example, the user of the back-end device can draw a rectangular frame arbitrarily on the preview screen with the mouse. After the user draws the rectangular frame, the back-end device can send the coordinates of the rectangular frame to the front-end analog camera through the coaxial protocol, and the front-end analog camera can set the coordinates of the corresponding privacy shielding area according to the coordinates of the rectangular frame; or for the back-end device with a touch screen, the user can also directly draw one or more rectangular frames on the preview screen of the display screen with his finger.
[0033] It is understandable that the shape of the picture frame is not limited to a rectangle. According to specific application requirements, the shape of the picture frame can also be other shapes, such as a circle, a triangle, an ellipse or an irregular shape.
[0034] Step 32: Receive the coordinates of the rectangular frame sent by the back-end device through the coaxial protocol, and use the coordinates of the rectangular frame to obtain the coordinates of the privacy shielding area.
[0035] Since the size of the preview screen and the size of the video frame captured by the front-end analog camera may be different, after receiving the coordinates of the rectangular frame sent by the back-end device, the front-end analog camera multiplies the coordinates of the rectangular frame by the preset scaling ratio to obtain the coordinates of the privacy masking area corresponding to the rectangular frame; for example, the size of the preview screen is 100×80, the size of the rectangular frame is 5×4, and the size of the video frame is 200×160, then the preset scaling ratio is 2, that is, the size of the privacy masking area is 10×8.
[0036] Step 33: Generate mask image data corresponding to the privacy mask information.
[0037] Step 33 is the same as step 22 in the above embodiment and will not be described again.
[0038] Step 34: Acquire video data, perform occlusion processing on the video data based on the occlusion image data, encode the processed data to obtain an encoded video stream, and send the encoded video stream to the back-end device.
[0039] The occlusion image data generated by the front-end analog camera includes pixel values of the occlusion image, and the video data includes multiple frames of video images. The front-end analog camera can use the pixel values of the occlusion image to occlude each frame of the video image, thereby obtaining an occlusion image frame.
[0040] In a specific embodiment, the pixel values of each frame of the video image can be superimposed with the pixel values of the occlusion image to obtain the occlusion video data, and then the occlusion video data can be encoded to obtain the encoded video stream. Furthermore, the front-end analog camera can set the corresponding black block to be superimposed on each frame of the video image according to the coordinates of the privacy occlusion area, and then encode it into the front-end analog code stream to obtain the encoded video stream.
[0041] In another specific embodiment, the pixel values corresponding to the privacy masking area in each frame of the video image can be replaced with the pixel values of the masking image; for example, all the pixel values corresponding to the privacy masking area are replaced with 255, so that the privacy masking area appears black, thereby achieving masking.
[0042] Step 35: After receiving the instruction to exit the screen menu, exit the screen menu and notify the back-end device to exit the picture frame state.
[0043] After the front-end camera receives the instruction to exit the OSD menu, it can exit the OSD menu and send a message to the back-end device to make the back-end device exit the interface for the user to draw a rectangular box; or the front-end camera can automatically exit the OSD menu after receiving the privacy masking information sent by the back-end device.
[0044] In this embodiment, the front-end analog camera can actively send a message to let the back-end device enter the picture frame state. The user can use the mouse to draw a rectangular frame on the display interface of the back-end device at will. After the user draws the rectangular frame, the back-end device can send the coordinates of the rectangular frame to the front-end analog camera through the coaxial protocol. The front-end analog camera is set to the coordinates of the corresponding privacy masking area. When it is necessary to exit the setting interface of the privacy masking area, the front-end analog camera can actively send a message to let the back-end device exit the picture frame state; this embodiment is based on the front-end and back-end interaction, and uses the front-end analog camera to realize the shielding of sensitive areas of an analog signal, which optimizes the process in which the back-end device needs to operate the analog channel for video shielding. There is no need for the acquisition and coding circuit to perform secondary processing on the video code stream output by the front-end analog camera to achieve privacy shielding, which makes the implementation simpler. Moreover, since there is no need for the acquisition and coding circuit to perform secondary processing, the processing speed of the analog video recording device for privacy shielding can be improved.
[0045] See also Figure 4 , Figure 4It is a structural diagram of another embodiment of the analog video recording device provided in the present application. The analog video recording device 40 includes a memory 41 and a processor 42 connected to each other. The memory 41 is used to store a computer program. When the computer program is executed by the processor 42, it is used to implement the privacy shielding method based on the analog video recording device in the above embodiment.
[0046] See also Figure 5 , Figure 5 It is a structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 50 is used to store a computer program 51. When the computer program 51 is executed by a processor, it is used to implement the privacy masking method based on the analog video recording device in the above embodiment.
[0047] The computer-readable storage medium 50 may be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other media that can store program codes.
[0048] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0049] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0050] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0051] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A privacy shielding method based on an analog video recording device, characterized in that: Applied to an analog video recording device, the analog video recording device includes a front-end device and a back-end device connected to each other, and the method includes: Receiving privacy shielding information sent by the back-end device; The front-end device is connected to the back-end device via a coaxial cable. Before the step of receiving the privacy shielding information sent by the back-end device, the method further includes: Sending notification information to the back-end device through the coaxial protocol, so that the back-end device sets at least one picture frame on the preview screen, and then sets the coordinates of the privacy shielding area; Generating masking image data corresponding to the privacy masking information; Acquire video data, perform occlusion processing on the video data based on the occlusion image data, encode the processed data to obtain an encoded video stream, and send the encoded video stream to the back-end device, wherein the occlusion image data is directly superimposed on the video data to achieve occlusion processing; Wherein, the video data is the original video data acquired by the front-end device; The backend device includes a processing device for receiving a user instruction to generate the privacy masking information.
2. According to claim 1, the privacy shielding method based on the analog video recording device is characterized in that: The occlusion image data includes pixel values of the occlusion image, the video data includes multiple frames of video images, and the step of performing occlusion processing on the video data based on the occlusion image data and encoding the processed data to obtain an encoded video stream includes: Superimposing the pixel value of each frame of the video image with the pixel value of the occlusion image to obtain occlusion video data; The occlusion video data is encoded to obtain the encoded video stream.
3. The privacy shielding method based on the analog video recording device according to claim 1, characterized in that: The privacy shielding information is the coordinates of the rectangular frame, and the step of receiving the privacy shielding information sent by the back-end device includes: The coordinates of the rectangular frame sent by the back-end device through the coaxial protocol are received, and the coordinates of the privacy shielding area are acquired using the coordinates of the rectangular frame.
4. According to claim 3, the privacy shielding method based on the analog video recording device is characterized in that: The step of acquiring the coordinates of the privacy shielding area by using the coordinates of the rectangular frame includes: The coordinates of the rectangular frame are multiplied by a preset scaling ratio to obtain the coordinates of the privacy shielding area corresponding to the rectangular frame.
5. The privacy shielding method based on the analog video recording device according to claim 1, characterized in that: The occlusion image data includes pixel values of the occlusion image, the video data includes multiple frames of video images, and the step of performing occlusion processing on the video data based on the occlusion image data includes: The pixel values corresponding to the privacy masking area in each frame of the video image are replaced with the pixel values of the masking image.
6. The privacy shielding method based on the analog video recording device according to claim 1, characterized in that: The method further comprises: After receiving the instruction to exit the screen menu, the screen menu is exited, and the back-end device is notified to exit the picture frame state.
7. An analog video recording device, characterized in that: It comprises a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the privacy shielding method based on the analog video recording device according to any one of claims 1 to 6.
8. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the privacy shielding method based on a simulated video recording device according to any one of claims 1 to 6.
Citation Information
Patent Citations
Privacy shielding based image display method and device
CN108206930A
Method of encoding an image including a privacy mask
CN108206951A
Video recording method, device, electronic equipment and readable storage medium
CN108965982A
Privacy protection method and device, apparatus and storage medium
CN110135195A
Encoding a privacy masked image
EP3340624A1