CN108124109A - A kind of method for processing video frequency, equipment and computer readable storage medium - Google Patents

A kind of method for processing video frequency, equipment and computer readable storage medium Download PDF

Info

Publication number
CN108124109A
CN108124109A CN201711174711.0A CN201711174711A CN108124109A CN 108124109 A CN108124109 A CN 108124109A CN 201711174711 A CN201711174711 A CN 201711174711A CN 108124109 A CN108124109 A CN 108124109A
Authority
CN
China
Prior art keywords
image frame
target image
background
target
video data
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.)
Pending
Application number
CN201711174711.0A
Other languages
Chinese (zh)
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.)
Shanghai Zhangmen Science and Technology Co Ltd
Original Assignee
Shanghai Zhangmen 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 Shanghai Zhangmen Science and Technology Co Ltd filed Critical Shanghai Zhangmen Science and Technology Co Ltd
Priority to CN201711174711.0A priority Critical patent/CN108124109A/en
Publication of CN108124109A publication Critical patent/CN108124109A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • H04N5/265Mixing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/23418Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • 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
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • 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
    • H04N21/4318Generation of visual interfaces for content selection or interaction; Content or additional data rendering by altering the content in the rendering process, e.g. blanking, blurring or masking an image region
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Circuits (AREA)

Abstract

The application provides a kind of method for processing video frequency, equipment and computer readable storage medium, it determines at least one target image frame in video data, and the background in target image frame is replaced with into target background, obtain new target image frame, based on new target image frame, new video data is synthesized.The video processing strategy that the application proposes can be used in net cast scene, during video data transmission, background replacement is carried out to video data in due course, background in video data will be from the limitation of real background residing for main broadcaster, no matter for main broadcaster or audient, good visual effect can be experienced, user experience is good.The video processing strategy that the application proposes can be used for local video data is carried out background replacement to being stored in local video data, improve video appreciation effect into edlin.

Description

