CN112672102B - Video generation method and device - Google Patents

Video generation method and device Download PDF

Info

Publication number
CN112672102B
CN112672102B CN201910980259.XA CN201910980259A CN112672102B CN 112672102 B CN112672102 B CN 112672102B CN 201910980259 A CN201910980259 A CN 201910980259A CN 112672102 B CN112672102 B CN 112672102B
Authority
CN
China
Prior art keywords
video
information
target object
detected
client
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910980259.XA
Other languages
Chinese (zh)
Other versions
CN112672102A (en
Inventor
向芬芬
蔡伟良
赵伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201910980259.XA priority Critical patent/CN112672102B/en
Publication of CN112672102A publication Critical patent/CN112672102A/en
Application granted granted Critical
Publication of CN112672102B publication Critical patent/CN112672102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides a video generation method and a video generation device, which are applied to a server, wherein the method comprises the following steps: receiving a video acquisition request sent by a client; acquiring a video to be detected requested by the video acquisition request, and detecting an object in each video frame of the video to be detected; sending the information of the video to be detected and the object in each video frame to the client, so that the client selects a target object to be subjected to blurring processing according to the video to be detected and the received information; receiving the identification of each target object sent by the client; and acquiring a blurring processing mode of each target object, and blurring each target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object. By applying the video generation method and device provided by the embodiment of the invention, the privacy protection degree of the object in the video is improved.

Description

Video generation method and device
Technical Field
The invention relates to the technical field of digital image processing, in particular to a video generation method and a video generation device.
Background
The application of current video monitoring is more and more extensive, and when people meet problems, people can ask a monitoring center to check monitoring videos, thereby helping the people to solve the problems. However, a large number of objects may be involved in the surveillance video, such as: for example, in order to protect the privacy of the object related to the surveillance video, it is necessary to perform object blurring on the surveillance video. In the prior art, when performing object virtualization on an object in a surveillance video, the same object virtualization processing mode is adopted, for example: a human face blurring processing mode. The object blurring processing refers to performing color level detail degradation or blurring processing on a region of an object to be blurred in a video frame. The object blurring process may be implemented based on a mosaic technique or a gaussian blurring technique.
However, since there are many different situations for the objects in the surveillance video, if only the same object blurring processing method is used, the privacy protection degree for the objects in the surveillance video will be low.
Disclosure of Invention
The embodiment of the invention aims to provide a video generation method and a video generation device so as to improve the privacy protection degree of an object in a video. The specific technical scheme is as follows:
in a first aspect, the present invention provides a video generation method applied to a server, where the method includes:
receiving a video acquisition request sent by a client;
acquiring a video to be detected requested by the video acquisition request, and detecting an object in each video frame of the video to be detected;
sending the information of the video to be detected and the object in each video frame to the client, so that the client selects a target object to be subjected to blurring processing according to the video to be detected and the received information;
receiving the identification of each target object sent by the client;
and acquiring a blurring processing mode of each target object, and blurring each target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object.
In an embodiment of the present invention, after the detecting the object in each video frame of the video to be detected, the method further includes:
obtaining area images respectively corresponding to areas where objects are located in each video frame of the video to be detected;
and sending the obtained area image to the client.
In an embodiment of the present invention, the obtaining a blurring processing manner for each target object includes:
acquiring object attributes of each target object, and acquiring a virtualization processing mode corresponding to each target object according to the acquired object attributes and the corresponding relation between preset object attributes and virtualization processing modes;
or
And receiving the virtualization processing mode of each target object set by the client.
In an embodiment of the present invention, after obtaining the virtualization processing manners corresponding to the respective target objects according to the obtained object attributes, the preset correspondence between the object attributes and the virtualization processing manners, the method further includes:
and sending the virtualization processing modes corresponding to the target objects to the client so that the client executes a first virtualization effect preview operation, wherein the first virtualization effect preview operation is realized by performing virtualization processing on each target object in the video frame of the video to be detected according to the virtualization processing modes corresponding to each target object and by adopting an object rendering mode.
In an embodiment of the present invention, the blurring processing on each target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object includes:
for each target object, obtaining similar objects of the target object from the detected objects;
and performing blurring processing on the target object and the similar object of the target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object.
In one embodiment of the invention, the method further comprises:
after obtaining the similar objects of each target object, sending the obtained identifiers of the similar objects to the client, so that the client executes a second virtualization preview operation, wherein the second virtualization preview operation is realized by performing virtualization processing on each target object and the similar objects of each target object in the video frame of the video to be detected in an object rendering manner.
In one embodiment of the invention, the method further comprises:
obtaining information for generating a digital watermark, wherein the information for generating the digital watermark comprises information of a video requester and/or information of a video manager;
generating a digital watermark according to the information;
determining the position of the digital watermark in each video frame of the video to be detected;
adding the digital watermark at the determined location.
In an embodiment of the present invention, the obtaining information for generating a digital watermark includes:
judging whether the credit level of the video requester is higher than a preset credit level;
if so, acquiring the information of the video requester as the information for generating the digital watermark;
if not, the information of the video requesting party and the information of the video managing party are obtained as the information for generating the digital watermark.
In one embodiment of the invention, the information of the video manager comprises an identifier of the video manager and object attribute information of the video manager;
the information of the video requester comprises identification of the video requester and object attribute information of the video requester.
In an embodiment of the present invention, the determining the position of the digital watermark in each video frame of the video to be detected includes:
and determining the position of the digital watermark in each video frame of the video to be detected in a random mode.
In a second aspect, the present invention provides a video generating apparatus applied to a server, the apparatus comprising:
the request acquisition module is used for receiving a video acquisition request sent by a client;
the object detection module is used for acquiring the video to be detected requested by the video acquisition request and detecting an object in each video frame of the video to be detected;
the information sending module is used for sending the information of the video to be detected and the object in each video frame to the client so that the client can select a target object to be subjected to blurring processing according to the video to be detected and the received information;
the identification receiving module is used for receiving the identification of each target object sent by the client;
and the object processing module is used for acquiring the blurring processing mode of each target object and blurring each target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object.
In one embodiment of the present invention, the apparatus further comprises:
the image obtaining module is used for obtaining area images corresponding to areas where the objects are located in the video frames of the video to be detected after the object detecting module detects the objects in the video frames of the video to be detected;
and the image sending module is used for sending the obtained area image to the client.
In an embodiment of the present invention, the object processing module is specifically configured to:
acquiring object attributes of each target object, and acquiring a virtualization processing mode corresponding to each target object according to the acquired object attributes and the corresponding relation between preset object attributes and virtualization processing modes;
or
And receiving the virtualization processing mode of each target object set by the client.
In one embodiment of the present invention, the apparatus further comprises:
and the processing mode sending module is used for sending the virtualization processing modes corresponding to the target objects to the client after the object processing module obtains the virtualization processing modes corresponding to the target objects according to the obtained object attributes and the preset corresponding relationship between the object attributes and the virtualization processing modes, so that the client executes a first virtualization effect preview operation, wherein the first virtualization effect preview operation is realized by performing virtualization processing on the target objects in the video frame of the video to be detected according to the virtualization processing modes corresponding to the target objects and by adopting an object rendering mode.
In an embodiment of the present invention, the object processing module includes:
a similar object obtaining unit configured to obtain, for each target object, a similar object of the target object from the detected objects;
and the object processing unit is used for carrying out blurring processing on the target object and the similar object of the target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object.
In one embodiment of the present invention, the apparatus further comprises:
and the identifier sending module is used for sending the identifiers of the obtained similar objects to the client after the similar objects of the target objects are obtained, so that the client executes a second virtualization preview operation, wherein the second virtualization preview operation is realized by virtualizing the target objects and the similar objects of the target objects in the video frame of the video to be detected in an object rendering mode.
In one embodiment of the present invention, the apparatus further comprises:
the information acquisition module is used for acquiring information for generating the digital watermark, wherein the information for generating the digital watermark comprises information of a video requester and/or information of a video manager;
the digital watermark generating module is used for generating a digital watermark according to the information;
the position determining module is used for determining the position of the digital watermark in each video frame of the video to be detected;
a digital watermark adding module for adding the digital watermark at the determined position.
In an embodiment of the present invention, the information obtaining module is specifically configured to:
judging whether the credit level of the video requester is higher than a preset credit level;
if so, acquiring the information of the video requester as the information for generating the digital watermark;
if not, obtaining the information of the video requester and the information of the video manager as the information for generating the digital watermark
In one embodiment of the present invention, the information of the video manager for generating the digital watermark includes an identifier of the video manager and object attribute information of the video manager;
the information of the video requester for generating the digital watermark comprises identification of the video requester and object attribute information of the video requester.
In an embodiment of the present invention, the position determining module is specifically configured to:
and determining the position of the digital watermark in each video frame of the video to be detected in a random mode.
In a third aspect, the present invention provides a server, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method steps of the first aspect when executing the program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method steps of the first aspect described above.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to generate a video, the server obtains a way of performing virtualization processing on each target object after receiving the identifier of each target object sent by the client. Thus different target objects may have different manners of blurring. Compared with the prior art, when the blurring processing is performed on the video, the blurring processing can be performed on the target object by using a plurality of different blurring processing modes, so that the blurring processing modes of each target object in the video are enriched, and the privacy of the target object in the video is better protected.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a first video generation method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a second video generation method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a first video generating apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a second video generating apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following first explains an execution subject of an embodiment of the present invention.
The execution subject of the embodiment of the invention is the server. Specifically, the hardware entity device corresponding to the server may be a DVR (Digital Video Recorder) or an NVR (Network Video Recorder).
The server can be in communication connection with the front-end video acquisition equipment and stores video data acquired by the front-end video acquisition equipment.
The following describes a video generation method according to an embodiment of the present invention with a specific embodiment.
Referring to fig. 1, fig. 1 is a schematic flowchart of a video generation method provided by an embodiment of the present invention, where the method is applied to a server, and the method includes the following steps S101 to S105.
S101: and receiving a video obtaining request sent by a client.
The server and the client may interact based on an encryption protocol.
The information carried in the video obtaining request may include information related to the video capture device, and may also include time information related to the video to be detected.
Specifically, the information related to the video capture device may be an identifier of the video capture device. When the server obtains the identifier of the video capture device, the video capture device corresponding to the identifier can be determined according to the obtained identifier.
The information related to the video capture device may also be an identification of a communication connection between the server and the video capture device. Because the server can establish communication connection with a plurality of video acquisition devices, each communication connection has a corresponding connection identifier. Therefore, after the server obtains the identifier of the connection between the server and the video capture device, the video capture device corresponding to the identifier can be determined according to the identifier of the connection.
The time information related to the video to be detected can be the starting time and the ending time of the video to be detected, the starting time and the video duration of the video to be detected, and the ending time and the video duration of the video to be detected. After the server obtains the time information related to the video to be detected, the acquisition time period of the video to be detected requested by the video obtaining request can be determined according to the obtained time information.
It is assumed that the information carried in the video obtaining request includes an identifier ID1 connected between the server and the video capture device a, and also includes a start time and a video duration of the video to be detected requested by the video obtaining request. After obtaining the video request sent by the client, the server can obtain the identifier ID1 information of the connection, the start time and the video duration. Therefore, the video acquisition equipment A can be determined according to the ID1, and the acquisition time period of the video to be detected can be determined according to the starting time and the video duration. Based on this, the video to be detected is: the video capture device a captures video during the capture period.
S102: and acquiring the video to be detected requested by the video acquisition request, and detecting an object in each video frame of the video to be detected.
The object in each video frame is different according to the content of the video, and for example, the object may be a person, a vehicle, a house, or the like.
When detecting an object in each video frame of a video to be detected, the object in each video frame may be detected in units of frames.
Specifically, after the server obtains the video to be detected, the server may decode the video to be detected to obtain decoded images corresponding to each video frame of the video to be detected, and perform object recognition on each decoded image according to an object recognition algorithm to obtain a recognition result. The obtained identification result is the object in each video frame of the video to be detected.
For different objects, the object recognition algorithm used in object recognition is generally different. For example: a face recognition algorithm may be employed to recognize faces in the decoded image. And identifying the vehicle and the like in the decoded image by adopting a vehicle identification algorithm. And an optimal frame recognition algorithm can be adopted to obtain the face, the human body or the region with the best recognition effect in the decoded image. For example, there are 10 consecutive video frames in a video, and each of the 10 consecutive video frames contains the object a. When the object identification is performed, the object a can be identified in all of the 10 consecutive video frames, and then an optimal frame identification algorithm can be adopted for the object a, and a video frame with the best identification effect of the object a is obtained in the 10 consecutive video frames as the identification result of the object a.
In one embodiment of the invention, after detecting the object in each video frame of the video to be detected, the area image corresponding to the area where each object in each video frame of the video to be detected is located can be obtained; and sending the obtained area image to the client.
For an object in a video frame, the area where the object is located is the area of the video frame that includes the object, and generally, the area does not include other objects.
The area image corresponding to the area where an object is located in a video frame can be understood as follows: and taking the content contained in the area as an image of the image content. In an embodiment of the present invention, after determining the region where the object is located, the server may obtain a region image corresponding to the region through a matting operation, and after obtaining the region image, may perform scaling processing on the region image, and set the size of the scaled image as a preset threshold. For example, the preset threshold may be set to 256 × 256 in units of pixels.
Therefore, the area image sent to the client by the server only comprises one object, and when the client displays the video to be detected, if the situation that the user cannot clearly identify the object due to dense objects occurs, the client can display the area image corresponding to the area where each object is located in each video frame, so that the user can clearly identify the object according to the area image.
S103: and sending the information of the video to be detected and the object in each video frame to the client, so that the client selects the target object to be subjected to blurring processing according to the video to be detected and the received information.
The information of the object in each video frame may be identification information, coordinate information, type information, feature information, and the like of the object.
Because content correlation exists between adjacent video frames of the video, after detecting an object in each video frame of the video to be detected, the server can also judge whether the detected object is detected in the previous video frame. In this way, the same object in each video frame can be merged.
In view of the above, the information of the object sent by the server to the client may be, in one case, information of the object in each video frame, and in another case, information of each detected object with respect to each video frame.
Specifically, when the server side sends the video to be detected and the information of the object in each video frame to the client side, in S102, after the server decodes the video to be detected, the information of the object in each video frame is used as private description information and a decoded image corresponding to each video frame to re-encode, so as to obtain a code stream, and the code stream is sent to the client side. The code stream is obtained by recoding the information of the object in each video frame and the decoded image corresponding to each video frame, so that the client receives the code stream and then obtains the information of the object in the video to be detected and each video frame.
The blurring processing refers to performing color level detail degradation or blurring processing on a region of an object to be blurred in the video frame.
After receiving the video to be detected and the information of the object in each video frame sent by the server, the client can select the target object to be subjected to blurring processing according to the video to be detected and the received information. Specifically, after the client displays the video to be detected to the user, the user can determine the object to be subjected to blurring processing in the user operation interface, so that the client can select the target object according to the object determined by the user.
In addition, the client can also select the target object according to a preset selection algorithm.
Specifically, the client may select the target object according to a credit rating of the user. For example, the target object may be selected on the basis of the fact that blurring is required as the credit level increases.
For example: the video segment comprises an object A, if the credit rating of A is high, human body blurring processing can be carried out on A, if the credit rating of A is medium, human face blurring processing can be carried out on A, and if the credit rating of A is low, blurring processing can not be carried out on A.
S104: and receiving the identification of each target object sent by the client.
S105: and acquiring the blurring processing mode of each target object, and blurring each target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object.
The blurring processing may be mosaic processing or gaussian blurring processing.
The blurring processing method for each target object may be determined by the server, or may be determined by the client, which will be described below.
In the first case: the server determines the way in which each target object is ghosted.
The server may preset a correspondence between the object attribute and the virtualization processing manner. On this basis, in an embodiment of the present invention, when the server obtains the way of performing the virtualization processing on each target object, the server may obtain the object attribute of each target object, and obtain the virtualization processing way corresponding to each target object according to the obtained object attribute, the preset correspondence between the object attribute and the virtualization processing way.
The object properties described above may be understood as types or characteristics of objects. For example: when the object is a person, the attribute of the person may be a human face or a human body. The correspondence between the object attribute and the virtualization processing mode may be: one object attribute corresponds to one virtualization processing mode or a plurality of virtualization processing modes. For example: the human body can correspond to a Gaussian blur processing mode, and the human face can correspond to a mosaic processing mode or a Gaussian blur processing mode.
The server can also determine a virtualization processing mode for each target object according to a preset rule. Specifically, the preset rule may be a rule related to the attribute of the object, the position of the object in the image, and the like. For example, when the object is a person, if the object is in a core region of a video frame, it may be determined that the blurring processing mode of the object is a mosaic processing mode of a face. If the object is in the rest area of the video frame, it can be determined that the blurring processing mode of the object is a mosaic processing mode for the human body. When the object is in a fixed area in each video frame of the video, it may be determined that the blurring processing mode of the object is a mosaic processing mode.
In the second case: and determining the blurring processing mode of each target object by the client.
The method can be used for selecting the target object in the client operation interface by the user and selecting the virtualization processing mode corresponding to each target object, and can also be used for presetting the corresponding relation between the object attribute and the virtualization processing mode by the client. On this basis, in an embodiment of the present invention, the way in which the server obtains the virtualization processing for each target object may be to determine, for the receiving client, the way in which the virtualization processing is performed for each target object.
The blurring processing of each target object is to perform blurring processing on an area in a video frame where each target object is located according to a blurring processing mode corresponding to the target object for each target object after the server obtains the blurring processing mode for each target object, so as to implement blurring processing on each target object.
For example, if the video blurring processing method corresponding to the target object a is a mosaic processing method, the details of the color level of the region in the video frame where the target object a is located are degraded according to the mosaic processing algorithm, and the mosaic processing for the target object a, that is, the blurring processing for the target object a is completed. If the video blurring processing mode corresponding to the target object B is a Gaussian blurring processing mode, according to a Gaussian blurring processing algorithm, the color level of the region of the video frame where the target object B is located is blurred, and the Gaussian blurring processing of the target object B is completed, namely the blurring processing of the target object B is completed.
When the server generates the video for blurring the target object, the server may decode the video to be detected first to obtain a decoded image corresponding to each video frame in the video to be detected. And aiming at the target object in each decoded image, performing blurring processing on the region where the target object is located in each decoded image by adopting a blurring processing algorithm corresponding to the target object. The decoded image after the blurring process is re-encoded, so that a video in which the blurring process is performed on the target object can be generated.
In an embodiment of the present invention, the server may perform blurring processing on an area where the target object is located in each decoded image, and may add a digital watermark to the video to be detected according to steps A1 to A4:
step A1: information for generating a digital watermark is obtained.
The information for generating the digital watermark may be information of a video requester or information of a video manager, and may also be information of the video requester and information of the video manager.
In an embodiment of the present invention, the information of the video manager includes an identifier of the video manager and object attribute information of the video manager.
The video management party can be a video monitoring center and can also be a manager of the video monitoring center.
Specifically, the identifier of the video manager may be a name of the video monitoring center, a job number of a manager, and the like. When the object attribute is a human face, the object attribute information of the video manager may be information for describing the human face of the video manager, and when the object attribute is a human body, the object attribute information of the video manager may be information for describing the human body of the video manager. The object attribute information of the video manager may be collected in advance.
In an embodiment of the present invention, the information of the video requester includes an identifier of the video requester and object attribute information of the video requester.
The video requesting party can be a user applying for viewing the video to be detected.
Specifically, the identifier of the video requester may be a name of the video requester, and the like. When the object attribute is a human face, the object attribute information of the video requester may be information for describing the human face of the video requester, and when the object attribute is a human body, the object attribute information of the video requester may be information for describing the human body of the video requester. The object attribute information of the video requester can be object attribute information of the video requester, which is acquired by a camera on the client when the video requester applies for viewing a video at the client.
In one embodiment of the invention, obtaining the information for generating the digital watermark can determine whether the credit level of the video requesting party is higher than a preset credit level; if so, acquiring the information of the video requester as the information for generating the digital watermark; if not, the information of the video requesting party and the information of the video managing party are obtained as the information for generating the digital watermark.
Specifically, it is assumed that the credit rating is divided into 30 ratings, and the 1 st rating to the 30 th rating indicate that the credit rating is higher and higher. If the credit level of the video requester is a 20 th level, if the credit level of the video requester is a 15 th level, the credit level is lower than the 20 th level of the preset credit level, then obtaining information of the video requester and information of the video manager as information for generating the digital watermark; if the credit rating of the video requester is 25 th, the information of the video requester is obtained as the information for generating the digital watermark because the credit rating is higher than the preset credit rating of 20 th.
In this way, the information for generating the digital watermark can be flexibly determined according to the credit level of the video requesting party.
Step A2: and generating the digital watermark according to the information.
Specifically, the information may be encrypted to generate a digital watermark.
Step A3: and determining the position of the digital watermark in each video frame of the video to be detected.
Specifically, the fixed position in each video frame of the video to be detected may be, for example: and the positions of the upper left corner, the upper right corner, the center and the like are used as the positions of the digital watermark in each video frame of the video to be detected.
In an embodiment of the present invention, the position of the digital watermark in each video frame of the video to be detected may be determined in a random manner.
Specifically, a random function Y = f (X) may be used, where Y is a location where the digital watermark is located, and X is a time when the video requester applies to view the video to be detected. Since the time when the video is viewed by the video requester varies, the location of the determined digital watermark also varies.
Step A4: adding a digital watermark at the determined position.
Specifically, when the digital watermark is added, each video frame of the video to be detected is decoded to obtain a decoded image, and then the digital watermark is added to the position determined in each decoded image of the video to be detected. And the decoded image added with the digital watermark information is re-encoded, so that the video to be detected added with the digital watermark can be generated.
In this way, since the digital watermark is added to each decoded image of the video to be detected as the image content of each video frame, the security of the generated video can be improved.
After the server generates the video, the video can be sent to the client, so that the client performs a downloading export operation.
The blurring process performed by the server on each target object will be described in each case.
In the first case: the target object is an object in a certain video frame.
That is, the object is an object determined for the video frame that has not been subjected to the merging process.
In this case, referring to fig. 2, fig. 2 is a schematic flowchart of a second video generation method according to an embodiment of the present invention, where the step S105 of performing, by the server, a blurring process on each target object in each video frame of the video to be detected according to a blurring processing manner corresponding to each target object includes:
S105A: for each target object, a similar object of the target object is obtained from the detected objects.
The similar objects may be: and the object with the characteristic similarity percentage larger than the preset similarity threshold value with the target object.
The preset similarity threshold may be set to a specific value, or may be set to a value within a preset range, that is, a value within a range.
If the predetermined similarity threshold is a specific value, the predetermined similarity threshold may be set to 90%, 80%, or 70%.
If the predetermined similarity threshold is a value within a predetermined range, the predetermined range may be [0%,100% ], [50%,100% ], [90%,100% ], or the like. Assuming that the preset range is [0%,100% ], the preset similarity threshold value may be set to any value within [0%,100% ]. The specific setting can be carried out according to different actual conditions. For example: if the video acquisition device is closer to the object when acquiring the video, for example, the video acquisition device is an attendance machine, an indoor monitoring device, or the like, and in this case, the preset similarity threshold may be set to 99% or the like. If the video capture device captures a video at a distance from the object, for example, the video capture device is an outdoor monitoring device, in this case, the preset similarity threshold may be set to 90% or 80%.
S105B: and performing blurring processing on the target object and the similar object of the target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object.
In the second case, the target object is an object in a plurality of video frames.
That is, the object is an object subjected to the merging processing.
In this case, the server may perform target object blurring processing on each video frame having a target object in the video to be detected according to the blurring processing mode corresponding to each target object.
As can be seen from the above, when the scheme provided by this embodiment is applied to generate a video, the server obtains a way of performing virtualization processing on each target object after receiving the identifier of each target object sent by the client. Thus different target objects may have different manners of blurring. Compared with the prior art, when the blurring processing is performed on the video, the blurring processing can be performed on the target object by using a plurality of different blurring processing modes, so that the blurring processing modes of each target object in the video are enriched, and the privacy of the target object in the video is better protected.
Before the server performs video blurring processing on the video, the client can also perform blurring effect preview operation, so that a user can preview the effect of performing video blurring processing on the video in advance at the client.
The blurring effect preview operation is realized by blurring each target object in the video frame of the video to be detected in an object rendering mode according to the blurring processing mode corresponding to each object. The object rendering mode is to render the region where the object is located.
Specifically, after receiving the video to be detected and the information of the object in each video frame sent by the server in S102, the client may perform the blurring effect preview operation on each received object.
Specifically, the client may further obtain coordinate information of each target object after receiving each target object. And acquiring the area of each target object according to the coordinate information of each target object. In S105, performing a blurring process on each target object in the video frame of the video to be detected in an object rendering manner according to the blurring process manner corresponding to each target object.
Since there are two cases in the above target object in S105, there are two cases in which the client performs the blurring effect preview operation:
in the first case: the target object is an object in a plurality of video frames.
That is, the object is the object subjected to the merging processing.
In this case, in an embodiment of the present invention, in the above S105, after the server obtains the virtualization processing manners corresponding to the respective target objects according to the obtained object attributes, the corresponding relationship between the set object attributes and the virtualization processing manners, the server may further send the virtualization processing manners corresponding to the respective target objects to the client, so that the client performs the first virtualization effect preview operation.
The first blurring effect preview operation is implemented by blurring each target object in a video frame of the video to be detected according to a blurring processing mode corresponding to each target object and by adopting an object rendering mode.
In this way, the client can preview the blurring processing effect in advance after executing the first blurring effect preview operation.
In the second case: the target object is an object in a certain video frame.
That is, the object is an object determined for the video frame that has not been subjected to the merging process.
In this case, in an embodiment of the present invention, after obtaining the similar objects of the respective target objects, the server sends the obtained identifications of the similar objects to the client, so that the client performs the second ghosting preview operation.
And performing the second blurring preview operation by blurring each target object and similar objects of each target object in the video frame of the video to be detected in an object rendering mode.
In this way, the client can preview the blurring processing effect in advance after executing the second blurring effect preview operation.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a video generating apparatus:
referring to fig. 3, fig. 3 is a schematic structural diagram of a first video generating apparatus according to an embodiment of the present invention, which is applied to a server, and the apparatus includes:
a request obtaining module 301, configured to receive a video obtaining request sent by a client.
The object detection module 302 is configured to obtain the video to be detected requested by the video obtaining request, and detect an object in each video frame of the video to be detected.
The information sending module 303 is configured to send information of the video to be detected and the object in each video frame to the client, so that the client selects a target object to be subjected to blurring processing according to the video to be detected and the received information.
And the identifier receiving module 304 is configured to receive identifiers of the target objects sent by the client.
The object processing module 305 is configured to obtain a blurring processing mode for each target object, and perform blurring processing on each target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object.
As can be seen from the above, when the scheme provided by this embodiment is applied to generate a video, the server obtains the virtualization processing modes for each target object after receiving the identifier of each target object sent by the client, and different target objects may have different virtualization processing modes. Compared with the prior art, when the blurring processing is performed on the video, the blurring processing can be performed on the target object by using a plurality of different blurring processing modes, so that the blurring processing modes of each target object in the video are enriched, and the privacy of the target object in the video is better protected.
In an embodiment of the present invention, the apparatus further includes:
and the image obtaining module is used for obtaining the area images corresponding to the areas where the objects are located in the video frames of the video to be detected after the object detecting module detects the objects in the video frames of the video to be detected.
And the image sending module is used for sending the obtained area image to the client.
Therefore, the regional image sent to the client by the server only contains one object in the same type of objects, and when the client displays the video to be detected, the object cannot be clearly identified by the user due to dense objects. In this case, the client may display the area image corresponding to the area where each object is located in each video frame in the video to be detected, so that the user may clearly recognize the object according to the area image.
In an embodiment of the present invention, the object processing module is specifically configured to:
acquiring object attributes of each target object, and acquiring a virtualization processing mode corresponding to each target object according to the acquired object attributes and the corresponding relation between preset object attributes and virtualization processing modes;
or
And receiving the blurring processing mode of each target object set by the client.
In this way, the server can obtain the virtualization processing modes corresponding to the target object in different modes.
In an embodiment of the present invention, the apparatus further includes:
the object processing module is configured to, after obtaining a virtualization processing mode corresponding to each target object according to the obtained object attribute, a preset corresponding relationship between the object attribute and the virtualization processing mode, send the virtualization processing mode corresponding to each target object to the client, so that the client executes a first virtualization effect preview operation, where the first virtualization effect preview operation is implemented by virtualizing each target object in the video frame of the video to be detected according to the virtualization processing mode corresponding to each target object and by using an object rendering mode.
In this way, the client can preview the blurring processing effect in advance after executing the first blurring effect preview operation.
In an embodiment of the present invention, referring to fig. 4, fig. 4 is a schematic structural diagram of a second video generating apparatus according to an embodiment of the present invention, where the object processing module 305 includes:
a similar object obtaining unit 305A for obtaining, for each target object, a similar object of the target object from the detected objects;
the object processing unit 305B is configured to perform blurring processing on the target object and a similar object of the target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object.
In this way, the server obtains the similar object of each target object for each target object, and can obtain the blurring processing mode of the similar object of each target object.
In an embodiment of the present invention, the apparatus further includes:
and the identifier sending module is used for sending the identifiers of the obtained similar objects to the client after the similar objects of the target objects are obtained, so that the client executes a second virtualization preview operation, wherein the second virtualization preview operation is realized by virtualizing the target objects and the similar objects of the target objects in the video frame of the video to be detected in an object rendering mode.
In this way, the client can preview the blurring processing effect in advance after performing the second blurring effect preview operation.
In an embodiment of the present invention, the apparatus further includes:
the information acquisition module is used for acquiring information for generating the digital watermark, wherein the information for generating the digital watermark comprises information of a video requester and/or information of a video manager.
And the digital watermark generating module is used for generating the digital watermark according to the information.
And the position determining module is used for determining the position of the digital watermark in each video frame of the video to be detected.
A digital watermark adding module for adding the digital watermark at the determined position.
In this way, since the digital watermark is added to each decoded image of the video to be detected as the image content of each video frame, the security of the generated video can be improved.
In an embodiment of the present invention, the information obtaining module is specifically configured to:
judging whether the credit level of the video requester is higher than a preset credit level; if so, acquiring the information of the video requester as the information for generating the digital watermark; if not, the information of the video requesting party and the information of the video managing party are obtained as the information for generating the digital watermark.
In this way, the information for generating the digital watermark can be flexibly determined according to the credit level of the video requesting party.
In one embodiment of the invention, the information of the video manager for generating the digital watermark comprises an identifier of the video manager and object attribute information of the video manager; the information of the video requester for generating the digital watermark comprises identification of the video requester and object attribute information of the video requester.
In an embodiment of the present invention, the position determining module is specifically configured to:
and determining the position of the digital watermark in each video frame of the video to be detected in a random mode. Thus, the location where the digital watermark is determined varies.
Corresponding to the method embodiment, the embodiment of the invention also provides a server.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention, including a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502, and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to execute the video generating method steps provided in the foregoing method embodiments when executing the program stored in the memory 503.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In a further embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program is executed by a processor to perform the video generation method steps provided by the foregoing method embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the video generation method steps provided by the aforementioned method embodiments.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the invention are brought about in whole or in part when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. 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 one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media can be any available media that can be accessed by a computer or a data storage device, such as a server, data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, as for the apparatus, the server and the computer readable medium, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A video generation method applied to a server is characterized by comprising the following steps:
receiving a video acquisition request sent by a client;
acquiring a video to be detected requested by the video acquisition request, and detecting an object in each video frame of the video to be detected;
sending the information of the video to be detected and the object in each video frame to the client, so that the client selects a target object to be subjected to blurring processing according to the video to be detected and the received information;
receiving the identification of each target object sent by the client;
acquiring a blurring processing mode of each target object, and blurring each target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object;
the obtaining of the blurring processing mode for each target object includes: determining a blurring processing mode for each target object according to preset rules, wherein the preset rules comprise rules related to the attributes of the objects and the positions of the objects in each video frame;
after the detecting the object in each video frame of the video to be detected, the method further includes:
obtaining area images respectively corresponding to areas where objects are located in each video frame of the video to be detected;
sending the obtained area image to the client;
obtaining information for generating a digital watermark, wherein the information for generating the digital watermark comprises information of a video requester and/or information of a video manager;
generating a digital watermark according to the information;
determining the position of the digital watermark in each video frame of the video to be detected;
adding the digital watermark at the determined location;
the obtaining information for generating a digital watermark includes:
judging whether the credit level of the video requester is higher than a preset credit level;
if so, acquiring the information of the video requester as the information for generating the digital watermark;
if not, the information of the video requesting party and the information of the video managing party are obtained as the information for generating the digital watermark.
2. The method of claim 1, wherein obtaining the way to perform the blurring processing on each target object comprises:
acquiring object attributes of each target object, and acquiring a virtualization processing mode corresponding to each target object according to the acquired object attributes and the corresponding relation between preset object attributes and virtualization processing modes;
or
And receiving the virtualization processing mode of each target object set by the client.
3. The method according to claim 2, wherein after obtaining the virtualization processing modes corresponding to the respective target objects according to the obtained object attributes, the preset object attributes and the corresponding relations of the virtualization processing modes, the method further comprises:
and sending the virtualization processing modes corresponding to the target objects to the client so that the client executes a first virtualization effect preview operation, wherein the first virtualization effect preview operation is realized by performing virtualization processing on each target object in the video frame of the video to be detected according to the virtualization processing modes corresponding to the target objects and by adopting an object rendering mode.
4. The method according to any one of claims 1 to 3, wherein the blurring processing each target object in each video frame of the video to be detected according to the blurring processing manner corresponding to each target object comprises:
for each target object, obtaining similar objects of the target object from the detected objects;
and performing blurring processing on the target object and the similar object of the target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object.
5. The method of claim 4, further comprising:
after obtaining the similar objects of each target object, sending the obtained identifiers of the similar objects to the client, so that the client executes a second virtualization preview operation, wherein the second virtualization preview operation is realized by performing virtualization processing on each target object and the similar objects of each target object in the video frame of the video to be detected in an object rendering manner.
6. The method of claim 1,
the information of the video management party comprises an identifier of the video management party and object attribute information of the video management party;
the information of the video requester comprises identification of the video requester and object attribute information of the video requester.
7. The method according to claim 1, wherein the determining the position of the digital watermark in each video frame of the video to be detected comprises:
and determining the position of the digital watermark in each video frame of the video to be detected in a random mode.
8. A video generation apparatus applied to a server, the apparatus comprising:
the request acquisition module is used for receiving a video acquisition request sent by a client;
the object detection module is used for acquiring the video to be detected requested by the video acquisition request and detecting an object in each video frame of the video to be detected;
the information sending module is used for sending the information of the video to be detected and the object in each video frame to the client so that the client can select a target object to be subjected to blurring processing according to the video to be detected and the received information;
the identification receiving module is used for receiving the identification of each target object sent by the client;
the object processing module is used for acquiring a blurring processing mode of each target object and blurring each target object in each video frame of the video to be detected according to the blurring processing mode corresponding to each target object;
the object processing module is specifically configured to: determining a blurring processing mode for each target object according to preset rules, wherein the preset rules comprise rules related to the attributes of the objects and the positions of the objects in each video frame;
the image obtaining module is used for obtaining area images corresponding to areas where the objects in the video frames of the video to be detected are located after the object detecting module detects the objects in the video frames of the video to be detected;
the image sending module is used for sending the obtained area image to the client;
the information acquisition module is used for acquiring information for generating the digital watermark, wherein the information for generating the digital watermark comprises information of a video requester and/or information of a video manager;
the digital watermark generating module is used for generating a digital watermark according to the information;
the position determining module is used for determining the position of the digital watermark in each video frame of the video to be detected;
a digital watermark adding module for adding the digital watermark at the determined position;
the information obtaining module is specifically configured to: judging whether the credit level of the video requester is higher than a preset credit level or not; if so, acquiring the information of the video requester as the information for generating the digital watermark; if not, the information of the video requesting party and the information of the video managing party are obtained as the information for generating the digital watermark.
9. A server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN201910980259.XA 2019-10-15 2019-10-15 Video generation method and device Active CN112672102B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910980259.XA CN112672102B (en) 2019-10-15 2019-10-15 Video generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910980259.XA CN112672102B (en) 2019-10-15 2019-10-15 Video generation method and device

Publications (2)

Publication Number Publication Date
CN112672102A CN112672102A (en) 2021-04-16
CN112672102B true CN112672102B (en) 2023-03-24

Family

ID=75400127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910980259.XA Active CN112672102B (en) 2019-10-15 2019-10-15 Video generation method and device

Country Status (1)

Country Link
CN (1) CN112672102B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114708138B (en) * 2022-06-06 2022-10-04 天津联想协同科技有限公司 Network disk image watermark adding method and device, network disk and storage medium
CN115883959B (en) * 2023-02-14 2023-06-06 深圳市湘凡科技有限公司 Picture content control method for privacy protection and related product

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1767638A (en) * 2005-11-30 2006-05-03 北京中星微电子有限公司 Visible image monitoring method for protecting privacy right and its system
CN104917989A (en) * 2014-03-11 2015-09-16 移康智能科技(上海)有限公司 Hierarchical watermark adding method and system
CN105550596A (en) * 2015-12-23 2016-05-04 北京奇虎科技有限公司 Access processing method and apparatus
CN106358069A (en) * 2016-10-31 2017-01-25 维沃移动通信有限公司 Video data processing method and mobile terminal
CN107864336A (en) * 2017-11-24 2018-03-30 维沃移动通信有限公司 A kind of image processing method, mobile terminal
CN108012122A (en) * 2017-12-15 2018-05-08 北京奇虎科技有限公司 Processing method, device and the server of monitor video
CN108848334A (en) * 2018-07-11 2018-11-20 广东小天才科技有限公司 A kind of method, apparatus, terminal and the storage medium of video processing
JP2019092025A (en) * 2017-11-14 2019-06-13 株式会社日立国際電気 Editing system
CN109886864A (en) * 2017-12-06 2019-06-14 杭州海康威视数字技术股份有限公司 Privacy covers processing method and processing device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1767638A (en) * 2005-11-30 2006-05-03 北京中星微电子有限公司 Visible image monitoring method for protecting privacy right and its system
CN104917989A (en) * 2014-03-11 2015-09-16 移康智能科技(上海)有限公司 Hierarchical watermark adding method and system
CN105550596A (en) * 2015-12-23 2016-05-04 北京奇虎科技有限公司 Access processing method and apparatus
CN106358069A (en) * 2016-10-31 2017-01-25 维沃移动通信有限公司 Video data processing method and mobile terminal
JP2019092025A (en) * 2017-11-14 2019-06-13 株式会社日立国際電気 Editing system
CN107864336A (en) * 2017-11-24 2018-03-30 维沃移动通信有限公司 A kind of image processing method, mobile terminal
CN109886864A (en) * 2017-12-06 2019-06-14 杭州海康威视数字技术股份有限公司 Privacy covers processing method and processing device
CN108012122A (en) * 2017-12-15 2018-05-08 北京奇虎科技有限公司 Processing method, device and the server of monitor video
CN108848334A (en) * 2018-07-11 2018-11-20 广东小天才科技有限公司 A kind of method, apparatus, terminal and the storage medium of video processing

Also Published As

Publication number Publication date
CN112672102A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
US8396316B2 (en) Method and apparatus for processing image
CN113259721B (en) Video data sending method and electronic equipment
US8675065B2 (en) Video monitoring system
US20160155465A1 (en) Video masking processing method and apparatus
CN111654700B (en) Privacy mask processing method and device, electronic equipment and monitoring system
IL249739A (en) System and method for secured capturing and authenticating of video clips
CN112672102B (en) Video generation method and device
CN110738178A (en) Garden construction safety detection method and device, computer equipment and storage medium
CN109902475B (en) Verification code image generation method and device and electronic equipment
CN112257124A (en) Image processing method and device
CN111031359B (en) Video playing method and device, electronic equipment and computer readable storage medium
CN107832598B (en) Unlocking control method and related product
CN107886518B (en) Picture detection method and device, electronic equipment and readable storage medium
CN113780212A (en) User identity verification method, device, equipment and storage medium
US10299117B2 (en) Method for authenticating a mobile device and establishing a direct mirroring connection between the authenticated mobile device and a target screen device
WO2015168893A1 (en) Video quality detection method and device
CN110991231A (en) Living body detection method and device, server and face recognition equipment
CN114387548A (en) Video and liveness detection method, system, device, storage medium and program product
US20100102961A1 (en) Alert system based on camera identification
US8953843B1 (en) Selecting objects in a sequence of images
CN106161743B (en) Media resource processing method, device and terminal
JP6598952B2 (en) Image processing apparatus and method, and monitoring system
US11755758B1 (en) System and method for evaluating data files
KR101925799B1 (en) Computer program for preventing information spill displayed on display device and security service using the same
KR20210072609A (en) Service providing apparatus and method supporting high speed identification of photographic work based on deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant