CN110363814A - A kind of method for processing video frequency, device, electronic device and storage medium - Google Patents

A kind of method for processing video frequency, device, electronic device and storage medium Download PDF

Info

Publication number
CN110363814A
CN110363814A CN201910676763.0A CN201910676763A CN110363814A CN 110363814 A CN110363814 A CN 110363814A CN 201910676763 A CN201910676763 A CN 201910676763A CN 110363814 A CN110363814 A CN 110363814A
Authority
CN
China
Prior art keywords
processed
target
video
processing
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.)
Pending
Application number
CN201910676763.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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201910676763.0A priority Critical patent/CN110363814A/en
Publication of CN110363814A publication Critical patent/CN110363814A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)

Abstract

A kind of method for processing video frequency, device, electronic device and storage medium pass through the target to be processed obtained in video to be processed;Target tracking is carried out to the target to be processed in video to be processed, can determine the position of target to be processed in each frame image of video to be processed;After the processing scheme for obtaining target to be processed, according to the position of target to be processed in each frame image obtained by target tracking, processing target can be treated in each frame image to be handled according to corresponding processing scheme, based on above-mentioned target tracking, the application can not have to first separate the life event and dynamic background video in video, the two is combined again, it can complete the processing to video, while reaching identical treatment effect, problem that can be low to avoid lock out operation and combination operation bring data-handling efficiency, be conducive to be promoted the processing speed of video, reduce the processing time of video.

Description