A kind of method for processing video frequency, equipment and computer readable storage medium
Technical field
This application involves internet information treatment technology and field of computer technology more particularly to a kind of video processing sides Method, equipment and computer readable storage medium.
Background technology
At present, the development of development of Mobile Internet technology generates net cast application.Communication terminal can install microphone and take the photograph As first-class hardware, for recording audio/video.Net cast client, the net cast that will be collected are installed in communication terminal Net cast data are sent to other each reception clients by data sending to server, server in real time.
In net cast, main broadcaster usually rearward arranges background, such as wall or scene.During live streaming, the back of the body Scape may be always kept in a fixed state, it is impossible to freely be replaced, can be influenced the effect that video watches.In this way, no matter for main broadcaster or spectators, The user experience that video watches is bad.
The content of the invention
The embodiment of the present application technical problems to be solved are, during net cast, the user experience that video watches is not It is good.
The embodiment of the present application uses following technical proposals:
The embodiment of the present application provides a kind of method for processing video frequency, including:
Based on setting rule, at least one target image frame in video data is determined, wherein the target image frame bag Include foreground and background;
Background in target image frame is replaced with into target background, obtains new target image frame;
Based on the new target image frame, new video data is synthesized.
Optionally, based on setting rule, at least one target image frame in video data is determined, including:
If the video data includes net cast data, based on setting rule, determine in the net cast data At least one target image frame.
Optionally, based on setting rule, at least one target image frame in video data is determined, including:
Obtain user first specifies operation;
Operation is specified based on described first, determines at least one target image frame in video data.
Optionally, operation is specified based on described first, determines at least one target image frame in video data, including:
Since getting described first and specifying operation, continuously by each figure in the net cast data of acquisition As frame is determined as target image frame.
Optionally, based on setting rule, at least one target image frame in video data is determined, including:
Based on timing rule, periodically determine the target image frame in video data, include at least in each timing section One target image frame;
Background in the target image frame is replaced with into target background, including:
Each target image frame in two neighboring timing section is replaced with into different target backgrounds.
Optionally, the background in the target image frame is replaced with into target background, including:
Obtain user second specifies operation;
Based on described second operation is specified to determine the target background;
Background in the target image frame is replaced with into identified target background.
Optionally, the background in the target image frame is replaced with into identified target background, including:
Based on setting order, different target backgrounds is obtained;
The background in different target picture frame is replaced with into corresponding different target background successively.
Optionally, the background in the target image frame is replaced with into target background, obtains new target image frame, wrapped It includes:
The target image frame is carried out to scratch figure, foreground and background respective positions in the target image frame is obtained and believes Breath;
Based on the location information, the prospect of the target image frame and the target background are synthesized, obtain institute State new target image frame.
Optionally, the target image frame is carried out scratching figure, including:
Based on the Colour in the target image frame, the respective position of foreground and background in the target image frame is determined Confidence ceases.
Optionally, based on the Colour in the target image frame, foreground and background in the target image frame is determined Respective positions information, including:
If the background is solid background, based at least one pixel in the solid background, reference image is determined Element value;
Each pixel in the target image frame is calculated to be distributed compared to the aberration of the reference pixel value;
Aberration based on each pixel in the target image frame compared to the reference pixel value is distributed, and determines the prospect With background respective positions information.
Optionally, each pixel in the target image frame is calculated to be distributed compared to the aberration of the reference pixel value, including:
It is rgb value P to determine the reference pixel valueGinseng(R0, G0, B0), and the rgb value of each pixel for P1 (R1, G1, B1) ... Pn (Rn, Gn, Bn);
Utilize colour difference formula:Calculate each pixel The corresponding value of chromatism Dn of point;
Based on the corresponding value of chromatism Dn of each pixel, determine that aberration is distributed.
Optionally, it is distributed, is determined based on aberration of each pixel in the target image frame compared to the reference pixel value The foreground and background respective positions information, including:
By the value of chromatism Dn of each pixel compared with default color difference threshold Key;
Pixel corresponding to each value of chromatism Dn based on more than the default color difference threshold Key, determines the prospect Location information;
Pixel corresponding to each value of chromatism Dn based on less than or equal to the default color difference threshold Key, determines the back of the body The location information of scape.
Optionally, it is distributed, is determined based on aberration of each pixel in the target image frame compared to the reference pixel value The foreground and background respective positions information, further includes:
Comparative result between value of chromatism Dn and default color difference threshold Key based on each pixel, generates the mesh The location chart of the foreground and background of logo image frame;
Based on the location information, the prospect of the target image frame and the target background are synthesized, obtain institute New target image frame is stated, including:
Based on the location chart, the prospect of the target image frame and the target background are synthesized, obtain institute State new target image frame.
Optionally, the reference pixel value includes rgb value or YUV values;
The target image frame includes yuv format or rgb format.
Optionally, the target background is included into Target Photo and/or target video.
Optionally, when the target background includes target video, the background in the target image frame is replaced with into mesh Background is marked, including:
The background of sequentially connected each target image frame in the video data is replaced with successively in the target video Sequentially connected each picture frame.
The embodiment of the present application also provides a kind of electronic equipment, including at least one processor and memory, memory storage There is program, and be configured to perform following steps by least one processor:Processor is realized above-mentioned when performing described program Any one of them method for processing video frequency.
The embodiment of the present application also provides a kind of computer readable storage medium, is stored thereon with computer program, feature It is, any of the above-described method for processing video frequency is realized when described program is executed by processor.
Above-mentioned at least one technical solution that the embodiment of the present application uses can reach following advantageous effect:
Determine at least one target image frame in video data, target image frame includes foreground and background;And by target Background in picture frame replaces with target background, obtains new target background;Afterwards based on new target image frame, recombine New video data.The video processing strategy that the application proposes can be used in net cast scene, in video data transmission mistake Cheng Zhong carries out background replacement to video data in due course, the background in video data by from the limitation of real background residing for main broadcaster, No matter for main broadcaster or audient, good visual effect can be experienced, user experience is good.At the video that the application proposes Reason strategy can be used for local video data is carried out background replacement to being stored in local video data, improved into edlin Video appreciation effect.Therefore, strategy is handled using video provided by the embodiments of the present application, user can freely replace video data In each picture frame background, promote video and watch experience, promotion user experience.
Description of the drawings
Attached drawing described herein is used for providing further understanding of the present application, forms the part of the application, this Shen Schematic description and description please does not form the improper restriction to the application for explaining the application.In the accompanying drawings:
Fig. 1 is a kind of structure chart of video living transmission system provided by the embodiments of the present application;
Fig. 2 is a kind of flow chart of method for processing video frequency provided by the embodiments of the present application;
Fig. 3 is based on to be provided by the embodiments of the present application in video treatment progress shown in Fig. 2, in a kind of definite target image frame Foreground and background location information flow chart.
Specific embodiment
In order to realize the purpose of the application, the embodiment of the present application provides a kind of method for processing video frequency, equipment and computer Readable storage medium storing program for executing based on setting rule, determines at least one target image frame in video data, wherein target image frame bag Include foreground and background;And the background in the target image frame is replaced with into target background, obtain new target image frame;Afterwards Based on new target image frame, new video data is synthesized.The video processing strategy that the application proposes can be used for straight in video Scene is broadcast, during video data transmission, background replacement is carried out to video data in due course, the background in video data will be from The limitation of real background residing for main broadcaster allows spectators to see different live streaming background.Main broadcaster or audient can freely set live streaming Background in video no matter for main broadcaster or audient, can experience good visual effect, user experience is good.
The video processing strategy that the application proposes can be used for local video data into edlin, local to being stored in Video data carries out background replacement, improves video appreciation effect.Therefore, plan is handled using video provided by the embodiments of the present application Slightly, user can freely replace the background of each picture frame in video data, promote video and watch experience, promote user experience.
It should be noted that if video data be net cast data, then in method for processing video frequency each step by same master Body performs or in video data in the case of net cast data, based on the transmission path of net cast data, at video Each step of reason method is performed by different subjects.
With reference to Fig. 1, Fig. 1 is a kind of structure chart of video living transmission system provided by the embodiments of the present application, and structure is as follows. Video living transmission system includes:Main broadcaster end 101, server-side 102 and viewer end 103, wherein main broadcaster end 101 and viewer end 103 are User terminal, the different ends in net cast data transfer path;
Wherein, main broadcaster end 101 is used to gather net cast data;
Server-side 102 is used to connect main broadcaster end 101 and viewer end 103, realizes communication between the two, especially can be in the future From the net cast data sending at main broadcaster end 101 to online viewer end 103;
Viewer end 103 receives net cast data from server-side 103 and plays live video.
In video living transmission system, main broadcaster end 101 can be the client of main broadcaster one side, and viewer end 103 can be spectators The client of one side.Main broadcaster end 101, server-side 102 and viewer end 103 can perform video processing respectively as executive agent Each step in method;It, can be by main broadcaster end 101, server-side 102 and viewer end 103 based on net cast data transfer path At least one target image frame determined in preceding one end in video data in three, and by the background in the target image frame Replace with target background, afterwards by three in latter end group in replaced target image frame, synthetic video data, herein It is not especially limited.
To make the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Go out all other embodiments obtained under the premise of creative work, shall fall in the protection scope of this application.
Below in conjunction with attached drawing, the technical solution that each embodiment of the application provides is described in detail.
Fig. 2 is a kind of flow chart of method for processing video frequency provided by the embodiments of the present application.The method can be as follows. The executive agent of the embodiment of the present application can be the client, server-side or processing system for video for possessing video processing function, Middle client can be presented in video processing equipment in the form of application program, and wherein video processing equipment can include meter The smart machines such as calculation machine, smart camera, smart mobile phone, tablet.
Step 201:Based on setting rule, at least one target image frame in video data, target image frame bag are determined Include foreground and background.
In this specification embodiment, video data is included along the sequentially connected several picture frames of time shaft, can be with base In setting rule, wherein at least one picture frame is determined as target image frame.
In video living transmission system, main broadcaster end gathers net cast data by camera, and can be by net cast number According to being sent to server-side, and finally it is transmitted to viewer end and plays out.In this case, method for processing video frequency further includes:
Based on setting rule, at least one target image frame in video data is determined, including:
If video data includes net cast data, based on setting rule, at least one in net cast data is determined A target image frame.
In this specification embodiment, based on setting rule, at least one target image frame in video data is determined, it can To include following at least one situation:
Based on setting rule, user terminal determines at least one target image frame in video data, wherein based on user terminal It broadcasts at least one in end and viewer end;Alternatively,
Server-side is based at least one target image determined from the video processing request that user terminal receives in video data Frame.
Setting rule is preferably based on, at least one target image frame in video data is determined, can include:
Obtain user first specifies operation;
Operation is specified based on first, at least one target image frame in video data is determined, wherein the user terminal bag It includes at least one in main broadcaster end and viewer end.It in practical applications, can be to main broadcaster end when main broadcaster wishes to change target background Apply first and specify operation, main broadcaster end detects that first specifies operation, determines the target image frame in video data.In this feelings Under condition, user terminal provides the operation object for described first the corresponding video of operation being specified to handle, when detecting operation object quilt Triggering then confirms that first specifies operation.Wherein, first to specify the type of operation can default click on such as click, double-click to move Make.
It is preferably based on first and specifies operation, determine at least one target image frame in video data, can include:
If the video data includes net cast data, since getting first and specifying operation, will continuously obtain Each picture frame in the net cast data taken is determined as target image frame.
During net cast, net cast data with continuous acquisition and can be transmitted, therefore user terminal is receiving After one specifies operation, each picture frame after confirming is determined as target image frame.
In this specification embodiment, based on setting rule, at least one target image frame in video data is determined, it can To include:Each picture frame in video data is determined as target image frame.
It, can will no matter in net cast scene or local storage in such a case, it is possible to from scene restriction Each picture frame in video data is determined as target image frame.
In this specification embodiment, based on setting rule, at least one target image frame in video data is determined, it can To include:Based on timing rule, the target image frame in video data is periodically determined, include at least one in each timing section A target image frame.
In this case, the target image frame in video data is periodically determined, including:
First picture frame when each timing section is started is determined as target image frame;Or
Part or all of picture frame in each timing section is determined as target image frame.
Wherein, the scope in each timing section is not set specifically, can be default setting or be specified by user.
Step 202:Background in target image frame is replaced with into target background, obtains new target image frame.
In this specification embodiment, the background in target image frame is replaced with into target background, obtains new target figure Picture frame, including:
Target image frame is carried out to scratch figure, obtains foreground and background respective positions information in target image frame;
Based on location information, the prospect of target image frame and target background are synthesized, obtain new target image frame.
In practical applications, in video living transmission system, prospect can be understood as main broadcaster's image, therefore, based on institute's rheme Confidence ceases, and main broadcaster's image and target background are synthesized, obtain new target image frame.
Wherein, based on location information, target image frame and target background are synthesized, obtain new target image frame, It can include:
By target background covering part or whole backgrounds, replaced target image frame is obtained;Alternatively,
Target background is covered into background and at least part prospect, obtains replaced target image frame.
In practical applications, target background can be covered main broadcaster, obtains main broadcaster's body position or whole bodies are hidden The effect of body;Or dressed up using target background to main broadcaster.
In this specification embodiment, target image frame is carried out to scratch figure, including:
Based on the Colour in target image frame, foreground and background respective positions information in target image frame is determined. In this case, the colourity of foreground and background has differences, and may thereby determine that respective positions information.In practical application In, main broadcaster can rearward set the wall or setting different from itself dress or the colour of skin, reach and deposit between foreground and background In the purpose of colourity difference.
In this specification embodiment, with reference to Fig. 3, Fig. 3 be it is provided by the embodiments of the present application in video processing procedure, one The flow chart of the location information of foreground and background in kind definite target image frame, based on the Colour in target image frame, Determine foreground and background respective positions information in target image frame, including:
If background is solid background, based at least one pixel in solid background, reference pixel value is determined;
Step 301 is performed, each pixel in target image frame is calculated and is distributed compared to the aberration of reference pixel value;
Aberration based on each pixel in target image frame compared to reference pixel value is distributed, and determines that foreground and background is respective Location information.
Under solid background, based at least one pixel in solid background, determine reference pixel value, can include: Reference pixel value is determined based on a pixel in solid background;Alternatively, it is distributed in view of the light in actual living broadcast environment Imbalance, the average of the pixel value based on multiple pixels in solid background, obtains reference pixel value.
Wherein, reference pixel value can include:RGB (RGB) values or Y (brightness) U (indigo plants to the color of yellow color component Degree) V (the red colourity to cyan color components) value, it is not especially limited herein.
In this specification embodiment, calculate each pixel in target image frame and be distributed compared to the aberration of reference pixel value, Including:
By the pixel value and reference pixel value of each pixel in target image frame, color difference matrix, wherein color is calculated Poor matrix can characterize aberration distribution.
Wherein it is determined that reference pixel value is rgb value PGinseng(R0, G0, B0), and the rgb value of each pixel is P1 (R1, G1, B1) ... Pn (Rn, Gn, Bn);
Utilize colour difference formula:Calculate each picture The corresponding value of chromatism Dn of vegetarian refreshments;
Based on the corresponding value of chromatism Dn of each pixel, color difference matrix is created, so as to obtain aberration distribution.
In this case, if target image frame includes rgb format, color difference matrix is directly calculated;If target image frame Including yuv format, then yuv format is first converted into rgb format.
If reference pixel value is rgb value, color difference matrix is directly calculated using rgb value;If reference pixel value is YUV values, YUV values are first then converted into rgb value, then calculate color difference matrix.
In this specification embodiment, the aberration point based on each pixel in target image frame compared to the reference pixel value Cloth determines foreground and background respective positions information, can include:
Step 302 is performed, by the value of chromatism Dn of each pixel compared with default color difference threshold Key;
If value of chromatism Dn is more than default color difference threshold Key, the corresponding pixels of value of chromatism Dn are determined as in prospect Pixel, based on the pixel corresponding to each value of chromatism Dn more than default color difference threshold Key, determine the position letter of prospect Breath;
If value of chromatism Dn is less than or equal to default color difference threshold Key, the corresponding pixels of value of chromatism Dn are determined as carrying on the back Pixel in scape based on the pixel corresponding to each value of chromatism Dn less than or equal to default color difference threshold Key, determines background Location information.
For example, if Key is 10, the location information that the value of chromatism less than or equal to 10 corresponds to background can be set, more than 10 Value of chromatism corresponds to the location information of prospect.It should be noted that Key is 10 by way of example only, in practical applications, from this Limitation.
Further, based on each pixel in target image frame compared to reference pixel value aberration be distributed, determine prospect and Background respective positions information, further includes:
Comparative result between value of chromatism Dn and default color difference threshold Key based on each pixel generates target image frame Foreground and background location chart;
Based on the location information, the prospect of target image frame and the target background are synthesized, obtain new mesh Logo image frame, including:
Step 303 is performed, based on location chart, the prospect of target image frame and target background are synthesized, is obtained new Target image frame.
In practical applications, in location chart, it will be greater than the picture corresponding to each value of chromatism Dn of default color difference threshold Key The setting coordinate of vegetarian refreshments is 1, represents prospect;By the pixel corresponding to each value of chromatism Dn less than or equal to default color difference threshold Key The setting coordinate of point is 0, represents background.In the prospect of target image frame and the target background carry out building-up process, target The region that respective value is 1 in picture frame remains unchanged, and the region that respective value is 0 in target image frame replaces with target background, obtains To new target image frame.
In this specification embodiment, after new target image frame is synthesized, new target image frame can be carried out Smoothing processing, details are not described herein.
In this specification embodiment, the situation of at least one target image frame in user terminal determines video data Under, the background in target image frame is replaced with into target background, can be included:User terminal replaces the background in target image frame For target background.
In this case, user can select suitable target background based on the hobby of oneself.Wherein, target background can Be user terminal obtained from local storage or target background can be user terminal obtain from server-side.For latter Situation, the operation interface in user terminal provides the selecting object of target background, and is receiving the operational order to selecting object Afterwards, target background is transferred from server to be replaced.
Preferably, the background in the target image frame is replaced with into target background, including:
Obtain user second specifies operation;
Based on second operation is specified to determine the target background;
Background in target image frame is replaced with into identified target background.
In this case, user terminal is selected when monitoring to specify operation to the second of target background from local storage It selects suitable target background or transfers suitable target background from server-side.Wherein, the second specified operation can be preset Hit action.
In this specification embodiment, the background in target image frame is replaced with into target background, can be included::
In user terminal in the case of main broadcaster end, server-side based on the target image frame obtained from the main broadcaster end, Background in the target image frame is replaced with into target background.User terminal can determine target image based on the wish of oneself Frame, but default setting is based on by server-side and selects suitable target background.
In this specification embodiment, the background in target image frame is replaced with to definite target background, can be included:
Based on setting order, different target backgrounds is obtained;
The background in different target picture frame is replaced with into corresponding different target background successively.
In practical applications, can will obtain several different target backgrounds in local storage, and based on setting order according to It is secondary to transfer target background, to replace the background in corresponding target image frame.Such as during net cast, this can be realized Background in live video is constantly replaced.
The setting order can be closed loop cycle.
In this specification embodiment, with reference to the content of step 201, if since first specifies operation, will continuously it obtain Each picture frame in the net cast data taken is determined as target image frame, then replaces the background in target image frame For target background, can include:It is adjacent twice first specify operation between each target image frame in background can by for Be changed to same target background or it is adjacent twice first specify operation between each target image frame in background can by for The target background being changed in different target background, such as two neighboring target image frame is different, is not especially limited herein.
In this specification embodiment, with reference to the content of step 201, if based on timing rule, periodically determine to regard Target image frame of the frequency in, then replace with target background by the background in target image frame, including:
Each target image frame in two neighboring timing section is replaced with into different target backgrounds.
In this case, in two neighboring timing section, target background in one of timing section and another Target background in timing section is different.Each target background in same timing section can be identical or different.
In this specification embodiment, the background in different target picture frame can be replaced with same target background, This is not especially limited.
In this specification embodiment, the background in target image frame is replaced with into target background, including:
If target background includes Target Photo, the background in target image frame is replaced with into the Target Photo.
During net cast, in live video, main broadcaster can place oneself in the midst of the landscape such as high mountain steep cliff, deep woods sea In.
In this specification embodiment, the background in target image frame is replaced with into target background, including:
If target background includes target video, based on the order of connection of each picture frame in the target video, obtain The different target backgrounds;
The background of definite each target image frame is replaced with to acquired each target background successively.
If target background includes target video, by the background of sequentially connected each target image frame in video data successively Replace with sequentially connected each picture frame in target video.In this case, each picture frame in target video is respectively seen as One independent target background.
In net cast process, the background in replaced video data will be presented animation and play.In this way, it is regarded in live streaming In frequency, main broadcaster can be appeared in animation or game, and main broadcaster can be interactive with the star in target video, can place oneself in the midst of starry sky In to realize the effect that goes through the veil of time.
Step 203 shown in Fig. 2:Based on new target image frame, new video data is synthesized.
During net cast, in the live video played in viewer end, replaced target background is presented.If live streaming Background in each picture frame of video is replaced by target background, then continuous same target will be presented in live video Background or the different target background that alternately variation is presented, final effect depending on the content based on step 202, will not made to have herein Body limits.
In this specification embodiment, based on new target image frame, new video data is synthesized, including:
User terminal synthesizes new video data based on new target image frame;Alternatively,
Server-side synthesizes new video data based on new target image frame, and by video data send to viewer end into Row plays.
The video processing strategy that the application proposes can be used in net cast scene, during video data transmission, Background replacement is carried out to video data in due course, the background in video data by from the limitation of real background residing for main broadcaster, no matter For main broadcaster or audient, good visual effect can be experienced, user experience is good.The video processing plan that the application proposes It slightly can be used for local video data is carried out background replacement to being stored in local video data, improve video into edlin Appreciation effect.Therefore, strategy is handled using video provided by the embodiments of the present application, user can freely replace each in video data The background of picture frame promotes video and watches experience, promotes user experience.
It should be noted that the method for processing video frequency that this specification embodiment provides can be realized by software mode, It can be realized by hardware mode, be not specifically limited here.
Based on same inventive concept, this specification embodiment additionally provides electronic equipment, including:At least one processor And memory, memory storage have program, and be configured to as the video described at least one processor performs any of the above Processing method.
Wherein, other functions of processor are no longer gone to live in the household of one's in-laws on getting married one by one here referring also to the content described in above-described embodiment It states.
Based on same inventive concept, this specification embodiment also provides a kind of computer readable storage medium, deposits thereon Computer program is contained, which includes the program being used in combination with electronic equipment, and program is by processor Any of the above-described method for processing video frequency is realized during execution.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Point just to refer each other, and the highlights of each of the examples are difference from other examples.It is real especially for system For applying example, since it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
The foregoing is merely embodiments herein, are not limited to the application.For those skilled in the art For, the application can have various modifications and variations.All any modifications made within spirit herein and principle are equal Replace, improve etc., it should be included within the scope of claims hereof.

