CN111601063B - Video processing method and electronic equipment - Google Patents

Video processing method and electronic equipment Download PDF

Info

Publication number
CN111601063B
CN111601063B CN202010358450.3A CN202010358450A CN111601063B CN 111601063 B CN111601063 B CN 111601063B CN 202010358450 A CN202010358450 A CN 202010358450A CN 111601063 B CN111601063 B CN 111601063B
Authority
CN
China
Prior art keywords
video
target
target object
processed
distance
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
CN202010358450.3A
Other languages
Chinese (zh)
Other versions
CN111601063A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010358450.3A priority Critical patent/CN111601063B/en
Publication of CN111601063A publication Critical patent/CN111601063A/en
Application granted granted Critical
Publication of CN111601063B publication Critical patent/CN111601063B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone
    • H04N7/142Constructional details of the terminal equipment, e.g. arrangements of the camera and the display
    • H04N7/144Constructional details of the terminal equipment, e.g. arrangements of the camera and the display camera and display on the same optical axis, e.g. optically multiplexing the camera and display for eye to eye contact
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/82Protecting input, output or interconnection devices
    • G06F21/84Protecting input, output or interconnection devices output devices, e.g. displays or monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the invention provides a video processing method and electronic equipment. The method is applied to the electronic equipment and comprises the following steps: determining characteristic parameters of an object in a first video frame of a video to be processed, and determining a target object and a non-target object according to the characteristic parameters; wherein the characteristic parameters include at least one of: a first distance between an entity object corresponding to the object and the electronic equipment, a second distance between the entity object corresponding to the object and a main target entity object, a single occurrence time of the object in the video to be processed, and a preset mark of the object; wherein the primary target entity object corresponds to a primary target object of the target objects; replacing or overlaying the non-target object in the first video frame. The embodiment of the invention solves the problem that in the prior art, the privacy of a user is poor in the video call process.

Description

