CN107767325A - Method for processing video frequency and device - Google Patents
Method for processing video frequency and device Download PDFInfo
- Publication number
- CN107767325A CN107767325A CN201710816136.3A CN201710816136A CN107767325A CN 107767325 A CN107767325 A CN 107767325A CN 201710816136 A CN201710816136 A CN 201710816136A CN 107767325 A CN107767325 A CN 107767325A
- Authority
- CN
- China
- Prior art keywords
- image
- facial image
- target
- head
- camera
- 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
Links
Landscapes
- Image Processing (AREA)
Abstract
The embodiment of the invention discloses a kind of method for processing video frequency and device, and applied to the entertainment machine for including the seat of camera and backrest with identification point, method includes:The adjustment parameter of the camera is determined according to multiple identification points, the camera is controlled to be shot according to the adjustment parameter, obtain target image, facial image is extracted from the target image, pre- setting video is obtained, remembers from the pre- setting video acceptance of the bid and facial image, obtain multiple facial images, the target facial image is replaced at least one facial image in the multiple facial image in the pre- setting video, obtains target video.The embodiment of the present invention can realize the optimal target image of shooting angle, the accurate extraction target facial image from target image, and target facial image accurately be replaced into the facial image in pre- setting video, the face of reference object is appeared in effect in pre- setting video.
Description
Technical field
The present invention relates to video production field, and in particular to a kind of method for processing video frequency and device.
Background technology
At present, production of film and TV company uses proxy performer instead of regular cast's shooting performance video, post-production sometimes
During by the way that the head portrait of stand-in to be substituted for the head portrait of regular cast, appear to be regular cast so as to reaching video and go out
The effect drilled.Thus, inventor considers that ordinary people can be allowed to experience the entertainment requirements for replacing the performer in video.
In the prior art, the stingy diagram technology for replacing personage's head portrait generally use in video is likely difficult to reach and precisely plucked out
The effect of facial image, the accurate replacement to the head portrait in video is also difficult in the replacement technology of head.
The content of the invention
The embodiments of the invention provide a kind of method for processing video frequency and device, it is possible to achieve to the accurate of the head portrait in video
Replace, lift Consumer's Experience.
In a first aspect, the embodiment of the present invention provides a kind of method for processing video frequency, applied to entertainment machine, the entertainment machine includes
Camera and seat, the seat include multiple identification points, and methods described includes:
The adjustment parameter of the camera is determined according to the multiple identification point;
Control the camera to be shot according to the adjustment parameter, obtain target image;
Target facial image is extracted from the target image;
Obtain pre- setting video;
Remember from the pre- setting video acceptance of the bid and facial image, obtain multiple facial images;
The target facial image is replaced at least one people in the multiple facial image in the pre- setting video
Face image, obtain target video.
Second aspect, the embodiments of the invention provide a kind of video process apparatus, applied to entertainment machine, the entertainment machine bag
Containing camera and seat, the seat includes multiple identification points, and described device includes:
The photographing module, for determining the adjustment parameter of the camera according to the multiple identification point;
The photographing module, it is additionally operable to control the camera to be shot according to the adjustment parameter, obtains target figure
Picture;
The stingy module, for extracting target facial image from the target image;
The video processing module, for obtaining pre- setting video;
The video processing module, is additionally operable to remember from the pre- setting video acceptance of the bid and facial image, obtains multiple face figures
Picture;
The video processing module, being additionally operable to will be the multiple in the target facial image replacement pre- setting video
At least one facial image in facial image, obtains target video.
Implement the embodiment of the present invention, have the advantages that:
As can be seen that in the embodiment of the present invention, the adjustment parameter of the camera is determined according to multiple identification points, according to institute
Stating adjustment parameter controls the camera to be shot, and obtains target image, extracts facial image from the target image, obtain
Pre- setting video is taken, remembers from the pre- setting video acceptance of the bid and facial image, multiple facial images are obtained, by the target facial image
At least one facial image in the multiple facial image in the pre- setting video is replaced, obtains target video.Thus, can
To realize the optimal target image of shooting angle, the accurately extraction target facial image, and by target face figure from target image
As accurately replacing facial image in pre- setting video, the face of reference object is set to appear in effect in pre- setting video.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Figure 1A is a kind of configuration diagram of entertainment machine provided in an embodiment of the present invention;
Figure 1B is a kind of schematic flow sheet of method for processing video frequency provided in an embodiment of the present invention;
Fig. 1 C are a kind of demonstration schematic diagrames of target image provided in an embodiment of the present invention;
Fig. 1 D are the demonstration schematic diagrames of the chin characteristic point in a kind of portrait image provided in an embodiment of the present invention;
Fig. 1 E are the demonstration schematic diagrames of the enclosed region in a kind of portrait image provided in an embodiment of the present invention;
Fig. 1 F are a kind of demonstration schematic diagrames of target facial image provided in an embodiment of the present invention;
Fig. 2 is a kind of structural representation of video process apparatus provided in an embodiment of the present invention.
Embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention
Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only
Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Term " first ", " second " in description and claims of this specification and above-mentioned accompanying drawing etc. are to be used to distinguish
Different objects, rather than for describing particular order.In addition, term " comprising " and " having " and their any deformations, it is intended that
It is to cover non-exclusive include.Such as process, method, system, product or the equipment for containing series of steps or unit do not have
The step of being defined in the step of having listed or unit, but alternatively also including not listing or unit, or alternatively also wrap
Include for other intrinsic steps of these processes, method, product or equipment or unit.
Referenced herein " embodiment " is it is meant that the special characteristic, structure or the characteristic that describe can wrap in conjunction with the embodiments
In at least one embodiment of the present invention.Each position in the description occur the phrase might not each mean it is identical
Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and
Implicitly understand, embodiment described herein can be combined with other embodiments.
The embodiment of the present invention is described in detail below.A kind of entertainment machine 1000 as shown in Figure 1A, the entertainment machine
1000 seat 11 includes multiple identification points 12, and the position of the multiple identification point is fixed on the seat.The described amusement
The camera 13 of machine 1000 can be used as identification device, can be used for detecting in the embodiment of the present invention captured when sitting people on seat
Image in identification point quantity, wherein, the camera 13 is fixed on guide rail 14, by controlling the lifting of guide rail 14 can be with
Adjust the height of camera 13.
Figure 1B is referred to, is a kind of schematic flow sheet of method for processing video frequency provided in an embodiment of the present invention.The present embodiment
Described in method for processing video frequency, applied to entertainment machine, the entertainment machine includes camera and seat, and the seat includes more
Individual identification point, its pictorial diagram can be found in Figure 1A, and it comprises the following steps:
101st, the adjustment parameter of the camera is determined according to the multiple identification point.
Wherein, as shown in Figure 1A, entertainment machine includes camera and the seat with camera horizontal interval L distances, works as user
Sit on the seat, user can be taken pictures by camera.Multiple identification points that seat includes can be placed in the back of the body of heater
On plate, wherein, the line of all identification points is a vertical straight line, and the people of different heights sits has different seats on the seat
Height, the user of different heights sit on the seat, may block one or more identification points of heater.In the reality of the present invention
Apply in example, when user sit on the seat, can by camera a fixed position to user shoot the first image, then detect
The quantity of identification point is included in first image, determines the face height of user further according to the quantity of identification point, and then set and be somebody's turn to do
Preset height corresponding to quantity, the adjustment parameter of camera is determined further according to preset height, wherein, adjustment parameter includes regulation
Direction, height.By above-mentioned steps, adjustable camera is in identical height with the face of user.
Alternatively, in above-mentioned steps 101, the adjustment parameter of the camera is determined according to the multiple identification point, can be wrapped
Include following steps:
A1, the control camera shoot the first image in default initial position, and carry out figure to described first image
As identification, the quantity of identification point in described first image is obtained;
A2, the quantity according to the identification point, obtain preset height corresponding with the quantity;
A3, according to the preset height and the difference of the height of the initial position, determine the regulation direction of camera, adjust
Section height.
Wherein, default initial position can voluntarily be set or system default by user, such as can be by initial position
It is arranged to the position that height is 1250mm.The first image is shot in initial position, can be according to the number of identification point in the first image
Amount determines the face height for the user being taken.
Wherein, the spacing that can be set between multiple identification points is equal, because the people of different heights has different sitting height values,
Therefore the height of first identification point can determine according to the height of seat plus minimum sitting height value, the height of last identification point
Spend and can be determined according to the height of seat plus maximum sitting height value, and then, it can be determined according to the spacing between multiple identification points
The height of middle each identification point.According to the varying number of identification point in the first image, can be set corresponding with each quantitative value
Preset height, when camera detects the quantity of identification point in the first image, camera is can adjust to corresponding preset height.Example
Such as, height of seat can be set to 550mm, in general, minimum sitting height value is usually 450mm in the different people more than three years old, most
Big sitting height value is usually 950mm, it follows that the total height scope that user sits on the seat is 1000mm-1500mm, be can be set
Three identification points, then the height of each characteristic point is respectively 1000mm, 1250mm and 1500mm, when identification point in the first image
Quantity is 0, it may be determined that the face for the user being taken highly is 1500mm, when identification point in the first image quantity be 1, can be true
Surely the face altitude range for the user being taken for [1250mm, 1500mm), when identification point in the first image quantity be 2, can
It is determined that the face altitude range for the user being taken for [1000mm, 1250mm).When the quantity difference of identification point in the first image
For 0,1,2 or 3, it is settable corresponding to the preset height of camera be respectively 1500mm, 1250mm, 1000mm and 1250mm, by
This can be realized, when the quantity of identification point in the first image is 0, the height of camera is adjusted to 1500mm.
Wherein, can be according to the preset height and the difference of the height of the initial position, it is determined that the side of regulation camera
To, height, specifically, when the difference that preset height subtracts the height of initial position be positive number, then the direction of regulation camera is
Upwards, when the difference that preset height subtracts the height of initial position is negative, then it is downward to adjust the direction of camera, it is clear that
, when the difference of preset height and the height of initial position is 0, then the height of control camera keeps constant.It is for example, described pre-
If the height of initial position be 1250mm, the identification point quantity in described first image is 0, and corresponding preset height is
1500mm, then the difference that preset height subtracts the height of initial position is+250mm, then the direction for adjusting camera is upward, is adjusted
The height of section is 250mm.
Alternatively, in a kind of embodiment of the invention, the entertainment machine can also include light compensating lamp, shot by light compensating lamp
Shooting brightness is adjusted in the case that the light of environment is too dark.
102nd, control the camera to be shot according to the adjustment parameter, obtain target image.
Wherein, camera can be two, be focused so as to realize by dual camera, and then photograph more
Clearly target image.
Wherein, the adjustment parameter is included to the direction adjusted for camera and height.In an embodiment of the present invention,
The regulation direction of camera and height can drive the guide rail of fixing camera to drive camera to move up and down to realize by motor,
Wherein, motor can use standard stepper motor.Specifically, after by the regulation direction of step 101 determination camera, height, joy
The computer of happy machine sends regulating command to control unit, and control unit sends the pulse to stepper motor, stepper motor rotating band
Camera on dynamic guide rail is moved up and (moved down).
Alternatively, the step of controlling the camera to be shot according to the adjustment parameter may include:
The camera is adjusted according to the adjustment parameter and reaches preset height;
Control camera photographic subjects image.
In an embodiment of the present invention, height and the direction of camera regulation are determined, regulation camera reaches preset height
Afterwards, the height of camera may can not be identical with shooting the height of face of user.For example, when the face for the user that is taken
Height [1250mm, 1500mm) in the range of, the quantity of identification point is 1 in the first image, and the preset height for adjusting camera is
1250mm, the face height for the user that is now taken may be 1250mm or 1400mm.Can by adjusting the angle of camera,
Control camera photographs positive facial image.
Alternatively, after preset height corresponding to being reached in regulation camera, before controlling camera photographic subjects image, also
It may include following steps:
A11, the control camera shooting character image;
The position of face, size in A12, the identification character image, regulation camera is determined according to the position, size
Shooting angle.
Wherein, optimum position is arrived into the shooting angle regulation of camera, positive facial image can be photographed.Camera
Regulation angle can realize that camera can be the camera for including single shaft head, can by controlling the head of connection camera
To realize the shooting angle of regulation camera pitching, or, camera can be the camera for including multiaxis head, it is possible to achieve
Multiple shooting angle of flexible modulation camera.
In an embodiment of the present invention, when the action such as user's blink, rotary head for occurring being taken, it may result in camera
Occurs situations such as closing one's eyes, face are fuzzy in the target image of shooting, in order to ensure that the target image of shooting is a normal people
Object image, camera can control multiple images to be continuously shot in scheduled time T, for example, controllable after adjusting to optimum position
Camera processed shoots multiple images after optimum photographing position is reached in the 2S times, then carries out image recognition and figure to multiple images
As quality evaluation, the image of an optimal quality is then screened from multiple images as target image.
Wherein, after step 102 is completed, controllable camera returns to default initial position after scheduled time T,
Camera is in default initial position each time and shoot the first image, and then pass through the number of identification point in the first image
Camera is adjusted amount.
103rd, target facial image is extracted from the target image.
Wherein, the target image for the camera shooting that entertainment machine includes is usually coloured image.The target of camera shooting
Image can be color background image, such as green background image, blue background image, and the target image of camera shooting is alternatively
Complicated background image.The target image is usually coloured image.As shown in Figure 1 C, Fig. 1 C are a mesh of video camera shooting
Logo image, target facial image is extracted from the target image, in an embodiment of the present invention, target image can be subjected to figure
Portrait image is obtained as splitting, Face datection then is carried out to portrait image, N number of characteristic point of face chin is obtained, according to N number of
Portrait image is carried out stingy figure and obtains target facial image by the closed area that characteristic point determines.
Alternatively, in above-mentioned steps 103, target facial image is extracted from the target image, it may include following steps:
31st, image segmentation is carried out to the target image, obtains portrait image;
32nd, Face datection is carried out to the portrait image, obtains N number of characteristic point of face chin, wherein, N is more than 1
Integer;
33rd, multiple default key points in N number of characteristic point and the target image form a closed area
Domain;
34th, FIG pull handle is carried out to the portrait image according to the enclosed region, obtains the target facial image.
Wherein, during step 31 is performed, image segmentation can be carried out to target image, target image is split and is grown up
Two regions of picture and background.The method that above-mentioned image segmentation can use the segmentation of below figure picture:Dividing method based on threshold value, it is based on
The dividing method at edge, dividing method based on region etc., will not be repeated here.Specifically, performing the process of step 31
In, target image can be converted into gray level image, first determine a gray threshold being among gradation of image span, so
The gray value of each pixel in target image is all compared with the gray threshold afterwards, split corresponding pixel according to comparative result
The gray value of one kind and pixel for being more than threshold value for the gray value of pixel is less than threshold value one kind, then the gray value of pixel is more than threshold value
One kind be portrait area, the transparency of the pixel in the region is set to 1, the gray value of pixel is background less than threshold value one kind
Region, the transparency of the pixel in the region is set to 0.
Wherein, during step 31 is performed, the contrast of image can by gray level image histogram equalization, be strengthened.
During step 31 is performed, can also smooth post-processing be carried out to the border of segmentation.
Wherein, during step 32 is performed, Face datection is carried out to portrait image and obtains characteristic point, can be used as follows
Algorithm is realized:Harris Corner Detection Algorithms, Scale invariant features transform (Scale Invariant Feature
Transform, SIFT), SUSAN Corner Detection Algorithms etc., will not be repeated here.Wherein, face inspection is carried out to portrait image
Survey, global detection can be first carried out to face region, then feature point extraction is carried out in the chin area obtained by detection, obtain N
Individual characteristic point, N are the integer more than 1;Branch's situation of N number of characteristic point is as shown in figure iD.
Wherein, in N number of characteristic point in step 33, comprising the left basal part of the ear and two characteristic points of auris dextra root, it is determined that described
The first intersection point point and the auris dextra root characteristic point on the left of left basal part of the ear characteristic point to the pending image is right to pending image
Second intersection point point of side, N number of characteristic point and the first intersection point point, the second intersection point point and the pending image are left
Lower angular vertex, the line of bottom right angular vertex can form an enclosed region, as referring to figure 1E, be formed by N number of characteristic point
Enclosed region.
Wherein, to the portrait image carry out FIG pull handle the step of, can be by figure in computer systems at
It is programmed in reason device GPU to realize.Specifically, the side of the part of enclosed region can be stated using mask layer image mask residence
Method, to obtain target facial image as shown in Figure 1 F.
Alternatively, the step of carrying out FIG pull handle to the portrait image in step 34, obtaining human face region image can wrap
Include:
B1, according to the enclosed region create mask layer picture;
B2, the mask layer picture is combined with the portrait image, shows the enclosed region and the portrait
The intersection of image;
B3, inversion mask operation is carried out, obtain target facial image.
Alternatively, between above-mentioned steps 102 and step 103, can also image enhaucament be carried out to the target facial image
Processing, wherein, image enhancement processing may include but be not limited only to:Image denoising (for example, wavelet transformation carry out image denoising), figure
As restoring (for example, Wiener filtering), noctovision enhancing algorithm (for example, histogram equalization, gray scale stretching etc.), to target
After facial image carries out image enhancement processing, the quality of iris image can get a promotion to a certain extent.
104th, pre- setting video is obtained.
Wherein, the pre- setting video can voluntarily be set or system default by user.Obtaining the method for pre- setting video can be:
User voluntarily selects a video as pre- setting video in the video library of system;User on the internet voluntarily download one or
Multiple videos are as pre- setting video;User voluntarily uploads one or more videos as pre- setting video, above-mentioned video acquiring method
By way of example only, other embodiment provided by the present invention can also realize the acquisition of pre- setting video by other methods.Wherein,
Pre- setting video in the embodiment of the present invention is usually the video for including at least one face
105th, remember from the pre- setting video acceptance of the bid and facial image, obtain multiple facial images.
Wherein, got the bid from pre- setting video and remember facial image, may include different faces in pre- setting video, in the reality of the present invention
Apply in example, multiple facial images of at least one face can be marked, user can be by selecting the multiple of wherein at least one face
Facial image.
Alternatively, in above-mentioned steps 105, remember from the pre- setting video acceptance of the bid and facial image, it may include following steps:
51st, by default Video Quality Metric framed sequence;
52nd, the reference picture of facial image is obtained;
53rd, each two field picture of video is matched with the reference picture;
54th, when the matching value of the facial image in two field picture and the reference picture is more than predetermined threshold value, the frame is determined
Image includes facial image.
Wherein, default Video Quality Metric framed sequence can be used into Video editing software (Adobe Premiere), obtained
After pre- setting video, by default Video Quality Metric framed sequence.
Wherein, the algorithm of recognition of face is carried out to each two field picture to be included the recognizer based on human face characteristic point, is based on
The recognizer of view picture facial image, the recognizer based on template, algorithm for being identified using neutral net etc., herein
Repeat no more.
Wherein, the reference picture in step 52 is the image for the facial image that can be used in identification two field picture, obtains reference
The mode of image can be that multiple face images of user's selection are defined as into reference picture or pass through choosing according to user
When the mode selected determines the facial image being replaced in video, automatically from the reference picture of web search.
In an embodiment of the present invention, due to different faces may be included in pre- setting video, multiple different faces can be obtained
Reference picture, after each two field picture of video is matched with reference picture, the face figure of different faces may be marked
Picture, the facial image of at least one face may be selected, the facial image of the face is replaced.For example, wrapped in pre- setting video
Face A, face B, face C and face D are included, the reference of face A reference picture, face B reference picture, face C can be obtained
The reference picture of image and face D, face A facial image in pre- setting video, face B are gone out according to above-mentioned reference picture marking
The facial image of facial image, face C facial image and face D.
The 106th, the target facial image is replaced at least one in the multiple facial image in the pre- setting video
Individual facial image, obtains target video.
Alternatively, in step 106, the target facial image is replaced into the multiple face in the pre- setting video
At least one facial image in image, it may include following steps:
61st, the parameter of the multiple facial image is obtained, wherein, the head that the parameter includes the facial image is wide
Degree, the head length of the facial image, the head area of the facial image, the position of the facial image and the face
The angle of image;
62nd, at least one facial image being replaced in multiple facial images is determined;
63rd, at least one people being superimposed upon the target facial image according to the parameter in the pre- setting video
The position of face image.
Wherein, the parameter of facial image is obtained, the face characteristic of facial image by way of image recognition, can be identified,
And the characteristic point position of each face characteristic is determined by way of measuring pixel, facial image is determined according to characteristic point position
Head width, the head length of facial image, the head area of facial image, the position of facial image and the angle of facial image
Degree.
Alternatively, the step of obtaining the parameter of facial image, including:
Face datection is carried out to the facial image, extracts multiple characteristic points of face;
According to the multiple characteristic point, the parameter of the facial image is determined.
Wherein, in the multiple facial images obtained in step 105, the facial image of wherein at least one face can be selected
It is replaced, for example, the face of the facial image of facial image, face B, face C facial image and face D from face A
In image, face A facial image can be selected to be replaced, face A facial image and face B face can also be selected
Image is replaced.
In a kind of embodiment of the present invention, step 62 may include:
Extract the facial image of the different faces in pre- setting video;
Receive the selection instruction for the facial image being replaced;
The facial image according to corresponding to determining the selection instruction is the facial image being replaced.
Wherein, the facial image of multiple different faces in pre- setting video can be extracted according to the reference picture in step 52.
Wherein, in the step of receiving the selection instruction for the facial image being replaced, it can be shown and obtained by display screen
The facial image of the different faces arrived, display mode can be suspended on video screen broadcast interface Overlapping display or
In two field picture, the head portrait of object is highlighted, color is prominent or brightness protrudes etc. can be referred to by highlighting, then can be with
Whether the corresponding viewing area for detecting these head portraits receives selection instruction, according to selection instruction, by the selection instruction institute
Corresponding facial image is defined as the facial image being replaced.
Alternatively, the face figure being superimposed upon the target facial image according to the parameter in the pre- setting video
The step of position of picture, it may include:
E1, according to the head width of the facial image, the head length of the facial image and/or the facial image
Head area, the target facial image is zoomed in and out, and the angle according to the facial image, adjustment described second
The angle of image, obtain head width, head length and/or the head area of the target facial image and the facial image
Width, the facial image head length and/or the facial image head area it is identical, and the target face
The angle of image and the image of angle identical second of the facial image;
E2, the facial image by second imaging importing in the pre- setting video head position.
As can be seen that in the embodiment of the present invention, the adjustment parameter of the camera is determined according to multiple identification points, according to institute
Stating adjustment parameter controls the camera to be shot, and obtains target image, extracts facial image from the target image, obtain
Pre- setting video is taken, remembers from the pre- setting video acceptance of the bid and facial image, multiple facial images are obtained, by the target facial image
At least one facial image in the multiple facial image in the pre- setting video is replaced, obtains target video.Thus, can
To realize the optimal target image of shooting angle, the accurately extraction target facial image, and by target face figure from target image
As accurately replacing facial image in pre- setting video, the face of reference object is set to appear in effect in pre- setting video.
Referring to Fig. 2, Fig. 2 is a kind of structural representation of video process apparatus provided in an embodiment of the present invention, it is applied to
Entertainment machine, the entertainment machine include camera and seat, and the seat includes multiple identification points, and the device includes photographing module
201, stingy module 202, video processing module 203, wherein:
Photographing module 201, for determining the adjustment parameter of the camera according to the multiple identification point;
Photographing module 201, it is additionally operable to control the camera to be shot according to the adjustment parameter, obtains target figure
Picture;
Module 202 is scratched, for extracting target facial image from the target image;
Video processing module 203, for obtaining pre- setting video;
Video processing module 203, is additionally operable to remember from the pre- setting video acceptance of the bid and facial image, obtains multiple face figures
Picture;
Video processing module 203, being additionally operable to will be the multiple in the target facial image replacement pre- setting video
At least one facial image in facial image, obtains target video.
Alternatively, the photographing module 201 is determining the adjustment parameter side of the camera according to the multiple identification point
Face, it is specifically used for:
Control camera to shoot the first image in default initial position, and image recognition carried out to described first image,
Obtain the quantity of identification point in described first image;
According to the quantity of identification point, preset height corresponding with the quantity is obtained;
According to preset height and the difference of the height of the initial position, it is determined that direction, height and the angle of regulation camera
Degree.
Alternatively, button module 202 includes:
Image segmentation module 2021, for carrying out image segmentation to the target image, obtain portrait image;
Face detection module 2022, for carrying out Face datection to the portrait image, obtain N number of feature of face chin
Point;
FIG pull handle module 2023, for multiple default passes in N number of characteristic point and the target image
Key point forms an enclosed region, and carries out FIG pull handle to the portrait image according to the enclosed region, obtains described
Target facial image.
Alternatively, video processing module 203 is described more in the target facial image to be replaced to the pre- setting video
In terms of at least one facial image in individual facial image, including:
Parameter acquisition module 2031, for obtaining the parameter of the facial image, wherein, the parameter includes the face
The head width of image, the head length of the facial image, the head area of the facial image, the position of the facial image
Put the angle with the facial image;
Laminating module 2032, for the target facial image to be superimposed upon in the pre- setting video according to the parameter
The position of the facial image.
Alternatively, laminating module 2032 is specifically used for:
According to the head width of the facial image, the head length of the facial image and/or the facial image
Head area, the target facial image is zoomed in and out, obtain head width, the head length of the target facial image
And/or width, the head length of the facial image and/or the head of the facial image of head area and the facial image
Portion's the second image of area identical;
According to the angle of the facial image, the angle of the target facial image is adjusted, obtains the target face figure
The angle of picture and the image of angle identical the 3rd of the facial image;
According to the position of the facial image, by the face figure of the 3rd imaging importing in the pre- setting video
The position of picture.
As can be seen that the video process apparatus in the embodiment of the present invention, the camera is determined according to multiple identification points
Adjustment parameter, control the camera to be shot according to the adjustment parameter, target image is obtained, from the target image
Facial image is extracted, obtains pre- setting video, remembers from the pre- setting video acceptance of the bid and facial image, obtain multiple facial images, will
The target facial image replaces at least one facial image in the multiple facial image in the pre- setting video, obtains
Target video.As a result, it is possible to achieve the target image that shooting angle is optimal, accurately extracts target face figure from target image
Picture, and target facial image is accurately replaced into the facial image in pre- setting video, the face of reference object is appeared in default regard
Effect in frequency.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed device, can be by another way
Realize.For example, device embodiment described above is only schematical, such as the division of the unit, it is only one kind
Division of logic function, can there is an other dividing mode when actually realizing, such as multiple units or component can combine or can
To be integrated into another system, or some features can be ignored, or not perform.Another, shown or discussed is mutual
Coupling direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit,
Can be electrical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of software program module.
If the integrated unit is realized in the form of software program module and is used as independent production marketing or use
When, it can be stored in a computer-readable access to memory.Based on such understanding, technical scheme substantially or
Person say the part to be contributed to prior art or the technical scheme all or part can in the form of software product body
Reveal and, the computer software product is stored in a memory, including some instructions are causing a computer equipment
(can be personal computer, server or network equipment etc.) performs all or part of each embodiment methods described of the present invention
Step.And foregoing memory includes:USB flash disk, read-only storage (ROM, Read-Only Memory), random access memory
(RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can be with the medium of store program codes.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
To instruct the hardware of correlation to complete by program, the program can be stored in a computer-readable memory, memory
It can include:Flash disk, read-only storage (English:Read-Only Memory, referred to as:ROM), random access device (English:
Random Access Memory, referred to as:RAM), disk or CD etc..
The embodiment of the present invention is described in detail above, specific case used herein to the principle of the present invention and
Embodiment is set forth, and the explanation of above example is only intended to help the method and its core concept for understanding the present invention;
Meanwhile for those of ordinary skill in the art, according to the thought of the present invention, can in specific embodiments and applications
There is change part, in summary, this specification content should not be construed as limiting the invention.
Claims (10)
1. a kind of method for processing video frequency, it is characterised in that applied to entertainment machine, the entertainment machine includes camera and seat, institute
State seat and include multiple identification points, methods described includes:
The adjustment parameter of the camera is determined according to the multiple identification point;
Control the camera to be shot according to the adjustment parameter, obtain target image;
Target facial image is extracted from the target image;
Obtain pre- setting video;
Remember from the pre- setting video acceptance of the bid and facial image, obtain multiple facial images;
The target facial image is replaced at least one face figure in the multiple facial image in the pre- setting video
Picture, obtain target video.
2. according to the method for claim 1, it is characterised in that described that the camera is determined according to the multiple identification point
Adjustment parameter, including:
Control the camera to shoot the first image in default initial position, and image recognition carried out to described first image,
Obtain the quantity of identification point in described first image;
According to the quantity of the identification point, preset height corresponding with the quantity is obtained;
According to the preset height and the difference of the height of the initial position, it is determined that the direction of regulation camera and height.
3. method according to claim 1 or 2, it is characterised in that described that target face is extracted from the target image
Image, including:
Image segmentation is carried out to the target image, obtains portrait image;
Face datection is carried out to the portrait image, obtains N number of characteristic point of face chin, wherein, N is the integer more than 1;
Multiple default key points in N number of characteristic point and the target image form an enclosed region;
FIG pull handle is carried out to the portrait image according to the enclosed region, obtains the target facial image.
4. according to the method described in any one of claims 1 to 3, it is characterised in that described to replace the target facial image
At least one facial image in the multiple facial image in the pre- setting video, including:
The parameter of the multiple facial image is obtained, wherein, the parameter includes the head width of the facial image, the people
The head length of face image, the head area of the facial image, the head of the angle of the facial image and the facial image
Portion position;
Determine at least one facial image being replaced in multiple facial images;
At least one facial image being superimposed upon the target facial image according to the parameter in the pre- setting video
Head position.
5. according to the method described in any one of Claims 1-4, it is characterised in that it is described according to the parameter by the target
Facial image is superimposed upon the head position of at least one facial image in the pre- setting video, including:
According to the head of the head width of the facial image, the head length of the facial image and/or the facial image
Area, the target facial image is zoomed in and out, and the angle according to the facial image, adjust second image
Angle, obtain head width, head length and/or the head area of the target facial image and the width of the facial image
The head area of degree, the head length of the facial image and/or the facial image is identical, and the target facial image
Angle and the facial image the image of angle identical second;
By the head position of the facial image of second imaging importing in the pre- setting video.
6. a kind of video process apparatus, it is characterised in that applied to entertainment machine, the entertainment machine includes camera and seat, institute
To state seat and include multiple identification points, described device includes photographing module, button module and video processing module, wherein:
The photographing module, for determining the adjustment parameter of the camera according to the multiple identification point;
The photographing module, it is additionally operable to control the camera to be shot according to the adjustment parameter, obtains target image;
The stingy module, for extracting target facial image from the target image;
The video processing module, for obtaining pre- setting video;
The video processing module, is additionally operable to remember from the pre- setting video acceptance of the bid and facial image, obtains multiple facial images;With
And the target facial image is replaced at least one facial image in the multiple facial image in the pre- setting video,
Obtain target video.
7. device according to claim 6, it is characterised in that the photographing module determines institute according to the multiple identification point
The specific implementation for stating the adjustment parameter of camera is:
Control the camera to shoot the first image in default initial position, and image recognition carried out to described first image,
Obtain the quantity of identification point in described first image;
According to the quantity of the identification point, preset height corresponding with the quantity is obtained;And
According to the preset height and the difference of the height of the initial position, it is determined that the direction of regulation camera and height.
8. the device according to claim 6 or 7, it is characterised in that the button module includes:
Image segmentation module, for carrying out image segmentation to the target image, obtain portrait image;
Face detection module, for carrying out Face datection to the portrait image, obtain N number of characteristic point of face chin;
FIG pull handle module, formed for multiple default key points in N number of characteristic point and the target image
One enclosed region, and FIG pull handle is carried out to the portrait image according to the enclosed region, obtain the target face
Image.
9. according to the device described in any one of claim 6 to 8, it is characterised in that the video processing module is by the target
Facial image replaces the specific implementation side of at least one facial image in the multiple facial image in the pre- setting video
Formula is:
The parameter of the multiple facial image is obtained, wherein, the parameter includes the head width of the facial image, the people
The head length of face image, the head area of the facial image, the head of the angle of the facial image and the facial image
Portion position;
At least one facial image being superimposed upon the target facial image according to the parameter in the pre- setting video
Head position.
10. according to the device described in any one of claim 6 to 9, it is characterised in that the laminating module is specifically used for:
According to the head of the head width of the facial image, the head length of the facial image and/or the facial image
Area, the target facial image is zoomed in and out, and the angle according to the facial image, adjust second image
Angle, obtain head width, head length and/or the head area of the target facial image and the width of the facial image
The head area of degree, the head length of the facial image and/or the facial image is identical, and the target facial image
Angle and the facial image the image of angle identical second;And
By the head position of the facial image of second imaging importing in the pre- setting video.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710816136.3A CN107767325A (en) | 2017-09-12 | 2017-09-12 | Method for processing video frequency and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710816136.3A CN107767325A (en) | 2017-09-12 | 2017-09-12 | Method for processing video frequency and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107767325A true CN107767325A (en) | 2018-03-06 |
Family
ID=61265755
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710816136.3A Pending CN107767325A (en) | 2017-09-12 | 2017-09-12 | Method for processing video frequency and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107767325A (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109345447A (en) * | 2018-09-20 | 2019-02-15 | 广州酷狗计算机科技有限公司 | The method and apparatus of face replacement processing |
CN110070725A (en) * | 2018-12-21 | 2019-07-30 | 盛视科技股份有限公司 | Snapshot all-in-one machine and method for occupying bus lane |
CN110175518A (en) * | 2019-04-19 | 2019-08-27 | 阿里巴巴集团控股有限公司 | Camera angle method of adjustment, device, equipment and the system of photographic device |
CN110210333A (en) * | 2019-05-16 | 2019-09-06 | 佛山科学技术学院 | A kind of focusing iris image acquiring method and device automatically |
CN110517187A (en) * | 2019-08-30 | 2019-11-29 | 王�琦 | Advertisement generation method, apparatus and system |
CN110738079A (en) * | 2018-07-19 | 2020-01-31 | 杭州海康威视数字技术股份有限公司 | Method and device for detecting abnormal number of front row personnel of motor vehicle and computer equipment |
CN111491124A (en) * | 2020-04-17 | 2020-08-04 | 维沃移动通信有限公司 | Video processing method and device and electronic equipment |
CN112085688A (en) * | 2020-09-16 | 2020-12-15 | 蒋芳 | Method and system for removing pedestrian shielding during photographing |
CN112333418A (en) * | 2020-04-30 | 2021-02-05 | 深圳Tcl新技术有限公司 | Method and device for determining intelligent unlocking mode, intelligent doorbell and storage medium |
CN112449111A (en) * | 2020-11-13 | 2021-03-05 | 珠海大横琴科技发展有限公司 | Monitoring equipment processing method and device |
CN112511748A (en) * | 2020-11-30 | 2021-03-16 | 努比亚技术有限公司 | Lens target intensified display method and device, mobile terminal and storage medium |
CN112562720A (en) * | 2020-11-30 | 2021-03-26 | 清华珠三角研究院 | Lip-synchronization video generation method, device, equipment and storage medium |
CN113223088A (en) * | 2020-01-21 | 2021-08-06 | 上海依图信息技术有限公司 | Method for selecting camera erection point position by robot and robot |
CN113506306A (en) * | 2021-06-18 | 2021-10-15 | 广州方图科技有限公司 | Multi-person matting method, system, device and storage medium |
CN115147264A (en) * | 2022-06-30 | 2022-10-04 | 北京百度网讯科技有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
CN115348393A (en) * | 2022-10-20 | 2022-11-15 | 慧视云创(北京)科技有限公司 | Automatic setting method for preset position of camera device and camera group |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140078332A1 (en) * | 2012-09-20 | 2014-03-20 | Casio Computer Co., Ltd. | Moving picture processing device for controlling moving picture processing |
CN104318202A (en) * | 2014-09-12 | 2015-01-28 | 上海明穆电子科技有限公司 | Method and system for recognizing facial feature points through face photograph |
CN104657974A (en) * | 2013-11-25 | 2015-05-27 | 腾讯科技(上海)有限公司 | Image processing method and device |
CN205596198U (en) * | 2016-03-22 | 2016-09-21 | 珠海方图智能科技有限公司 | Pavilion of taking picture by oneself |
CN106303206A (en) * | 2015-06-12 | 2017-01-04 | 西安蒜泥电子科技有限责任公司 | The camera system localization method of a kind of body-scanner and device |
CN106560869A (en) * | 2016-11-01 | 2017-04-12 | 深圳市雄帝科技股份有限公司 | Self-help photographing device and self-help photographing equipment |
-
2017
- 2017-09-12 CN CN201710816136.3A patent/CN107767325A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140078332A1 (en) * | 2012-09-20 | 2014-03-20 | Casio Computer Co., Ltd. | Moving picture processing device for controlling moving picture processing |
CN104657974A (en) * | 2013-11-25 | 2015-05-27 | 腾讯科技(上海)有限公司 | Image processing method and device |
CN104318202A (en) * | 2014-09-12 | 2015-01-28 | 上海明穆电子科技有限公司 | Method and system for recognizing facial feature points through face photograph |
CN106303206A (en) * | 2015-06-12 | 2017-01-04 | 西安蒜泥电子科技有限责任公司 | The camera system localization method of a kind of body-scanner and device |
CN205596198U (en) * | 2016-03-22 | 2016-09-21 | 珠海方图智能科技有限公司 | Pavilion of taking picture by oneself |
CN106560869A (en) * | 2016-11-01 | 2017-04-12 | 深圳市雄帝科技股份有限公司 | Self-help photographing device and self-help photographing equipment |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110738079A (en) * | 2018-07-19 | 2020-01-31 | 杭州海康威视数字技术股份有限公司 | Method and device for detecting abnormal number of front row personnel of motor vehicle and computer equipment |
CN109345447A (en) * | 2018-09-20 | 2019-02-15 | 广州酷狗计算机科技有限公司 | The method and apparatus of face replacement processing |
CN110070725A (en) * | 2018-12-21 | 2019-07-30 | 盛视科技股份有限公司 | Snapshot all-in-one machine and method for occupying bus lane |
CN110175518A (en) * | 2019-04-19 | 2019-08-27 | 阿里巴巴集团控股有限公司 | Camera angle method of adjustment, device, equipment and the system of photographic device |
CN110175518B (en) * | 2019-04-19 | 2023-02-28 | 创新先进技术有限公司 | Camera angle adjusting method, device, equipment and system of camera device |
CN110210333A (en) * | 2019-05-16 | 2019-09-06 | 佛山科学技术学院 | A kind of focusing iris image acquiring method and device automatically |
CN110517187A (en) * | 2019-08-30 | 2019-11-29 | 王�琦 | Advertisement generation method, apparatus and system |
CN113223088A (en) * | 2020-01-21 | 2021-08-06 | 上海依图信息技术有限公司 | Method for selecting camera erection point position by robot and robot |
CN111491124B (en) * | 2020-04-17 | 2023-02-17 | 维沃移动通信有限公司 | Video processing method and device and electronic equipment |
CN111491124A (en) * | 2020-04-17 | 2020-08-04 | 维沃移动通信有限公司 | Video processing method and device and electronic equipment |
CN112333418A (en) * | 2020-04-30 | 2021-02-05 | 深圳Tcl新技术有限公司 | Method and device for determining intelligent unlocking mode, intelligent doorbell and storage medium |
CN112333418B (en) * | 2020-04-30 | 2023-05-23 | 深圳Tcl新技术有限公司 | Method and device for determining intelligent unlocking mode, intelligent doorbell and storage medium |
CN112085688A (en) * | 2020-09-16 | 2020-12-15 | 蒋芳 | Method and system for removing pedestrian shielding during photographing |
CN112449111A (en) * | 2020-11-13 | 2021-03-05 | 珠海大横琴科技发展有限公司 | Monitoring equipment processing method and device |
CN112511748A (en) * | 2020-11-30 | 2021-03-16 | 努比亚技术有限公司 | Lens target intensified display method and device, mobile terminal and storage medium |
CN112562720A (en) * | 2020-11-30 | 2021-03-26 | 清华珠三角研究院 | Lip-synchronization video generation method, device, equipment and storage medium |
CN113506306A (en) * | 2021-06-18 | 2021-10-15 | 广州方图科技有限公司 | Multi-person matting method, system, device and storage medium |
CN115147264A (en) * | 2022-06-30 | 2022-10-04 | 北京百度网讯科技有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
CN115348393A (en) * | 2022-10-20 | 2022-11-15 | 慧视云创(北京)科技有限公司 | Automatic setting method for preset position of camera device and camera group |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107767325A (en) | Method for processing video frequency and device | |
US10304166B2 (en) | Eye beautification under inaccurate localization | |
KR101446975B1 (en) | Automatic face and skin beautification using face detection | |
CN105122302B (en) | Generation without ghost image high dynamic range images | |
US20110002506A1 (en) | Eye Beautification | |
EP1453002A2 (en) | Enhancing portrait images that are processed in a batch mode | |
Chen et al. | Face illumination transfer through edge-preserving filters | |
CN105303161A (en) | Method and device for shooting multiple people | |
US9106838B2 (en) | Automatic photographing method and system thereof | |
CN105608447A (en) | Method for detecting human face smile expression depth convolution nerve network | |
Asha et al. | Auto removal of bright spot from images captured against flashing light source | |
JP2004005384A (en) | Image processing method, image processing device, program, recording medium, automatic trimming device and picture-taking arrangement | |
Florea et al. | Directed color transfer for low-light image enhancement | |
CN111274851A (en) | Living body detection method and device | |
CN112204945A (en) | Image processing method, image processing apparatus, image capturing device, movable platform, and storage medium | |
JP4775599B2 (en) | Eye position detection method | |
JP4831344B2 (en) | Eye position detection method | |
JP4683236B2 (en) | Eye position detection method | |
JP2005141523A (en) | Image processing method | |
JP5093540B2 (en) | Eye position detection method and detection system | |
JP4831361B2 (en) | Eye position detection method and detection system | |
Safonov et al. | Changing the Aspect Ratio for Borderless Printing | |
Constable et al. | Exemplar-based portrait photograph enhancement as informed by portrait paintings |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180306 |