Claims (18)

1. a kind of method for processing video frequency, which is characterized in that including:
Based on setting rule, at least one target image frame in video data is determined, wherein before the target image frame includes Scape and background;
Background in the target image frame is replaced with into target background, obtains new target image frame;
Based on the new target image frame, new video data is synthesized.
2. method for processing video frequency as described in claim 1, which is characterized in that based on setting rule, determine in video data At least one target image frame, including:
If the video data includes net cast data, based on setting rule, determine in the net cast data extremely A few target image frame.
3. method for processing video frequency as claimed in claim 2, which is characterized in that based on setting rule, determine in video data At least one target image frame, including:
Obtain user first specifies operation;
Operation is specified based on described first, determines at least one target image frame in video data.
4. method for processing video frequency as claimed in claim 3, which is characterized in that specify operation based on described first, determine video At least one target image frame in data, including:
Since getting described first and specifying operation, continuously by each picture frame in the net cast data of acquisition It is determined as target image frame.
5. method for processing video frequency as described in claim 1, which is characterized in that based on setting rule, determine in video data At least one target image frame, including:
Based on timing rule, the target image frame in video data is periodically determined, include in each timing section at least one Target image frame;
Background in the target image frame is replaced with into target background, including:
Each target image frame in two neighboring timing section is replaced with into different target backgrounds.
6. method for processing video frequency as described in claim 1, which is characterized in that replace with the background in the target image frame Target background, including:
Obtain user second specifies operation;
Based on described second operation is specified to determine the target background;
Background in the target image frame is replaced with into identified target background.
7. method for processing video frequency as claimed in claim 6, which is characterized in that replace with the background in the target image frame Identified target background, including:
Based on setting order, different target backgrounds is obtained;
The background in different target picture frame is replaced with into corresponding different target background successively.
8. method for processing video frequency as described in claim 1, which is characterized in that replace with the background in the target image frame Target background obtains new target image frame, including:
The target image frame is carried out to scratch figure, obtains foreground and background respective positions information in the target image frame;
Based on the location information, the prospect of the target image frame and the target background are synthesized, obtained described new Target image frame.
9. method for processing video frequency as claimed in claim 8, which is characterized in that the target image frame is carried out to scratch figure, including:
Based on the Colour in the target image frame, determine that foreground and background respective positions are believed in the target image frame Breath.
10. method for processing video frequency as claimed in claim 9, which is characterized in that based on the colourity in the target image frame point Cloth determines foreground and background respective positions information in the target image frame, including:
If the background is solid background, based at least one pixel in the solid background, reference pixel value is determined;
Each pixel in the target image frame is calculated to be distributed compared to the aberration of the reference pixel value;
Aberration based on each pixel in the target image frame compared to the reference pixel value is distributed, and determines the prospect and the back of the body Scape respective positions information.
11. method for processing video frequency as claimed in claim 10, which is characterized in that calculate each pixel in the target image frame Aberration compared to the reference pixel value is distributed, including:
It is rgb value P to determine the reference pixel valueGinseng(R0, G0, B0), and the rgb value of each pixel for P1 (R1, G1, B1) ... Pn (Rn, Gn, Bn);
Utilize colour difference formula:Calculate each pixel pair The value of chromatism Dn answered;
Based on the corresponding value of chromatism Dn of each pixel, determine that aberration is distributed.
12. method for processing video frequency as claimed in claim 11, which is characterized in that based on each pixel in the target image frame Aberration compared to the reference pixel value is distributed, and determines the foreground and background respective positions information, including:
By the value of chromatism Dn of each pixel compared with default color difference threshold Key;
Pixel corresponding to each value of chromatism Dn based on more than the default color difference threshold Key determines the position of the prospect Information;
Pixel corresponding to each value of chromatism Dn based on less than or equal to the default color difference threshold Key, determines the background Location information.
13. method for processing video frequency as claimed in claim 12, which is characterized in that based on each pixel in the target image frame Aberration compared to the reference pixel value is distributed, and is determined the foreground and background respective positions information, is further included:
Comparative result between value of chromatism Dn and default color difference threshold Key based on each pixel, generates the target figure As the location chart of the foreground and background of frame;
Based on the location information, the prospect of the target image frame and the target background are synthesized, obtained described new Target image frame, including:
Based on the location chart, the prospect of the target image frame and the target background are synthesized, obtained described new Target image frame.
14. method for processing video frequency as claimed in claim 11, which is characterized in that the reference pixel value includes rgb value or YUV Value;
The target image frame includes yuv format or rgb format.
15. method for processing video frequency as described in claim 1, which is characterized in that by the target background include Target Photo and/ Or target video.
16. method for processing video frequency as claimed in claim 15, which is characterized in that when the target background includes target video When, the background in the target image frame is replaced with into target background, including:
The background of sequentially connected each target image frame in the video data is replaced in the target video successively successively Each picture frame of connection.
17. a kind of computer equipment, including memory, processor and it is stored on the memory and can be on the processor The computer program of operation, which is characterized in that the processor is realized when performing described program as any in claim 1~16 Method for processing video frequency described in.
18. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed The method for processing video frequency as any one of claim 1~16 is realized when device performs.
CN201711174711.0A 2017-11-22 2017-11-22 A kind of method for processing video frequency, equipment and computer readable storage medium Pending CN108124109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711174711.0A CN108124109A (en) 2017-11-22 2017-11-22 A kind of method for processing video frequency, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711174711.0A CN108124109A (en) 2017-11-22 2017-11-22 A kind of method for processing video frequency, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN108124109A true CN108124109A (en) 2018-06-05