Video processing method and electronic equipment
Technical Field
The present invention relates to the field of mobile communications technologies, and in particular, to a video processing method and an electronic device.
Background
With the rapid development of mobile communication technology, electronic devices such as smart phones have become an indispensable tool in various aspects of people's life. The functions of various Application programs (APPs) of the electronic equipment are gradually improved, and the functions do not only play a role in communication, but also provide various intelligent services for users, so that great convenience is brought to the work and life of the users.
With the video call function, video calls have already occupied a large share of the field of instant messaging based on their visibility and convenience. Other application forms derived from video call, such as live broadcast, also create a great application prospect. However, in the process of video call, the privacy of the user is not completely protected, for example, when the video call is performed, the surrounding environment of the user is transmitted to the user at the opposite end in real time through the camera; on the one hand, it is possible for a communicating user in the surrounding environment that the communicating user does not want the information transferred to the other communicating interface, but it is often difficult to avoid.
Therefore, the privacy of the user is poor during the video call.
Disclosure of Invention
The embodiment of the invention provides a video processing method and electronic equipment, which can solve the problem that in the prior art, the privacy of a user is poor in the video call process.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a video processing method, where the method is applied to an electronic device, and the method includes:
determining characteristic parameters of an object in a first video frame of a video to be processed, and determining a target object and a non-target object according to the characteristic parameters; wherein the characteristic parameters include at least one of: a first distance between an entity object corresponding to the object and the electronic equipment, a second distance between the entity object corresponding to the object and a main target entity object, a single occurrence time of the object in the video to be processed, and a preset mark of the object; wherein the primary target entity object corresponds to a primary target object of the target objects;
replacing or overlaying the non-target object in the first video frame.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
the parameter determination module is used for determining the characteristic parameters of the object in the first video frame of the video to be processed and determining a target object and a non-target object according to the characteristic parameters; wherein the characteristic parameters include at least one of: a first distance between an entity object corresponding to the object and the electronic equipment, a second distance between the entity object corresponding to the object and a main target entity object, a single occurrence time of the object in the video to be processed, and a preset mark of the object; wherein the primary target entity object corresponds to a primary target object of the target objects;
a processing module to replace or overlay the non-target object in the first video frame.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps in the video processing method as described above when executing the computer program.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps in the video processing method as described above.
In the embodiment of the invention, by determining the characteristic parameters of the object in the first video frame of the video to be processed, the target object and the non-target object are determined according to the characteristic parameters, and the non-target object in the first video frame is replaced or covered; and performing replacement or covering processing on the non-target object to replace or cover the non-target object in the first video frame, so that the non-target object is prevented from being displayed in the first video frame and the processed complete video, and privacy disclosure of a user is prevented in the processes of video calling, live broadcasting, recorded broadcasting and the like.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flow chart of a video processing method according to an embodiment of the present invention;
FIG. 2 shows a schematic diagram of a first example of embodiment of the invention;
FIG. 3 shows a flow chart of a second example of embodiment of the invention;
FIG. 4 shows a flow chart of a third example of embodiment of the invention;
FIG. 5 shows one of the block diagrams of an electronic device provided by an embodiment of the invention;
fig. 6 shows a second block diagram of an electronic device according to an embodiment of the 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 some, not all, embodiments of the present invention. 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.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a video processing method applied to electronic devices, which include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of Mobile Stations (MSs), Terminal devices (Terminal devices), and so on.
The method comprises the following steps:
step 101, determining characteristic parameters of an object in a first video frame of a video to be processed, and determining a target object and a non-target object according to the characteristic parameters.
The video to be processed is a pre-recorded video or a video acquired in real time in the process of a video call between the sending end and the receiving end. After being processed, the video to be processed is sent to a receiving end by a sending end.
And performing image recognition on the first video frame in the video to be processed, and identifying an object in the video, wherein the object can be a person, an animal or a still object. After identifying the object, extracting characteristic parameters of the object; the characteristic parameters include the type of the object, the distance to the photographing apparatus, the distance to another object, and the like. Object types such as people, animals, or still, etc.
And determining a target object according to the characteristic parameters, wherein the target object is a main object in the first video frame. Optionally, or objects pre-labeled as target objects; or the characteristic parameter of the target object may be an object closest to the shooting device, for example, if the object is a person, the person closest to the call device may be determined to be a subject person in a video call scene or a live network scene.
Wherein the characteristic parameters include at least one of: a first distance between an entity object corresponding to the object and the electronic equipment, a second distance between the entity object corresponding to the object and a main target entity object, a single occurrence time of the object in the video to be processed, and a preset mark of the object; wherein the primary target entity object corresponds to a primary target object of the target objects; the object may be an object in a video frame of a video to be processed, and may be a person, an animal, a still object, or the like, and the entity object is a real object in a real environment corresponding to the object, such as a person corresponding to the person, and an object real object corresponding to the object.
It is understood that, in the embodiment of the present invention, the distance-related parameters, such as the first distance and the second distance, are physical distances between the physical objects or between the physical objects and the electronic device; and the target object and the non-target object refer to the image of each entity object in the video.
As a first example, referring to fig. 2, the above characteristic parameters are introduced in the scene of fig. 2, where M denotes a photographing device which is a photographing device of a video to be processed, A, B, C are three solid objects within the photographing range of the photographing device, respectively; d is the entity object outside the shooting range, and the shooting equipment cannot shoot the entity object D; da is a first distance between the physical object a and the photographing apparatus, db is a first distance between the physical object B and the photographing apparatus, and dc is a first distance between the physical object C and the photographing apparatus; if the entity object a is the main target entity object of the main target object, the second distance of the entity object B is the distance between the entity object B and the main target entity object a, i.e. d1 in fig. 2; the second distance of the entity object C is the distance between the entity object C and the main target entity object a, i.e. d2 in fig. 2.
Alternatively, in the process of determining the target object by the shooting device, a filtering range may be set, as shown in fig. 2, in a range with the shooting device M as the center and the radius R as a circle, and objects in the range are preferentially selected as the identified objects.
Specifically, during the process of recording the video to be processed, the shooting device may determine, by using a target detection technology, a first distance of each entity object relative to the shooting device and a second distance between each entity object and a main target entity object, or take a difference between the first distances of the two as the second distance of the two; when the shooting device obtains the first distance and/or the second distance of each object, the first distance and/or the second distance can be carried in the first video frame as a characteristic parameter.
And if the object appears in the video to be processed for multiple times, the single-appearing time length is not accumulated.
The objects may have a preset tag, for example, some objects may be pre-tagged as target objects or non-target objects.
Step 102, replacing or overlaying the non-target object in the first video frame.
The non-target object, i.e. the non-subject object in the first video frame, may be determined according to a characteristic parameter of the object, for example, an object farther from the shooting device, or an object that is pre-marked as a non-target object.
In addition, after determining at least one target object, further searching for other target objects in the first video frame based on the characteristic parameters of other objects; such as an object that is closer to the target object.
After the non-target object is determined, performing replacement or coverage processing on the non-target object; for example, taking the covering process as an example, the mosaic process is performed on the non-target object, so that the details of the color level of the region where the non-target object is located are degraded, the color blocks are disturbed, and the covering is performed through the mosaic; taking replacement processing as an example, replacing the area where the non-target object is located by using a preset mark, for example, firstly performing matting processing on pixel points of the area where the non-target object is located, and then filling the preset mark in the area subjected to the matting processing to complete the replacement processing, so as to avoid the situation that the privacy of a video call user or the non-target object is revealed because the non-target object is displayed in a video to be processed.
Alternatively, for a video frame to be processed, a processing period may be set, such as several seconds each; in a processing period, a frame of image is selected as a first video frame, after a target object and a non-target object are identified based on the first video frame, the non-target object in the video frame in the processing period is replaced or covered, and the identification of each frame of image is not needed, so that the image processing operation amount of the electronic equipment is reduced.
In order to ensure the image processing precision, each frame of image in the video to be processed can be identified; the specific identification manner may be set by a user, and the embodiment of the present invention is not limited herein.
And sending the processed video frame or the complete video to a receiving end, so that a receiving end user cannot check the non-target object when checking the video frame or the video, and the privacy of the user is effectively protected.
In the embodiment of the invention, a characteristic parameter of an object in a first video frame of a video to be processed is determined, a target object and a non-target object are determined according to the characteristic parameter, and the non-target object in the first video frame is replaced or covered; and performing replacement or covering processing on the non-target object to replace or cover the non-target object in the first video frame, so that the non-target object is prevented from being displayed in the first video frame and the processed complete video, and privacy disclosure of a user is prevented in the processes of video calling, live broadcasting, recorded broadcasting and the like. The embodiment of the invention solves the problem that in the prior art, the privacy of a user is poor in the video call process.
Optionally, in an embodiment of the present invention, the step of determining the target object according to the feature parameter includes:
if the characteristic parameter of the object meets at least one of the following identification conditions, determining that the object is a target object, wherein the identification conditions include:
condition one, the first distance is less than a first distance threshold or the first distance of the object is the smallest value of the first distances.
For example, a first distance threshold is set, for example, the first distance threshold is 1 meter, and then objects corresponding to physical objects less than 1 meter away from the shooting device are all taken as target objects; it can be understood that there may be one or more target objects, and if the number of the target objects is one, the object closest to the shooting device may be selected as the target object, that is, the object with the smallest value in the first distance is the main target entity object, see fig. 2, and the object with the smallest first distance is the entity object a.
Conditional two, the second distance is less than a second distance threshold.
If the first video frame has a target object which is marked as a target object in advance or is identified, further searching a new target object according to the target object; specifically, searching for an object whose second distance from the main target entity object is smaller than a second distance threshold, referring to fig. 2, if the entity object a is identified as a target object, further searching for a second distance between each object to be identified and the main target entity object of the known target object, and if the second distance is smaller than the second distance threshold, determining that the object to be identified is the target object; alternatively, the second distance threshold may be a distance value of less than 1 meter, such as 0.5 meter.
And thirdly, the single-occurrence time length is larger than or equal to the first time length threshold.
For example, if an object to be identified exists in the to-be-processed video, where the single-occurrence time length of the object is greater than or equal to the first time length threshold, for example, the first time length threshold is 2 minutes, after the single-occurrence time length in the current to-be-processed video reaches 2 minutes, the object is marked as a target object. Taking the electronic equipment as shooting equipment as an example, when a lens captures a distinguishable object in the process of video call, the electronic equipment extracts object features and establishes a unique number, such as M, for the object; when the accumulated staying time of the object M in the unit time t exceeds s (for example, within 30 seconds, the accumulated staying time exceeds 20 seconds), the object M is determined as a participant, namely the target object, otherwise, the object M is determined as a non-participant.
Conditional four, the preset mark includes a mark of the target object.
If the object to be identified in the first video frame is marked as the target object in other video frames of the video to be processed, the object is directly determined as the target object.
Optionally, in this embodiment of the present invention, after determining that the target object is the target object according to the characteristic parameter, the method further includes:
detecting that a first object disappears from a video frame of the video to be processed, and recording the disappearance duration of the first object, wherein the first object is the target object;
determining a target characteristic parameter of the first object under the condition that the first object appears in the video to be processed again and the disappearance duration is greater than or equal to a second duration threshold, and determining that the first object is a target object or a non-target object according to the target characteristic parameter;
and under the condition that the first object appears in the video to be processed again and the disappearance duration is less than a second duration threshold, determining that the first object is a target object.
The first object disappears from the video frame of the video to be processed, for example, in the video call process, if the first object leaves the video call picture, the disappearance duration of the first object is recorded; if the single-disappearance duration is greater than or equal to the second duration threshold, for example, the second duration threshold is 10 minutes, the characteristic parameters of the object are identified again if the first object disappears for more than 10 minutes.
Specifically, taking the electronic device as a shooting device as an example, when a lens captures a recognizable object in the process of video call, the electronic device extracts object features and establishes a unique number, such as M, for the object; when the accumulated staying time of the object M in the unit time t exceeds s (for example, within 30 seconds, the accumulated staying time exceeds 20 seconds), the object M is determined as a participant, namely the target object, otherwise, the object M is determined as a non-participant. After the target object identity of M is identified, the identity of a participant has a period of validity h, and h is a second duration threshold; when the M leaves the lens, timing is started, when the M returns to the lens within the validity period h, the identity of a participant is automatically obtained, re-identification is not needed, timing returns to zero, and timing is re-performed when the M leaves next time; and when the time that M leaves the lens exceeds h, losing the identity of the participant, changing the participant into a non-target object, and identifying according to the characteristic parameters such as the stay time, the first distance or the second distance and the like.
Optionally, in an embodiment of the present invention, the step of replacing or overlaying the non-target object in the first video frame includes:
determining a region to be processed of the non-target object in the first video frame;
replacing or overlaying the non-target object in the first video frame with a target image; the target image is a first image or a preset second image, the first image is an image of a second video frame in the video to be processed at the same position as the area to be processed, for example, by acquiring other image frames in the video to be processed, if the object does not exist in the same area or a corresponding area and only a background area exists, the same area of the image is intercepted as an overlay image to replace or overlay the area to be processed in the first video frame.
The preset second image can be a cartoon image or other preset images, and the second image directly covers the area to be processed.
In addition, the mosaic processing can be carried out on the area to be processed so as to cover the non-target object.
Optionally, in the embodiment of the present invention, if the electronic device is a sending end or a server of the to-be-processed video;
after the step of replacing or overlaying the non-target object in the first video frame, the method comprises:
and sending the target video subjected to the replacement or the coverage processing to a receiving end of the video to be processed.
As a second example, referring to fig. 3, if the electronic device is a sending end of a to-be-processed video, such as one end of a video call, or a live webcast anchor, fig. 3 shows an application process in which the electronic device is a sending end, and mainly includes the following steps:
and step 301, acquiring a video image.
Step 302, the sending end analyzes each frame of image in the video to be processed.
Step 303, extracting a target object and a non-target object in each frame of image.
Step 304, replacing or covering the area in which the non-target object is located.
Step 305, the processed video is sent to the receiving end.
Optionally, in a case that the electronic device is a sending end, a display interface of the sending end may display a video to be processed, may also display a processed video, or provide a switch key for a user to switch.
If the electronic equipment is a server, namely, the to-be-processed video sent by the sending end is received, the electronic equipment executes the video processing method in the embodiment of the invention on the to-be-processed video, and then sends the processed video to the receiving end; as a third example, referring to fig. 4, fig. 4 shows an application process in which the electronic device is a server, and mainly includes the following steps:
step 401, a video image at a sending end is acquired to obtain a video to be processed, and the video to be processed is sent to a server (i.e. the electronic device).
In step 402, the server analyzes each frame of image in the video to be processed.
And step 403, extracting a target object and a non-target object in each frame of image.
Step 404, replacing or covering the area in which the non-target object is located.
Step 405, the processed video is sent to the receiving end.
In the embodiment of the invention, the characteristic parameters of an object in a first video frame of a video to be processed are determined, a target object and a non-target object are determined according to the characteristic parameters, and the non-target object in the first video frame is replaced or covered; and performing replacement or covering processing on the non-target object to replace or cover the non-target object in the first video frame, so that the non-target object is prevented from being displayed in the first video frame and the processed complete video, and privacy disclosure of a user is prevented in the processes of video calling, live broadcasting, recorded broadcasting and the like.
With the above description of the video processing method according to the embodiment of the present invention, an electronic device according to the embodiment of the present invention will be described with reference to the accompanying drawings.
Referring to fig. 5, an embodiment of the present invention further provides an electronic device 500, including:
the parameter determining module 501 is configured to determine a feature parameter of an object in a first video frame of a video to be processed, and determine a target object and a non-target object according to the feature parameter.
The video to be processed is a pre-recorded video or a video acquired in real time in the process of a video call between the sending end and the receiving end. After being processed, the video to be processed is sent to a receiving end by a sending end.
And performing image recognition on the first video frame in the video to be processed, and identifying an object in the video, wherein the object can be a person, an animal or a still object. After identifying the object, extracting characteristic parameters of the object; the characteristic parameters include the type of the object, the distance to the photographing apparatus, the distance to another object, and the like. Object types such as people, animals, or still, etc.
And determining a target object according to the characteristic parameters, wherein the target object is a main object in the first video frame. Optionally, or objects pre-labeled as target objects; or the characteristic parameter of the target object may be an object closest to the shooting device, for example, if the object is a person, the person closest to the call device may be determined to be a subject person in a video call scene or a live network scene.
Wherein the characteristic parameters include at least one of: the first distance between the entity object corresponding to the object and the electronic device, the object may be an object in a video frame of a video to be processed, and may be a person, an animal, a still object, or the like, and the entity object is a real object in a real environment corresponding to the object, such as a person corresponding to a portrait, an object corresponding to a portrait, and a real object.
A second distance between an entity object corresponding to the object and a main target entity object, a single occurrence time of the object in the video to be processed, and a preset mark of the object; wherein the primary target entity object corresponds to a primary target object of the target objects.
As a first example, referring to fig. 2, the above characteristic parameters are introduced in the scene of fig. 2, where M denotes a photographing device which is a photographing device of a video to be processed, A, B, C are three solid objects within the photographing range of the photographing device, respectively; d is the entity object outside the shooting range, and the shooting equipment cannot shoot the entity object D; da is a first distance between the physical object a and the photographing apparatus, db is a first distance between the physical object B and the photographing apparatus, and dc is a first distance between the physical object C and the photographing apparatus; if the entity object a is the main target entity object of the main target object, the second distance of the entity object B is the distance between the entity object B and the main target entity object a, i.e. d1 in fig. 2; the second distance of the entity object C is the distance between the entity object C and the main target entity object a, i.e. d2 in fig. 2.
Alternatively, in the process of determining the target object by the shooting device, a filtering range may be set, as shown in fig. 2, in a range with the shooting device M as the center and the radius R as a circle, and objects in the range are preferentially selected as the identified objects.
Specifically, during the process of recording the video to be processed, the shooting device may determine, by using a target detection technology, a first distance of each entity object relative to the shooting device and a second distance between each entity object and a main target entity object, or take a difference between the first distances of the two as the second distance of the two; when the shooting device obtains the first distance and/or the second distance of each object, the first distance and/or the second distance can be carried in the first video frame as a characteristic parameter.
And if the object appears in the video to be processed for multiple times, the single-appearing time length is not accumulated.
The objects may have a preset tag, for example, some objects may be pre-tagged as target objects or non-target objects.
A processing module 502 for replacing or overlaying the non-target object in the first video frame.
The non-target object, i.e. the non-subject object in the first video frame, may be determined according to a characteristic parameter of the object, for example, an object farther from the shooting device, or an object that is pre-marked as a non-target object.
In addition, after determining at least one target object, further searching for other target objects in the first video frame based on the characteristic parameters of other objects; such as an object that is closer to the target object.
After the non-target object is determined, performing replacement or coverage processing on the non-target object; for example, taking the covering process as an example, the mosaic process is performed on the non-target object, so that the details of the color level of the region where the non-target object is located are degraded, the color blocks are disturbed, and the covering is performed through the mosaic; taking replacement processing as an example, replacing the area where the non-target object is located by using a preset mark, for example, firstly performing matting processing on pixel points of the area where the non-target object is located, and then filling the preset mark in the area subjected to the matting processing to complete the replacement processing, so as to avoid the situation that the privacy of a video call user or the non-target object is revealed because the non-target object is displayed in a video to be processed.
Alternatively, for a video frame to be processed, a processing period may be set, such as several seconds each; in a processing period, a frame of image is selected as a first video frame, after a target object and a non-target object are identified based on the first video frame, the non-target object in the video frame in the processing period is replaced or covered, and the identification of each frame of image is not needed, so that the image processing operation amount of the electronic equipment is reduced.
In order to ensure the image processing precision, each frame of image in the video to be processed can be identified; the specific identification manner may be set by a user, and the embodiment of the present invention is not limited herein.
And sending the processed video frame or the complete video to a receiving end, so that a receiving end user cannot check the non-target object when checking the video frame or the video, and the privacy of the user is effectively protected.
Optionally, in this embodiment of the present invention, the parameter determining module 501 includes:
an identification submodule, configured to determine that the object is a target object if the characteristic parameter of the object satisfies at least one of the following identification conditions, where the identification conditions include:
the first distance is less than a first distance threshold or the first distance of the object is the smallest value of the first distances;
the second distance is less than a second distance threshold;
the single-occurrence duration is greater than or equal to a first duration threshold;
the preset mark comprises a mark of the target object.
Optionally, in this embodiment of the present invention, the electronic device 500 further includes:
the recording module is used for detecting that a first object disappears from a video frame of the video to be processed and recording the disappearance duration of the first object, wherein the first object is the target object;
determining a target characteristic parameter of the first object under the condition that the first object appears in the video to be processed again and the disappearance duration is greater than or equal to a second duration threshold, and determining that the first object is a target object or a non-target object according to the target characteristic parameter; and under the condition that the first object appears in the video to be processed again and the disappearance duration is less than a second duration threshold, determining that the first object is a target object.
Optionally, in this embodiment of the present invention, the processing module 502 includes:
the region determining submodule is used for determining a region to be processed of the non-target object in the first video frame;
an overlay sub-module for replacing or overlaying the non-target object in the first video frame with a target image; the target image is a first image or a preset second image, and the first image is an image at the same position as the region to be processed in a second video frame in the video to be processed.
Optionally, in this embodiment of the present invention, if the electronic device 500 is a sending end or a server of the to-be-processed video;
the electronic device 500 includes:
and the sending module is used for sending the target video subjected to the replacement or the coverage processing to a receiving end of the video to be processed.
The electronic device 500 provided in the embodiment of the present invention can implement each process implemented by the electronic device 500 in the method embodiments of fig. 1 to fig. 4, and for avoiding repetition, details are not described here again.
In the embodiment of the present invention, the parameter determining module 501 determines a feature parameter of an object in a first video frame of a video to be processed, and determines a target object and a non-target object according to the feature parameter; the processing module 502 replaces or covers the non-target object in the first video frame, avoids the non-target object from being displayed in the first video frame and the processed complete video, and prevents privacy of the user from being leaked in the process of video call or live broadcast, recorded broadcast and the like.
FIG. 6 is a diagram illustrating a hardware configuration of an electronic device implementing various embodiments of the invention;
the electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 6 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 610 is configured to determine a feature parameter of an object in a first video frame of a video to be processed, and determine a target object and a non-target object according to the feature parameter; wherein the characteristic parameters include at least one of: a first distance between an entity object corresponding to the object and the electronic equipment, a second distance between the entity object corresponding to the object and a main target entity object, a single occurrence time of the object in the video to be processed, and a preset mark of the object; wherein the primary target entity object corresponds to a primary target object of the target objects;
replacing or overlaying the non-target object in the first video frame.
In the embodiment of the invention, the characteristic parameters of an object in a first video frame of a video to be processed are determined, a target object and a non-target object are determined according to the characteristic parameters, and the non-target object in the first video frame is replaced or covered; and performing replacement or covering processing on the non-target object to replace or cover the non-target object in the first video frame, so that the non-target object is prevented from being displayed in the first video frame and the processed complete video, and privacy disclosure of a user is prevented in the processes of video calling, live broadcasting, recorded broadcasting and the like.
It should be noted that, in this embodiment, the electronic device 600 may implement each process in the method embodiment of the present invention and achieve the same beneficial effects, and for avoiding repetition, details are not described here.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 610; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio frequency unit 601 may also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 602, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 may also provide audio output related to a specific function performed by the electronic apparatus 600 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used to receive audio or video signals. The input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics processor 6041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphic processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 601 in case of the phone call mode.
The electronic device 600 also includes at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 6061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 6061 and/or the backlight when the electronic apparatus 600 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 605 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 606 is used to display information input by the user or information provided to the user. The Display unit 606 may include a Display panel 6061, and the Display panel 6061 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 6071 using a finger, stylus, or any suitable object or accessory). The touch panel 6071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 610, receives a command from the processor 610, and executes the command. In addition, the touch panel 6071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, the other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 6071 can be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation on or near the touch panel 6071, the touch operation is transmitted to the processor 610 to determine the type of the touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although the touch panel 6071 and the display panel 6061 are shown in fig. 6 as two separate components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the electronic device, and this is not limited here.
The interface unit 608 is an interface for connecting an external device to the electronic apparatus 600. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 600 or may be used to transmit data between the electronic device 600 and external devices.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 609 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 610 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 609, and calling data stored in the memory 609, thereby performing overall monitoring of the electronic device. Processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The electronic device 600 may further include a power supply 611 (e.g., a battery) for supplying power to the various components, and preferably, the power supply 611 may be logically connected to the processor 610 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In addition, the electronic device 600 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 610, a memory 609, and a computer program stored in the memory 609 and capable of running on the processor 610, where the computer program, when executed by the processor 610, implements each process of the above-mentioned video processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the video processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, 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 phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. A video processing method applied to an electronic device is characterized by comprising the following steps:
determining characteristic parameters of an object in a first video frame of a video to be processed, and determining a target object and a non-target object according to the characteristic parameters; wherein the characteristic parameters include at least one of: a first distance between an entity object corresponding to the object and the electronic equipment, a second distance between the entity object corresponding to the object and a main target entity object, a single occurrence time of the object in the video to be processed, and a preset mark of the object; wherein the primary target entity object corresponds to a primary target object of the target objects;
replacing or overlaying the non-target object in the first video frame;
the step of determining the target object according to the characteristic parameters comprises the following steps:
if the characteristic parameter of the object meets at least one of the following identification conditions, determining that the object is a target object, wherein the identification conditions include:
the first distance is less than a first distance threshold or the first distance of the object is the smallest value of the first distances;
the second distance is less than a second distance threshold;
the single occurrence duration is greater than or equal to a first duration threshold;
the preset mark comprises a mark of the target object;
after the target object is determined according to the characteristic parameters, the method further comprises:
detecting that a first object disappears from a video frame of the video to be processed, and recording the disappearance duration of the first object, wherein the first object is the target object;
determining a target characteristic parameter of the first object under the condition that the first object appears in the video to be processed again and the disappearance duration is greater than or equal to a second duration threshold, and determining that the first object is a target object or a non-target object according to the target characteristic parameter;
and under the condition that the first object appears in the video to be processed again and the disappearance duration is less than a second duration threshold, determining that the first object is a target object.
2. The video processing method of claim 1, wherein the step of replacing or overlaying the non-target object in the first video frame comprises:
determining a region to be processed of the non-target object in the first video frame;
replacing or overlaying the non-target object in the first video frame with a target image; the target image is a first image or a preset second image, and the first image is an image at the same position as the region to be processed in a second video frame in the video to be processed.
3. The video processing method according to claim 1, wherein the electronic device is a sender or a server of the video to be processed;
after the step of replacing or overlaying the non-target object in the first video frame, the method further comprises:
and sending the target video subjected to the replacement or the coverage processing to a receiving end of the video to be processed.
4. An electronic device, characterized in that the electronic device comprises:
the device comprises a determining module, a processing module and a processing module, wherein the determining module is used for determining characteristic parameters of an object in a first video frame of a video to be processed and determining a target object and a non-target object according to the characteristic parameters; wherein the characteristic parameters include at least one of: a first distance between an entity object corresponding to the object and the electronic equipment, a second distance between the entity object corresponding to the object and a main target entity object, a single occurrence time of the object in the video to be processed, and a preset mark of the object; wherein the primary target entity object corresponds to a primary target object of the target objects;
a processing module for replacing or overlaying the non-target object in the first video frame;
the determining module comprises:
an identification submodule, configured to determine that the object is a target object if the characteristic parameter of the object satisfies at least one of the following identification conditions, where the identification conditions include:
the first distance is less than a first distance threshold or the first distance of the object is the smallest value of the first distances;
the second distance is less than a second distance threshold;
the single occurrence duration is greater than or equal to a first duration threshold;
the preset mark comprises a mark of the target object;
the electronic device further includes:
the recording module is used for detecting that a first object disappears from a video frame of the video to be processed and recording the disappearance duration of the first object, wherein the first object is the target object;
the first determining module is used for determining a target characteristic parameter of the first object under the condition that the first object reappears in the video to be processed and the disappearance duration is greater than or equal to a second duration threshold, and determining that the first object is a target object or a non-target object according to the target characteristic parameter;
and the second determining module is used for determining that the first object is a non-target object under the condition that the first object reappears in the video to be processed and the disappearance duration is less than a second duration threshold.
5. An electronic device, comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the video processing method according to any one of claims 1 to 3.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the video processing method according to any one of claims 1 to 3.
CN202010358450.3A 2020-04-29 2020-04-29 Video processing method and electronic equipment Active CN111601063B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010358450.3A CN111601063B (en) 2020-04-29 2020-04-29 Video processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010358450.3A CN111601063B (en) 2020-04-29 2020-04-29 Video processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111601063A CN111601063A (en) 2020-08-28
CN111601063B true CN111601063B (en) 2021-12-14

