CN112055246B - Video processing method, device and system and storage medium - Google Patents

Video processing method, device and system and storage medium Download PDF

Info

Publication number
CN112055246B
CN112055246B CN202010953735.1A CN202010953735A CN112055246B CN 112055246 B CN112055246 B CN 112055246B CN 202010953735 A CN202010953735 A CN 202010953735A CN 112055246 B CN112055246 B CN 112055246B
Authority
CN
China
Prior art keywords
video
frame image
processed
display area
image
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
CN202010953735.1A
Other languages
Chinese (zh)
Other versions
CN112055246A (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.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and 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 Beijing IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN202010953735.1A priority Critical patent/CN112055246B/en
Publication of CN112055246A publication Critical patent/CN112055246A/en
Application granted granted Critical
Publication of CN112055246B publication Critical patent/CN112055246B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/30Image reproducers
    • H04N13/302Image reproducers for viewing without the aid of special glasses, i.e. using autostereoscopic displays
    • 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/485End-user interface for client configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects

Abstract

The invention relates to a video processing method, a video processing device, a video processing system and a storage medium. The scheme divides a frame image to be processed into a main video display area and an auxiliary video display area, and image elements associated with the video main body in the auxiliary video display area of the frame image to be processed are reserved to obtain a target frame image, the unprocessed frame image and the target frame image in the video to be processed are combined to obtain a target video, since only the image elements associated with the video subject remain within the secondary video display area of the target frame image, therefore, when the target video is played, the video main body in the video shows the screen effect in the auxiliary video display area, thereby obtain the third dimension that the screen display shows in the impression of seeing, compare in bore hole 3D technique to the complicacy of video processing process and the limitation of direct broadcast video, this scheme has given the user more visual impact force when watching the video through littleer cost to improve the competitiveness of video website.

Description

Video processing method, device and system and storage medium
Technical Field
The present invention relates to the field of video playing technologies, and in particular, to a video processing method, apparatus, system, and storage medium.
Background
Video generally refers to various techniques for capturing, recording, processing, storing, transmitting and reproducing a series of still images as electrical signals. When the continuous image change exceeds more than 24 frames (frames) of pictures per second, human eyes cannot distinguish a single static picture according to the principle of persistence of vision; it appears as a smooth continuous visual effect, so that the continuous picture is called a video.
When an ordinary video is played, the video can only be displayed in a plane, so that a user can only understand the parts of the video, which are mainly displayed, through the depth of field of the video and the blurring of the image when watching the video, furthermore, the video displayed in the plane can only display a two-dimensional effect, and has many limitations, and the development of the naked eye 3D technology enables the user to obtain the impression of a 3D effect in the plane video, so that the video is more abundant integrally, but the naked eye 3D technology is the fine processing aiming at the video, the workload of a small segment of video is very large and complex, and the manufacturing cost of the video displaying the naked eye 3D effect is very high due to large engineering quantity and complex process, so the naked eye 3D technology is difficult to be applied to the manufacturing of each segment of video.
Disclosure of Invention
In order to solve the problems in the prior art, at least one embodiment of the present invention provides a video processing method, apparatus, system and storage medium.
In a first aspect, an embodiment of the present invention provides a video processing method, where the processing method includes:
determining a main video display area displayed in a target area and an auxiliary video display area displayed outside the target area in at least one frame image to be processed of a video to be processed;
performing image processing on an auxiliary video display area of each frame image to be processed to obtain a target frame image only retaining image elements in the auxiliary video display area; wherein the image elements are each associated with a video subject within the frame image to be processed;
and forming a target video according to the target frame image and the unprocessed frame image in the video to be processed.
Based on the above technical solutions, the embodiments of the present invention may be further improved as follows.
With reference to the first aspect, in a first embodiment of the first aspect, the processing method further includes:
acquiring a video body mark added aiming at an object in any frame image to be processed;
and taking the object added with the video main body mark in the frame image to be processed as the video main body of the frame image to be processed.
With reference to the first kind of embodiment of the first aspect, in a second kind of embodiment of the first aspect, for a frame image to be processed to which no video body mark is added, the processing method further includes:
comparing the object in the frame image to be processed with the video main body to obtain a corresponding similarity value;
and taking the object of the frame image to be processed with the similarity value larger than a preset similarity threshold value as a video main body of the frame image to be processed.
With reference to the first aspect, in a third embodiment of the first aspect, the performing image processing on the auxiliary video display area of each frame image to be processed to obtain a target frame image only retaining image elements in the auxiliary video display area includes:
judging whether image elements associated with a video main body in a main video display area of the frame image to be processed exist in an auxiliary video display area of the frame image to be processed;
if so, only image elements associated with the video main body are reserved in the auxiliary video display area of the frame image to be processed, and the target frame image is obtained;
or if not, hiding the auxiliary video display area of the frame image to be processed.
With reference to the first aspect, in a fourth embodiment of the first aspect, the performing image processing on the auxiliary video display area of each frame image to be processed to obtain a target frame image only retaining image elements in the auxiliary video display area includes:
identifying a video subject in the frame image to be processed;
and only reserving the video main body in the auxiliary video display area of the frame image to be processed as the target frame image.
With reference to the first aspect, in a fifth embodiment of the first aspect, the performing image processing on the auxiliary video display area of each frame image to be processed to obtain a target frame image only retaining image elements in the auxiliary video display area includes:
identifying a video background in the frame image to be processed;
setting the color of a video background in an auxiliary video display area in the frame image to be processed as a filtering color as the target frame image; and the color value of the filtering color is different from the color value of any pixel in the frame image to be processed.
With reference to the first aspect or the first, second, third, fourth or fifth embodiment of the first aspect, in a sixth embodiment of the first aspect, the processing method further includes:
acquiring a real-time interface of a user side for playing the target video;
and when the target video is played, processing the real-time interface and the target video to enable the real-time interface to be used as the background of the target video.
In a second aspect, an embodiment of the present invention provides a video processing apparatus, where the playback apparatus includes:
the first processing unit is used for determining a main video display area and an auxiliary video display area in at least one frame image to be processed of a video to be processed;
the second processing unit is used for carrying out image processing on the auxiliary video display area of each frame image to be processed to obtain a target frame image only retaining image elements in the auxiliary video display area; wherein the image element is associated with a video subject within the frame image to be processed;
and the third processing unit is used for forming a target video according to the target frame image and an unprocessed frame image in the video to be processed.
In a third aspect, an embodiment of the present invention provides a video processing system, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
the processor is configured to implement the video processing method according to any one of the embodiments of the first aspect when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the video processing method described in any one of the first aspects.
Compared with the prior art, the technical scheme of the invention has the following advantages: according to the scheme, each frame of to-be-processed frame image of a to-be-processed video is processed, the to-be-processed frame image is divided into a main video display area and an auxiliary video display area, image elements related to a video main body in the auxiliary video display area of the to-be-processed frame image are reserved, a target frame image is obtained, unprocessed frame images and target frame images in the to-be-processed video are combined, and a target video is obtained.
Drawings
Fig. 1 is a schematic flow chart of a video processing method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for determining a video subject in a video to be played according to another embodiment of the present invention;
fig. 3 is a schematic flow chart of a video processing method according to another embodiment of the present invention;
fig. 4 is a flowchart illustrating a video processing method according to another embodiment of the present invention;
fig. 5 is a schematic flow chart of a video processing method according to another embodiment of the present invention;
fig. 6 is a fourth flowchart illustrating a video processing method according to another embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a video processing apparatus according to yet another embodiment of the present invention;
fig. 8 is a schematic structural diagram of a video processing system according to yet another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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.
The client provided in the embodiments of the present invention to implement various embodiments of the present invention includes a network connection device, a memory 1130, a processor 1110, a communication interface 1120, and a communication bus 1140, and electronic components complete communication with each other through the communication bus 1140, where the client may be a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, an intelligent bracelet, a pedometer, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The embodiment of the invention provides a server for realizing each embodiment of the invention, which comprises: RF (Radio Frequency) unit, audio output unit, a/V (audio/video) input unit, sensor, display unit, user input unit, communication interface 1120, memory 1130, processor 1110, communication bus 1140, and power supply, and the electronic components communicate with each other through communication bus 1140. Those skilled in the art will appreciate that the server may include more or fewer components, or combine certain components, or a different arrangement of components.
As shown in fig. 1, an embodiment of the present invention provides a video processing method. Referring to fig. 1, the processing method includes the steps of:
s11, determining a main video display area displayed in the target area and an auxiliary video display area displayed outside the target area in at least one frame image to be processed of the video to be processed.
In the present embodiment, Video (Video) generally refers to various techniques for capturing, recording, processing, storing, transmitting and reproducing a series of still images as electrical signals. When the continuous image changes more than 24 frames (frames) of pictures per second, human eyes cannot distinguish a single static picture according to the persistence of vision principle; it appears as a smooth continuous visual effect, so that the continuous picture is called a video.
In this embodiment, the frame image to be processed that needs to be processed may be a video frame to which a mark is added in advance in the video to be processed, so when the video is processed, the frame image to be processed can be determined according to the mark that is added, and the frame image to be processed may also be determined according to the size of the video frame in the video to be processed, for example, when the size of the video frame in any size dimension is larger than the size of the corresponding size dimension of the target area, the video frame is taken as the frame image to be processed, where the size of the video frame in any size dimension may be a frame height or a frame width. The size of the target area may be the size of a video playing frame of a client that plays the video to be processed, or may be a preset size smaller than the size of the video playing frame.
In this embodiment, the main video display area and the auxiliary video display area may be obtained by dividing the frame image to be processed, and the auxiliary video display area is provided with at least one auxiliary video display area, for example, the auxiliary video display area may be at least one of an image area above the main video display area, an image area below the main video display area, an image area on the left side, and an image area on the right side, or the auxiliary video display area may be an annular image area around the main video display area.
S12, performing image processing on the auxiliary video display area of each frame image to be processed to obtain a target frame image only retaining image elements in the auxiliary video display area; wherein the image elements are each associated with a video subject within the frame image to be processed.
In this embodiment, the auxiliary video display area of the frame image to be processed is processed, so that image elements are retained in the auxiliary video display area of the frame image to be processed, and other portions in the auxiliary video display area are deleted or made transparent, wherein each image element is associated with a video main body in the frame image to be processed, and finally, the obtained target frame image retains the image elements and the complete main video display area in the auxiliary video display area of the frame image to be processed.
For example, in an embodiment, the video subject may be a person, a scene, an object, an animal, or the like currently displayed by the video, and the image element associated with the video subject in the secondary video display area may be a part of the video subject or an image associated with or interacting with the video subject.
And S13, forming a target video according to the target frame image and the unprocessed frame image in the video to be processed.
In this embodiment, an unprocessed frame image in a video to be processed and a processed target frame image are combined to obtain a target video, specifically, in this step, a target video is formed according to the target frame image and the unprocessed frame image in the video to be processed, and the target video may be obtained by combining the target frame image and the unprocessed frame image in the video to be processed according to a timeline arrangement sequence of video frames in the video to be processed; or, the target frame image may be substituted for the corresponding to-be-processed frame image in the to-be-processed video, and the target frame image and the unprocessed frame image in the to-be-processed video are combined to obtain the target video.
The method comprises the steps of processing each frame of to-be-processed frame image of a to-be-processed video, dividing the to-be-processed frame image into a main video display area and an auxiliary video display area, reserving all images of the to-be-processed frame image in the main video display area, reserving only image elements associated with a video main body in the auxiliary video display area to obtain a target frame image, combining an unprocessed frame image and the target frame image in the to-be-processed video according to the time sequence of the frame images when the original to-be-processed video is played to obtain the target video in the step, wherein only the image elements associated with the video main body are reserved in the auxiliary video display area of the target frame image, so that the video main body in the video shows a screen effect when the target video is played, and therefore, the stereoscopic impression of screen display is obtained visually, compared with the limitation of a naked eye 3D technology on the complexity of a video processing process and the direct video playing, the scheme gives more visual impact force to the user when watching the video through lower cost, thereby improving the competitiveness of the video website.
As shown in fig. 2, in this embodiment, the method for determining a video subject in a video to be played includes the following steps:
and S21, acquiring the video body mark added for the object in any frame image to be processed.
In this embodiment, a user may manually add a video body mark to an object in a frame image to be processed in advance, or process the frame image to be processed by an image recognition method, and after the object which is a video body in the frame image to be processed is obtained by recognition, add the video body mark to the object, for example, an image of the frame image to be processed except for a background may be used as the video body by recognizing the background of the frame image to be processed, where a background recognition algorithm for recognizing the background includes algorithms such as a background subtraction method, a frame subtraction method, an optical flow field method, and after the video body is obtained by recognition, add the video body mark to the image; and determining whether the object is a video subject according to the position, definition and other parameters of each object in the frame image to be processed, and adding a video subject mark to the object determined as the video subject.
And S22, taking the object added with the video body mark in the frame image to be processed as the video body of the frame image to be processed.
In this embodiment, the object in the frame image to be processed may be an image in which an area is defined within the frame image to be processed by a user; the boundary between different objects can also be determined according to the color change of the frame image to be processed, and each object in the frame image to be processed can be obtained according to the boundary.
In this embodiment, it is quickly determined that objects are video subjects by directly acquiring video subject marks of the objects in the frame image to be processed, so as to realize quick processing of the frame image to be processed.
In a specific embodiment, in combination with the method shown in fig. 2 and as shown in fig. 3, for a frame image to be processed to which no video body mark is added, the processing method further includes the following steps:
and S31, comparing the object in the frame image to be processed with the video main body to obtain a corresponding similarity value.
In this embodiment, in the process of processing any frame image to be processed, an object in the frame image to be processed is compared with a video main body in other frame images to be processed, so as to obtain a similarity value between the object in the frame image to be processed and the video main body in the other frame images to be processed, in one video, since a plurality of frame images are included in one second of the video, a difference between adjacent frame images is not very large, and therefore, after the video main body in any frame image to be processed is determined, an object corresponding to the video main body may exist in the adjacent frame images to be processed very much, the similarity between the two frame images is very high, and the probability that the object corresponding to the video main body exists in the frame image to be processed with a farther time interval is found in the frame image to be processed with the farther time interval is correspondingly reduced.
Specifically, the frame image to be processed, for which the video subject is determined, may be used as the first frame image; and taking the frame image to be processed adjacent to the first frame image as a second frame image, comparing the object in the second frame image with the video main body in the first frame image to obtain a corresponding similarity value, and only comparing the adjacent frame images to be processed, so that the comparison process can be reduced, and the processing efficiency is improved.
And S32, taking the object of the frame image to be processed with the similarity value larger than the preset similarity threshold value as the video main body of the frame image to be processed.
In this embodiment, the greater the similarity value between the object of the frame image to be processed and the video subject, the fact that both the two frame images to be processed include similar main display pictures is described, and at this time, the object whose similarity value with the video subject is greater than the preset similarity threshold is taken as the video subject of the frame image to be processed.
In this embodiment, the determination of whether the object in the frame image to be processed is the video subject is completed by comparing the object in the frame image to be processed with the determined video subjects in other frame images to be processed, so that the video subject marks in the frame image to be processed can be reduced in a phase-changing manner, for example, if the user marks the video subject in the frame image to be processed, the user needs to mark each frame image to be processed, even in a video with a short duration, such workload is enormous, by the method in this embodiment, the user only needs to add the video subject marks to a part of the frame images to be processed, and then, by comparison, the determination of the video subjects in the remaining frame images to be processed is completed, for example, in 24 frame images of a video of one second, marks are added to the first and last two frame images, and then only needs to add the video subject marks in the 24 frame images at intervals, for example, a video body mark is added when a scene changes.
In a specific embodiment, the video processing method may further include: acquiring a real-time interface of a user side for playing a target video; and when the target video is played, processing the real-time interface and the target video, so that the real-time interface is used as the background of the target video.
In this embodiment, the user side may be a software client or a web page client, and the real-time interface of the user side may be a startup display image, or the user side enters an interface displayed by the current user side after entering any page, and the interface is obtained and loaded into the target video in real time, so that the real-time interface is used as a background of the target video, thereby ensuring a screen-out effect in a target video playing process, reducing a distortion problem during video playing caused by switching of the user side interface, and improving the playing smoothness of the target video.
As shown in fig. 4, an embodiment of the present invention provides a video processing method. Referring to fig. 4, the video processing method includes the steps of:
s41, determining a main video display area displayed in the target area and an auxiliary video display area displayed outside the target area in at least one frame image to be processed of the video to be processed.
For step S41, reference may be made to the description in step S11, and this embodiment is not described herein again.
And S42, judging whether image elements associated with the video main body in the main video display area of the frame image to be processed exist in the auxiliary video display area of the frame image to be processed.
In this embodiment, as described in the embodiment of fig. 1, it is determined whether an image element associated with a video main body in a main video display area exists in an auxiliary video display area of a frame image to be processed, that is, whether a part of the video main body is included in the auxiliary display area, or whether an image linked with the video main body exists in the auxiliary display area.
S43a, if yes, only keeping image elements associated with a video main body in the auxiliary video display area of the frame image to be processed, and obtaining a target frame image.
In this embodiment, if it is determined that the image element associated with the video main body in the primary video display area exists in the secondary video display area, the method described in step S12 is executed, and details of this embodiment are not repeated herein.
S43b, or if not, hiding the auxiliary video display area of the frame image to be processed.
In this embodiment, if it is determined that there is no image element associated with the video main body in the main video display area in the auxiliary video display area, the auxiliary video display area may be hidden at this time, specifically, the auxiliary video display area may be deleted, or the auxiliary video display area of the frame image to be processed is hidden by setting an image in the auxiliary video display area to be transparent or the like.
And S44, forming a target video according to the target frame image and the unprocessed frame image in the video to be processed.
For step S44, reference may be made to the description in step S13, and this embodiment is not described herein again.
In this embodiment, by determining whether an image element associated with a video main body in a main video display area of a frame image to be processed exists in an auxiliary video display area of the frame image to be processed, different processing is directly performed on the auxiliary video display area under different conditions, so that the image processing efficiency is improved.
As shown in fig. 5, an embodiment of the present invention provides a video processing method. Referring to fig. 5, the video processing method includes the steps of:
s51, determining a main video display area displayed in the target area and an auxiliary video display area displayed outside the target area in at least one frame image to be processed of the video to be processed.
For step S51, reference may be made to the description in step S11, and this embodiment is not described herein again.
And S52, identifying the video main body in the frame image to be processed.
In this embodiment, the video subject in the frame image to be processed may be determined from a video subject flag manually added to an object in the frame image to be processed in advance by a user, and an image of the frame image to be processed other than the background may be taken as the video subject by identifying the background of the frame image to be processed.
S53, only reserving the video main body in the auxiliary video display area of the frame image to be processed as a target frame image.
In this embodiment, a frame image to be processed is processed, so that a video main body in an auxiliary video display area in the frame image to be processed is reserved, and the rest of the auxiliary video display area is directly deleted or pixels are converted into transparent pixels, thereby obtaining a target frame image.
And S54, forming a target video according to the target frame image and the unprocessed frame image in the video to be processed.
Regarding step S54, refer to the description in step S13 for details, which are not repeated herein.
In the embodiment, the video main body in the frame image to be processed is directly identified, the auxiliary video display area of the frame image to be processed is processed, only the video main body is reserved in the auxiliary video display area, the processed frame image to be processed is used as the target frame image, and the finally formed target video shows the screen effect in the auxiliary video display area when the video main body in the video is played, so that the stereoscopic impression of screen display is obtained in the aspect of appearance.
As shown in fig. 6, an embodiment of the present invention provides a video processing method. Referring to fig. 6, the video processing method includes the steps of:
s61, determining a main video display area displayed in the target area and an auxiliary video display area displayed outside the target area in at least one frame image to be processed of the video to be processed.
For step S61, reference may be made to the description in step S11, and this embodiment is not described herein again.
And S62, identifying the video background in the frame image to be processed.
In this embodiment, an image of a frame image to be processed, except for a background, may be used as a video subject by identifying the background of the frame image to be processed, where the background identification algorithm includes algorithms such as a background subtraction method, a frame subtraction method, and an optical flow field method.
S63, setting the color of the video background in the auxiliary video display area in the frame image to be processed as a filtering color as a target frame image; the color value of the filtering color is different from the color value of any pixel in the frame image to be processed.
In this embodiment, in this step, after the video background of the frame image to be processed is determined, the color of the video background in the auxiliary video display area of the frame image to be processed is changed, and the color of the video background is set to be a filtering color, where a color value of the filtering color is different from a color value of any pixel in the frame image to be processed.
And S64, combining the unprocessed frame image and the target frame image in the video to be processed to form the target video.
Regarding step S64, refer to the description in step S13 for details, which are not repeated herein.
In this embodiment, in the present invention, by obtaining the video background of the frame image to be processed and changing the color of the video background of the frame image to be processed in the auxiliary video display area, the color of the video background in the auxiliary video display area is inconsistent with the pixel color of any pixel in the frame image to be processed, when the finally formed target video is played, when the frame image to be processed appears, the filtering of the video background in the auxiliary display area of the frame image to be processed can be completed through the filtering color, so that the finally played video forms a screen-out effect in the auxiliary display area, and thus, the stereoscopic impression of screen-out display is obtained in the viewing sense.
In a specific embodiment, the method for identifying the video background in the frame image to be processed in step S62 includes the following steps:
the method comprises the steps of firstly, acquiring at least two adjacent frames of to-be-processed frame images from any time in a to-be-processed video to form a comparison image group.
Secondly, comparing every two frame images to be processed in the comparison image group to obtain the image coincidence proportion between the corresponding first regions to be selected in each frame image to be processed; the first candidate area is an area with a first preset shape obtained by dividing a video frame.
Thirdly, judging whether the coincidence proportion of all the images corresponding to the first to-be-selected area is larger than the preset coincidence proportion or not;
and fourthly, if all the image coincidence proportions of the first to-be-selected area are larger than the preset coincidence proportion, the first to-be-selected area is a video background.
In this embodiment, by comparing the overlapping conditions of the corresponding regions between different frame images to be processed, the overlapping proportion of each corresponding region is determined, and if the overlapping proportion of one region in all the frame images to be processed in all the comparison image groups is greater than the preset overlapping proportion, it is indicated that the region is relatively similar in all the frame images to be processed in the comparison image group, and at this time, the region can be determined as the video background.
In this embodiment, the steps of the present scheme implement the determination of the video background in the frame image to be processed, and further, according to the video background obtained in the present scheme, the video main body in the frame image to be processed in the embodiment described in fig. 5 may also be determined.
In a specific embodiment, the method for identifying the video background in the frame image to be processed in step S62 includes the following steps:
the method comprises the steps of firstly, obtaining the definition average value of each second to-be-selected area in a frame image to be processed; the second candidate area is an area with a second preset shape obtained by dividing the frame image to be processed.
In this embodiment, the sharpness in the processed frame image refers to the degree of sharpness of the image macroscopically seen by the human eye, and is a subjective feeling of the human on the final image caused by the result of integration of objective performance of the system and the device. Although the definition is subjective, unlike subjective listening evaluations, which cannot be measured by an objective standard, the definition is quantitatively measurable, i.e., measured by the thickness of the black and white lines, and has a standard test method and test chart with a specific unit of measurement data, i.e., the tv line TVL.
And secondly, judging whether the definition average value of each second candidate area is smaller than a preset threshold value.
And thirdly, if the definition average value of the second candidate area is smaller than a preset threshold value, the second candidate area is a video background.
In this embodiment, since the background portion in the video frame is blurred, the definition of the background portion is weaker than that of the main portion, or weaker than that of the entire video frame, and the video achieves a planar depth-of-field effect in this way, in this embodiment, it may be determined whether the region to be selected is the video background according to the average definition value of the region to be selected.
In this embodiment, the steps of the present solution implement the determination of the video background in the frame image to be processed, and further, according to the video background obtained in the present solution, the video main body in the frame image to be processed in the embodiment shown in fig. 5 may also be determined.
As shown in fig. 7, an embodiment of the present invention provides a video processing apparatus, where the processing apparatus includes: a first processing unit 11, a second processing unit 12 and a third processing unit 13.
In this embodiment, the first processing unit 11 is configured to determine a primary video display area and a secondary video display area in at least one to-be-processed frame image of a to-be-processed video.
In this embodiment, the second processing unit 12 is configured to perform image processing on an auxiliary video display area of each frame image to be processed, so as to obtain a target frame image in which only image elements are reserved in the auxiliary video display area; wherein the image element is associated with a video subject within the frame image to be processed.
In this embodiment, the third processing unit 13 is configured to form a target video according to the target frame image and an unprocessed frame image in the video to be processed.
In this embodiment, the processing apparatus further includes: a fourth processing unit, configured to acquire a video body mark added for an object in any frame image to be processed; and taking the object added with the video main body mark in the frame image to be processed as the video main body of the frame image to be processed.
In this embodiment, the processing apparatus further includes: the fifth processing unit is used for comparing the object in the frame image to be processed with the video main body to obtain a corresponding similarity value; and taking the object of the frame image to be processed with the similarity value larger than the preset similarity threshold value as a video main body of the frame image to be processed.
In this embodiment, the second processing unit 12 is specifically configured to determine whether an image element associated with a video main body in the main video display area of the frame image to be processed exists in the auxiliary video display area of the frame image to be processed; if so, only image elements associated with a video main body are reserved in the auxiliary video display area of the frame image to be processed, and a target frame image is obtained; or if not, hiding the auxiliary video display area of the frame image to be processed.
In this embodiment, the second processing unit 12 is specifically configured to identify a video subject in a frame image to be processed; and only reserving the video main body in the auxiliary video display area of the frame image to be processed as a target frame image.
In this embodiment, the second processing unit 12 is specifically configured to identify a video background in a frame image to be processed; setting the color of a video background in an auxiliary video display area in a frame image to be processed as a filtering color as a target frame image; the color value of the filtering color is different from the color value of any pixel in the frame image to be processed.
In this embodiment, the processing apparatus further includes: the sixth processing unit is used for acquiring a real-time interface of a user side for playing the target video; and when the target video is played, processing the real-time interface and the target video to enable the real-time interface to be used as the background of the target video.
As shown in fig. 8, an embodiment of the present invention provides a video processing system, which includes a processor 1110, a communication interface 1120, a memory 1130, and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 complete communication with each other through the communication bus 1140;
a memory 1130 for storing computer programs;
the processor 1110, when executing the program stored in the memory 1130, implements the following method:
determining a main video display area displayed in a target area and an auxiliary video display area displayed outside the target area in at least one frame image to be processed of a video to be processed;
performing image processing on an auxiliary video display area of each frame image to be processed to obtain a target frame image only retaining image elements in the auxiliary video display area; wherein the image elements are each associated with a video subject within the frame image to be processed;
and forming a target video according to the target frame image and the unprocessed frame image in the video to be processed.
In the electronic device provided in the embodiment of the present invention, the processor 1110 implements, by executing the program stored in the memory 1130, processing of each frame of to-be-processed frame image of the to-be-processed video, dividing the to-be-processed frame image into a primary video display area and a secondary video display area, and reserving image elements associated with a video main body in the secondary video display area of the to-be-processed frame image to obtain a target frame image, and combining an unprocessed frame image in the to-be-processed video and the target frame image to obtain a target video, where since only image elements associated with the video main body are reserved in the secondary video display area of the target frame image, when the target video is played, the video main body in the video shows a screen effect in the secondary video display area, so as to obtain a stereoscopic impression of screen display in the viewing sense, compared with a limitation of a naked eye 3D technology on complexity of a video processing process and a video being directly played, the scheme gives more visual impact force to the user when watching the video through lower cost, thereby improving the competitiveness of the video website.
The communication bus 1140 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 1140 may be divided into an address bus, a data bus, a control bus, and the like. 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 1120 is used for communication between the electronic device and other devices.
The memory 1130 may include a Random Access Memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory 1130 may also be at least one memory device located remotely from the processor 1110.
The processor 1110 may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the integrated circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components.
An embodiment of the present invention provides a computer-readable storage medium, where one or more programs are stored in the computer-readable storage medium, and the one or more programs are executable by one or more processors to implement the video processing method according to any of the above 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, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the 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.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A video processing method, characterized in that the processing method comprises:
determining a main video display area displayed in a target area and an auxiliary video display area displayed outside the target area in at least one frame image to be processed of a video to be processed;
performing image processing on an auxiliary video display area of each frame image to be processed to obtain a target frame image only retaining image elements in the auxiliary video display area; wherein the image elements are each associated with a video subject within the frame image to be processed;
and forming a target video according to the target frame image and the unprocessed frame image in the video to be processed.
2. The video processing method of claim 1, wherein the processing method further comprises:
acquiring a video body mark added aiming at an object in any frame image to be processed;
and taking the object added with the video main body mark in the frame image to be processed as the video main body of the frame image to be processed.
3. The video processing method according to claim 2, wherein for the frame image to be processed without adding the video body mark, the processing method further comprises:
comparing the object in the frame image to be processed with the video main body to obtain a corresponding similarity value;
and taking the object of the frame image to be processed with the similarity value larger than a preset similarity threshold value as a video main body of the frame image to be processed.
4. The video processing method according to claim 1, wherein said performing image processing on the secondary video display area of each frame image to be processed to obtain a target frame image in which only image elements are retained in the secondary video display area comprises:
judging whether image elements associated with a video main body in a main video display area of the frame image to be processed exist in an auxiliary video display area of the frame image to be processed;
if so, only image elements associated with the video main body are reserved in the auxiliary video display area of the frame image to be processed, and the target frame image is obtained;
or if not, hiding the auxiliary video display area of the frame image to be processed.
5. The video processing method according to claim 1, wherein said performing image processing on the secondary video display area of each frame image to be processed to obtain a target frame image in which only image elements are retained in the secondary video display area comprises:
identifying a video subject in the frame image to be processed;
and only reserving the video main body in the auxiliary video display area of the frame image to be processed as the target frame image.
6. The video processing method according to claim 1, wherein said performing image processing on the secondary video display area of each frame image to be processed to obtain a target frame image in which only image elements are retained in the secondary video display area comprises:
identifying a video background in the frame image to be processed;
setting the color of a video background in an auxiliary video display area in the frame image to be processed as a filtering color as the target frame image; and the color value of the filtering color is different from the color value of any pixel in the frame image to be processed.
7. The video processing method according to any one of claims 1 to 6, wherein the processing method further comprises:
acquiring a real-time interface of a user side for playing the target video;
and when the target video is played, processing the real-time interface and the target video to enable the real-time interface to be used as the background of the target video.
8. A video processing apparatus, characterized in that the processing apparatus comprises:
the video processing device comprises a first processing unit, a second processing unit and a display unit, wherein the first processing unit is used for determining a main video display area and an auxiliary video display area in at least one frame image to be processed of a video to be processed;
the second processing unit is used for carrying out image processing on the auxiliary video display area of each frame image to be processed to obtain a target frame image only retaining image elements in the auxiliary video display area; wherein the image element is associated with a video subject within the frame image to be processed;
and the third processing unit is used for forming a target video according to the target frame image and the unprocessed frame image in the video to be processed.
9. The video processing system 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 video processing method according to any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the video processing method of any one of claims 1 to 7.
CN202010953735.1A 2020-09-11 2020-09-11 Video processing method, device and system and storage medium Active CN112055246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010953735.1A CN112055246B (en) 2020-09-11 2020-09-11 Video processing method, device and system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010953735.1A CN112055246B (en) 2020-09-11 2020-09-11 Video processing method, device and system and storage medium

Publications (2)

Publication Number Publication Date
CN112055246A CN112055246A (en) 2020-12-08
CN112055246B true CN112055246B (en) 2022-09-30

Family

ID=73610802

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010953735.1A Active CN112055246B (en) 2020-09-11 2020-09-11 Video processing method, device and system and storage medium

Country Status (1)

Country Link
CN (1) CN112055246B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107920202A (en) * 2017-11-15 2018-04-17 阿里巴巴集团控股有限公司 Method for processing video frequency, device and electronic equipment based on augmented reality
CN108124194A (en) * 2017-12-28 2018-06-05 北京奇艺世纪科技有限公司 A kind of net cast method, apparatus and electronic equipment
CN110876079A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Video processing method, device and equipment
CN111193965A (en) * 2020-01-15 2020-05-22 北京奇艺世纪科技有限公司 Video playing method, video processing method and device
CN111246196A (en) * 2020-01-19 2020-06-05 北京字节跳动网络技术有限公司 Video processing method and device, electronic equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090315980A1 (en) * 2008-06-24 2009-12-24 Samsung Electronics Co., Image processing method and apparatus
KR102321364B1 (en) * 2015-03-05 2021-11-03 삼성전자주식회사 Method for synthesizing a 3d backgroud content and device thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107920202A (en) * 2017-11-15 2018-04-17 阿里巴巴集团控股有限公司 Method for processing video frequency, device and electronic equipment based on augmented reality
CN108124194A (en) * 2017-12-28 2018-06-05 北京奇艺世纪科技有限公司 A kind of net cast method, apparatus and electronic equipment
CN110876079A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Video processing method, device and equipment
CN111193965A (en) * 2020-01-15 2020-05-22 北京奇艺世纪科技有限公司 Video playing method, video processing method and device
CN111246196A (en) * 2020-01-19 2020-06-05 北京字节跳动网络技术有限公司 Video processing method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112055246A (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN110189378A (en) A kind of method for processing video frequency, device and electronic equipment
JP6336206B2 (en) Method, apparatus, program and recording medium for processing moving picture file identifier
WO2020248900A1 (en) Panoramic video processing method and apparatus, and storage medium
CN110062157B (en) Method and device for rendering image, electronic equipment and computer readable storage medium
CN110335216B (en) Image processing method, image processing apparatus, terminal device, and readable storage medium
CN112954450B (en) Video processing method and device, electronic equipment and storage medium
CN111131688B (en) Image processing method and device and mobile terminal
CN110781823A (en) Screen recording detection method and device, readable medium and electronic equipment
CN108932703B (en) Picture processing method, picture processing device and terminal equipment
US10733706B2 (en) Mobile device, and image processing method for mobile device
CN107770487B (en) Feature extraction and optimization method, system and terminal equipment
CN111654747B (en) Bullet screen display method and device
CN112929728A (en) Video rendering method, device and system, electronic equipment and storage medium
CN110047126B (en) Method, apparatus, electronic device, and computer-readable storage medium for rendering image
CN112055246B (en) Video processing method, device and system and storage medium
CN112055247B (en) Video playing method, device, system and storage medium
US11647294B2 (en) Panoramic video data process
US20150117757A1 (en) Method for processing at least one disparity map, corresponding electronic device and computer program product
CN111161299A (en) Image segmentation method, computer program, storage medium, and electronic device
CN115134677A (en) Video cover selection method and device, electronic equipment and computer storage medium
CN115049572A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN108898081B (en) Picture processing method and device, mobile terminal and computer readable storage medium
CN110619362B (en) Video content comparison method and device based on perception and aberration
JP2014085845A (en) Moving picture processing device, moving picture processing method, program and integrated circuit
CN111353929A (en) Image processing method and device 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