Family

ID=62227900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711174711.0A Pending CN108124109A (en) 2017-11-22 2017-11-22 A kind of method for processing video frequency, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108124109A (en)

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151575A (en) * 2018-10-16 2019-01-04 Oppo广东移动通信有限公司 Multimedia data processing method and device, computer readable storage medium
CN109509195A (en) * 2018-12-12 2019-03-22 北京达佳互联信息技术有限公司 Perspective process method, apparatus, electronic equipment and storage medium
CN110062176A (en) * 2019-04-12 2019-07-26 北京字节跳动网络技术有限公司 Generate method, apparatus, electronic equipment and the computer readable storage medium of video
CN110309721A (en) * 2019-05-31 2019-10-08 百度在线网络技术(北京)有限公司 Method for processing video frequency, terminal and storage medium
WO2020034984A1 (en) * 2018-08-14 2020-02-20 广州虎牙信息科技有限公司 Video image processing
CN110855905A (en) * 2019-11-29 2020-02-28 联想(北京)有限公司 Video processing method and device and electronic equipment
CN111083518A (en) * 2019-12-31 2020-04-28 安博思华智能科技有限责任公司 Method, device, medium and electronic equipment for tracking live broadcast target
CN111292337A (en) * 2020-01-21 2020-06-16 广州虎牙科技有限公司 Image background replacing method, device, equipment and storage medium
CN111464761A (en) * 2020-04-07 2020-07-28 北京字节跳动网络技术有限公司 Video processing method and device, electronic equipment and computer readable storage medium
CN111880709A (en) * 2020-07-31 2020-11-03 北京市商汤科技开发有限公司 Display method and device, computer equipment and storage medium
CN112330579A (en) * 2020-10-30 2021-02-05 中国平安人寿保险股份有限公司 Video background replacing method and device, computer equipment and computer readable medium
CN112423006A (en) * 2020-11-09 2021-02-26 珠海格力电器股份有限公司 Live broadcast scene switching method, device, equipment and medium
CN112752038A (en) * 2020-12-28 2021-05-04 广州虎牙科技有限公司 Background replacing method and device, electronic equipment and computer readable storage medium
CN112770173A (en) * 2021-01-28 2021-05-07 腾讯科技(深圳)有限公司 Live broadcast picture processing method and device, computer equipment and storage medium
CN113630623A (en) * 2021-07-26 2021-11-09 山东云缦智能科技有限公司 Traversing video manufacturing method based on pixel color difference contrast
CN113793395A (en) * 2021-09-15 2021-12-14 湖南快乐阳光互动娱乐传媒有限公司 Key color extraction method and device
WO2022179487A1 (en) * 2021-02-24 2022-09-01 影石创新科技股份有限公司 Video processing method for making stealth special effect, filter, device, and medium
CN115002359A (en) * 2022-05-23 2022-09-02 北京字跳网络技术有限公司 Video processing method and device, electronic equipment and storage medium
CN115086686A (en) * 2021-03-11 2022-09-20 北京有竹居网络技术有限公司 Video processing method and related device
CN115334235A (en) * 2022-07-01 2022-11-11 西安诺瓦星云科技股份有限公司 Video processing method, device, terminal equipment and storage medium
CN116600150A (en) * 2023-05-29 2023-08-15 佛山市炫新智能科技有限公司 Matrix type live broadcast display system and display method thereof
CN115334235B (en) * 2022-07-01 2024-06-04 西安诺瓦星云科技股份有限公司 Video processing method, device, terminal equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100646A (en) * 2015-08-31 2015-11-25 北京奇艺世纪科技有限公司 Video processing method and device
CN105654471A (en) * 2015-12-24 2016-06-08 武汉鸿瑞达信息技术有限公司 Augmented reality AR system applied to internet video live broadcast and method thereof
CN106412643A (en) * 2016-09-09 2017-02-15 上海掌门科技有限公司 Interactive video advertisement placing method and system
US20170154450A1 (en) * 2015-11-30 2017-06-01 Le Shi Zhi Xin Electronic Technology (Tianjin) Limited Multimedia Picture Generating Method, Device and Electronic Device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100646A (en) * 2015-08-31 2015-11-25 北京奇艺世纪科技有限公司 Video processing method and device
US20170154450A1 (en) * 2015-11-30 2017-06-01 Le Shi Zhi Xin Electronic Technology (Tianjin) Limited Multimedia Picture Generating Method, Device and Electronic Device
CN105654471A (en) * 2015-12-24 2016-06-08 武汉鸿瑞达信息技术有限公司 Augmented reality AR system applied to internet video live broadcast and method thereof
CN106412643A (en) * 2016-09-09 2017-02-15 上海掌门科技有限公司 Interactive video advertisement placing method and system

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020034984A1 (en) * 2018-08-14 2020-02-20 广州虎牙信息科技有限公司 Video image processing
CN109151575A (en) * 2018-10-16 2019-01-04 Oppo广东移动通信有限公司 Multimedia data processing method and device, computer readable storage medium
CN109151575B (en) * 2018-10-16 2021-12-14 Oppo广东移动通信有限公司 Multimedia data processing method and device and computer readable storage medium
CN109509195A (en) * 2018-12-12 2019-03-22 北京达佳互联信息技术有限公司 Perspective process method, apparatus, electronic equipment and storage medium
CN110062176A (en) * 2019-04-12 2019-07-26 北京字节跳动网络技术有限公司 Generate method, apparatus, electronic equipment and the computer readable storage medium of video
CN110062176B (en) * 2019-04-12 2020-10-30 北京字节跳动网络技术有限公司 Method and device for generating video, electronic equipment and computer readable storage medium
CN110309721B (en) * 2019-05-31 2021-06-29 百度在线网络技术(北京)有限公司 Video processing method, terminal and storage medium
CN110309721A (en) * 2019-05-31 2019-10-08 百度在线网络技术(北京)有限公司 Method for processing video frequency, terminal and storage medium
CN110855905A (en) * 2019-11-29 2020-02-28 联想(北京)有限公司 Video processing method and device and electronic equipment
CN111083518A (en) * 2019-12-31 2020-04-28 安博思华智能科技有限责任公司 Method, device, medium and electronic equipment for tracking live broadcast target
CN111083518B (en) * 2019-12-31 2022-09-09 安博思华智能科技有限责任公司 Method, device, medium and electronic equipment for tracking live broadcast target
CN111292337A (en) * 2020-01-21 2020-06-16 广州虎牙科技有限公司 Image background replacing method, device, equipment and storage medium
CN111292337B (en) * 2020-01-21 2024-03-01 广州虎牙科技有限公司 Image background replacement method, device, equipment and storage medium
US11962932B2 (en) 2020-04-07 2024-04-16 Beijing Bytedance Network Technology Co., Ltd. Video generation based on predetermined background
CN111464761A (en) * 2020-04-07 2020-07-28 北京字节跳动网络技术有限公司 Video processing method and device, electronic equipment and computer readable storage medium
CN111880709A (en) * 2020-07-31 2020-11-03 北京市商汤科技开发有限公司 Display method and device, computer equipment and storage medium
CN112330579A (en) * 2020-10-30 2021-02-05 中国平安人寿保险股份有限公司 Video background replacing method and device, computer equipment and computer readable medium
CN112423006A (en) * 2020-11-09 2021-02-26 珠海格力电器股份有限公司 Live broadcast scene switching method, device, equipment and medium
CN112752038B (en) * 2020-12-28 2024-04-19 广州虎牙科技有限公司 Background replacement method, device, electronic equipment and computer readable storage medium
CN112752038A (en) * 2020-12-28 2021-05-04 广州虎牙科技有限公司 Background replacing method and device, electronic equipment and computer readable storage medium
CN112770173A (en) * 2021-01-28 2021-05-07 腾讯科技(深圳)有限公司 Live broadcast picture processing method and device, computer equipment and storage medium
WO2022179487A1 (en) * 2021-02-24 2022-09-01 影石创新科技股份有限公司 Video processing method for making stealth special effect, filter, device, and medium
CN115086686A (en) * 2021-03-11 2022-09-20 北京有竹居网络技术有限公司 Video processing method and related device
CN113630623A (en) * 2021-07-26 2021-11-09 山东云缦智能科技有限公司 Traversing video manufacturing method based on pixel color difference contrast
CN113793395A (en) * 2021-09-15 2021-12-14 湖南快乐阳光互动娱乐传媒有限公司 Key color extraction method and device
CN113793395B (en) * 2021-09-15 2024-05-03 湖南快乐阳光互动娱乐传媒有限公司 Key color extraction method and device
CN115002359A (en) * 2022-05-23 2022-09-02 北京字跳网络技术有限公司 Video processing method and device, electronic equipment and storage medium
CN115334235A (en) * 2022-07-01 2022-11-11 西安诺瓦星云科技股份有限公司 Video processing method, device, terminal equipment and storage medium
CN115334235B (en) * 2022-07-01 2024-06-04 西安诺瓦星云科技股份有限公司 Video processing method, device, terminal equipment and storage medium
CN116600150B (en) * 2023-05-29 2024-02-06 佛山市炫新智能科技有限公司 Matrix type live broadcast display system and display method thereof
CN116600150A (en) * 2023-05-29 2023-08-15 佛山市炫新智能科技有限公司 Matrix type live broadcast display system and display method thereof

Similar Documents

Publication Publication Date Title
CN108124109A (en) A kind of method for processing video frequency, equipment and computer readable storage medium
Lee et al. High‐resolution 360 video foveated stitching for real‐time VR
US9665334B2 (en) Rendering system, rendering server, control method thereof, program, and recording medium
CN106411877B (en) A kind of realization method and system of the net cast gifts based on augmented reality AR technology
CN108924540A (en) Low latency mixed reality head wearable device
CN106621326A (en) Local application quick start with cloud transitioning
US11882188B2 (en) Methods and systems for maintaining smooth frame rate during transmission of streaming video content
US20120120201A1 (en) Method of integrating ad hoc camera networks in interactive mesh systems
CN109313484A (en) Virtual reality interactive system, method and computer storage medium
US10171785B2 (en) Color balancing based on reference points
WO2019143572A1 (en) Method and system for ar and vr collaboration in shared spaces
US11538138B2 (en) Methods and apparatus for applying motion blur to overcaptured content
CN109413508A (en) Method, apparatus, equipment, plug-flow method and the live broadcast system of image blend
CN110033463A (en) A kind of foreground data generates and its application method, relevant apparatus and system
US9327199B2 (en) Multi-tenancy for cloud gaming servers
CN113297937B (en) Image processing method, device, equipment and medium
CN107609946A (en) A kind of display control method and computing device
CN105989345A (en) Method and device for discovering friends by image matching
CN106815803A (en) The processing method and processing device of picture
CN104581196A (en) Video image processing method and device
CN105872445A (en) Video call method, device and system
CN206364929U (en) Image providing service system
JP5687670B2 (en) Display control system, game system, display control device, and program
CN113628121B (en) Method and device for processing and training multimedia data
US20150375109A1 (en) Method of Integrating Ad Hoc Camera Networks in Interactive Mesh Systems

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180605

RJ01 Rejection of invention patent application after publication