Family

ID=72183802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010358450.3A Active CN111601063B (en) 2020-04-29 2020-04-29 Video processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111601063B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114466203A (en) * 2020-11-10 2022-05-10 阿里巴巴集团控股有限公司 Video processing method, device and system
CN113014949B (en) * 2021-03-10 2022-05-06 读书郎教育科技有限公司 Student privacy protection system and method for smart classroom course playback
CN114339118B (en) * 2022-03-11 2022-06-24 深圳市迈科思腾科技有限公司 Video transmission method and system based on full duplex network

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776619A (en) * 2015-11-20 2017-05-31 百度在线网络技术(北京)有限公司 Method and apparatus for determining the attribute information of destination object
CN108174140A (en) * 2017-11-30 2018-06-15 维沃移动通信有限公司 The method and mobile terminal of a kind of video communication
CN108184086A (en) * 2012-12-20 2018-06-19 微软技术许可有限责任公司 Video camera with privacy mode
CN108650555A (en) * 2018-05-15 2018-10-12 优酷网络技术(北京)有限公司 The displaying of video clip, the generation method of interactive information, player and server
CN109672822A (en) * 2018-12-29 2019-04-23 努比亚技术有限公司 A kind of method for processing video frequency of mobile terminal, mobile terminal and storage medium
CN110363172A (en) * 2019-07-22 2019-10-22 曲靖正则软件开发有限公司 A kind of method for processing video frequency, device, electronic equipment and readable storage medium storing program for executing
CN110502974A (en) * 2019-07-05 2019-11-26 深圳壹账通智能科技有限公司 A kind of methods of exhibiting of video image, device, equipment and readable storage medium storing program for executing
CN110519544A (en) * 2019-08-30 2019-11-29 维沃移动通信有限公司 A kind of video call method and electronic equipment
CN110650367A (en) * 2019-08-30 2020-01-03 维沃移动通信有限公司 Video processing method, electronic device, and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2492529B (en) * 2011-05-31 2018-01-10 Skype Video stabilisation
CN205537535U (en) * 2016-04-19 2016-08-31 吉林大学 Collecting space area deformation monitoring and early warning device
CN109756727B (en) * 2017-08-25 2021-07-20 华为技术有限公司 Information display method and related equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108184086A (en) * 2012-12-20 2018-06-19 微软技术许可有限责任公司 Video camera with privacy mode
CN108234920A (en) * 2012-12-20 2018-06-29 微软技术许可有限责任公司 Video camera with privacy mode
CN106776619A (en) * 2015-11-20 2017-05-31 百度在线网络技术(北京)有限公司 Method and apparatus for determining the attribute information of destination object
CN108174140A (en) * 2017-11-30 2018-06-15 维沃移动通信有限公司 The method and mobile terminal of a kind of video communication
CN108650555A (en) * 2018-05-15 2018-10-12 优酷网络技术(北京)有限公司 The displaying of video clip, the generation method of interactive information, player and server
CN109672822A (en) * 2018-12-29 2019-04-23 努比亚技术有限公司 A kind of method for processing video frequency of mobile terminal, mobile terminal and storage medium
CN110502974A (en) * 2019-07-05 2019-11-26 深圳壹账通智能科技有限公司 A kind of methods of exhibiting of video image, device, equipment and readable storage medium storing program for executing
CN110363172A (en) * 2019-07-22 2019-10-22 曲靖正则软件开发有限公司 A kind of method for processing video frequency, device, electronic equipment and readable storage medium storing program for executing
CN110519544A (en) * 2019-08-30 2019-11-29 维沃移动通信有限公司 A kind of video call method and electronic equipment
CN110650367A (en) * 2019-08-30 2020-01-03 维沃移动通信有限公司 Video processing method, electronic device, and medium