A kind of method for processing video frequency, device, electronic device and storage medium
Technical field
This application involves technical field of image processing more particularly to a kind of method for processing video frequency, device, electronic device and deposit Storage media.
Background technique
Currently, film and TV media has become current most popular and most influential media presentation form, it is more next More users expresses self by shooting and issuing video, uses this of video so that more and more users pay close attention to view Frequency processing function.
In related art scheme, processing to video could be completed by needing computer to execute various and complicated step, These steps not only need to expend a large amount of process resource of terminal and need the more processing time, so that depositing in the related technology In the low problem of video treatment effeciency.
Summary of the invention
The embodiment of the present application provides a kind of method for processing video frequency, device, electronic device and storage medium, is conducive to be promoted pair Video carries out treatment effeciency when data processing.
The embodiment of the present application first aspect provides a kind of method for processing video frequency, this method comprises:
Obtain the target to be processed in video to be processed;
Obtain the processing scheme of the target to be processed;
Target tracking is carried out to the target to be processed in the video to be processed, determines the every of the video to be processed The position of target to be processed described in one frame image;
The position of the target to be processed according to each frame image, to described wait locate in each frame image Reason target is handled according to corresponding processing scheme.
The embodiment of the present application second aspect provides a kind of video process apparatus, comprising:
First obtains module, for obtaining the target to be processed in video to be processed;
Second obtains module, for obtaining the processing scheme of the target to be processed;
Target tracking module is determined for carrying out target tracking to the target to be processed in the video to be processed The position of target to be processed described in each frame image of the video to be processed;
Processing module, for the position of the target to be processed according to each frame image, in each frame figure The target to be processed is handled according to corresponding processing scheme as in.
The embodiment of the present application third aspect provides a kind of electronic device, comprising: memory, processor and is stored in described deposit On reservoir and the computer program that can run on the processor, when the processor executes the computer program, realize The step of method that the embodiment of the present application first aspect provides.
The embodiment of the present application fourth aspect provides a kind of storage medium, is stored thereon with computer program, the computer When program is executed by processor, realize the embodiment of the present application first aspect provide method the step of.
The embodiment of the present application provides a kind of method for processing video frequency, device, electronic device and storage medium, by obtain to Handle the target to be processed in video;Target tracking is carried out to the target to be processed in video to be processed, can be determined to be processed The position of target to be processed in each frame image of video;After the processing scheme for obtaining target to be processed, according to each frame figure The position of target to be processed as in, can be treated in each frame image processing target according to corresponding processing scheme at Reason is based on target tracking, and the scheme of the present embodiment can not have to first separate the life event and dynamic background video in video, then The two is combined, so that it may which the processing completed to video can be to avoid separation while reaching identical treatment effect The problem low with combination operation bring data-handling efficiency is conducive to the processing speed for promoting video, reduces the processing of video Time.
Detailed description of the invention
Fig. 1 is a kind of hardware structural diagram of electronic device provided by the present application;
Fig. 2 is the flow diagram for the method for processing video frequency that the application first embodiment provides;
Fig. 3 is the flow diagram of the method for processing video frequency refined in the application second embodiment;
Fig. 4 is the display schematic diagram of several videos in the application second embodiment;
Fig. 5 be the application second embodiment in, after video to be processed has been selected in Fig. 4, the video pair to be processed of display The schematic diagram of the selection interface for the target input mode answered;
Fig. 6 is the pop-up selection in the picture that Fig. 5 is shown after the virtual Touch control key for clicking " target input mode " in 5 The schematic diagram of frame;
Fig. 7 is to pass through under the completed scene of shooting of video to be processed in a certain frame image kind of video to be processed Delineate the schematic diagram for determining target to be processed;
Under the scene that Fig. 8 does not start for the shooting in video to be processed, the schematic diagram of preview image is shown;
Fig. 9 is under the ongoing scene of shooting of video to be processed, and the image of display camera captured in real-time shows It is intended to;
Figure 10 is a kind of structural schematic diagram for video process apparatus that the application 3rd embodiment provides;
Figure 11 is a kind of structural schematic diagram for electronic device that the application 3rd embodiment provides.
Specific embodiment
To enable present invention purpose, feature, advantage more obvious and understandable, below in conjunction with the application Attached drawing in embodiment, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described reality Applying example is only some embodiments of the present application, and not all embodiments.Based on the embodiment in the application, those skilled in the art Member's every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Referring to Fig.1, Fig. 1 shows a kind of structural block diagram of electronic device.Video processing side provided in an embodiment of the present invention Method can be applied in electronic device 10 as shown in Figure 1, and electronic device 10 includes but is not limited to: mobile terminal such as smart phone, Notebook and wearing smart machine etc., fixed terminal such as desktop computer and smart television and server etc..
As shown in Figure 1, electronic device 10 includes memory 101, storage control 102, one or more (is only shown in figure One) processor 103, Peripheral Interface 104 and Touch Screen 105.These components pass through one or more communication bus/signal wire 106 mutually communications.
It is appreciated that structure shown in FIG. 1 is only to illustrate, the structure of electronic device is not caused to limit.Electronics dress Setting 10 may also include than shown in Fig. 1 more perhaps less component or with the configuration different from shown in Fig. 1.It is shown in FIG. 1 Each component can be realized using hardware, software, or its combination.
Memory 101 can be used for storing software program and module, as in the embodiment of the present invention method for processing video frequency and Corresponding program instruction/the module of electronic device, processor 103 by the software program that is stored in memory 101 of operation and Module thereby executing various function application and data processing, such as realizes above-mentioned method for processing video frequency.
Memory 101 may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetic Property storage device, flash memory or other non-volatile solid state memories.In some instances, memory 101 can further comprise The memory remotely located relative to processor 103, these remote memories can pass through network connection to electronic device 10.On The example for stating network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.Processor 103 And other possible components can carry out the access of memory 101 under the control of storage control 102.
Various input/output devices are couple CPU and memory 101 by Peripheral Interface 104.The operation of processor 103 is deposited Various softwares, instruction in reservoir 101 are to execute the various functions of electronic device 10 and carry out data processing.
In some embodiments, Peripheral Interface 104, processor 103 and storage control 102 can be in one single chips It realizes.In some other example, they can be realized by independent chip respectively.
Touch Screen 105 provides an output and input interface simultaneously between electronic device and user.Specifically, touch-control Screen 105 shows video output to user, and the content of these videos output may include text, figure, video and its any group It closes.Some outputs of Touch Screen 105 are the result is that correspond to some user interface objects.Touch Screen 105 also receives user's Input, such as the gesture operations such as click, sliding of user, so that user interface object responds the input of these users. The technology of detection user's input can be based on resistance-type, condenser type or any other possible touch control detection technology.Touch-control The specific example of 105 display unit of screen includes but is not limited to liquid crystal display or light emitting polymer displays.
Method for processing video frequency in the embodiment of the present invention is described based on above-mentioned electronic device.
First embodiment:
A kind of method for processing video frequency is present embodiments provided, compared to the first extraction activity thing from video to be processed of needs Part and dynamic background video, handle life event or dynamic background video, are synthesized again to both later Video processing schemes, the method for processing video frequency of the present embodiment can be promoted effectively without carrying out complicated extraction and synthetic operation Video treatment effeciency and speed.
Referring to fig. 2, the method for processing video frequency of the present embodiment includes:
Target to be processed in step 201, acquisition video to be processed;
In the present embodiment, video to be processed can be the video of the arbitrary format of any photographic device shooting.Step 201- 204 executing subject can be to shoot the electronic device of video to be processed or to receive the electricity of video to be processed from other equipment Sub-device, the present embodiment are not limited in this respect.
Optionally, in the present embodiment, the target to be processed obtained in step 201 can be pair directly graphically illustrated As being also possible to the object described with modes such as text or voices, the present embodiment is not limited in this respect.
For example, obtaining the target to be processed in video to be processed includes: the target to be processed obtained in video to be processed Figure;Alternatively, receiving the description for treating processing target of text or speech form input, target to be processed is determined according to description Image characteristics.
It, in one example, can be before shooting video to be processed for obtaining the scheme of the figure of target to be processed In preview image, in the video to be processed that is perhaps shooting or in video to be processed that shooting is completed, mesh to be processed is obtained Target figure, it is to be understood that the figure of the target to be processed obtained according to this exemplary scheme is the true of target to be processed Real figure, this figure can be by the preview images to video to be processed to display, or to the video to be processed of display A certain frame image carry out region delineate to obtain, after the completion of delineating, delineate trace instruction object be target to be processed;When So, in the present embodiment, the figure of target to be processed can also be received from other equipment, by detecting received figure, determine to Processing target, the present embodiment are not limited in this respect.For example, the figure for the target to be processed that detection other equipment are sent is cat, then Target to be processed is cat.
If then being needed in step 203 below it is understood that receiving the figure of target to be processed from other equipment Target to be processed is identified from a certain frame image (such as first frame image) of video to be processed, be then based on the frame figure again The recognition result of picture and the position of frame image in video carry out target following to the image of other frames of video to be processed, lead to It crosses target following and determines target to be processed in other frame images of video to be processed.
For receiving the scheme of the description for treating processing target of text or speech form input, need from text or voice The image characteristics of target to be processed are determined in description.It, can be straight in text or voice description in an example of the present embodiment Meet the description for providing the image characteristics for treating processing target, such as " people that target to be processed is close haircut ";In the present embodiment In another example, the title that can be target to be processed of text or language description, such as " target to be processed is panda ".It can With understanding, it is not directly obtained the figure of target to be processed in video to be processed in this embodiment, in step 201 Picture, so needing in step 203, according to the description of the image characteristics for the target to be processed determined, first to identify view to be processed Target to be processed in frequency in a certain frame image (such as first frame image), then processing target progress is treated in video to be processed Target following.
Optionally, in the present embodiment, there is no limit in the present embodiment for quantity, type and state of target to be processed etc.. For example, the quantity of the target to be processed of the present embodiment can be one or more, the type of target to be processed can be people or object Etc., the state of target to be processed can be motion state or stationary state.
Step 202, the processing scheme for obtaining target to be processed;
In the present embodiment, the number amount and type of processing scheme are unlimited, can be virtualization processing scheme or paster processing (increasing paster for target to be processed) scheme perhaps contrast adjustment prescription case or gray proces scheme etc., and if to Processing target has multiple, then for the difference targets to be processed in video to be processed, the type of processing scheme can be different, example Such as, for the target to be processed of " people of close haircut ", processing scheme can be virtualization scheme;For the mesh to be processed of " panda " Mark, processing scheme can be handled for paster, and the present embodiment is not limited in this respect.
In the present embodiment, the processing scheme of target to be processed can be just to be set in advance, or be arranged in real time, The present embodiment is not limited in this respect.
Optionally, for presetting the embodiment of processing scheme, can preset processing scheme is that some is specific Scheme, for example, virtualization scheme or paster processing scheme etc., for blurring scheme, can also be arranged one it is specific Coefficient is blurred, or presets the corresponding relationship of different target type and virtualization coefficient.
Optionally, for the embodiment of processing scheme is arranged in real time, the processing scheme for obtaining target to be processed includes: to receive After being instructed to user for the processing scheme setting of target to be processed triggering, the several preset processing side of display system offer Case receives selection of the user in several processing schemes of display, user is selected as the corresponding processing of target to be processed Scheme.Wherein, if obtain be the figure of target to be processed, and be by user the preview image of video to be processed or to It handles and delineates to obtain in the image of video, then instruction is set for the processing scheme of target to be processed, can be and treated in user Automatic trigger after the completion of the delineating of image (or preview image) of video is handled, can also be after the completion of user delineates, lead to It crosses and clicking trigger is carried out to the region interior zone for delineating trace instruction.
Step 203 carries out target tracking to the target to be processed in video to be processed, determines each frame of video to be processed The position of target to be processed in image;
Wherein it is possible to understand, target to be processed quantity be it is multiple when, in step 203, using multiple target with The mode of track carries out target following to the target to be processed in video to be processed.
Optionally, for obtaining the scheme of the figure of target to be processed, the source of the figure of target to be processed at least can be with It is divided into three kinds.The first: the graphical source of target to be processed is in other equipment;Second: the graphical source of target to be processed in In preview image before shooting video to be processed;The third: the graphical source of target to be processed is in the image of video to be processed.
For the first source, carrying out target tracking to the target to be processed in video to be processed includes: according to be processed The figure of target identifies target to be processed in several frame images of video to be processed, after identifying target to be processed, is based on Position of the target to be processed in a certain frame image of several frame images carries out mesh to the target to be processed in video to be processed Mark tracking.Optionally, in an example, the quantity of several frame images can be a frame, if video to be processed shooting or Completion has been taken in person, then above-mentioned several frame images can be the first frame image of video to be processed;If video to be processed is just It is shooting, then above-mentioned several frame images can also be a certain frame image shot before the figure for obtaining target to be processed.It can Choosing, if in several frame images it is unidentified go out target to be processed, can figure after or before several frame images As successively identifying target to be processed in frame in sequence, until identifying target to be processed.Optionally, another example In, the quantity of several frame images can be N (N is greater than 1), according to the figure of target to be processed, identify in video to be processed When target to be processed, N frame image adjacent in video to be processed can be carried out wait locate respectively using N number of parallel thread The identification of target is managed, the time needed for identifying target to be processed with shortening.
For second of source, carrying out target tracking to the target to be processed in video to be processed includes: according to be processed The figure of target identifies target to be processed in the first frame image of video to be processed, after identifying target to be processed, is based on Target to be processed carries out target tracking in the position of the first frame image, to the target to be processed in video to be processed.Optionally, In one example, the image for other frames having been taken in video to be processed also can choose as the figure for identifying target to be processed Picture.It is understood that if in first frame image it is unidentified go out target to be processed, according to video to be processed picture frame from Sequence after going to successively carries out the identification of target to be processed, until identifying to other frame images after first frame image Until target to be processed.It optionally, can be using N number of parallel thread respectively in video to be processed in another example Preceding N frame (N is greater than 1) image carries out the identification of target to be processed, time needed for identifying target to be processed with shortening.
For the third source, the image that the figure of target to be processed is obtained in video to be processed is denoted as target image, It is understood that when obtaining the figure of target to be processed, so that it may know which in video to be processed target image be The position of frame image and the figure of target to be processed in the target image.Target to be processed in video to be processed is carried out Target tracking comprises determining that position of the target image in video to be processed, according to position of the target image in video to be processed Set and target image in target to be processed position, in the image in video to be processed before and after target image Target to be processed carries out target tracking.
Step 204, according to the position of target to be processed in each frame image, treated in each frame image processing target by It is handled according to corresponding processing scheme.
It is understood that in video to be processed, in fact it could happen that there is no targets to be processed in the image of certain frames Situation is not handled then for the picture frame of target to be processed is not present according to processing scheme.
Optionally, in the present embodiment, if video to be processed is shooting or having been taken completion, also to view to be processed Frequency is replicated, and the video to be processed of duplication is stored to particular memory space, according to the mesh to be processed in each frame image Target position, when in each frame image treating processing target and being handled according to corresponding processing scheme, to original shooting Or it is replicated video to be processed and is handled according to corresponding processing scheme.After being not only stored with processing in electronic device as a result, Video, be also stored with original video, in order to user use.
Present embodiment discloses a kind of method for processing video frequency, by obtaining the target to be processed in video to be processed;It can be with Target tracking is carried out to the target to be processed in video to be processed, determines target to be processed in each frame image of video to be processed Position;, can be according to the position of target to be processed in each frame image after the processing scheme for obtaining target to be processed, it can be with It treats processing target in each frame image to be handled according to corresponding processing scheme, the target tracking based on the present embodiment, The scheme of the present embodiment can not have to first separate the life event and dynamic background video in video, then be combined to the two, The processing to video can be completed, while reaching identical treatment effect, can be brought to avoid separation and combination operation The low problem of data-handling efficiency, be conducive to the processing speed for promoting video, reduce the processing time of video.
Second embodiment:
Referring to Fig. 3, the present embodiment provides a kind of method for processing video frequency of refinement, this method comprises:
Step 301 shows image for determining the target to be processed in video to be processed;
Step 302, acquisition user delineate trace in the image of display, and pair in the region of trace instruction is delineated in identification As using the object of identification as the target to be processed in video to be processed;
In the present embodiment, above-mentioned steps 301 and 302 are the refinement steps of step 201 in first embodiment.Above-mentioned steps It is that target to be processed is determined by being delineated on the image of display in 301 and 302.It is understood that above-mentioned steps 301 and 302 only obtain a kind of scheme of target to be processed, and in the present embodiment, step 301 and 302 can also have others to replace For scheme, for example, receiving the description for treating processing target that user is inputted by text or voice, the shape of target to be processed is determined As feature.After determining image characteristics, in step 304, based on the image characteristics of target to be processed, in video to be processed Target to be processed is tracked, and determines the position of target to be processed in each frame image of video to be processed.
Optionally, the acquisition that processing target is treated in the present embodiment can be before video capture to be processed starts, or to It is carried out in the shooting process of processing video or after the shooting of video to be processed.
Step 303, the processing scheme for obtaining target to be processed;
Step 304 carries out target tracking to the target to be processed in video to be processed, determines each frame of video to be processed The position of target to be processed in image;
Step 305, according to the position of target to be processed in each frame image, treated in each frame image processing target by It is handled according to corresponding processing scheme.
Above-mentioned steps 303-305 corresponds to the step 202-204 in first embodiment, for step 303 and 305 description Referring to description corresponding in first embodiment, details are not described herein for the present embodiment.
Optionally, above-mentioned display is used to determine that the scheme of the image of the target to be processed in video to be processed to include below Three kinds:
The first: before video to be processed starts shooting, showing preview image as determining in video to be processed The image of target to be processed;
Second: in the shooting process of video to be processed, if receiving selection target instruction, showing that receiving target refers to The image shot before enabling is as determining the image of the target to be processed in video to be processed;
The third: after the completion of video capture to be processed, if receiving the selection target instruction to video to be processed, showing Show the pre-set image in video to be processed as determining the image of the target to be processed in video to be processed.
Optionally, the virtual Touch control key that trigger area is delineated also is shown in the first scheme, on screen, when detecting User clicks the virtual Touch control key, then electronic device generates selection target instruction, then preview image, which is fixed, clicks void in user When quasi- Touch control key, user can determine target to be processed by being delineated on the preview image to fix.
Optionally, the virtual Touch control key delineated for trigger area can also be shown in second scheme, on screen, when Detect that user clicks the virtual Touch control key, then electronic device generates selection target instruction, and the image shown on screen is user The image that camera acquires when (or before) click virtual Touch control key, user can be delineated on the image of display to determine Target to be processed out.
Optionally, for the third scheme, before step 301, further includes: obtain user in several videos of display Selection, using the video selected as video to be processed.On the display interface of video to be processed, trigger area hook is also shown The virtual Touch control key drawn, when detecting that user clicks the virtual Touch control key, then electronic device generates selection target instruction, electronics dress The pre-set image (such as first frame image) for showing video to be processed is set, user can be delineated in pre-set image to determine Target to be processed out.
In the present embodiment, to the target to be processed obtained in video to be processed and mesh to be processed is obtained in conjunction with attached drawing 4-9 Target processing scheme is illustrated.
The scene of completion is shot for video to be processed, electronic device shows the display of several videos as shown in Figure 4 Picture, and click of the user in display picture is received, the video for the position instruction that user is clicked is as video to be processed.
After user clicks some video, electronic device shows interface as shown in Figure 5, shows in interface to be handled Video and virtual Touch control key " target input mode ", if detecting, user clicks the virtual Touch control key, as shown in fig. 6, Choice box is popped up in the picture of display, and the virtual selecting buttons of the mode of several input target to be processed are shown in choice box, Such as " text input " is shown in choice box, " voice input " and " delineating selection " these three buttons.
If detecting, user clicks " text input " button in Fig. 6, can show a text input on the screen Frame, the text that inputs in text input box of identification user is as the verbal description for treating processing target, and according to verbal description Determine the image characteristics of target to be processed;If detecting, user clicks " voice input " button in Fig. 6, opens microphone, The voice that user's input is acquired by microphone, converts speech into text and obtains the description that user treats processing target, pass through The description determines the image characteristics of target to be processed;If detecting, user clicks " delineating selection " button in Fig. 6, such as Fig. 7 It is shown, show the first frame image of video to be processed as determining the image of the target to be processed in video to be processed;And It obtains user and delineates trace (as shown in Figure 7 delineates trace A1 or A2) in the first frame image, identification is delineated trace and referred to The object in region shown, using the object of identification as the target to be processed in video to be processed.Wherein, trace instruction is being delineated Region in, there may be one or more objects, the present embodiment does not limit this.Further, as shown in fig. 7, screen The upper lower section positioned at first frame image also shows that the progress bar B of video to be handled, progress bar B can control video to be processed In the image that shows on the screen.If desired the target to be processed handled is not present in the first frame, then user can lead to The progress of adjustment progress bar B is crossed, come the first frame image for selecting the image being shown in above progress bar to replace above-mentioned.It is optional , the method for the present embodiment further include: detect the progress in the progress bar of video to be processed, shown according to the progress that detection obtains Corresponding image in video to be processed obtains user and delineates trace (for example, as shown in Figure 7 delineates in the image of display Trace A1 or A2), identification delineate trace instruction region in object, using the object of identification as in video to be processed wait locate Manage target.
Not starting the scene of shooting for video to be processed, electronic device can show picture as shown in Figure 8, in Fig. 8, The preview image of region C display electronics assemblies also shows " the target input of virtual Touch control key in the display area except the C of region Mode ", if detecting, user clicks the virtual Touch control key, can be similar to Figure 6, in the picture that Fig. 8 is shown, pop-up choosing Frame is selected, the virtual selecting buttons of the mode of several input target to be processed, such as display " text in choice box are shown in choice box Word input ", " voice input " and " delineating selection " these three buttons.For the choice box by being popped up in similar Fig. 6 obtain to Processing target and obtain target to be processed processing scheme method, may refer to showing for corresponding diagram 6 and Fig. 7 in above-mentioned example Example explanation.It is, of course, understood that if detect user's click is the button of " delineating selection ", then in Fig. 7 in Fig. 6 The first frame image of the video not to be processed of display, user click " delineating selection " button when (or before) on screen The preview image of display, subsequent the operations such as to delineate be also to carry out on preview image.
For the scene that video to be processed is being shot, electronic device can show picture as shown in Figure 9, in Fig. 9, area The captured in real-time picture of domain D display electronics assemblies, also showing virtual Touch control key in the display area except the D of region, " target is defeated Enter mode ", if detecting, user clicks the virtual Touch control key, picture similar to Figure 6 can be shown, in the picture of display In, choice box is popped up, the virtual selecting buttons of the mode of several input target to be processed, such as choice box are shown in choice box Middle display " text input ", " voice input " and " delineating selection " these three buttons.For the selection of the pop-up by similar Fig. 6 The method that frame obtains target to be processed and obtains the processing scheme of target to be processed, may refer to corresponding diagram 6 in above-mentioned example With the declaratives of Fig. 7.It is, of course, understood that if detect user's click is pressing for " delineating selection " in Fig. 6 Button, then the first frame image that can be video to be processed shown in Fig. 7 are also possible to user and click pressing for " delineating selection " The portrait shown on screen when button (or before), and subsequent delineate etc. on the portrait that operations will also be shown in Fig. 7 carries out.
Optionally, in an example, the processing scheme for obtaining target to be processed includes: to detect that user terminates showing Image on delineate operation after, show several preset processing schemes, receive user in several processing schemes of display Selection, using the processing scheme selected as the processing side for delineating target to be processed indicated by trace for delineating operation formation Case.Wherein, preset processing scheme includes but is not limited to blur processing scheme, increase paster processing scheme and gray proces side At least one of case.
For example, delineated if user is detected to be completed in Fig. 7 to delineating trace A1 or A2, it can be in Fig. 7 Choice box is popped up, shows that several preset processing schemes are selected for user in choice box, trace is delineated in setting according to the user's choice The processing scheme of the target to be processed of mark A1 or A2 instruction.It is understood that being used for the target to be processed that A1 or A2 is indicated The scheme to be processed of family selection can be identical or different.
Optionally, in another example, the processing scheme for obtaining target to be processed includes: to detect user in the figure of display Click location as in, if the click location on this image in certain fixed mesh target area to be processed, is shown several Preset processing scheme receives selection of the user in several preset processing schemes of display, the processing scheme that will be selected Processing scheme as the corresponding target to be processed of click location.
Optionally, in an example of the present embodiment, the processing scheme of target to be processed can be virtualization scheme.It can manage It solves, the virtualization coefficient of target to be handled can be set in the virtualization scheme of target to be processed.Optionally, different wait locate Target is managed, virtualization coefficient can be different.
Optionally, in the present embodiment, the virtualization scheme for obtaining target to be processed includes: to identify the type of target to be processed; It obtains preset target type and blurs the corresponding relationship of scheme, according to corresponding relationship and the type of target to be processed, determine The corresponding virtualization scheme of target to be processed, wherein the virtualization coefficient of corresponding target type is provided in virtualization scheme.The example In, user can preset the target type of target to be blurred and the virtualization coefficient corresponding to each target type.Such as it sets The target type for setting target to be blurred includes: humans and animals, and it is smaller to be arranged the corresponding virtualization coefficient of target type " people ", if It is larger to set the corresponding virtualization coefficient of target type " animal ".
It optionally,, can be according to bat when carrying out the target tracking of target to be processed for video to be processed in the present embodiment The camera for taking the photograph video to be processed is static camera or Flying Camera head, to carry out mesh according to different target tracking modes Mark tracking.
In the present embodiment, target tracking is carried out to the target to be processed in video to be processed, determines the every of video to be processed The position of target to be processed comprises determining that whether the camera for shooting video to be processed is static camera in one frame image, or Whether person is Flying Camera head;If the camera for shooting video to be processed is static camera, obtained from video to be processed Background image is based on background image and video to be processed, to the target to be processed in each frame image in video to be processed Target tracking is carried out, determines the position of target to be processed in each frame image of video to be processed;If shooting video to be processed Camera is dynamic camera head, then according to preset dynamic video target tracking method, to each frame figure in video to be processed Target to be processed as in carries out target tracking, determines the position of target to be processed in each frame image of video to be processed.Its In, above-mentioned background image is the image that static background is constituted.
Optionally, it in the present embodiment, according to the position of target to be processed in each frame image, is treated in each frame image It includes: according to the position of target to be processed in each frame image, every that processing target, which carries out processing according to corresponding processing scheme, In one frame image, treats processing target and blurred according to the virtualization coefficient being arranged in corresponding virtualization scheme.It is understood that It is that the processing scheme instruction of target to be processed can also be other processing, such as gray proces.
Optionally, in the present embodiment, in each frame image for determining video to be processed behind the position of target to be processed, also Comprise determining that target to be processed, will be apart from as first to the distance for the camera for shooting video to be processed in each frame image Distance;Object in each frame image at a distance from target to be processed within a preset range is identified, what determination identified Object, will be apart from as second distance to the distance of camera;According to the virtualization coefficient and first distance of target to be processed with The difference of second distance determines the target virtualization coefficient of the object identified in each frame image;Coefficient pair is blurred according to target Corresponding object is blurred.Optionally, the difference of second distance and first distance is bigger, then target virtualization coefficient compared to The virtualization coefficient of processing target is smaller.In the present embodiment, if first distance and the difference of second distance are less than preset difference value threshold value, The corresponding object of second distance is not blurred then.In the present embodiment, above-mentioned virtualization scheme can make target to be processed Neighbouring virtualization degree transition is more natural.
Optionally, in the present embodiment, object refers to object in the picture and mesh to be processed at a distance from target to be processed Target plan range.
Present embodiment discloses a kind of method for processing video frequency, can not have to first separate in video using the scheme of the present embodiment Life event and dynamic background video, then the two is combined, so that it may complete the processing to video, it is identical reaching While treatment effect, it can be conducive to promote view to avoid the problem low with combination operation bring data-handling efficiency is separated The processing speed of frequency reduces the processing time of video.
3rd embodiment:
Referring to Figure 10, a kind of video process apparatus is present embodiments provided, which includes:
First obtains module 1001, for obtaining the target to be processed in video to be processed;
Second obtains module 1002, for obtaining the processing scheme of target to be processed;
Target tracking module 1003 is determined for carrying out target tracking to the target to be processed in video to be processed wait locate Manage the position of target to be processed in each frame image of video;
Processing module 1004 is treated in each frame image for the position according to target to be processed in each frame image Processing target is handled according to corresponding processing scheme.
Optionally, first module 1001 is obtained, for obtaining the virtualization scheme of target to be processed.Optionally, processing module 1004, for treating processing target according to correspondence in each frame image according to the position of target to be processed in each frame image Virtualization scheme in the virtualization coefficient that is arranged blurred.
Optionally, first module 1001 is obtained, specifically for identifying the type of target to be processed;Obtain preset target class The corresponding relationship of type and virtualization scheme determines that target to be processed is corresponding according to corresponding relationship and the type of target to be processed Virtualization scheme, wherein the virtualization coefficient of corresponding target type is provided in virtualization scheme.
Optionally, the processing module 1004 of video process apparatus is also used to determine view to be processed in target tracking module 1003 In each frame image of frequency behind the position of target to be processed, determine in each frame image target to be processed to shooting video to be processed Camera distance, will be apart from as first distance;To in each frame image at a distance from target to be processed in preset range Interior object is identified, determines that the object identified, will be apart from as second distance to the distance of camera;According to be processed The virtualization coefficient and first distance of target and the difference of second distance determine the mesh of the object identified in each frame image Mark virtualization coefficient;Corresponding object is blurred according to target virtualization coefficient.
Optionally, in the present embodiment first obtain module 1001, for show for determine in video to be processed to The image of processing target;It obtains user and delineates trace in the image of display, pair in the region of trace instruction is delineated in identification As using the object of identification as the target to be processed in video to be processed.
Optionally, first module 1001 is obtained, specifically for before video to be processed starts shooting, display preview image is made For for determining the image of the target to be processed in video to be processed;Alternatively, in the shooting process of video to be processed, if receiving It is instructed to selection target, then shows the image for receiving and shooting before target instruction target word as to be processed in video to be processed for determining The image of target;Alternatively, after the completion of video capture to be processed, if receiving the selection target instruction to video to be processed, Show the pre-set image in video to be processed as determining the image of the target to be processed in video to be processed.
Optionally, target tracking module 1003, for determining that shooting the camera of video to be processed is for static camera Or dynamic camera head;If the camera for shooting video to be processed is static camera, background is obtained from video to be processed Image is based on background image and video to be processed, carries out to the target to be processed in each frame image in video to be processed Target tracking determines the position of target to be processed in each frame image of video to be processed;If shooting the camera shooting of video to be processed Head is dynamic camera head, then according to preset dynamic video target tracking method, in each frame image in video to be processed Target to be processed carry out target tracking, determine the position of target to be processed in each frame image of video to be processed.Wherein, on The background image stated is the image that static background is constituted.
Further, the present embodiment also provides a kind of electronic device, which includes that can be used for realizing Fig. 2 and Fig. 3 Method for processing video frequency in illustrated embodiment.
As shown in figure 11, which specifically includes that memory 1101, processor 1102, bus 1103 and is stored in On memory 1101 and the computer program that can run on processor 1102, memory 1101 and processor 1102 pass through bus 1103 connections.When processor 1102 executes the computer program, the method for processing video frequency in Fig. 2 and embodiment illustrated in fig. 3 is realized. Wherein, the quantity of processor can be one or more.
Memory 1101 can be high random access memory body (RAM, Random Access Memory) memory, It can be non-labile memory (non-volatile memory), such as magnetic disk storage.Memory 1101 can for storing Program code is executed, processor 1102 is coupled with memory 1101.
Further, the embodiment of the present application also provides a kind of storage medium, which, which can be, is set to this reality The computer readable storage medium in the electronic device in example is applied, which can be in aforementioned embodiment illustrated in fig. 11 Memory.
It is stored with computer program on the storage medium, which realizes Fig. 2 and Fig. 3 embodiment institute when being executed by processor The method for processing video frequency shown.Further, which can also be USB flash disk, mobile hard disk, read-only memory (ROM, Read- Only Memory), RAM, the various media that can store program code such as magnetic or disk.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of module, only A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple module or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or module It connects, can be electrical property, mechanical or other forms.
Module may or may not be physically separated as illustrated by the separation member, show as module Component may or may not be physical module, it can and it is in one place, or may be distributed over multiple networks In module.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, can integrate in a processing module in each functional module in each embodiment of the application It is that modules physically exist alone, can also be integrated in two or more modules in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.
If integrated module is realized and when sold or used as an independent product in the form of software function module, can To be stored in a computer readable storage medium.Based on this understanding, the technical solution of the application substantially or Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products Out, which is stored in a readable storage medium storing program for executing, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) execute each embodiment method of the application whole or Part steps.And readable storage medium storing program for executing above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can be with Store the medium of program code.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Shen It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
The above are the description to method for processing video frequency provided herein, device, electronic device and storage medium, for Those skilled in the art has change according to the thought of the embodiment of the present application in specific embodiments and applications Place, to sum up, the contents of this specification should not be construed as limiting the present application.

