CN108520493A - Processing method, device, storage medium and the electronic equipment that image is replaced - Google Patents
Processing method, device, storage medium and the electronic equipment that image is replaced Download PDFInfo
- Publication number
- CN108520493A CN108520493A CN201810277764.3A CN201810277764A CN108520493A CN 108520493 A CN108520493 A CN 108520493A CN 201810277764 A CN201810277764 A CN 201810277764A CN 108520493 A CN108520493 A CN 108520493A
- Authority
- CN
- China
- Prior art keywords
- image
- replaced
- facial image
- facial
- terminal
- 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
- 238000003672 processing method Methods 0.000 title claims abstract description 28
- 238000003860 storage Methods 0.000 title claims abstract description 17
- 230000001815 facial effect Effects 0.000 claims abstract description 372
- 238000000034 method Methods 0.000 claims abstract description 16
- 238000012545 processing Methods 0.000 claims description 68
- 238000001514 detection method Methods 0.000 claims description 37
- 238000004590 computer program Methods 0.000 claims description 11
- 230000009467 reduction Effects 0.000 claims description 7
- 238000006467 substitution reaction Methods 0.000 claims description 6
- 210000001508 eye Anatomy 0.000 description 77
- 238000006073 displacement reaction Methods 0.000 description 23
- 238000003384 imaging method Methods 0.000 description 15
- 239000000872 buffer Substances 0.000 description 14
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 11
- 238000011946 reduction process Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 5
- 230000007613 environmental effect Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 210000003128 head Anatomy 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 238000012937 correction Methods 0.000 description 3
- 241001396014 Priacanthus arenatus Species 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000008921 facial expression Effects 0.000 description 2
- 230000014759 maintenance of location Effects 0.000 description 2
- 230000000750 progressive effect Effects 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 241001269238 Data Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000004397 blinking Effects 0.000 description 1
- 210000005252 bulbus oculi Anatomy 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
This application discloses processing method, device, storage medium and electronic equipments that a kind of image is replaced.This method includes:Base image is determined from pending image;Facial image to be replaced is determined from the base image, the image of predetermined patterns does not meet preset condition in the facial image to be replaced;From the pending image, the target facial image for replacing each facial image to be replaced, each facial image to be replaced and its facial image that corresponding target facial image is same subscriber are obtained;According to each facial image to be replaced and its corresponding target facial image, it includes that face replaces and predetermined patterns replacement to determine that each facial image to be replaced needs the replacement operation used, the replacement operation.
Description
Technical field
The application belong to the processing method that image technique field more particularly to a kind of image replace, device, storage medium and
Electronic equipment.
Background technology
It is a basic function of terminal to take pictures.With being constantly progressive for the hardware such as camera module and image processing algorithm,
The shooting function of terminal is stronger and stronger.User also more and more continually take pictures by using terminal, for example user often makes
With terminal taking personage photograph etc..In the related technology, when handling image, terminal can be by certain portion in the first image
Partial image replaces with another part image in the second image.However, its flexibility of the mode of this image replacement is poor.
Invention content
The embodiment of the present application provides a kind of processing method, device, storage medium and electronic equipment that image is replaced, Ke Yiti
High terminal-pair image is replaced the flexibility of processing.
The embodiment of the present application provides a kind of processing method that image is replaced, including:
Base image is determined from pending image;
Determine facial image to be replaced from the base image, the figure of predetermined patterns in the facial image to be replaced
As not meeting preset condition;
From the pending image, the target facial image for replacing each facial image to be replaced is obtained, it is each
Facial image to be replaced and its facial image that corresponding target facial image is same subscriber;
According to each facial image to be replaced and its corresponding target facial image, each facial image to be replaced is determined
It includes that face replaces and predetermined patterns replacement to need the replacement operation used, the replacement operation.
The embodiment of the present application provides a kind of processing unit that image is replaced, including:
First determining module, for determining base image from pending image;
Second determining module, for determining facial image to be replaced, the face to be replaced from the base image
The image of predetermined patterns does not meet preset condition in image;
Acquisition module, for from the pending image, obtaining the target for replacing each facial image to be replaced
Facial image, each facial image to be replaced and its corresponding target facial image are the facial image of same subscriber;
Third determining module, for according to each facial image to be replaced and its corresponding target facial image, determining
It includes that face replaces and predetermined patterns replacement that each facial image to be replaced, which needs the replacement operation used, the replacement operation,.
The embodiment of the present application provides a kind of storage medium, computer program is stored thereon with, when the computer program exists
When being executed on computer so that the computer executes method provided by the embodiments of the present application.
The embodiment of the present application also provides a kind of electronic equipment, including memory, and processor, the processor is by calling institute
The computer program stored in memory is stated, for executing method provided by the embodiments of the present application.
In the present embodiment, terminal can be according to the specific of each facial image to be replaced and its corresponding target facial image
Situation is the face of facial image to be replaced to be replaced using the face in target facial image, or use target to determine
Predetermined patterns in facial image replace the predetermined patterns of facial image to be replaced.Therefore, the embodiment of the present application can improve
Terminal-pair image is replaced the flexibility of processing.Also, in the present embodiment, replaced in treated base image by image
Face part is with smile expression, therefore whole imaging effect is more preferable, more meets the expection of taking pictures of user.
Description of the drawings
Below in conjunction with the accompanying drawings, it is described in detail by the specific implementation mode to the present invention, technical scheme of the present invention will be made
And advantage is apparent.
Fig. 1 is the flow diagram for the processing method that image provided by the embodiments of the present application is replaced.
Fig. 2 is another flow diagram for the processing method that image provided by the embodiments of the present application is replaced.
Fig. 3 to Fig. 4 is the schematic diagram of a scenario for the processing method that image provided by the embodiments of the present application is replaced.
Fig. 5 is the structural schematic diagram for the processing unit that image provided by the embodiments of the present application is replaced.
Fig. 6 is another structural schematic diagram for the processing unit that image provided by the embodiments of the present application is replaced.
Fig. 7 is the structural schematic diagram of mobile terminal provided by the embodiments of the present application.
Fig. 8 is the structural schematic diagram of electronic equipment provided by the embodiments of the present application.
Specific implementation mode
Schema is please referred to, wherein identical component symbol represents identical component, the principle of the present invention is to implement one
It is illustrated in computing environment appropriate.The following description be based on illustrated by the specific embodiment of the invention, should not be by
It is considered as the limitation present invention other specific embodiments not detailed herein.
It is understood that the executive agent of the embodiment of the present application can be the end of smart mobile phone or tablet computer etc.
End equipment.
Referring to Fig. 1, Fig. 1 is the flow diagram for the processing method that image provided by the embodiments of the present application is replaced, flow
May include:
In step S101, base image is determined from pending image.
It is a basic function of terminal to take pictures.With being constantly progressive for the hardware such as camera module and image processing algorithm,
The shooting function of terminal is stronger and stronger.User also more and more continually take pictures by using terminal, for example user often makes
With terminal taking personage photograph etc..In the related technology, when handling image, terminal can be by certain portion in the first image
Partial image replaces with another part image in the second image.However, its flexibility of the mode of this image replacement is poor.
In the step S101 of the embodiment of the present application, for example, terminal can first determine a frame base from pending image
Plinth image.
It should be noted that pending image can be the multiple image that terminal is continuous, Quick Acquisition arrives.For example, into
After the shooting preview interface for entering terminal camera, terminal can acquire a frame image every 30 milliseconds or 40 milliseconds or 60 milliseconds etc.,
And by the image collected include being checked for user in shooting preview interface, while the image collected can be saved in by terminal
In the buffer queue of one fixed length.For example, preserving terminal collected 15 frame image recently in the buffer queue.So, when need
When carrying out image procossing, terminal can obtain multiple image from the buffer queue.This multiple image that terminal is got is i.e.
It is pending image.
In step s 102, facial image to be replaced is determined from the base image, it is pre- in the facial image to be replaced
If the image at position does not meet preset condition.
For example, after determining base image, terminal can determine the figure of face predetermined patterns from the base image
Facial image to be replaced as not meeting preset condition.
It is first, second, third, the facial image of four people of fourth respectively for example, including four facial images in base image.Its
In, second and third image of face predetermined patterns do not meet preset condition, therefore the facial image of second and third is determined as by terminal
Facial image to be replaced.
In step s 103, from the pending image, the target person for replacing each facial image to be replaced is obtained
Face image, each facial image to be replaced and its corresponding target facial image are the facial image of same subscriber.
For example, after determining facial image to be replaced, terminal can obtain each for replacing from pending image
The target facial image of facial image to be replaced, i.e. terminal can obtain target face corresponding with each facial image to be replaced
Image.Wherein, each facial image to be replaced and its facial image that corresponding target facial image is same user.
For example, pending image is A, B, C, D, E, F, this 6 frame image is that terminal is acquired and is saved in buffer queue
The the first and second the third four people of fourth group photo image.Wherein, image D is confirmed as base image.Second in base image D and third face
Image is determined as facial image to be replaced by terminal.Later, terminal can be from other pending images (i.e. image A, B, C, E, F)
The target facial image of the middle target facial image and third for obtaining second.For example, the facial image of the second in image A is determined
For the target facial image of second, third facial image is confirmed as third target facial image in image B.It is understood that
The target facial image of second is substituted for the facial image to be replaced of second in image D in image A, third target in image B
Facial image is substituted in image D third facial image to be replaced.
In step S104, according to each facial image to be replaced and its corresponding target facial image, determine each
It includes that face replaces and predetermined patterns replacement that facial image to be replaced, which needs the replacement operation used, the replacement operation,.
For example, after determining target facial image corresponding with each facial image to be replaced, terminal can be according to every
One facial image to be replaced and its corresponding target facial image determine that each facial image to be replaced needs the replacement used
Operation.Wherein, which at least may include that face replaces and predetermined patterns replacement.That is, terminal can be waited for according to each
The concrete condition for replacing facial image and its corresponding target facial image, determine for each facial image to be replaced, be
The face of facial image to be replaced is replaced using the face in its corresponding target facial image, or uses its corresponding mesh
Predetermined patterns replace the predetermined patterns of facial image to be replaced in mark facial image, and to make to replace by image, treated
The image of the predetermined patterns of each facial image in base image meets preset condition.
For example, to be replaced facial image and target facial image of the terminal according to user's second, determine to need to use face
The operation of replacement, and according to the facial image to be replaced and target facial image of user third, it determines to need to replace using eye
Operation.So, terminal can replace the face image of second in base image D using the face image of second in image A, so
Terminal can replace in base image D third eyes image using in image B third eyes image afterwards, to make by image
It replaces the eyes image in the image D of processing in the facial image of the first and second the third four people of fourth and meets preset condition.
It is understood that in the present embodiment, terminal can be according to each facial image to be replaced and its corresponding target
The concrete condition of facial image is the face that facial image to be replaced is replaced using the face in target facial image to determine
Predetermined patterns in portion, or use target facial image replace the predetermined patterns of facial image to be replaced.Therefore, the application
Embodiment can improve the flexibility that terminal-pair image is replaced processing.
Referring to Fig. 2, Fig. 2 is another flow diagram for the processing method that image provided by the embodiments of the present application is replaced,
It is illustrated by eye citing of predetermined patterns in the present embodiment, flow may include:
In step s 201, terminal determines base image from pending image.
For example, when needing to carry out image procossing, terminal can obtain multiple image from buffer queue.Terminal is got
This multiple image be pending image.After getting pending image, terminal can be from these pending images really
Make a frame base image.
In step S202, terminal determines facial image to be replaced from the base image, the facial image to be replaced
Eyes image do not meet preset condition.
For example, after determining base image, it is pre- that terminal can determine that eyes image is not met from the base image
If the facial image to be replaced of condition.
In one embodiment, preset condition can be that the eyes of user in this image should than in other pending images
The eyes bigger of user.
For example, pending image is A, B, C, D, E, F, this 6 frame image is that terminal is acquired and is saved in buffer queue
The the first and second the third four people of fourth group photo image.Wherein, image D is confirmed as base image.The eyes of first wait locating than other in image D
Manage the eyes bigger of first in image (A, B, C, E, F), in image D the eyes of fourth than fourth in other pending images eyes more
Greatly.And the eyes of second are than the eyes smaller of second in a certain frame in other pending images or a few frame images, image D in image D
In third eyes smaller of the eyes than in a certain frame in other pending images or a few frame images third.For example, second in image D
The numerical value of eyes size is 80, and the numerical value of the eyes size of second is 85 in image A, then the facial image of second can in image D
To be confirmed as replacing substitution face image.In image D the numerical value of third eyes size be 82, and in image B third eyes size
Numerical value be 88, then third facial image can also be confirmed as facial image to be replaced in image D.
In step S203, from pending image, terminal obtains the target for replacing each facial image to be replaced
Facial image, each facial image to be replaced and its corresponding target facial image are the facial image of same subscriber.
For example, after determining facial image to be replaced, terminal can obtain each for replacing from pending image
The target facial image of facial image to be replaced.Wherein, each facial image to be replaced and its corresponding target facial image are
The facial image of same user.
For example, pending image is A, B, C, D, E, F, this 6 frame image is that terminal is acquired and is saved in buffer queue
The the first and second the third four people of fourth group photo image.Wherein, image D is confirmed as base image.Second in base image D and third face
Image is determined as facial image to be replaced by terminal.Later, terminal can be from other pending images (i.e. image A, B, C, E, F)
The target facial image of the middle target facial image and third for obtaining second.For example, since the eyes size of second in image A is 85,
More than the eyes size 80 of second in image D.Therefore the facial image of the second in image A is confirmed as the target facial image of second.
Due in image B third eyes size be 88, be more than image D in third eyes size 82, therefore in image B third facial image
It is confirmed as third target facial image.
In step S204, each facial image to be replaced of terminal-pair and its corresponding target facial image carry out expression inspection
It surveys.
For example, after determining each facial image to be replaced and its corresponding target facial image, terminal can be to every
One facial image to be replaced and its corresponding target facial image carry out expression detection.
In one embodiment, terminal can utilize preset expression detection algorithm (such as smile detection algorithm), detection
Whether each facial image to be replaced and its corresponding target facial image contain smile expression.Alternatively, terminal can be identified first
Then the corners of the mouth region is detected with cambered in the corners of the mouth region for going out the mouth region and mouth region in facial image whether.If
With cambered, it may be considered that the facial image contains smile expression.With cambered, terminal can also be further
Radian size is detected, if radian is larger, it may be considered that smile is more magnificent, if radian is smaller, it may be considered that smile compares
It is not magnificent.If without radian, it may be considered that the facial image is free of smile expression.
Then, terminal can be detected according to the expression of each facial image to be replaced and its corresponding target facial image and be tied
Fruit, it can be specifically face's replacement or eye to determine that each face to be replaced needs the replacement operation used, the replacement operation
It replaces in portion.
In one embodiment, for each facial image to be replaced and its corresponding target facial image, if table
The result of feelings detection shows that the expression of facial image to be replaced and its corresponding target facial image does not change or changes very
It is small, then the mode of face's replacement may be used in terminal, it can also be by the way of eye replacement.That is, in this case, eventually
End can use that entire target facial image replace entire facial image to be replaced in base image or terminal can also
The eye of facial image to be replaced in base image is replaced using the eye in target facial image.
In step S205, for each facial image to be replaced and its corresponding target facial image, if expression detects
Result indicate that facial image to be replaced includes smile expression, and target facial image is free of smile expression, then terminal is determined
The operation that facial image to be replaced is needed to replace using eye.
For example, for each facial image to be replaced and its corresponding target facial image, if the result of expression detection
Indicate that facial image to be replaced includes smile expression, and corresponding target facial image does not include smile expression, then terminal
It can determine to need to use the operation that eye is replaced, i.e. terminal to determine carrying out image replacement behaviour facial image to be replaced
When making, the eyes image in facial image to be replaced is replaced using the eyes image in target facial image.
For example, terminal detects that the expression of the facial image (facial image to be replaced) of second in base image D contains smile
Expression, and the expression of the facial image (target facial image) of second does not contain smile expression in image A.In this case, exist
When carrying out image replacement operation, terminal can replace the eyes image of second in image D using the eyes image of second in image A.
It is replaced without the entire facial image to second in image D.
In step S206, for each facial image to be replaced and its corresponding target facial image, if expression detects
Result indicate that facial image to be replaced is free of smile expression, and target facial image includes smile expression, then terminal is determined
The operation that facial image to be replaced is needed to replace using face.
For example, for each facial image to be replaced and its corresponding target facial image, if the result of expression detection
Indicate that facial image to be replaced is free of smile expression, and corresponding target facial image contains smile expression, then terminal can
To determine to need to use the operation that face replaces, i.e. terminal to determine carrying out image replacement operation facial image to be replaced
When, replace entire facial image to be replaced using entire target facial image.
For example, terminal detects the expression of in base image D third facial image (facial image to be replaced) without smile
Expression, and the expression of the facial image (target facial image) of second contains smile expression in image A.In this case, into
When row image replacement operation, terminal can replace the entire face of second in image D using the entire facial image of second in image A
Image.
It is understood that in the present embodiment, terminal can be according to facial image to be replaced and its corresponding target face
Expression in image replaces entire facial image to be replaced using entire target facial image to determine, or uses target
Eye in facial image replaces the eye in facial image to be replaced, replaces and waits for without the use of entire target facial image
Replace facial image.Therefore, the present embodiment can improve flexibility of the terminal when carrying out image replacement.
Also, in the present embodiment, it is to carry smile expression to replace face part in treated base image by image
, therefore whole imaging effect is more preferable, more meets the expection of taking pictures of user.
In addition, when the mode replaced using eye, due to only replacing eyes image, terminal carries out image replacement
Processing speed is very fast.
In one embodiment, each facial image to be replaced of terminal-pair and its corresponding target face figure in S204
After the step of carrying out expression detection, it can also include the following steps:
For each facial image to be replaced and its corresponding target facial image, if the result of expression detection indicates to wait replacing
Substitution face image is consistent with the expression of target facial image, then obtains the operation of current occupied running memory capacity and terminal
Total amount of memory;
Obtain the ratio that the occupied running memory capacity accounts for the running memory total capacity;
If detecting, the ratio reaches preset ratio threshold value, it is determined that goes out and needs facial image to be replaced using default
The operation that position is replaced.
That is, determining that each facial image to be replaced needs the step of the replacement operation used according to the result that expression detects
Suddenly, it may include above-mentioned steps.
For example, when detecting that the expression of each facial image to be replaced and its corresponding target facial image is consistent (i.e. every
There is no expression shape change between the expression of one facial image to be replaced and its corresponding target facial image or vary less) when,
Terminal can obtain current occupied running memory capacity and running memory total capacity, and calculate in the occupied operation
Deposit the ratio that capacity accounts for the running memory total capacity.
If detecting, the ratio of the occupied running memory capacity and the running memory total capacity is more than preset ratio threshold
Value, then can consider that current running memory is occupied more, terminal can be determined using in target facial image at this time
Predetermined patterns replace the predetermined patterns in facial image to be replaced.For example, terminal is determined using in target facial image
Eye replace the eye in facial image to be replaced.
If detecting, the ratio of the occupied running memory capacity and the running memory total capacity is less than preset ratio
Threshold value, then can consider that current running memory is occupied less.At this point, terminal can be determined to use entire target face
The mode that image replaces entire facial image to be replaced carries out image replacement processing, etc..
It in one embodiment, can be with described before the step of determining base image in pending image
Include the following steps:
When acquisition includes the image of face, target frame number is determined according to collected at least two field pictures;
From collected multiple image, the pending image that quantity is the target frame number is obtained;
It is described determine the step of each facial image to be replaced needs the replacement operation used after, further include:Root
According to the replacement operation that the needs determined use, using corresponding target facial image to each facial image to be replaced
Image replacement processing is carried out, the base image for replacing processing by image is obtained.
For example, after entering camera preview interface, if detecting the image that terminal includes face in acquisition, terminal
The image that face can be included according to collected at least two frames, determines a target frame number.In one embodiment, should
Target frame number can be greater than or equal to 2.
For example, when terminal collects four frames and includes the image of face, terminal can detect the face in this four frames image
Whether the position at place is subjected to displacement.If not being subjected to displacement or displacement very little, it may be considered that the facial image ratio in image
Relatively stablize, i.e., user without shaking or rotating head on a large scale.If being subjected to displacement, it may be considered that facial image is unstable,
I.e. user shakes or has rotated head, and amplitude is larger.
In one embodiment, whether the face that can in the following way come in detection image is subjected to displacement:It is obtaining
After getting four frame images of acquisition, terminal can generate a coordinate system, and then terminal can be in a like fashion by each frame
Image is put into the coordinate system.Later, terminal can obtain the features of human face images in each frame image in the coordinate system
Coordinate.After the characteristic point coordinate in the coordinate system of the facial image in obtaining each frame image, terminal can compare
Whether the coordinate compared with the same features of human face images in different images is identical.If identical, it may be considered that the face in image
Image is not subjected to displacement.If it is different, it may be considered that the facial image in image is subjected to displacement.If detecting facial image
Displacement, then terminal can obtain specific shift value.If the specific shift value is within the scope of default value, can
To think that the facial image displacement in image is smaller.If the specific shift value is in outside default value range, then can be with
Think that the facial image displacement in image is larger.
In one embodiment, if for example, facial image is subjected to displacement, target frame number can be determined as to 4 frames.If
Facial image is not subjected to displacement, then target frame number can be determined as to 6 frames or 8 frames.
After user presses and takes pictures button, terminal can be from nearest the image collected, and acquisition quantity is target frame number
Pending image.
After obtaining pending image, terminal can determine base image from pending image, and from base image
In determine that the image of face predetermined patterns does not meet the facial image to be replaced of preset condition, and from pending image,
Obtain the target facial image for replacing each facial image to be replaced.Then, terminal can be according to each face to be replaced
Image and its corresponding target facial image determine that each facial image to be replaced needs the replacement operation used.
After determine that each facial image to be replaced needs the replacement operation used, terminal can be according to determining
The replacement operation for needing to use carries out image replacement using corresponding target facial image to each facial image to be replaced
Processing obtains the base image that processing is replaced by image.
In one embodiment, after described the step of obtaining replacing the base image of processing by image, may be used also
To include the following steps:
According to the pending image, image noise reduction processing is carried out to the base image for replacing processing by image.
For example, obtaining after image replaces the base image of processing, terminal can be according to pending image, to the warp
Cross the base image progress image noise reduction processing that image replaces processing.Exist comprising base image for example, terminal can obtain one group
The image that interior continuous acquisition arrives, and the base image handled is replaced by image to this according to this group of image and carries out multiframe noise reduction
Processing.
For example, since base image is image D, terminal can obtain image A, B, C, and according to image A, B, C couple
The image D that processing is replaced by image carries out multiframe noise reduction process.
In one embodiment, when carrying out multiframe noise reduction, image A, B, C, D can be first aligned by terminal, and be obtained
The pixel value of each group of snap to pixels in image.If the pixel value of same group of snap to pixels is not much different, then terminal can be counted
The pixel value mean value of this group of snap to pixels is calculated, then replaces with the pixel value mean value pixel value of the respective pixel of image E.If same
The pixel value difference of one group of snap to pixels is more, then can not be adjusted to the pixel value in image E.
For example, pixel P2, the pixel P3 in image C and the pixel in image D in pixel P1, image B in image A
P4 is one group of pixel being mutually aligned, and the pixel value that the pixel value that wherein pixel value of P1 is 101, P2 is 102, P3 is 103, P4
Pixel value be 104, then the pixel value mean value for the pixel that this group is mutually aligned be 102.5, then terminal can be by image D
In the pixel values of P4 pixels be adjusted to 102.5 by 104, to carry out noise reduction process to the P4 pixels in image D.If the picture of P1
The pixel value that the pixel value that the pixel value that element value is 80, P2 is 83, P3 is 90, P4 is 103, then due to their pixel value phase
Difference is more, and terminal can not adjust the pixel value of P4 at this time, i.e. the pixel value holding 104 of P4 is constant.
Fig. 3 to Fig. 4 is please referred to, Fig. 3 to Fig. 4 is that the scene for the processing method that image provided by the embodiments of the present application is replaced is shown
It is intended to.
In the present embodiment, after the preview interface for entering camera, if detecting terminal in acquisition facial image, eventually
End can acquire current environmental parameter, and according to collected at least two frame facial images, determine a target frame number.It should
Environmental parameter can be environmental light brightness.
If terminal according to collecting at least two frame facial images, determine the face in image be not subjected to displacement (or
Displacement very little), and it is currently at light environment, then target frame number can be determined as 8 frames by terminal.If terminal is according to acquisition
To at least two frame facial images, determine that the face in image is not subjected to displacement (or displacement very little), and be currently at
Half-light environment, then target frame number can be determined as 6 frames by terminal.If terminal according to collecting at least two frame facial images,
Determine that the face in image is subjected to displacement, then target frame number can be determined as 4 frames by terminal.
The image collected can be saved in buffer queue by terminal.The buffer queue can be fixed length queue, such as should
Buffer queue can preserve the newest collected 10 frame image of terminal.
For example, first, second, third, fourth, penta 5 people travel outdoors, and prepare to take pictures by landscape at one.Wherein, first uses eventually
End is first taken pictures for second, as shown in Figure 3.For example, after the preview interface for entering camera, terminal is joined according to current collected environment
Number acquires a frame image every 50 milliseconds.Before first presses the button of taking pictures of camera, terminal can be obtained first from buffer queue
Collected 4 frame image, it is to be understood that include the facial image of second in this 4 frame image.Then, terminal can detect
Whether position of the facial image of second in picture is subjected to displacement in this 4 frame image.If not being subjected to displacement or displacement very little,
It is considered that the facial image of second is more stable, i.e., second without shaking or rotating head on a large scale.It, can be with if being subjected to displacement
Think that the facial image of second is unstable, i.e., second shakes or has rotated head, and amplitude is larger.For example, in the present embodiment, terminal
Detect that position of the facial image of second in above-mentioned 4 frame image in picture is not subjected to displacement.
Then, terminal can obtain current environmental light brightness, and according to the environmental light brightness, and whether judgement is currently in
Half-light environment.For example, terminal is judged to be currently at half-light environment.
Later, terminal can be according to the above-mentioned information got:Position does not occur for position of the facial image of second in picture
It moves, and is currently at half-light environment, determine a target frame number.For example, the target frame number determined is 6 frames.
Hereafter, after first, which is pressed, takes pictures button, terminal can obtain the collected image about second of 6 frames.For example, terminal
Nearest image of collected 6 frame about second can be obtained from buffer queue, such as according to time order and function, this 6 frame image point
It Wei not A, B, C, D, E, F.
After getting 6 frame images, terminal can carry out the 6 frame image recognition of face, and face in detection image
The eyes size divided.For example, indicated in A, B, C, D, E, F image the numerical value of the eyes size of second be respectively 80,82,83,84,
85、84.Due to the single image that this 6 frame image is second, terminal can be by that frame image of largest eyes in this 6 frame image
It is determined as base image, i.e. image E is confirmed as base image.
After image E is determined as base image, terminal can carry out at multiframe noise reduction image E according to image C, D, F
Reason.After carrying out multiframe noise reduction process to image E, terminal can by the image E storages to photograph album after noise reduction process at
For a photo.It is understood that image E is the big eye photo of the second taken.
Later, penta is first, second, third, four people of fourth shooting group photo.For example, after the preview interface for entering camera, terminal detection
It is not subjected to displacement to position of the facial image in picture of the first and second the third four people of fourth in collected 4 frame image, and currently locates
In half-light environment.Based on this, terminal determines that target frame number is 6 frames.
Hereafter, after penta, which presses, takes pictures button, terminal can obtain the collected image about the first and second the third fourths of 6 frames.Example
Such as, terminal can obtain image of nearest collected 6 frame about the first and second the third fourths from buffer queue, such as according to time elder generation
Afterwards, this 6 frame image is respectively H, I, J, K, L, M.
It is understood that this 6 frame image H, I, J, K, L, M are pending image.After obtaining pending image, eventually
End can determine base image from this pending image of 6 frame.
For example, terminal first can carry out recognition of face to this 6 frame image, and the eyes for obtaining face part in image are big
It is small.For example, by human eye size detection, terminal determines the numerical value difference of eyes size of the first in image H, I, J, K, L, M
It is 70,72,75,80,78,79.The numerical value of eyes size of the second in image H, I, J, K, L, M is respectively 80,80,81,82,
85、82.The numerical value of the third eyes size in image H, I, J, K, L, M is respectively 80,82,82,50,30,0.Fourth image H,
I, the numerical value of the eyes size in J, K, L, M is respectively 82,83,84,88,85,81.Wherein, by pending image third eye
It is found that third eyes constantly become smaller since image J, this can consider that third is blinking for the variation of eyeball size.Third in wherein image M
In closed-eye state (eyes size is 0).
In obtaining the pending image of each frame after the eyes size of each face, terminal can be determined from this 6 frame
Go out base image.
For example, the maximum eye of first appears in image K, the maximum eye of second appears in image L, third maximum eye
It appears in image I and J, the maximum eye of fourth appears in image K.So, due to occurring two user's (first in image K
And fourth) maximum eye, therefore image K can be determined as base image by terminal.
After image K is determined as base image, terminal can determine that eyes image does not meet default item from image K
The facial image to be replaced of part.Wherein, which is that the eyes of user in this image are more than this in other pending images
The eyes of user.For example, the maximum eye of second appears in image L, third maximum eye appears in image I and J, i.e., second and
Third maximum eye is not in image K, therefore the facial image of second and third can be determined as facial image to be replaced by terminal.
After determining facial image to be replaced, terminal can determine the target facial image of second from pending image
With third target facial image.For example, since the maximum eye of second appears in image L, terminal can be by second in image L
Facial image be determined as target facial image.Since third maximum eye appears in image I and J, terminal can incite somebody to action
Third facial image is determined as target facial image in image I and J.For example, in image J third facial image is determined as by terminal
Target facial image.
After determining the target facial image of second, terminal can be to the facial image to be replaced and target facial image of second
Expression detection is carried out, and obtains expression testing result.For example, expression testing result indicates the target facial image of second in image L
Without containing smile expression, and the facial image to be replaced of second contains smile expression in image K, and in this case, terminal can be with
It determines to need the operation replaced using eye for the facial image to be replaced of second.Then, terminal can use second in image L
Eyes image replace the eyes image of second in image K.
After determining third target facial image, facial image to be replaced and target facial image that terminal can be to third
Expression detection is carried out, and obtains expression testing result.For example, expression testing result indicates the target facial image of second in image J
Containing smile expression, and third facial image to be replaced does not contain smile expression in image K, and in this case, terminal can be with
It determines to need the operation replaced using face for third facial image to be replaced.Then, terminal can use third in image J
Entire facial image replace in image K third entire facial image.
It is understood that after being replaced by image, the eyes of the first and second the third four people of fourth are pending images in image K
In four people maximum eye.Then, terminal can obtain the 4 frame images arrived comprising the continuous acquisition including image K, and according to
Other 3 frame image in this 4 frame image carries out multiframe noise reduction process to image K.For example, terminal can obtain image J, L, M, and
Multiframe noise reduction process is carried out to the image K for replacing processing by image according to image J, L, M.After the completion of multiframe noise reduction process, eventually
End can will become photo in the image K storages to photograph album Jing Guo noise reduction process.
It is understood that in the present embodiment, terminal can be according to facial image to be replaced and its corresponding target face
Expression in image replaces entire facial image to be replaced using entire target facial image to determine, or uses target
Eye in facial image replaces the eye in facial image to be replaced.Therefore, the present embodiment can improve terminal and carry out
Flexibility when image is replaced.Also, in the present embodiment, it is band to replace face part in treated base image by image
There is smile expression, therefore whole imaging effect is more preferable, more meets the expection of taking pictures of user.Moreover, exported in the present embodiment
The eyes of four people belong to big eye shape state in first, second, third, the group photo photo of fourth, and imaging effect is preferable.
In addition, in the present embodiment, since newest the image collected is M, and third eyes size is 0 in image M, therefore
If directly exporting image M and storing to becoming photo in photograph album, the first, second obtained in this way, third, the group photo of four people of fourth
In piece, the eyes in third facial image are in closed-eye state.Its imaging effect of such photo is very poor.The present embodiment is logical
It crosses and image K is determined as base image, and replace in image K third facial image using third facial image in image J
, then the mode for becoming photo into photograph album will be stored by the image K of facial image replacement, it effectively prevents closing user third
The problem of becoming photo in the photo storage to photograph album of eye, effectively increase image quality and user experience.
Referring to Fig. 5, Fig. 5 is the structural schematic diagram for the processing unit that image provided by the embodiments of the present application is replaced.Image
The processing unit 300 of replacement may include:First determining module 301, the second determining module 302, acquisition module 303, Yi Ji
Three determining modules 304.
First determining module 301, for determining base image from pending image.
Second determining module 302, for determining facial image to be replaced, the people to be replaced from the base image
The image of predetermined patterns does not meet preset condition in face image.
Acquisition module 303, for from the pending image, obtaining the mesh for replacing each facial image to be replaced
Mark facial image, each facial image to be replaced and its facial image that corresponding target facial image is same subscriber.
Third determining module 304, for according to each facial image to be replaced and its corresponding target facial image, determining
It includes that face's replacement and predetermined patterns replace to go out each facial image to be replaced to need the replacement operation used, the replacement operation
It changes.
In one embodiment, third determining module 304 can be used for:
Expression detection is carried out to each facial image to be replaced and its corresponding target facial image;
According to expression detection as a result, determining that each facial image to be replaced needs the replacement operation used.
In one embodiment, third determining module 304 can be used for:
For each facial image to be replaced and its corresponding target facial image, if the result of expression detection indicates to wait replacing
Substitution face image includes smile expression, and target facial image is free of smile expression, it is determined that going out needs facial image to be replaced
The operation that use predetermined patterns to replace.
In one embodiment, third determining module 304 can be used for:
For each facial image to be replaced and its corresponding target facial image, if the result of expression detection indicates to wait replacing
Substitution face image is free of smile expression, and target facial image includes smile expression, it is determined that going out needs facial image to be replaced
The operation that use face to replace.
In one embodiment, third determining module 304 can be used for:
For each facial image to be replaced and its corresponding target facial image, if the result of expression detection indicates to wait replacing
Substitution face image is consistent with the expression of target facial image, then obtains the operation of current occupied running memory capacity and terminal
Total amount of memory;
Obtain the ratio that the occupied running memory capacity accounts for the running memory total capacity;
If detecting, the ratio reaches preset ratio threshold value, it is determined that goes out and needs facial image to be replaced using default
The operation that position is replaced.
Also referring to Fig. 6, Fig. 6 is another structural representation for the processing unit that image provided by the embodiments of the present application is replaced
Figure.In one embodiment, the processing unit 300 of image replacement can also include:Processing module 305.
Processing module 305, for when acquisition includes the image of face, being determined according to collected at least two field pictures
Target frame number;From collected multiple image, the pending image that quantity is the target frame number is obtained.
So, determine that each facial image to be replaced needs what is used to replace described in having been executed in third determining module 304
After the step of changing operation, processing module 305 can be used for:According to the replacement operation that the needs determined use, make
Image replacement processing is carried out to each facial image to be replaced with corresponding target facial image, obtains handling by image replacement
Base image.
In one embodiment, processing module 305 can be also used for:According to the pending image, to the process
The base image that image replaces processing carries out image noise reduction processing.
The embodiment of the present application provides a kind of computer-readable storage medium, computer program is stored thereon with, when described
When computer program executes on computers so that the computer executes the processing side replaced such as image provided in this embodiment
Step in method.
The embodiment of the present application also provides a kind of electronic equipment, including memory, and processor, the processor is by calling institute
The computer program stored in memory is stated, for executing the step in the processing method that image provided in this embodiment is replaced.
For example, above-mentioned electronic equipment can be the mobile terminals such as tablet computer or smart mobile phone.Referring to Fig. 7,
Fig. 7 is the structural schematic diagram of mobile terminal provided by the embodiments of the present application.
The mobile terminal 400 may include the components such as camera module 401, memory 402, processor 403.Art technology
Personnel are appreciated that mobile terminal structure shown in Fig. 7 does not constitute the restriction to mobile terminal, may include than illustrating more
More or less component either combines certain components or different components arrangement.
Camera module 401 may include single camera module, double camera modules etc..
Memory 402 can be used for storing application program and data.Include that can hold in the application program that memory 402 stores
Line code.Application program can form various functions module.Processor 403 is stored in the application journey of memory 402 by operation
Sequence, to perform various functions application and data processing.
Processor 403 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection
A part by running or execute the application program being stored in memory 402, and is called and is stored in memory 402
Data execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.
In the present embodiment, the processor 403 in mobile terminal can be according to following instruction, will be one or more
The corresponding executable code of process of application program is loaded into memory 402, and is stored in storage by processor 403 to run
Application program in device 402, to realize step:
Base image is determined from pending image;Facial image to be replaced, institute are determined from the base image
The image for stating predetermined patterns in facial image to be replaced does not meet preset condition;From the pending image, obtain for replacing
The target facial image of each facial image to be replaced is changed, each facial image to be replaced and its corresponding target facial image are
The facial image of same subscriber;According to each facial image to be replaced and its corresponding target facial image, each wait for is determined
It includes that face replaces and predetermined patterns replacement to replace facial image to need the replacement operation used, the replacement operation.
The embodiment of the present invention also provides a kind of electronic equipment.Above-mentioned electronic equipment includes image processing circuit, at image
Managing circuit can utilize hardware and or software component to realize, it may include define ISP (Image Signal Processing, figure
As signal processing) the various processing units of pipeline.Fig. 8 is the structural schematic diagram of image processing circuit in one embodiment.Such as Fig. 8
It is shown, for purposes of illustration only, only showing the various aspects with the relevant image processing techniques of the embodiment of the present invention.
As shown in figure 8, image processing circuit includes image-signal processor 540 and control logic device 550.Imaging device
510 image datas captured are handled by image-signal processor 540 first, and image-signal processor 540 carries out image data
Analysis is to capture the image statistics for the one or more control parameters that can be used for determining and/or imaging device 510.Imaging is set
Standby 510 may include the camera with one or more lens 511 and imaging sensor 512.Imaging sensor 512 may include color
Color filter array (such as Bayer filters), imaging sensor 512 can be obtained to be captured with each imaging pixel of imaging sensor 512
Luminous intensity and wavelength information, and provide one group of raw image data being handled by image-signal processor 540.Sensor
520 can be supplied to image-signal processor 540 based on 520 interface type of sensor raw image data.520 interface of sensor
SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface, other can be utilized
The combination of serial or parallel camera interface or above-mentioned interface.
Image-signal processor 540 handles raw image data pixel by pixel in various formats.For example, each image slices
Element can carry out one or more with the bit depth of 8,10,12 or 14 bits, image-signal processor 540 to raw image data
The statistical information of a image processing operations, collection about image data.Wherein, image processing operations can be by identical or different position
Depth accuracy carries out.
Image-signal processor 540 can also receive pixel data from video memory 530.For example, from 520 interface of sensor
Raw pixel data is sent to video memory 530, the raw pixel data in video memory 530 is available to image letter
Number processor 540 is for processing.Video memory 530 can be in a part, storage device or electronic equipment for memory device
Independent private memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving the raw image data from 520 interface of sensor or from video memory 530, picture signal
Processor 540 can carry out one or more image processing operations, such as time-domain filtering.Treated, and image data can be transmitted to image
Memory 530, to carry out other processing before shown.Image-signal processor 540 is received from video memory 530
Data are handled, and the image real time transfer in original domain and in RGB and YCbCr color spaces is carried out to the processing data.
Image data that treated may be output to display 570, so that user watches and/or by graphics engine or GPU (Graphics
Processing Unit, graphics processor) it is further processed.In addition, the output of image-signal processor 540 also can be transmitted to
Video memory 530, and display 570 can read image data from video memory 530.In one embodiment, image
Memory 530 can be configured as realizing one or more frame buffers.In addition, the output of image-signal processor 540 is transmittable
To encoder/decoder 560, so as to encoding/decoding image data.The image data of coding can be saved, and aobvious being shown in
It is decompressed before showing in 570 equipment of device.Encoder/decoder 560 can be realized by CPU or GPU or coprocessor.
The statistical data that image-signal processor 540 determines can be transmitted to control logic device 550.For example, statistical data can
It is passed including the images such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 511 shadow correction of lens
512 statistical information of sensor.Control logic device 550 may include the processor for executing one or more routines (such as firmware) and/or micro-
Controller, one or more routines according to the statistical data of reception, can determine imaging device 510 control parameter and control
Parameter.For example, control parameter may include 520 control parameter of sensor (such as time of integration of gain, spectrum assignment), camera
The combination for the control parameter, 511 control parameter of lens (such as focusing or zoom focal length) or these parameters of glistening.ISP control ginsengs
Number may include the gain level and color correction matrix for automatic white balance and color adjustment (for example, during RGB processing),
And 511 shadow correction parameter of lens.
It is the step of realizing the processing method of image provided in this embodiment with image processing techniques in Fig. 8 below:
Base image is determined from pending image;Facial image to be replaced, institute are determined from the base image
The image for stating predetermined patterns in facial image to be replaced does not meet preset condition;From the pending image, obtain for replacing
The target facial image of each facial image to be replaced is changed, each facial image to be replaced and its corresponding target facial image are
The facial image of same subscriber;According to each facial image to be replaced and its corresponding target facial image, each wait for is determined
It includes that face replaces and predetermined patterns replacement to replace facial image to need the replacement operation used, the replacement operation.
In one embodiment, electronic equipment is described according to each facial image to be replaced and its corresponding mesh in execution
When mark facial image determines that each facial image to be replaced needs the step of the replacement operation used, it can execute:To each
Facial image to be replaced and its corresponding target facial image carry out expression detection;According to expression detection as a result, determining
Go out each facial image to be replaced and needs the replacement operation used.
In one embodiment, electronic equipment determines each wait in the execution result according to expression detection
When replacing the step for the replacement operation that facial image needs use, it can execute:For each facial image to be replaced and its right
The target facial image answered, if the result of expression detection indicates that facial image to be replaced includes smile expression, and target face figure
As being free of smile expression, it is determined that go out and need the operation replaced using predetermined patterns to facial image to be replaced.
In one embodiment, electronic equipment determines each wait in the execution result according to expression detection
When replacing the step for the replacement operation that facial image needs use, it can execute:For each facial image to be replaced and its right
The target facial image answered, if the result of expression detection indicates that facial image to be replaced is free of smile expression, and target face figure
As including smile expression, it is determined that go out and need the operation replaced using face to facial image to be replaced.
In one embodiment, electronic equipment determines each wait in the execution result according to expression detection
When replacing the step for the replacement operation that facial image needs use, it can execute:For each facial image to be replaced and its right
The target facial image answered, if the result of expression detection indicates that facial image to be replaced is consistent with the expression of target facial image,
Then obtain the running memory total capacity of current occupied running memory capacity and terminal;Obtain the occupied running memory
Capacity accounts for the ratio of the running memory total capacity;If detecting, the ratio reaches preset ratio threshold value, it is determined that goes out to treat
It replaces facial image and needs the operation replaced using predetermined patterns.
In one embodiment, described before the step of determining base image in pending image, electronics is set
It is standby to can also be performed:When acquisition includes the image of face, target frame number is determined according to collected at least two field pictures;From
In collected multiple image, the pending image that quantity is the target frame number is obtained.
So, it is described determine the step of each facial image to be replaced needs the replacement operation used after, electronics
Equipment can also be performed:According to the replacement operation that the needs determined use, corresponding target facial image pair is used
Each facial image to be replaced carries out image replacement processing, obtains the base image that processing is replaced by image.
In one embodiment, after described the step of obtaining replacing the base image of processing by image, electronics
Equipment can also be performed:According to the pending image, image drop is carried out to the base image for replacing processing by image
It makes an uproar processing.
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, the detailed description for the processing method replaced above with respect to image is may refer to, details are not described herein again.
The place that image in processing unit and foregoing embodiments that described image provided by the embodiments of the present application is replaced is replaced
Reason method belongs to same design, and the processing method that described image replacement can be run in the processing unit that described image is replaced is real
The either method provided in example is applied, specific implementation process refers to the processing method embodiment of described image replacement, herein no longer
It repeats.
It should be noted that for the processing method that the embodiment of the present application described image is replaced, ordinary skill
Personnel are appreciated that all or part of flow for the processing method for realizing that the embodiment of the present application described image is replaced, and are that can pass through
Computer program is completed to control relevant hardware, and the computer program can be stored in a computer read/write memory medium
In, it such as stores in memory, and executed by least one processor, may include in the process of implementation as described image is replaced
The flow of the embodiment of processing method.Wherein, the storage medium can be magnetic disc, CD, read-only memory (ROM, Read
Only Memory), random access memory (RAM, Random Access Memory) etc..
For the processing unit that the described image of the embodiment of the present application is replaced, each function module can be integrated in one
Can also be that modules physically exist alone in processing chip, can also two or more modules be integrated in a mould
In block.The form that hardware had both may be used in above-mentioned integrated module is realized, can also be realized in the form of software function module.
If the integrated module is realized and when sold or used as an independent product in the form of software function module, can also
It is stored in a computer read/write memory medium, the storage medium is for example read-only memory, disk or CD etc..
Processing method, device, storage medium and the electricity that a kind of image provided above the embodiment of the present application is replaced
Sub- equipment is described in detail, and principle and implementation of the present invention are described for specific case used herein,
The explanation of above example is only intended to facilitate the understanding of the method and its core concept of the invention;Meanwhile for the skill of this field
Art personnel, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion this
Description should not be construed as limiting the invention.
Claims (10)
1. the processing method that a kind of image is replaced, which is characterized in that including:
Base image is determined from pending image;
Determine facial image to be replaced from the base image, the image of predetermined patterns is not in the facial image to be replaced
Meet preset condition;
From the pending image, the target facial image for replacing each facial image to be replaced is obtained, it is each to wait replacing
Substitution face image and its facial image that corresponding target facial image is same subscriber;
According to each facial image to be replaced and its corresponding target facial image, each facial image needs to be replaced are determined
The replacement operation of use, the replacement operation include that face replaces and predetermined patterns replacement.
2. the processing method that image according to claim 1 is replaced, which is characterized in that described according to each face to be replaced
Image and its corresponding target facial image determine the step of each facial image to be replaced needs the replacement operation used, packet
It includes:
Expression detection is carried out to each facial image to be replaced and its corresponding target facial image;
According to expression detection as a result, determining that each facial image to be replaced needs the replacement operation used.
3. the processing method that image according to claim 2 is replaced, which is characterized in that described according to expression detection
As a result the step of each facial image to be replaced needs the replacement operation used is determined, including:
For each facial image to be replaced and its corresponding target facial image, if the result of expression detection indicates people to be replaced
Face image includes smile expression, and target facial image is free of smile expression, it is determined that goes out and is adopted to facial image to be replaced needs
The operation replaced with predetermined patterns.
4. the processing method that image according to claim 2 is replaced, which is characterized in that described according to expression detection
As a result the step of each facial image to be replaced needs the replacement operation used is determined, including:
For each facial image to be replaced and its corresponding target facial image, if the result of expression detection indicates people to be replaced
Face image is free of smile expression, and target facial image includes smile expression, it is determined that goes out and is adopted to facial image to be replaced needs
The operation replaced with face.
5. the processing method that image according to claim 2 is replaced, which is characterized in that described according to expression detection
As a result the step of each facial image to be replaced needs the replacement operation used is determined, including:
For each facial image to be replaced and its corresponding target facial image, if the result of expression detection indicates people to be replaced
Face image is consistent with the expression of target facial image, then obtains current occupied running memory capacity and the running memory of terminal
Total capacity;
Obtain the ratio that the occupied running memory capacity accounts for the running memory total capacity;
If detecting, the ratio reaches preset ratio threshold value, it is determined that goes out and needs to use predetermined patterns to facial image to be replaced
The operation of replacement.
6. the processing method that image according to claim 1 is replaced, which is characterized in that it is described from pending image really
Before the step of making base image, further include:
When acquisition includes the image of face, target frame number is determined according to collected at least two field pictures;
From collected multiple image, the pending image that quantity is the target frame number is obtained;
It is described determine the step of each facial image to be replaced needs the replacement operation used after, further include:According to true
The replacement operation that the needs fixed use carries out each facial image to be replaced using corresponding target facial image
Image replacement is handled, and obtains the base image that processing is replaced by image.
7. the processing method that image according to claim 6 is replaced, which is characterized in that obtain replacing by image described
After the step of base image of processing, further include:
According to the pending image, image noise reduction processing is carried out to the base image for replacing processing by image.
8. the processing unit that a kind of image is replaced, which is characterized in that including:
First determining module, for determining base image from pending image;
Second determining module, for determining facial image to be replaced, the facial image to be replaced from the base image
The image of middle predetermined patterns does not meet preset condition;
Acquisition module, for from the pending image, obtaining the target face for replacing each facial image to be replaced
Image, each facial image to be replaced and its corresponding target facial image are the facial image of same subscriber;
Third determining module, for according to each facial image to be replaced and its corresponding target facial image, determining each
It includes that face replaces and predetermined patterns replacement that facial image to be replaced, which needs the replacement operation used, the replacement operation,.
9. a kind of storage medium, is stored thereon with computer program, which is characterized in that when the computer program on computers
When execution so that the computer executes the method as described in any one of claim 1 to 7.
10. a kind of electronic equipment, including memory, processor, which is characterized in that the processor is by calling the memory
The computer program of middle storage, for executing the method as described in any one of claim 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810277764.3A CN108520493A (en) | 2018-03-30 | 2018-03-30 | Processing method, device, storage medium and the electronic equipment that image is replaced |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810277764.3A CN108520493A (en) | 2018-03-30 | 2018-03-30 | Processing method, device, storage medium and the electronic equipment that image is replaced |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108520493A true CN108520493A (en) | 2018-09-11 |
Family
ID=63430981
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810277764.3A Pending CN108520493A (en) | 2018-03-30 | 2018-03-30 | Processing method, device, storage medium and the electronic equipment that image is replaced |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108520493A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109559362A (en) * | 2018-11-23 | 2019-04-02 | 广东智媒云图科技股份有限公司 | A kind of image subject face replacement method and device |
CN109993722A (en) * | 2019-04-09 | 2019-07-09 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
CN110458026A (en) * | 2019-07-11 | 2019-11-15 | 成都市喜爱科技有限公司 | A kind of face acquisition method, device, system, equipment and medium |
CN111565292A (en) * | 2019-02-13 | 2020-08-21 | 夏普株式会社 | Image processing apparatus, image communication system, and image processing method |
CN112085688A (en) * | 2020-09-16 | 2020-12-15 | 蒋芳 | Method and system for removing pedestrian shielding during photographing |
CN112818147A (en) * | 2021-02-22 | 2021-05-18 | 维沃移动通信有限公司 | Picture processing method, device, equipment and storage medium |
CN113709370A (en) * | 2021-08-26 | 2021-11-26 | 维沃移动通信有限公司 | Image generation method and device, electronic equipment and readable storage medium |
CN113747057A (en) * | 2021-07-26 | 2021-12-03 | 荣耀终端有限公司 | Image processing method and electronic equipment |
CN117789131A (en) * | 2024-02-18 | 2024-03-29 | 广东电网有限责任公司广州供电局 | Risk monitoring method, risk monitoring device, risk monitoring equipment and storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120099002A1 (en) * | 2010-10-20 | 2012-04-26 | Hon Hai Precision Industry Co., Ltd. | Face image replacement system and method implemented by portable electronic device |
CN103258316A (en) * | 2013-03-29 | 2013-08-21 | 东莞宇龙通信科技有限公司 | Method and device for picture processing |
CN105303161A (en) * | 2015-09-21 | 2016-02-03 | 广东欧珀移动通信有限公司 | Method and device for shooting multiple people |
CN105654420A (en) * | 2015-12-21 | 2016-06-08 | 小米科技有限责任公司 | Face image processing method and device |
CN105812672A (en) * | 2016-05-27 | 2016-07-27 | 广东欧珀移动通信有限公司 | Method and device for photographing processing |
CN106067167A (en) * | 2016-06-06 | 2016-11-02 | 广东欧珀移动通信有限公司 | Image processing method and device |
CN106204435A (en) * | 2016-06-27 | 2016-12-07 | 北京小米移动软件有限公司 | Image processing method and device |
CN106599817A (en) * | 2016-12-07 | 2017-04-26 | 腾讯科技(深圳)有限公司 | Face replacement method and device |
CN107316020A (en) * | 2017-06-26 | 2017-11-03 | 司马大大(北京)智能系统有限公司 | Face replacement method, device and electronic equipment |
CN107481317A (en) * | 2017-07-31 | 2017-12-15 | 广东欧珀移动通信有限公司 | The facial method of adjustment and its device of face 3D models |
-
2018
- 2018-03-30 CN CN201810277764.3A patent/CN108520493A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120099002A1 (en) * | 2010-10-20 | 2012-04-26 | Hon Hai Precision Industry Co., Ltd. | Face image replacement system and method implemented by portable electronic device |
CN103258316A (en) * | 2013-03-29 | 2013-08-21 | 东莞宇龙通信科技有限公司 | Method and device for picture processing |
CN105303161A (en) * | 2015-09-21 | 2016-02-03 | 广东欧珀移动通信有限公司 | Method and device for shooting multiple people |
CN105654420A (en) * | 2015-12-21 | 2016-06-08 | 小米科技有限责任公司 | Face image processing method and device |
CN105812672A (en) * | 2016-05-27 | 2016-07-27 | 广东欧珀移动通信有限公司 | Method and device for photographing processing |
CN106067167A (en) * | 2016-06-06 | 2016-11-02 | 广东欧珀移动通信有限公司 | Image processing method and device |
CN106204435A (en) * | 2016-06-27 | 2016-12-07 | 北京小米移动软件有限公司 | Image processing method and device |
CN106599817A (en) * | 2016-12-07 | 2017-04-26 | 腾讯科技(深圳)有限公司 | Face replacement method and device |
CN107316020A (en) * | 2017-06-26 | 2017-11-03 | 司马大大(北京)智能系统有限公司 | Face replacement method, device and electronic equipment |
CN107481317A (en) * | 2017-07-31 | 2017-12-15 | 广东欧珀移动通信有限公司 | The facial method of adjustment and its device of face 3D models |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109559362A (en) * | 2018-11-23 | 2019-04-02 | 广东智媒云图科技股份有限公司 | A kind of image subject face replacement method and device |
CN109559362B (en) * | 2018-11-23 | 2022-10-21 | 广东智媒云图科技股份有限公司 | Image subject face replacing method and device |
CN111565292A (en) * | 2019-02-13 | 2020-08-21 | 夏普株式会社 | Image processing apparatus, image communication system, and image processing method |
CN109993722A (en) * | 2019-04-09 | 2019-07-09 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
CN109993722B (en) * | 2019-04-09 | 2023-04-18 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN110458026A (en) * | 2019-07-11 | 2019-11-15 | 成都市喜爱科技有限公司 | A kind of face acquisition method, device, system, equipment and medium |
CN112085688A (en) * | 2020-09-16 | 2020-12-15 | 蒋芳 | Method and system for removing pedestrian shielding during photographing |
CN112818147A (en) * | 2021-02-22 | 2021-05-18 | 维沃移动通信有限公司 | Picture processing method, device, equipment and storage medium |
WO2022174826A1 (en) * | 2021-02-22 | 2022-08-25 | 维沃移动通信有限公司 | Image processing method and apparatus, device, and storage medium |
CN113747057B (en) * | 2021-07-26 | 2022-09-30 | 荣耀终端有限公司 | Image processing method, electronic equipment, chip system and storage medium |
CN113747057A (en) * | 2021-07-26 | 2021-12-03 | 荣耀终端有限公司 | Image processing method and electronic equipment |
CN113709370A (en) * | 2021-08-26 | 2021-11-26 | 维沃移动通信有限公司 | Image generation method and device, electronic equipment and readable storage medium |
CN113709370B (en) * | 2021-08-26 | 2023-05-09 | 维沃移动通信有限公司 | Image generation method, device, electronic equipment and readable storage medium |
CN117789131A (en) * | 2024-02-18 | 2024-03-29 | 广东电网有限责任公司广州供电局 | Risk monitoring method, risk monitoring device, risk monitoring equipment and storage medium |
CN117789131B (en) * | 2024-02-18 | 2024-05-28 | 广东电网有限责任公司广州供电局 | Risk monitoring method, risk monitoring device, risk monitoring equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108520493A (en) | Processing method, device, storage medium and the electronic equipment that image is replaced | |
CN107959778B (en) | Imaging method and device based on dual camera | |
CN107948500A (en) | Image processing method and device | |
CN108259770B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN108401110A (en) | Acquisition methods, device, storage medium and the electronic equipment of image | |
CN110166708A (en) | Night scene image processing method, device, electronic equipment and storage medium | |
CN108024054A (en) | Image processing method, device and equipment | |
CN108419012A (en) | Photographic method, device, storage medium and electronic equipment | |
CN108419028A (en) | Image processing method, device, computer readable storage medium and electronic equipment | |
CN110213502A (en) | Image processing method, device, storage medium and electronic equipment | |
CN108574803A (en) | Choosing method, device, storage medium and the electronic equipment of image | |
CN110198418A (en) | Image processing method, device, storage medium and electronic equipment | |
CN108717530A (en) | Image processing method, device, computer readable storage medium and electronic equipment | |
CN110198419A (en) | Image processing method, device, storage medium and electronic equipment | |
CN110717871A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN110445986A (en) | Image processing method, device, storage medium and electronic equipment | |
KR20230098575A (en) | Frame Processing and/or Capture Command Systems and Techniques | |
CN110290325A (en) | Image processing method, device, storage medium and electronic equipment | |
CN110740266B (en) | Image frame selection method and device, storage medium and electronic equipment | |
CN105556957B (en) | A kind of image processing method, computer storage media, device and terminal | |
CN108513068A (en) | Choosing method, device, storage medium and the electronic equipment of image | |
CN108401109A (en) | Image acquiring method, device, storage medium and electronic equipment | |
CN107563329A (en) | Image processing method, device, computer-readable recording medium and mobile terminal | |
CN110278375A (en) | Image processing method, device, storage medium and electronic equipment | |
CN108282616B (en) | Processing method, device, storage medium and the electronic equipment of image |
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: 20180911 |