Also Published As

Publication number Publication date
CN111601063A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
CN110913132B (en) Object tracking method and electronic equipment
CN107977652B (en) Method for extracting screen display content and mobile terminal
CN111601063B (en) Video processing method and electronic equipment
CN111263071B (en) Shooting method and electronic equipment
CN107730460B (en) Image processing method and mobile terminal
CN111401463B (en) Method for outputting detection result, electronic equipment and medium
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN110012143B (en) Telephone receiver control method and terminal
CN110913139A (en) Photographing method and electronic equipment
CN109922294B (en) Video processing method and mobile terminal
CN109618218B (en) Video processing method and mobile terminal
CN110519503B (en) Method for acquiring scanned image and mobile terminal
CN111031178A (en) Video stream clipping method and electronic equipment
CN108174109B (en) Photographing method and mobile terminal
CN110944113B (en) Object display method and electronic equipment
CN110636225B (en) Photographing method and electronic equipment
CN110505660B (en) Network rate adjusting method and terminal equipment
CN109639981B (en) Image shooting method and mobile terminal
CN108093119B (en) Strange incoming call number marking method and mobile terminal
CN108243489B (en) Photographing control method and mobile terminal
CN111427644B (en) Target behavior identification method and electronic equipment
CN110740265B (en) Image processing method and terminal equipment
CN111402157B (en) Image processing method and electronic equipment
CN111026263B (en) Audio playing method and electronic equipment
CN110944114B (en) Photographing method and electronic equipment

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