Method, device, equipment and storage medium for blurring faces in public transportation surveillance video
By blurring the face images in bus surveillance videos, the problem of privacy leakage during transmission is solved, and the protection of passenger face information is achieved.
Patent Information
- Application Number
- CN202411004560.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-25
AI Technical Summary
The prior art does not blur the passenger's face when transmitting bus surveillance videos, resulting in the risk of privacy leakage.
By obtaining the monitoring screen in real time, extracting face images, and segmenting the working image and face images into sub-images based on the bus line number and real-time location, determining the combination and exchange method, generating blur face images, and replacing the original face images , ensure that faces cannot be recognized during transmission.
It effectively protects passenger privacy and prevents facial information from being leaked. Even if the surveillance image is leaked during transmission, the face cannot be recognized.
Smart Images

Figure CN118552438B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of video data, and in particular to a method, device, equipment and storage medium for blurring faces in bus surveillance videos. Background Art
[0002] At present, after the bus camera captures the surveillance video, it will generally transmit the surveillance video to the monitoring terminal of the monitoring center so that the staff of the monitoring center can remotely view the real-time images on the bus. However, in the process of transmitting the surveillance video on the bus, if the faces of the passengers in the surveillance video are not blurred, there is a risk of leakage of passenger privacy.
[0003] In summary, the prior art does not blur the faces of passengers when transmitting surveillance videos on buses, resulting in a technical problem that the privacy of passengers is easily leaked. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, equipment and storage medium for blurring faces in bus surveillance videos, which solves the technical problem that in the prior art, the faces of passengers are not blurred during the transmission of surveillance videos on buses, resulting in easy leakage of passengers' privacy.
[0005] In a first aspect, an embodiment of the present invention provides a method for blurring faces in a public transportation surveillance video, comprising:
[0006] Acquire the surveillance picture of the bus taken by the camera in real time, and extract the face image of each passenger from the surveillance picture, wherein each face image has the same size;
[0007] Determine the route number and real-time location of the bus and the working image of the driver of the bus, and scale the size of the working image to be consistent with the size of the facial image;
[0008] According to the real-time position, the working image and the face image are respectively divided into a plurality of first sub-images and a plurality of second sub-images, and the first sub-images and the second sub-images are the same in size and number;
[0009] determining, according to the line number, a combination method of the second sub-image and an exchange method of the first sub-image;
[0010] Recombining the second sub-images according to the combination method to generate a first blurred face image;
[0011] Generate a first blurred working image and a second blurred face image according to the exchange mode, the first sub-image and the first blurred face image;
[0012] After using the second blurred facial image to replace the corresponding facial image in the monitoring screen, the replaced monitoring screen and the first blurred working image are transmitted to the monitoring terminal, so that the monitoring terminal can restore the second blurred facial image in the replaced monitoring screen according to the exchange method, the combination method and the first blurred working image.
[0013] Preferably, the step of dividing the working image and the face image into a plurality of first sub-images and a plurality of second sub-images respectively according to the real-time position comprises:
[0014] Determining a division method of the working image and the face image according to the real-time position;
[0015] According to the division method, the working image and the face image are divided into a plurality of first sub-images and a plurality of second sub-images respectively.
[0016] Preferably, the determining of the division method of the working image and the face image according to the real-time position includes:
[0017] Determine the current area according to the real-time location, where the area is obtained by dividing the map in advance;
[0018] According to the region, a division method corresponding to the region is obtained from a database, wherein the database stores a division method corresponding to each region, and the division method includes a horizontal division method and a vertical division method of the image.
[0019] Preferably, the step of recombining the second sub-images according to the combination mode to generate a first blurred face image includes:
[0020] Determine, according to the combination mode, a rotation mode corresponding to each of the second sub-images;
[0021] Rotate each of the second sub-images according to the rotation method;
[0022] According to the combination mode, determining an arrangement mode with each of the second sub-images;
[0023] According to the arrangement mode, the rotated second sub-image is rearranged to obtain a first blurred face image.
[0024] Preferably, the rotation angle of the second sub-image is a multiple of 90°.
[0025] Preferably, the number of the first sub-images is greater than or equal to the number of the facial images, and the generating of the second blurred facial image according to the exchange mode, the first sub-images and the first blurred facial image comprises:
[0026] According to the exchange mode, a first target sub-image corresponding to each first blurred face image is determined from the first sub-image, and a second target sub-image corresponding to each first target sub-image is determined from the first blurred face image;
[0027] The first target sub-image is exchanged with the second target sub-image in the corresponding first blurred face image to generate a first blurred working image and a second blurred face image.
[0028] Preferably, the exchange method includes, under different line numbers, a first target sub-image in the first sub-image corresponding to each first blurred face image, and a second target sub-image in the first blurred face image corresponding to each first target sub-image.
[0029] In a second aspect, an embodiment of the present invention provides a face blurring device for a public transportation monitoring video, comprising:
[0030] A face image extraction module is used to obtain the monitoring picture of the bus taken by the camera in real time, and extract the face image of each passenger from the monitoring picture, and each face image has the same size;
[0031] An information acquisition module, used to determine the bus line number, real-time location and working image of the bus driver, and scale the working image to be consistent with the size of the face image;
[0032] An image segmentation module, used for segmenting the working image and the face image into a plurality of first sub-images and a plurality of second sub-images according to the real-time position, wherein the first sub-images and the second sub-images have the same size and quantity;
[0033] an exchange mode determination module, used for determining a combination mode of the second sub-image and an exchange mode of the first sub-image according to the line number;
[0034] An image combining module, used for recombining the second sub-images according to the combining method to generate a first blurred face image;
[0035] a blurred image generating module, configured to generate a first blurred working image and a second blurred face image according to the exchange mode, the first sub-image and the first blurred face image;
[0036] An image replacement module is used to replace the corresponding face image in the monitoring screen with the second blurred face image, and then transmit the replaced monitoring screen and the first blurred working image to the monitoring terminal, so that the monitoring terminal can restore the second blurred face image in the replaced monitoring screen according to the exchange method, the combination method and the first blurred working image.
[0037] In a third aspect, an embodiment of the present invention provides a device for blurring faces in a public transportation surveillance video, the device comprising a processor and a memory;
[0038] The memory is used to store a computer program and transmit the computer program to the processor;
[0039] The processor is used to execute the method for blurring faces in a bus surveillance video as described in the first aspect according to the instructions in the computer program.
[0040] In a fourth aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute the method for blurring faces in a bus surveillance video described in the first aspect.
[0041] As described above, the embodiment of the present invention provides a method, device, equipment and storage medium for blurring faces in a bus surveillance video. The embodiment of the present invention extracts a face image from the surveillance picture and determines the bus line number, real-time location and working image of the bus driver. Then, according to the real-time location, the working image and the face image are respectively divided into a plurality of first sub-images and a plurality of second sub-images; the combination mode of the second sub-image and the exchange mode of the first sub-image are determined according to the line number, and the second sub-image is combined and exchanged with the first sub-image according to the combination mode and the exchange mode to obtain a second blurred face image and a first blurred working image, and the second blurred face image is used to replace the face image in the surveillance picture. The embodiment of the present invention blurs the face image in the surveillance picture, so that even if the surveillance picture is leaked during the transmission process, the face in the surveillance picture cannot be viewed, which can effectively protect the privacy of passengers, and solves the technical problem that the existing technology does not blur the faces of passengers in the process of transmitting the surveillance video on the bus, resulting in the easy leakage of the privacy of passengers. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flowchart of a method for blurring faces in a public transportation surveillance video provided by an embodiment of the present invention.
[0043] Figure 2 A schematic diagram of segmenting a facial image into second sub-images provided by an embodiment of the present invention.
[0044] Figure 3 A schematic diagram of assigning numbers to different facial images in a monitoring screen provided by an embodiment of the present invention.
[0045] Figure 4 A schematic diagram of exchanging a second target sub-image of a first blurred face image with a first target sub-image provided by an embodiment of the present invention.
[0046] Figure 5 A schematic structural diagram of a face blurring device for public transportation surveillance videos provided by an embodiment of the present invention.
[0047] Figure 6 A schematic structural diagram of a face blurring device for public transportation surveillance videos provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following description and accompanying drawings fully illustrate the specific embodiments of the present application so that those skilled in the art can practice them. The examples represent possible variations only. Unless explicitly required, separate components and functions are optional, and the order of operation can vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. The scope of the embodiments of the present application includes the entire scope of the claims, and all available equivalents of the claims. In this article, each embodiment may be represented individually or generally by the term "invention", which is only for convenience, and if more than one invention is disclosed in fact, it is not intended to automatically limit the scope of the application to any single invention or inventive concept. In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. The various embodiments are described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the structures, products, etc. disclosed in the embodiments, since they correspond to the parts disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0049] like Figure 1 As shown, Figure 1A flowchart of a method for blurring faces in a bus surveillance video provided by an embodiment of the present invention. The method for blurring faces in a bus surveillance video provided by an embodiment of the present invention can be executed by a face blurring device for a bus surveillance video. The face blurring device for a bus surveillance video can be implemented by software and / or hardware. The face blurring device for a bus surveillance video can be composed of two or more physical entities, or can be composed of one physical entity. For example, the face blurring device for a bus surveillance video can be a computer, a host computer, a tablet or other device. The face blurring device for a bus surveillance video (hereinafter referred to as the face blurring device) is pre-installed in a bus. The method for blurring faces in a bus surveillance video provided by an embodiment of the present invention includes the following steps:
[0050] Step 101: Acquire the surveillance picture of the bus captured by the camera in real time, and extract the face image of each passenger from the surveillance picture, wherein each face image has the same size.
[0051] In this embodiment, it is first necessary to obtain the monitoring screen of the bus captured by the camera in real time. It is understandable that the bus is equipped with a camera to monitor the bus compartment in real time, and the face blurring device can communicate with the camera to obtain the monitoring screen collected by the camera in real time. After obtaining the monitoring screen, the face blurring device needs to further extract the face image of each passenger from the monitoring screen. Specifically, after obtaining the monitoring screen, a deep learning neural network can be used to identify the target object classified as a person from the monitoring screen, and determine the face area of each target object, and then the face image is intercepted according to the face area of each target object in the monitoring screen. It should be noted that the size of each face image intercepted in this embodiment is the same, and the specific size can be set according to actual needs, and is not specifically limited in this embodiment.
[0052] Step 102: determine the bus line number, real-time location, and working image of the bus driver, and scale the working image to be consistent with the size of the face image.
[0053] While acquiring the monitoring screen, the face blurring device also needs to determine the bus line number, real-time location and working image of the bus driver. The bus line number is obtained from the background monitoring management system of the bus. For example, the background monitoring management system stores the line numbers corresponding to the license plates of different buses, and the face blurring device stores the license plate number of the bus installed by itself. The face blurring device can obtain the corresponding line number from the background monitoring management system according to the license plate number. In addition, the bus is equipped with a GPS positioning system. The bus will upload its real-time location to the background monitoring management system during driving. The face blurring device can directly obtain the real-time location of the bus from the GPS positioning system on the bus. It can be understood that the real-time location in this embodiment refers to the position corresponding to the bus when the monitoring screen is collected. In addition, the working image of the bus driver in this embodiment is the image submitted by the bus driver when he joins the job, and the working image is pre-entered into the local database of the background monitoring management system. After determining the daily bus schedule, the staff needs to determine the line number and license plate number associated with each driver at different time periods according to the bus schedule, and enter them into the background monitoring management system. After the face blurring device queries the driver corresponding to the line number according to the background monitoring system, it can further obtain the working image corresponding to the bus driver from the local database of the background monitoring management system. In addition, after obtaining the working image, the size of the working image needs to be scaled to the same size as the face image to ensure that the size of the sub-images obtained when the working image and the face image are subsequently divided is the same.
[0054] Step 103 : According to the real-time position, the working image and the face image are respectively divided into a plurality of first sub-images and a plurality of second sub-images, and the first sub-images and the second sub-images are the same in size and number.
[0055] After extracting the face image, the working image and the real-time position of the bus in real time, the face blurring device needs to further segment the working image and the face image according to the real-time position, so as to divide the working image and the face image into a plurality of first sub-images and a plurality of second sub-images, respectively. Exemplarily, the face blurring device can determine the division method of the working image and the face image according to the real-time position, and divide the working image and the face image according to the division method. It should also be noted that the size and number of the first sub-image and the second sub-image divided in this embodiment are the same, that is, the size of the first sub-image and the second sub-image are the same, and the number of the first sub-image and the second sub-image are also the same.
[0056] On the basis of the above embodiment, in step 103, the working image and the face image are respectively divided into a plurality of first sub-images and a plurality of second sub-images according to the real-time position, including:
[0057] Step 1031: Determine the division method of the working image and the face image according to the real-time position.
[0058] In this embodiment, the face blurring device needs to determine the division method of the working image and the face image according to the real-time position, wherein the division methods corresponding to different real-time positions are pre-set, and the face blurring device can determine the corresponding division method according to the real-time position of the current bus. In one embodiment, the current area can be determined according to the real-time position, and the area is pre-divided into maps; then, according to the area, the division method corresponding to the area is obtained from the database, and the database stores the division method corresponding to each area, and the division method includes the horizontal division method and the vertical division method of the image.
[0059] Exemplarily, the operating range of the bus can be divided in advance on the map to obtain multiple areas, and then a corresponding division method is set for each area. The division method of the working image and the face image is the same, and the division method specifies the horizontal and vertical division methods of the image, such as the horizontal division interval and the vertical division interval of the image. After the division method for different areas is determined in advance, it is necessary to further store the division method in a database, where the database can be a local database of the face blurring device or a database in the cloud. After determining the current real-time location, the face blurring device can obtain the division method corresponding to the current real-time location by accessing the database.
[0060] Step 1032: divide the working image and the face image into a plurality of first sub-images and a plurality of second sub-images according to the division method.
[0061] After determining the division method, the face blurring device can divide the working image and the face image into a plurality of first sub-images and a plurality of second sub-images according to the division method. For example, the working image and the face image can be divided into 5×5 first sub-images and 5×5 second sub-images according to the division method.
[0062] Step 104: Determine a combination method of the second sub-image and an exchange method of the first sub-image according to the line number.
[0063] After obtaining multiple first sub-images and multiple second sub-images, the face blurring device needs to further determine the combination method of the second sub-images and the exchange method of the first sub-images according to the bus route number, wherein the combination method of the second sub-images specifies the arrangement and combination method of the second sub-images, and the exchange method of the first sub-images specifies the exchange method of the first sub-images with the second sub-images.
[0064] Step 105: Re-combine the second sub-images according to the combination method to generate a first blurred face image.
[0065] After determining the combination method of the second sub-images, the second sub-images can be rearranged and combined according to the combination method, so as to reassemble and generate the first blurred face image. For example, the combination method specifies the arrangement position corresponding to each second sub-image, and the face blurring device needs to rearrange the second sub-images according to the arrangement position to generate the first blurred face image.
[0066] On the basis of the above embodiment, in step 105, the second sub-images are re-combined according to the combination mode to generate a first blurred face image, including:
[0067] Step 1051: Determine a rotation method corresponding to each second sub-image according to the combination method.
[0068] In this embodiment, the combination method includes a rotation method corresponding to each second sub-image, wherein the rotation method includes a rotation angle and a rotation direction of each second sub-image, and the face blurring device first needs to determine the rotation method corresponding to each second sub-image. In one embodiment, in order to facilitate splicing after rotation, the rotation angle of each second sub-image is a multiple of 90°, such as 90°, 180°, or 270°, etc., and the rotation angle of the second sub-image can also be 0°.
[0069] Step 1052: Rotate each second sub-image according to the rotation method.
[0070] After determining the rotation mode corresponding to each second sub-image, each second sub-image can be rotated according to the rotation mode. For example, assuming that the face image is segmented into 3×3 second sub-images according to the segmentation mode, such as Figure 2 As shown, Figure 2 A schematic diagram of segmenting a face image into second sub-images. Figure 2 The number in the second sub-image in the rotation method represents the serial number of the second sub-image, and the serial number increases from left to right and from top to bottom. The rotation angle and rotation direction of each second sub-image included in the rotation method are shown in Table 1. The face blurring device can rotate each second sub-image according to Table 1. For example, for Figure 2 The second sub-image with the serial number 1 is rotated 90° counterclockwise.
[0071] Table 1
[0072]
[0073] Step 1053: Determine the arrangement method for each second sub-image according to the combination method.
[0074] In this embodiment, the combination method also includes an arrangement method for each sub-image, and the arrangement method includes a method for rearranging and combining the second sub-images. It should be noted that the size of the new image generated after rearranging and combining the second sub-images according to the arrangement method is the same as the size of the face image, that is, after the face image is divided into n×n second sub-images, after rearranging and combining the second sub-images according to the arrangement method, there are also n second sub-images in the horizontal and vertical directions.
[0075] Step 1054: rearrange the rotated second sub-image according to the arrangement mode to obtain a first blurred face image.
[0076] After the arrangement is determined, the rotated second sub-images can be rearranged and combined according to the arrangement, thereby generating a first blurred face image. Figure 2 The second sub-image shown is arranged as shown in Table 2.
[0077] Table 2
[0078]
[0079] The rearranged sequence numbers in Table 2 are the rearranged sequence numbers of the second sub-image after rotation. For example, Figure 2 The rotated second sub-image with the sequence number 1 needs to be moved to the position of the second sub-image with the sequence number 6, and the rotated second sub-image with the sequence number 6 needs to be moved to the position of the second sub-image with the sequence number 9, and the rearrangement of the other rotated second sub-images is similar, which will not be described in detail in this embodiment. After rearranging each second sub-image according to the arrangement in Table 2, the first blurred face image can be obtained.
[0080] Step 106: Generate a first blurred working image and a second blurred face image according to the exchange mode, the first sub-image and the first blurred face image.
[0081] After obtaining the first blurred face image, it is necessary to further use the first sub-image to exchange with the second sub-image (rotated) in the first blurred face image according to the exchange method to generate the second blurred face image. Exemplarily, the face blurring device can select at least one first target sub-image from the first sub-image according to the exchange method, and determine that the second target sub-image needs to be exchanged in the first blurred face image, and exchange the first target sub-image and the second target sub-image with each other, and the working image after the exchange is the first blurred working image, and the first blurred face image after the exchange is the second blurred face image.
[0082] On the basis of the above embodiment, the number of first sub-images is greater than or equal to the number of face images. Specifically, in the division method corresponding to different regions, a division method corresponding to the number of different face images is also specified, so that the number of first sub-images obtained after dividing the working image is greater than or equal to the number of face images.
[0083] In step 106, a first blurred working image and a second blurred face image are generated according to the exchange mode, the first sub-image and the first blurred face image, including:
[0084] Step 1061: According to the exchange method, determine a first target sub-image corresponding to each first blurred face image from the first sub-image, and determine a second target sub-image corresponding to each first target sub-image in the first blurred face image.
[0085] In this embodiment, the exchange method stipulates that there is a first target sub-image in the first sub-image corresponding to each first blurred face image. Exemplarily, after the face blurring device extracts each face image from the monitoring screen, it can assign a number to each face image according to preset rules, and the preset rules are pre-set in the face blurring device and the monitoring terminal. For example, a number can be assigned to each face image according to the position of the face image in the monitoring screen. Exemplarily, the distance between the face and the front of the bus can be determined based on the position of the face image, and a number can be assigned to each face image based on the size of the distance. The closest number is 1, and the farthest number is the largest. When the distance is the same, the face images are numbered from left to right in the width direction of the bus. At the same distance, the number of the face image on the left is smaller than the number of the face image on the right, such as Figure 3 As shown, Figure 3 Schematic diagram of assigning numbers to different face images in the monitoring screen. The exchange method includes the numbering of the first target sub-image corresponding to each first blurred face image in the first sub-image when there are different numbers of face images, wherein the numbering of the first blurred face image is consistent with the numbering of the original face image.
[0086] In addition, since the first fuzzy face image also includes multiple sub-images (i.e., the second sub-images that have been rotated and rearranged), the exchange method also stipulates that the second target sub-image in each sub-image of the first fuzzy face image needs to be exchanged with the first target sub-image. For example, assume that 5 face images are extracted from the monitoring screen, and the sequence numbers of the face images are 1 to 5. The working image is divided into 3×3 first sub-images, and each face image is divided into 3×3 second sub-images. The exchange method is shown in Table 3.
[0087] Table 3
[0088]
[0089] As shown in Table 3, the first sub-image with sequence number 1 in the working image needs to be exchanged with the sub-image with sequence number 7 in the first blurred face image corresponding to the face image with sequence number 4. The specific process of the exchange is as follows: Figure 4 As shown, the exchange method of other first blurred face images is similar. However, for the first sub-images without numbers corresponding to the first blurred face images, there is no need to exchange them.
[0090] In one embodiment, the exchange method includes the first target sub-image corresponding to each first blurred face image in the first sub-image and the second target sub-image corresponding to each first target sub-image in the first blurred face image under different route numbers and different numbers of face images. That is, different exchange methods of first target sub-images and second target sub-images are corresponding to different bus route numbers, which further improves safety.
[0091] Step 1062: Exchange the first target sub-image with the second target sub-image in the corresponding first blurred face image to generate a first blurred working image and a second blurred face image.
[0092] Afterwards, the face blurring device needs to exchange the first target sub-image with the second target sub-image in the corresponding first blurred face image according to the exchange method. The exchanged working image is the first blurred working image, and the exchanged first blurred face image is the second blurred face image.
[0093] Step 107: After using the second blurred face image to replace the corresponding face image in the monitoring screen, the replaced monitoring screen and the first blurred working image are transmitted to the monitoring terminal, so that the monitoring terminal can restore the second blurred face image in the replaced monitoring screen according to the exchange method, the combination method and the first blurred working image.
[0094] After obtaining the second fuzzy face image corresponding to each face image, the second fuzzy face image can be used to replace the corresponding face image in the monitoring screen, and then the replaced monitoring screen and the first fuzzy working image are transmitted to the monitoring terminal. After receiving the monitoring screen and the first fuzzy working image, the monitoring terminal can determine the division method of the face image and the working image according to the real-time position of the bus when uploading the monitoring screen and the first fuzzy working image, and query the corresponding exchange method and combination method according to the line number. The exchange methods and combination methods corresponding to different line numbers are pre-stored in the monitoring terminal.
[0095] Afterwards, the monitoring terminal can intercept the second blurred face image from the monitoring screen. In one embodiment, in order to facilitate interception, the face blurring device can also mark the frame of each second blurred face image in the uploaded monitoring screen, so that the monitoring terminal can directly intercept the second blurred face image based on the frame. After intercepting the second blurred face image, the monitoring terminal can restore the second blurred face image according to the division method, combination method, exchange method and the first blurred working image to obtain the face image in the monitoring screen. Specifically, firstly, according to the division method, the first blurred working image and the second blurred face image are respectively divided into multiple sub-images, and then according to the exchange method, the exchanged sub-images in the first blurred working image are restored to the corresponding second blurred face image. Finally, according to the combination method, the arrangement method and rotation angle of the sub-images in the second blurred face image are restored to obtain the original face image.
[0096] In addition, due to the need for data processing, the real-time position of the bus when uploading the surveillance image and the first blurred working image may deviate from the real-time position determined by the face blurring device. When restoration fails, the position of the bus before the preset time when uploading the surveillance image and the first blurred working image can be obtained for restoration.
[0097] As described above, the embodiment of the present invention provides a method for blurring faces in a bus surveillance video. The embodiment of the present invention extracts a face image from the surveillance picture and determines the bus line number, real-time location, and working image of the bus driver. Then, according to the real-time location, the working image and the face image are respectively divided into a plurality of first sub-images and a plurality of second sub-images; the combination method of the second sub-image and the exchange method of the first sub-image are determined according to the line number, and the second sub-image is combined and exchanged with the first sub-image according to the combination method and the exchange method to obtain a second blurred face image and a first blurred working image, and the second blurred face image is used to replace the face image in the surveillance picture. The embodiment of the present invention blurs the face image in the surveillance picture, so that even if the surveillance picture is leaked during the transmission process, the face in the surveillance picture cannot be viewed, which can effectively protect the privacy of passengers, and solves the technical problem that the existing technology does not blur the faces of passengers in the process of transmitting the surveillance video on the bus, resulting in the easy leakage of the privacy of passengers.
[0098] like Figure 5 As shown, Figure 5 A schematic diagram of a structure of a face blurring device for a public transportation monitoring video provided by an embodiment of the present invention, such as Figure 5 As shown, a face blurring device for a bus monitoring video provided by an embodiment of the present invention comprises:
[0099] The face image extraction module 201 is used to obtain the monitoring picture of the bus taken by the camera in real time, and extract the face image of each passenger from the monitoring picture, and each face image has the same size;
[0100] The information acquisition module 202 is used to determine the bus line number, real-time location and working image of the bus driver, and scale the working image to the same size as the face image;
[0101] An image segmentation module 203 is used to segment the working image and the face image into a plurality of first sub-images and a plurality of second sub-images according to the real-time position, and the first sub-images and the second sub-images have the same size and number;
[0102] The exchange mode determination module 204 is used to determine the combination mode of the second sub-image and the exchange mode of the first sub-image according to the line number;
[0103] An image combining module 205, configured to re-combine the second sub-images according to a combining method to generate a first blurred face image;
[0104] A blurred image generating module 206, configured to generate a first blurred working image and a second blurred face image according to the exchange mode, the first sub-image and the first blurred face image;
[0105] The image replacement module 207 is used to replace the corresponding face image in the monitoring picture with the second blurred face image, and then transmit the replaced monitoring picture and the first blurred working image to the monitoring terminal, so that the monitoring terminal can restore the second blurred face image in the replaced monitoring picture according to the exchange method, the combination method and the first blurred working image.
[0106] Based on the above embodiment, the image segmentation module 203 includes:
[0107] A division method determination submodule is used to determine the division method of the working image and the face image according to the real-time position;
[0108] The image division submodule is used to divide the working image and the face image into a plurality of first sub-images and a plurality of second sub-images according to a division method.
[0109] Based on the above embodiment, the division mode determination submodule includes:
[0110] A region determination unit, used to determine the current region according to the real-time position, where the region is obtained by dividing the map in advance;
[0111] The division method determination unit is used to obtain the division method corresponding to the region from the database according to the region. The database stores the division method corresponding to each region, and the division method includes the horizontal division method and the vertical division method of the image.
[0112] Based on the above embodiment, the image combination module 205 includes:
[0113] A rotation mode determination submodule, used for determining a rotation mode corresponding to each second sub-image according to the combination mode;
[0114] A rotation submodule, used for rotating each second sub-image according to a rotation method;
[0115] An arrangement mode determination submodule, used to determine an arrangement mode with each second sub-image according to the combination mode;
[0116] The arrangement submodule is used to rearrange the rotated second sub-image according to an arrangement mode to obtain a first blurred face image.
[0117] Based on the above embodiment, the rotation angle of the second sub-image is a multiple of 90°.
[0118] Based on the above embodiment, the number of the first sub-images is greater than or equal to the number of face images, and the blurred image generating module 206 includes:
[0119] A target sub-image determination sub-module, used to determine, according to the exchange method, from the first sub-image, a first target sub-image corresponding to each first blurred face image, and to determine, in the first blurred face image, a second target sub-image corresponding to each first target sub-image;
[0120] The sub-image exchange sub-module is used to exchange the first target sub-image with the second target sub-image in the corresponding first blurred face image to generate a first blurred working image and a second blurred face image.
[0121] Based on the above embodiment, the exchange method includes a first target sub-image corresponding to each first blurred face image in the first sub-image under different line numbers, and a second target sub-image corresponding to each first target sub-image in the first blurred face image.
[0122] The face blurring device for bus surveillance video provided in the embodiment of the present invention is included in the face blurring equipment for bus surveillance video, and can be used to execute the face blurring method for bus surveillance video provided in the above embodiment, and has corresponding functions and beneficial effects.
[0123] It is worth noting that in the embodiment of the above-mentioned face blurring device for bus surveillance video, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0124] This embodiment also provides a device for blurring faces in public transportation surveillance videos, such as Figure 6 As shown, Figure 6 Schematic diagram of the structure of a face blurring device for a public transportation monitoring video provided by an embodiment of the present invention. The face blurring device 30 for a public transportation monitoring video provided by an embodiment of the present invention includes a processor 300 and a memory 301;
[0125] The memory 301 is used to store the computer program 302 and transmit the computer program 302 to the processor 300;
[0126] The processor 300 is used to execute the steps in the above-mentioned embodiment of the method for blurring faces in a bus surveillance video according to the instructions in the computer program 302.
[0127] Exemplarily, the computer program 302 may be divided into one or more modules / units, one or more modules / units are stored in the memory 301, and are executed by the processor 300 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 302 in the face blurring device 30 for bus surveillance video.
[0128] The face blurring device 30 for bus surveillance video can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The face blurring device 30 for bus surveillance video can include, but is not limited to, a processor 300 and a memory 301. Those skilled in the art can understand that Figure 6 It is only an example of the face blurring device 30 for bus surveillance video and does not constitute a limitation of the face blurring device 30 for bus surveillance video. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the face blurring device 30 for bus surveillance video may also include input and output devices, network access devices, buses, etc.
[0129] The processor 300 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0130] The memory 301 may be an internal storage unit of the face blurring device 30 for bus surveillance video, such as a hard disk or memory of the face blurring device 30 for bus surveillance video. The memory 301 may also be an external storage device of the face blurring device 30 for bus surveillance video, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the face blurring device 30 for bus surveillance video. Further, the memory 301 may also include both an internal storage unit and an external storage device of the face blurring device 30 for bus surveillance video. The memory 301 is used to store computer programs and other programs and data required by the face blurring device 30 for bus surveillance video. The memory 301 may also be used to temporarily store data that has been output or is to be output.
[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0132] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0133] 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 solution of this embodiment.
[0134] In addition, each functional unit in each embodiment of the present invention 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.
[0135] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store computer programs.
[0136] The embodiment of the present invention further provides a storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to execute a method for blurring faces in a public transportation monitoring video. The method includes the following steps:
[0137] Obtain the surveillance images of the bus captured by the camera in real time, and extract the facial image of each passenger from the surveillance images, where each facial image has the same size;
[0138] Determine the bus line number, real-time location, and working image of the bus driver, and scale the working image to the same size as the face image;
[0139] According to the real-time position, the working image and the face image are respectively divided into a plurality of first sub-images and a plurality of second sub-images, and the first sub-images and the second sub-images are of the same size and quantity;
[0140] Determine, according to the line number, a combination method of the second sub-image and an exchange method of the first sub-image;
[0141] Recombining the second sub-images according to the combination method to generate a first blurred face image;
[0142] Generate a first blurred working image and a second blurred face image according to the exchange mode, the first sub-image and the first blurred face image;
[0143] After using the second blurred face image to replace the corresponding face image in the monitoring screen, the replaced monitoring screen and the first blurred working image are transmitted to the monitoring terminal, so that the monitoring terminal can restore the second blurred face image in the replaced monitoring screen according to the exchange method, combination method and the first blurred working image.
[0144] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the embodiments of the present invention are not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.
Claims
1. A method for blurring faces in bus surveillance videos, characterized in that: include: Acquire the surveillance picture of the bus taken by the camera in real time, and extract the face image of each passenger from the surveillance picture, wherein each face image has the same size; Determine the route number and real-time location of the bus and the working image of the driver of the bus, and scale the size of the working image to be consistent with the size of the facial image; According to the real-time position, the working image and the face image are respectively divided into a plurality of first sub-images and a plurality of second sub-images, and the first sub-images and the second sub-images are the same in size and number; determining, according to the line number, a combination method of the second sub-image and an exchange method of the first sub-image; Recombining the second sub-images according to the combination method to generate a first blurred face image; Generate a first blurred working image and a second blurred face image according to the exchange mode, the first sub-image and the first blurred face image; After replacing the corresponding face image in the monitoring screen with the second blurred face image, transmitting the replaced monitoring screen and the first blurred working image to the monitoring terminal, so that the monitoring terminal restores the second blurred face image in the replaced monitoring screen according to the exchange method, the combination method and the first blurred working image; Wherein, the step of dividing the working image and the face image into a plurality of first sub-images and a plurality of second sub-images respectively according to the real-time position includes: Determining a division method of the working image and the face image according to the real-time position; According to the division method, the working image and the face image are divided into a plurality of first sub-images and a plurality of second sub-images respectively; Wherein, determining the division method of the working image and the face image according to the real-time position includes: Determine the current area according to the real-time location, where the area is obtained by dividing the map in advance; According to the region, a division method corresponding to the region is acquired from a database, wherein the database stores a division method corresponding to each region, and the division method includes a horizontal division method and a vertical division method of the image; The step of recombining the second sub-images according to the combination method to generate a first blurred face image includes: According to the combination mode, determining a rotation mode corresponding to each of the second sub-images; Rotate each of the second sub-images according to the rotation method; According to the combination mode, determining an arrangement mode with each of the second sub-images; According to the arrangement method, the rotated second sub-image is rearranged to obtain a first blurred face image; The number of the first sub-images is greater than or equal to the number of the facial images, and the generating of the second blurred facial image according to the exchange mode, the first sub-images and the first blurred facial image includes: According to the exchange mode, a first target sub-image corresponding to each first blurred face image is determined from the first sub-image, and a second target sub-image corresponding to each first target sub-image is determined from the first blurred face image; The first target sub-image is exchanged with the second target sub-image in the corresponding first blurred face image to generate a first blurred working image and a second blurred face image.
2. The method for blurring faces in public transportation surveillance video according to claim 1, characterized in that: The rotation angle of the second sub-image is a multiple of 90°.
3. The method for blurring faces in public transportation surveillance video according to claim 2, characterized in that: The exchange method stipulates that under different line numbers, there are first target sub-images in the first sub-image corresponding to each first blurred face image, and second target sub-images in the first blurred face image corresponding to each first target sub-image, that is, different bus line numbers correspond to different exchange methods of the first target sub-image and the second target sub-image.
4. A face blurring device for bus surveillance video, characterized in that: include: A face image extraction module is used to obtain the monitoring picture of the bus taken by the camera in real time, and extract the face image of each passenger from the monitoring picture, and each face image has the same size; An information acquisition module, used to determine the bus line number, real-time location and working image of the bus driver, and scale the working image to be consistent with the size of the face image; An image segmentation module, used for segmenting the working image and the face image into a plurality of first sub-images and a plurality of second sub-images according to the real-time position, wherein the first sub-images and the second sub-images have the same size and quantity; an exchange mode determination module, used for determining a combination mode of the second sub-image and an exchange mode of the first sub-image according to the line number; An image combining module, used for recombining the second sub-images according to the combining method to generate a first blurred face image; a blurred image generating module, configured to generate a first blurred working image and a second blurred face image according to the exchange mode, the first sub-image and the first blurred face image; an image replacement module, configured to replace the corresponding face image in the monitoring picture with the second blurred face image, and then transmit the replaced monitoring picture and the first blurred working image to the monitoring terminal, so that the monitoring terminal restores the second blurred face image in the replaced monitoring picture according to the exchange mode, the combination mode and the first blurred working image; Wherein, the image segmentation module comprises: A division method determination submodule, used to determine the division method of the working image and the face image according to the real-time position; An image division submodule, used for dividing the working image and the face image into a plurality of first sub-images and a plurality of second sub-images according to the division method; The division mode determination submodule includes: An area determination unit, used to determine the current area according to the real-time position, wherein the area is obtained by dividing the map in advance; a division mode determining unit, configured to obtain, according to the region, a division mode corresponding to the region from a database, wherein the database stores a division mode corresponding to each region, the division mode including a horizontal division mode and a vertical division mode of the image; Wherein, the image combination module comprises: A rotation mode determination submodule, used for determining a rotation mode corresponding to each of the second sub-images according to the combination mode; A rotation submodule, used for rotating each of the second sub-images according to the rotation mode; an arrangement mode determining submodule, used for determining an arrangement mode with each of the second sub-images according to the combination mode; an arrangement submodule, used for rearranging the rotated second sub-image according to the arrangement mode to obtain a first blurred face image; The number of the first sub-images is greater than or equal to the number of face images, and the blurred image generation module includes: a target sub-image determination sub-module, configured to determine, according to the exchange mode, from the first sub-image a first target sub-image corresponding to each first blurred face image, and to determine, in the first blurred face image, a second target sub-image corresponding to each first target sub-image; The sub-image exchange sub-module is used to exchange the first target sub-image with the second target sub-image in the corresponding first blurred face image to generate a first blurred working image and a second blurred face image.
5. A face blurring device for public transportation surveillance video, characterized in that: The face blurring device for the bus surveillance video includes a processor and a memory; The memory is used to store a computer program and transmit the computer program to the processor; The processor is used to execute a method for blurring faces in a bus surveillance video according to any one of claims 1 to 3 according to instructions in the computer program.
6. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to execute a method for blurring faces in a public transportation surveillance video as described in any one of claims 1 to 3 when executed by a computer processor.