Claims (10)

1. a kind of method for processing video frequency characterized by comprising
Obtain the target to be processed in video to be processed;
Obtain the processing scheme of the target to be processed;
Target tracking is carried out to the target to be processed in the video to be processed, determines each frame of the video to be processed The position of target to be processed described in image;
The position of the target to be processed according to each frame image, to the mesh to be processed in each frame image Mark is handled according to corresponding processing scheme.
2. method for processing video frequency according to claim 1, which is characterized in that the processing for obtaining the target to be processed Scheme includes:
Obtain the virtualization scheme of the target to be processed;
The position of the target to be processed according to each frame image, to described wait locate in each frame image Reason target carries out processing according to corresponding processing scheme
The position of the target to be processed according to each frame image, in each frame image, to described to be processed Target is blurred according to the virtualization coefficient being arranged in the corresponding virtualization scheme.
3. method for processing video frequency according to claim 2, which is characterized in that the virtualization for obtaining the target to be processed Scheme includes:
Identify the type of the target to be processed;
It obtains preset target type and blurs the corresponding relationship of scheme, according to the corresponding relationship and the target to be processed Type, determine the corresponding virtualization scheme of the target to be processed, wherein be provided with corresponding target class in the virtualization scheme The virtualization coefficient of type.
4. method for processing video frequency according to claim 2, which is characterized in that in the every of the determination video to be processed Behind the position of target to be processed described in one frame image, further includes:
Determine target to be processed described in each frame image to the camera for shooting the video to be processed distance, by institute Distance is stated as first distance;
Object in each frame image at a distance from the target to be processed within a preset range is identified, determines and knows Not Chu object to the camera distance, using the distance as second distance;
According to the virtualization coefficient of the target to be processed and the difference of the first distance and the second distance, institute is determined State the target virtualization coefficient of the object identified in each frame image;
The corresponding object is blurred according to target virtualization coefficient.
5. method for processing video frequency according to claim 1-4, which is characterized in that described to obtain in video to be processed Target to be processed include:
Show the image for determining the target to be processed in video to be processed;
It obtains user and delineates trace in the image of display, the object in the region of trace instruction is delineated described in identification, will be known Other object is as the target to be processed in the video to be processed.
6. method for processing video frequency according to claim 5, which is characterized in that the display is for determining in video to be processed The image of target to be processed include:
Before the video to be processed starts shooting, show preview image as determining the mesh to be processed in video to be processed Target image;
Alternatively, if receiving selection target instruction, showing in the shooting process of the video to be processed and receiving the target The image shot before instruction is as determining the image of the target to be processed in the video to be processed;
Alternatively, after the completion of the video capture to be processed, if receiving the selection target instruction to the video to be processed, Show the pre-set image in the video to be processed as determining the image of the target to be processed in the video to be processed.
7. method for processing video frequency according to claim 1-4, which is characterized in that described to the video to be processed In the target to be processed carry out target tracking, determine target to be processed described in each frame image of the video to be processed Position include:
It determines and shoots whether the camera of the video to be processed is static camera;
If the camera for shooting the video to be processed is static camera, Background is obtained from the video to be processed Picture is based on the background image and the video to be processed, described in each frame image in the video to be processed Target to be processed carries out target tracking, determines the position of target to be processed described in each frame image of the video to be processed.
8. a kind of video process apparatus characterized by comprising
First obtains module, for obtaining the target to be processed in video to be processed;
Second obtains module, for obtaining the processing scheme of the target to be processed;
Target tracking module, described in determining to the target progress target tracking to be processed in the video to be processed The position of target to be processed described in each frame image of video to be processed;
Processing module, for the position of the target to be processed according to each frame image, in each frame image The target to be processed is handled according to corresponding processing scheme.
9. a kind of electronic device, comprising: memory, processor and be stored on the memory and can transport on the processor Capable computer program, which is characterized in that when the processor executes the computer program, realize in claim 1-7 and appoint Step in the method for anticipating.
10. a kind of storage medium, is stored thereon with computer program, which is characterized in that the computer program is held by processor When row, the step in any one the method in claim 1-7 is realized.
CN201910676763.0A 2019-07-25 2019-07-25 A kind of method for processing video frequency, device, electronic device and storage medium Pending CN110363814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910676763.0A CN110363814A (en) 2019-07-25 2019-07-25 A kind of method for processing video frequency, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910676763.0A CN110363814A (en) 2019-07-25 2019-07-25 A kind of method for processing video frequency, device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN110363814A true CN110363814A (en) 2019-10-22

Family

ID=68221609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910676763.0A Pending CN110363814A (en) 2019-07-25 2019-07-25 A kind of method for processing video frequency, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN110363814A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111445499A (en) * 2020-03-25 2020-07-24 北京百度网讯科技有限公司 Method and device for identifying target information
WO2021155549A1 (en) * 2020-02-06 2021-08-12 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method, system, and computer-readable medium for generating stabilized image compositing effects for image sequence
CN114339049A (en) * 2021-12-31 2022-04-12 深圳市商汤科技有限公司 Video processing method and device, computer equipment and storage medium
CN114339307A (en) * 2021-12-31 2022-04-12 上海商汤临港智能科技有限公司 Video desensitization method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207664A (en) * 2012-01-16 2013-07-17 联想(北京)有限公司 Image processing method and equipment
CN106454118A (en) * 2016-11-18 2017-02-22 上海传英信息技术有限公司 Picture blurring method and mobile terminal
CN106898036A (en) * 2017-02-28 2017-06-27 宇龙计算机通信科技(深圳)有限公司 Image processing method and mobile terminal
JP2017126960A (en) * 2016-01-15 2017-07-20 キヤノン株式会社 Image shake correction apparatus, control method of the same, imaging apparatus, program, and storage medium
CN108958610A (en) * 2018-07-27 2018-12-07 北京微播视界科技有限公司 Special efficacy generation method, device and electronic equipment based on face

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207664A (en) * 2012-01-16 2013-07-17 联想(北京)有限公司 Image processing method and equipment
JP2017126960A (en) * 2016-01-15 2017-07-20 キヤノン株式会社 Image shake correction apparatus, control method of the same, imaging apparatus, program, and storage medium
CN106454118A (en) * 2016-11-18 2017-02-22 上海传英信息技术有限公司 Picture blurring method and mobile terminal
CN106898036A (en) * 2017-02-28 2017-06-27 宇龙计算机通信科技(深圳)有限公司 Image processing method and mobile terminal
CN108958610A (en) * 2018-07-27 2018-12-07 北京微播视界科技有限公司 Special efficacy generation method, device and electronic equipment based on face

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GARNET: "《漫画+:超人气CG漫画背景创作技法》", 30 April 2016, 中国青年出版社 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021155549A1 (en) * 2020-02-06 2021-08-12 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method, system, and computer-readable medium for generating stabilized image compositing effects for image sequence
CN115066881A (en) * 2020-02-06 2022-09-16 Oppo广东移动通信有限公司 Method, system and computer readable medium for generating a stabilized image composition effect for an image sequence
CN115066881B (en) * 2020-02-06 2023-11-14 Oppo广东移动通信有限公司 Method, system and computer readable medium for generating stabilized image composition effects for image sequences
CN111445499A (en) * 2020-03-25 2020-07-24 北京百度网讯科技有限公司 Method and device for identifying target information
CN111445499B (en) * 2020-03-25 2023-07-18 北京百度网讯科技有限公司 Method and device for identifying target information
CN114339049A (en) * 2021-12-31 2022-04-12 深圳市商汤科技有限公司 Video processing method and device, computer equipment and storage medium
CN114339307A (en) * 2021-12-31 2022-04-12 上海商汤临港智能科技有限公司 Video desensitization method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110363814A (en) A kind of method for processing video frequency, device, electronic device and storage medium
Betancourt et al. The evolution of first person vision methods: A survey
CN112954210B (en) Photographing method and device, electronic equipment and medium
WO2019242222A1 (en) Method and device for use in generating information
CN110119700B (en) Avatar control method, avatar control device and electronic equipment
CN109951595A (en) Intelligence adjusts method, apparatus, storage medium and the mobile terminal of screen intensity
WO2022116604A1 (en) Image captured image processing method and electronic device
US10848746B2 (en) Apparatus including multiple cameras and image processing method
CN107786549A (en) Adding method, device, system and the computer-readable medium of audio file
CN110928411B (en) AR-based interaction method and device, storage medium and electronic equipment
CN106815803B (en) Picture processing method and device
CN106303234A (en) photographing processing method and device
CN108781252A (en) A kind of image capturing method and device
CN106303235A (en) Photographing processing method and device
CN113283319A (en) Method and device for evaluating face ambiguity, medium and electronic equipment
CN110266953B (en) Image processing method, image processing apparatus, server, and storage medium
CN114025100B (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN104901939B (en) Method for broadcasting multimedia file and terminal and server
CN114125226A (en) Image shooting method and device, electronic equipment and readable storage medium
CN113194256A (en) Shooting method, shooting device, electronic equipment and storage medium
CN109685015A (en) Processing method, device, electronic equipment and the computer storage medium of image
CN113761281B (en) Virtual resource processing method, device, medium and electronic equipment
CN114222069A (en) Shooting method, shooting device and electronic equipment
CN114466140A (en) Image shooting method and device
CN113347355A (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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191022

RJ01 Rejection of invention patent application after publication