CN107481186A - Image processing method, device, computer-readable recording medium and computer equipment - Google Patents
Image processing method, device, computer-readable recording medium and computer equipment Download PDFInfo
- Publication number
- CN107481186A CN107481186A CN201710737479.0A CN201710737479A CN107481186A CN 107481186 A CN107481186 A CN 107481186A CN 201710737479 A CN201710737479 A CN 201710737479A CN 107481186 A CN107481186 A CN 107481186A
- Authority
- CN
- China
- Prior art keywords
- area
- image
- color
- depth
- human face
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 28
- 238000012545 processing Methods 0.000 claims abstract description 95
- 238000000034 method Methods 0.000 claims abstract description 15
- 230000015654 memory Effects 0.000 claims description 22
- 230000008859 change Effects 0.000 claims description 4
- 230000001815 facial effect Effects 0.000 abstract description 5
- 238000003384 imaging method Methods 0.000 description 14
- 238000001914 filtration Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 4
- 238000012937 correction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 241000209094 Oryza Species 0.000 description 2
- 235000007164 Oryza sativa Nutrition 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 235000009566 rice Nutrition 0.000 description 2
- 230000006641 stabilisation Effects 0.000 description 2
- 238000011105 stabilization Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 239000000872 buffer Substances 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 239000011800 void material Substances 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/18—Image warping, e.g. rearranging pixels individually
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Quality & Reliability (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The present invention relates to a kind of image processing method, device, computer-readable recording medium and computer equipment.The above method includes:Human face region in image be present if detecting, obtain the first depth of view information of the human face region;Obtain the first color in the human face region;According to first area in first depth of view information and the first color recognition described image;Virtualization processing is carried out to the second area in described image in addition to the first area.The above method, recognition of face acquisition face ROI region, i.e. human face region are carried out after image is obtained.Under normal circumstances, human face region is polygonal region, such as square area, rectangular region.Further according to depth of view information in human face region and acquiring color information facial contour region, i.e., accurate human face region, virtualization processing is carried out to the region in image in addition to accurate human face region.It can avoid carrying out image occur leakage virtualization phenomenon during virtualization processing.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of image processing method, device, computer-readable deposit
Storage media and computer equipment.
Background technology
With the fast development of intelligent mobile terminal, using intelligent mobile terminal take pictures becomes more and more frequent.
When being taken pictures using intelligent mobile terminal, dual camera can be used to obtain depth of view information in image, be believed according to the depth of field in image
Breath pair can image carry out virtualization processing, image can protrude target subject in image after virtualization processing.Virtualization processing to image can
Use large aperture using various ways, during such as shooting image, during shooting image main body with background relatively far apart, to image using flat
Sliding filtering process etc..
The content of the invention
The embodiment of the present invention provides a kind of image processing method, device, computer-readable recording medium and computer equipment,
Leakage virtualization phenomenon during virtualization processing can be carried out to image.
A kind of image processing method, including:
Human face region in image be present if detecting, obtain the first depth of view information of the human face region;
Obtain the first color in the human face region;
According to first area in first depth of view information and the first color recognition described image;
Virtualization processing is carried out to the second area in described image in addition to the first area.
A kind of image processing apparatus, including:
Acquisition module, if human face region in image be present for detecting, obtain first depth of field letter of the human face region
Breath;Obtain the first color in the human face region;
Identification module, for according to first area in first depth of view information and the first color recognition described image;
Blurring module, for carrying out virtualization processing to the second area in described image in addition to the first area.
One or more includes the non-volatile computer readable storage medium storing program for executing of computer executable instructions, when the calculating
When machine executable instruction is executed by one or more processors so that the computing device image processing method as described above
Method.
A kind of computer equipment, including memory and processor, computer-readable instruction are stored in the memory, institute
When stating instruction by the computing device so that the computing device image processing method as described above.
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.
Fig. 1 is the internal structure schematic diagram of mobile terminal 10 in one embodiment;
Fig. 2 is the flow chart of image processing method in one embodiment;
Fig. 3 is human face region schematic diagram in image in one embodiment;
Fig. 4 is double schematic diagrames for taking the photograph acquisition for mobile terminal depth of field value in one embodiment;
Fig. 5 is the corresponding relation curve map of number of pixels and depth of field value in human face region in one embodiment;
Fig. 6 is the structured flowchart of image processing apparatus in one embodiment;
Fig. 7 is the structured flowchart of image processing apparatus in another embodiment;
Fig. 8 is the structured flowchart of image processing apparatus in another embodiment;
Fig. 9 is the schematic diagram of image processing circuit in one embodiment.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
It is appreciated that term " first " used in the present invention, " second " etc. can be used to describe various elements herein,
But these elements should not be limited by these terms.These terms are only used for distinguishing first element and another element.Citing comes
Say, without departing from the scope of the invention, the first determining module can be referred to as the second determining module, and similarly,
Second determining module can be referred to as the first determining module.First determining module and the second determining module both determining module,
But it is not same determining module.
So that computer equipment is mobile terminal as an example.Fig. 1 is the internal structure signal of mobile terminal 10 in one embodiment
Figure.As shown in figure 1, the mobile terminal 10 includes the processor, non-volatile memory medium, memory storage connected by system bus
Device, network interface, display screen and input unit.Wherein, the non-volatile memory medium of mobile terminal 10 is stored with operating system
And computer-readable instruction.To realize a kind of image processing method when the computer-readable instruction is executed by processor.The processing
Device is used to provide calculating and control ability, supports the operation of whole mobile terminal 10.Built-in storage in mobile terminal 10 is non-
The operation of computer-readable instruction in volatile storage medium provides environment.Network interface is used to lead to server progress network
Letter.The display screen of mobile terminal 10 can be LCDs or electric ink display screen etc., and input unit can be display
The button, trace ball or the Trackpad that are set on the touch layer or the shell of mobile terminal 10 covered on screen or outer
Keyboard, Trackpad or mouse for connecing etc..The mobile terminal 10 can be mobile phone, tablet personal computer or personal digital assistant or wearing
Formula equipment etc..It will be understood by those skilled in the art that the structure shown in Fig. 1, the only part related to application scheme
The block diagram of structure, the restriction for the mobile terminal 10 being applied thereon to application scheme, specific mobile terminal are not formed
10 can include, than more or less parts shown in figure, either combining some parts or arranging with different parts.
Fig. 2 is the flow chart of image processing method in one embodiment.As shown in Fig. 2 a kind of image processing method, including
Step 202 is to step 206.Wherein:
202, human face region in image be present if detecting, obtain the first depth of view information of human face region;Obtain face area
First color in domain.
After computer equipment gets image, one can be entered by whether there is face in human face detection tech detection image
Step extraction includes the ROI region of face.Above-mentioned image can be the preview image that computer equipment obtains after photographing program is started,
Or it is stored in image in computer equipment.The ROI region that face is included in image can be obtained by human face detection tech, i.e.,
Human face region, above-mentioned human face region can be polygonal region or border circular areas.As shown in figure 3, human face region is square frame 30 in Fig. 3
Middle region.
After human face region is got, computer equipment can obtain depth of view information corresponding to human face region, i.e. first depth of field
Information.Above-mentioned first depth of view information can be obtained by a under type:
When computer equipment for it is double take the photograph mobile terminal when, two camera respective sensors point in mobile terminal can be passed through
Not Huo Qu two camera distance objectives distance.As shown in figure 4, the primary optical axis of two cameras is parallel in mobile terminal, L points
To do the photocentre of left camera, R points are the photocentre of right camera.Line segment where PL points and PR points is respectively left and right camera
Image planes, the beeline of photocentre to image planes is focal length f.If P is target point, P points are PL and PR in the imaging point of left and right image planes.
The distance of the left hand edge of PL points and PR points away from respective image planes is XL and XR, then parallax d=XR-XL or d=XL-XR.Wherein Z is mesh
The punctuate P point depth of field, T are the distance between left and right camera photocentre.It can then be obtained according to Similar Principle of Triangle:
Then
I.e.
Or
By the above method, the depth of field value of target point can be obtained, after human face region is obtained, human face region can be obtained successively
In each target point depth of field value, obtain the first depth of view information.
When computer equipment is singly to take the photograph mobile terminal, each target point in human face region can be obtained successively by structure light
Depth of field value, obtain the first depth of view information.
In one embodiment, the depth of view information of entire image can also be obtained.Wherein, the depth of view information of entire image is obtained
Method and step it is identical with the method and step of the above-mentioned depth of view information of acquisition first, will not be repeated here.Getting entire image
Depth of view information after, identify human face region in image, extract depth of view information corresponding to human face region, i.e. first depth of field in image
Information.
The first color refers to that area ratio is more than the color of designated value in human face region in above-mentioned human face region.Further
, the first color can be large area color in human face region, the colour of skin of face in such as human face region.Identifying human face region
Afterwards, the area ratio of the color-values of each color, each color in human face region in human face region can be obtained, further according to the color of color
Area ratio corresponding to coloured silk value and color obtains the first color in human face region.
204, according to first area in the first depth of view information and the first color recognition image.
After the first color of human face region and the first depth of view information is got, it can be believed according to the first color and first depth of field
First area in breath identification image.Above-mentioned first area refers to the region that facial contour includes in human face region, i.e., more accurate
Human face region.The step of identifying first area specifically may include:
The first depth of view information of human face region is obtained, the depth of view information of above-mentioned human face region includes face in human face region
The depth of view information of background in depth of view information and human face region.Choose in the first depth of view information, the mode of depth of field value is as face
Depth of field value, face depth of field region is set on the basis of the depth of field value of face.Choose pixel of the depth of field value in face depth of field region.
As shown in figure 5, Fig. 5 is the corresponding relation curve map of number of pixels and depth of field value in human face region.There are peak A and peak value in curve
B, it is seen then that depth of field value corresponding to peak A is the depth of field value of face, and depth of field value corresponding to peak value B is the depth of field value of background.Choose peak
Depth of field value of the depth of field as face corresponding to value A, if the depth of field corresponding to peak A is 5 meters, face depth of field region is set as 4.95
Rice is to 5.05 meters.Choose pixel of the depth of field value at 4.95 meters to 5.05 meters.Depth of field value is being got in face depth of field region
After pixel, the color-values of the first color are obtained, color-values scope are set on the basis of the color-values of the first color, for example, first
The color-values of color are R=95, G=40, B=20, and the color-values scope set is R>95, G>40, B>20, R>G, R>B and Shu R-
G Shu>15.Obtain in pixel of the above-mentioned depth of field value in the face depth of field region color-values in the range of color-values pixel as first
Pixel, i.e., first area, i.e., the region that facial contour includes in human face region can obtain to above-mentioned first pixel expansion algorithm.
206, virtualization processing is carried out to the second area in image in addition to first area.
After first area is got, it is to obtain second area that first area is rejected from image.Use smothing filtering pair
Second area is smoothed, and the image after being handled is that image after virtualization processing is carried out to second area.It is above-mentioned flat
Sliding filtering may include gaussian filtering, medium filtering etc..
In the embodiment of the present invention, recognition of face acquisition face ROI region, i.e. human face region are carried out after image is obtained.It is logical
In the case of often, human face region is polygonal region, such as square area, rectangular region.Further according in human face region
Depth of view information and acquiring color information facial contour region, i.e., accurate human face region, to removing accurate human face region in image
Region in addition carries out virtualization processing.It can avoid carrying out image occur leakage virtualization phenomenon during virtualization processing.
In one embodiment, obtaining the first color in human face region includes:Wrapped if detecting in the color of human face region
Preset color is included, using preset color as the first color;Or using color ratio in human face region be more than preset value color as
First color.
Computer equipment includes preset color value, if being detected in color-values corresponding to the color in human face region default
Color-values, then using preset color value as the first color-values.Above-mentioned preset color value can be color-values, the YUV of rgb color space
The color-values of color space or the color-values of Lab color spaces etc..Computer equipment can also obtain each color in human face region
Corresponding number of pixels accounts for the ratio of the total number of pixels of human face region, i.e., the color ratio of each color.If the color of single color
Color ratio is more than preset value, then color ratio is more than into the color of preset value as the first color.Above-mentioned first color is face
The color of application on human skin in large area color in region, such as human face region;Above-mentioned preset value can be user's setting value, or root
The value obtained according to historical data.
Image processing algorithm in the embodiment of the present invention, the first color in human face region is obtained, that is, obtained main in human face region
Want color.Under normal circumstances, primary color is the colour of skin in human face region, after the colour of skin is got, is advantageous to further according to skin
Color identifies accurate human face region, improves the precision of identification.
In one embodiment, it is above-mentioned before the second area in image in addition to first area carries out virtualization processing
Image processing method also includes:The second depth of view information of second area is obtained, virtualization parameter is determined according to the second depth of view information;Root
Virtualization processing is carried out to second area according to virtualization parameter.
After rejecting first area obtains second area from image, the second depth of view information of second area can be asked for.Wherein,
Asking for second depth of field of second area may include:The depth of view information of image is asked for, obtains second area in image, extracts the secondth area
Depth of view information corresponding to domain;Or second area in image is obtained, measurement obtains the second depth of view information corresponding to second area.Work as meter
Calculate machine equipment for it is double take the photograph mobile terminal or singly take the photograph mobile terminal when, can obtain the second depth of view information, the acquisition for mobile terminal depth of field
The step of information, specifically refers to step 202, will not be repeated here.
In one embodiment, determine that virtualization parameter includes according to the second depth of view information:According to it is default virtualization grade with
The corresponding relation of depth of field value determines virtualization grade corresponding to the second depth of view information.
The corresponding relation of virtualization grade and depth of field value is prestored in computer equipment, above-mentioned corresponding relation can be list, bent
Line chart etc., not limited to this.The corresponding relation for blurring grade and depth of field value can be numerical value corresponding relation.It is as shown in the table:
Table 1 blurs the numerical value mapping table of grade and depth of field value
Depth of field value (rice) | Blur grade |
≤5 | 1 |
>5 and≤10 | 2 |
>10 and≤15 | 3 |
>15 and≤20 | 4 |
>20 | 5 |
The corresponding relation of virtualization grade and depth of field value is alternatively ratio corresponding relation, is getting the depth of field value of whole image
Afterwards, can the depth of field value of whole image is descending (or have small to big) be divided into predetermined number grade, according to depth of field value grade
Virtualization grade corresponding to searching.For example, depth of field value maximum is 20 meters in whole image, minimum 0 meter of depth of field value, then setting is schemed
The corresponding first virtualization grade of the pixel of 0~5 meter of depth of field value, the corresponding second virtualization grade of the pixel of 5~10 meters of depth of field value, scape as in
The corresponding 3rd virtualization grade of pixel, the corresponding 4th virtualization grade of the pixel of 15~20 meters of depth of field value of deep 10~15 meters of value.
Virtualization grade is intensity when virtualization processing is carried out to image, and virtualization grade is corresponding with algorithm parameter value.With not
When carrying out virtualization processing to image with algorithm parameter value, image fog-level is different after virtualization processing.Wherein, virtualization grade is got over
Height, stronger to image virtualization processing, the image that virtualization handles to obtain is fuzzyyer;Or virtualization lower grade, image virtualization is handled
Stronger, the image that virtualization handles to obtain is fuzzyyer.
In the embodiment of the present invention, virtualization processing is carried out to second area according to the second depth of view information of second area, wherein,
Different depth of field value correspond to different virtualization grades in second depth of view information, and the virtualization intensity that different virtualization grades is correspondingly given is not
Together, that is, the fuzziness of image is different after handling so that, can be according to the depth of field value of image to figure when carrying out virtualization processing to image
Virtualization effect as realizing gradual change, be advantageous to protrude the theme of image, image is more had a sense of hierarchy.
In one embodiment, to before second area carries out virtualization processing in addition to first area in image, above-mentioned image
Processing method also includes:Obtain human face region area ratio in the picture;Determined according to area ratio to corresponding to second area
Blur grade.
Computer equipment can obtain human face region area ratio in the picture, and according to the area ratio of human face region in image
Example judges image type.In general, when user opens front camera self-timer, face is nearer apart from front camera, self-timer
In the image of acquisition human face region account for image area ratio it is larger;User open rear camera shooting image when, face away from
From rear camera farther out, shoot human face region in the image of acquisition account for image ratio it is smaller, can be pre- in computer equipment
If human face ratio threshold value, when area ratio is more than or equal to above-mentioned human face ratio threshold value to human face region in the picture, then by image
It is judged to taking pictures certainly;When area ratio is less than above-mentioned human face ratio threshold value to human face region in the picture, it is by spectral discrimination then
The photo of rear camera shooting.Different virtualization grades can be set to the photo taken pictures certainly and rear camera is shot, in root
According to human face region after area ratio judges image type in the picture, virtualization grade corresponding to image type can be obtained.Usual feelings
Under condition, when image is that user takes pictures certainly, the main body that image protrudes is behaved, and second area can be set higher virtualization grade,
Make the virtualization degree for the treatment of to second area higher, second area is relatively fuzzy in image;When image is rear camera shooting
During photo, background can be also protruded in addition to portrait, relatively low virtualization grade can be set to second area, make the virtualization to second area
Degree for the treatment of is relatively low, and second area is more visible in image.
Image processing method in the embodiment of the present invention, the area ratio that human face region in image accounts for image is obtained, according to figure
Human face region accounts for the area ratio of image and can determine that image is from taking pictures or rear camera is taken pictures as in, then to obtain image corresponding
Virtualization grade, virtualization processing is carried out to second area in image, realized different to the degree of different images virtualization processing so that
Image more has levels.
In one embodiment, a kind of image processing method, including:
(1) if detecting in image face ROI region be present, the depth of view information of face ROI region, above-mentioned depth of field letter are obtained
Breath includes the depth of view information of the depth of view information of face and background in face ROI region.Believe in the depth of field for getting face ROI region
After breath, the color-values of face complexion in face ROI region are obtained.
The color-values of face complexion can be obtained by following steps in face ROI region:Detect color in face ROI region
Whether preset color is included, if so, using preset color as the color of face complexion;Or obtain color pair in face ROI region
The number of pixels answered accounts for color of the ratio highest color of total number of pixels as face complexion.
(2) according to human face region in the color-values of the depth of view information of face and colour of skin identification image in face ROI region.
Pixel of the depth of field value in the range of the depth of view information of face in image can be chosen according to the depth of view information of face, then will
The color-values of the colour of skin reject the pixel value that the colour of skin differs larger, the human face region of acquisition compared with the color-values of pixel.Due to by mistake
Difference is present, and can have the vacancy of partial pixel point in the human face region of acquisition, can carry out expansion algorithm to above-mentioned human face region and fill out
Fill vacancy pixel.
(3) virtualization processing is carried out to the background area in image in addition to human face region.
Before background area in image in addition to human face region carries out virtualization processing, can also background area the depth of field letter
Breath.Different virtualization grades is set according to different depth of field value in the depth of view information of background area, that is, sets different virtualization processing
Degree so that the virtualization degree for the treatment of to background area is according to the different and different of depth of field value.It is predeterminable in computer equipment
The corresponding relation of grade and depth of field value is blurred, can determine that according to the corresponding relation of depth of field value and virtualization grade and background area is blurred
The degree of processing.Further, image type can also be judged according to the size of face area in image, if image is to take pictures certainly
Or rear camera is taken pictures.When image is that user takes pictures certainly, it is individual that user, which wants prominent theme, then can be to background area
The virtualization compared with strong grade is carried out to handle;When image is taken pictures for rear camera, user still wants to retain the back of the body in addition to wanting to push oneself to the front
The landscape of scene area, the then virtualization that weaker grade can be carried out to background area are handled.
Image processing method in the embodiment of the present invention, recognition of face acquisition face ROI region is carried out after image is obtained, i.e.,
Human face region.Under normal circumstances, human face region is polygonal region, such as square area, rectangular region.Further basis
Depth of view information and acquiring color information facial contour region in human face region, i.e., accurate human face region are accurate to being removed in image
Human face region beyond region carry out virtualization processing.It can avoid carrying out image occur leakage virtualization phenomenon during virtualization processing.
Fig. 6 is the structured flowchart of image processing apparatus in one embodiment.Including acquisition module 602, the and of identification module 604
Blurring module 606.Wherein:
Acquisition module 602, if human face region in image be present for detecting, obtain first depth of field letter of human face region
Breath;Obtain the first color in human face region.
Identification module 604, for according to first area in the first depth of view information and the first color recognition image.
Blurring module 606, for carrying out virtualization processing to the second area in image in addition to first area.
In one embodiment, if acquisition module 602 is additionally operable to detect that the color of human face region includes preset color,
Using preset color as the first color;Or color ratio in human face region is more than the color of preset value as the first color.
Fig. 7 is the structured flowchart of image processing apparatus in another embodiment.Including acquisition module 702, identification module
704th, the determining module 708 of blurring module 706 and first.Wherein, acquisition module 702, identification module 704, blurring module 706 and figure
Corresponding functions of modules is identical in 6.
First determining module 708, before carrying out virtualization processing for the second area in image in addition to first area,
The second depth of view information of second area is obtained, virtualization parameter is determined according to the second depth of view information;
Blurring module 706 is additionally operable to carry out virtualization processing to second area according to virtualization parameter.
In one embodiment, the first determining module 708 is additionally operable to corresponding with depth of field value according to default virtualization grade
Relation determines virtualization grade corresponding to the second depth of view information.
Fig. 8 is the structured flowchart of image processing apparatus in another embodiment.Including acquisition module 802, identification module
804th, the determining module 808 of blurring module 806 and second.Wherein, acquisition module 802, identification module 804, blurring module 806 and figure
Corresponding functions of modules is identical in 6.
Second determining module 808, for before second area carries out virtualization processing in addition to first area in image, obtaining
Human face region area ratio in the picture;Determined according to area ratio to blurring grade corresponding to second area.
The division of modules is only used for for example, in other embodiments, will can scheme in above-mentioned image processing apparatus
As processing unit is divided into different modules as required, to complete all or part of function of above-mentioned image processing apparatus.
The embodiment of the present invention additionally provides a kind of computer-readable recording medium.One or more can perform comprising computer
The non-volatile computer readable storage medium storing program for executing of instruction, when computer executable instructions are executed by one or more processors,
So that computing device following steps:
(1) human face region in image be present if detecting, obtain the first depth of view information of human face region;Obtain human face region
In the first color.
(2) according to first area in the first depth of view information and the first color recognition image.
(3) virtualization processing is carried out to the second area in image in addition to first area.
In one embodiment, obtaining the first color in human face region includes:Wrapped if detecting in the color of human face region
Preset color is included, using preset color as the first color;Or using color ratio in human face region be more than preset value color as
First color.
In one embodiment, it is above-mentioned before the second area in image in addition to first area carries out virtualization processing
Image processing method also includes:The second depth of view information of second area is obtained, virtualization parameter is determined according to the second depth of view information;Root
Virtualization processing is carried out to second area according to virtualization parameter.
In one embodiment, determine that virtualization parameter includes according to the second depth of view information:According to it is default virtualization grade with
The corresponding relation of depth of field value determines virtualization grade corresponding to the second depth of view information.
In one embodiment, to before second area carries out virtualization processing in addition to first area in image, above-mentioned image
Processing method also includes:Obtain human face region area ratio in the picture;Determined according to area ratio to corresponding to second area
Blur grade.
The embodiment of the present invention also provides a kind of computer equipment.Above computer equipment includes image processing circuit, figure
As process circuit can utilize hardware and/or component software to realize, it may include define ISP (Image Signal
Processing, picture signal processing) pipeline various processing units.Fig. 9 is that image processing circuit shows in one embodiment
It is intended to.As shown in figure 9, for purposes of illustration only, the various aspects of the image processing techniques related to the embodiment of the present invention are only shown.
As shown in figure 9, image processing circuit includes ISP processors 940 and control logic device 950.Imaging device 910 is caught
View data handled first by ISP processors 940, ISP processors 940 view data is analyzed with catch can be used for it is true
The image statistics of fixed and/or imaging device 910 one or more control parameters.Imaging device 910 may include there is one
The camera of individual or multiple lens 912 and imaging sensor 914.Imaging sensor 914 may include colour filter array (such as
Bayer filters), imaging sensor 914 can obtain the luminous intensity caught with each imaging pixel of imaging sensor 914 and wavelength
Information, and the one group of raw image data that can be handled by ISP processors 940 is provided.Sensor 920 (such as gyroscope) can be based on passing
The parameter (such as stabilization parameter) of the image procossing of collection is supplied to ISP processors 940 by the interface type of sensor 920.Sensor 920
Interface can utilize SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface,
The combination of other serial or parallel camera interfaces or above-mentioned interface.
In addition, raw image data can also be sent to sensor 920 by imaging sensor 914, sensor 920 can be based on passing
The interface type of sensor 920 is supplied to ISP processors 940 to be handled raw image data, or sensor 920 is by original graph
As in data Cun Chudao video memories 930.
ISP processors 940 handle raw image data pixel by pixel in various formats.For example, each image pixel can
Bit depth with 8,10,12 or 14 bits, ISP processors 940 can be carried out at one or more images to raw image data
Reason operation, statistical information of the collection on view data.Wherein, image processing operations can be by identical or different bit depth precision
Carry out.
ISP processors 940 can also receive pixel data from video memory 930.For example, the interface of sensor 920 will be original
View data is sent to video memory 930, and the raw image data in video memory 930 is available to ISP processors 940
It is for processing.Video memory 930 can be independent special in the part of storage arrangement, storage device or electronic equipment
With memory, and it may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from the interface of imaging sensor 914 or from the interface of sensor 920 or from video memory 930
During raw image data, ISP processors 940 can carry out one or more image processing operations, such as time-domain filtering.ISP processors
View data after 940 processing can be transmitted to video memory 930, to carry out other processing before shown.At ISP
Manage device 940 from the reception processing data of video memory 930, and to the processing data carry out original domain in and RGB and YCbCr
Image real time transfer in color space.View data after processing may be output to display 980, for user viewing and/or
Further handled by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, ISP processors
940 output also can be transmitted to video memory 930, and display 980 can read view data from video memory 930.
In one embodiment, video memory 930 can be configured as realizing one or more frame buffers.In addition, ISP processors 940
Output can be transmitted to encoder/decoder 970, so as to encoding/decoding image data.The view data of coding can be saved,
And decompressed before being shown in the equipment of display 980.
View data after the processing of ISP processors 940 can be transmitted to blurring module 960, so as to before shown to figure
As carrying out virtualization processing.The depth of view information that blurring module 960 may include to obtain image to view data virtualization processing, according to image
Depth of view information obtain corresponding to virtualization parameter virtualization processing etc. is carried out to image again.Blurring module 960 carries out view data
After virtualization processing, the view data after can virtualization be handled is sent to encoder/decoder 970, so as to encoding/decoding image number
According to.The view data of coding can be saved, and show with the equipment of display 980 before decompress.It is it is understood that empty
Change the view data after module 960 is handled can directly to issue display 980 without encoder/decoder 970 and shown
Show.View data after the processing of ISP processors 940 can also first pass through encoder/decoder 970 and handle, then again by void
Change module 960 to be handled.Wherein, blurring module 960 or encoder/decoder 970 can be CPU (Central in mobile terminal
Processing Unit, central processing unit) or GPU etc..
The statistics that ISP processors 940 determine, which can be transmitted, gives the unit of control logic device 950.For example, statistics can wrap
Include the image sensings such as automatic exposure, AWB, automatic focusing, flicker detection, black level compensation, the shadow correction of lens 912
The statistical information of device 914.Control logic device 950 may include the processor and/or micro-control for performing one or more routines (such as firmware)
Device processed, one or more routines according to the statistics of reception, can determine control parameter and the ISP processing of imaging device 910
The control parameter of device 940.For example, the control parameter of imaging device 910 may include the control parameter of sensor 920 (such as gain, expose
Time of integration of photocontrol, stabilization parameter etc.), camera flash control parameter, the control parameter of lens 912 (such as focus on or become
Jiao's focal length) or these parameters combination.ISP control parameters may include be used for AWB and color adjustment (for example,
During RGB processing) gain level and color correction matrix, and the shadow correction parameter of lens 912.
It it is below the step of realizing images above processing method with image processing techniques in Fig. 9:
(1) human face region in image be present if detecting, obtain the first depth of view information of human face region;Obtain human face region
In the first color.
(2) according to first area in the first depth of view information and the first color recognition image.
(3) virtualization processing is carried out to the second area in image in addition to first area.
In one embodiment, obtaining the first color in human face region includes:Wrapped if detecting in the color of human face region
Preset color is included, using preset color as the first color;Or using color ratio in human face region be more than preset value color as
First color.
In one embodiment, it is above-mentioned before the second area in image in addition to first area carries out virtualization processing
Image processing method also includes:The second depth of view information of second area is obtained, virtualization parameter is determined according to the second depth of view information;Root
Virtualization processing is carried out to second area according to virtualization parameter.
In one embodiment, determine that virtualization parameter includes according to the second depth of view information:According to it is default virtualization grade with
The corresponding relation of depth of field value determines virtualization grade corresponding to the second depth of view information.
In one embodiment, to before second area carries out virtualization processing in addition to first area in image, above-mentioned image
Processing method also includes:Obtain human face region area ratio in the picture;Determined according to area ratio to corresponding to second area
Blur grade.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The hardware of correlation is instructed to complete by computer program, described program can be stored in a non-volatile computer and can be read
In storage medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage is situated between
Matter can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Embodiment described above only expresses the several embodiments of the present invention, and its description is more specific and detailed, but simultaneously
Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention
Protect scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (12)
- A kind of 1. image processing method, it is characterised in that including:Human face region in image be present if detecting, obtain the first depth of view information of the human face region;Obtain the first color in the human face region;According to first area in first depth of view information and the first color recognition described image;Virtualization processing is carried out to the second area in described image in addition to the first area.
- 2. image processing method according to claim 1, it is characterised in that described to obtain the first color in the human face region Coloured silk includes:Include preset color if detecting the color of the human face region, using the preset color as the first color;Or color ratio in the human face region is more than the color of preset value as the first color.
- 3. image processing method according to claim 1, it is characterised in that it is described to described image in remove described first Before second area outside region carries out virtualization processing, methods described also includes:The second depth of view information of the second area is obtained, virtualization parameter is determined according to second depth of view information;Virtualization processing is carried out to the second area according to the virtualization parameter.
- 4. image processing method according to claim 3, it is characterised in that described to be determined according to second depth of view information Virtualization parameter includes:Determine that second depth of view information is corresponding with the corresponding relation of depth of field value according to default virtualization grade and blur grade.
- 5. image processing method according to claim 1, it is characterised in that described to removing firstth area in described image Before overseas second area carries out virtualization processing, methods described also includes:Obtain human face region area ratio in described image;Determined according to the area ratio to blurring grade corresponding to the second area.
- A kind of 6. image processing apparatus, it is characterised in that including:Acquisition module, if human face region in image be present for detecting, obtain the first depth of view information of the human face region;Obtain Take the first color in the human face region;Identification module, for according to first area in first depth of view information and the first color recognition described image;Blurring module, for carrying out virtualization processing to the second area in described image in addition to the first area.
- 7. image processing apparatus according to claim 6, it is characterised in that:If the acquisition module is additionally operable to detect that the color of the human face region includes preset color, by the preset color As the first color;Or color ratio in the human face region is more than the color of preset value as the first color.
- 8. image processing apparatus according to claim 6, it is characterised in that described device also includes:First determining module, for it is described to described image in second area in addition to the first area carry out virtualization processing Before, the second depth of view information of the second area is obtained, virtualization parameter is determined according to second depth of view information;The blurring module is additionally operable to carry out virtualization processing to the second area according to the virtualization parameter.
- 9. image processing apparatus according to claim 8, it is characterised in that:First determining module is additionally operable to determine second scape according to the corresponding relation of default virtualization grade and depth of field value Deeply convince virtualization grade corresponding to breath.
- 10. image processing apparatus according to claim 6, it is characterised in that described device also includes:Second determining module, for before second area carries out virtualization processing in addition to the first area in described image, obtaining Take human face region area ratio in described image;Determined according to the area ratio to empty corresponding to the second area Change grade.
- 11. one or more includes the non-volatile computer readable storage medium storing program for executing of computer executable instructions, when the calculating When machine executable instruction is executed by one or more processors so that the computing device such as any one of claim 1 to 5 Described image processing method.
- 12. a kind of computer equipment, including memory and processor, computer-readable instruction is stored in the memory, institute When stating instruction by the computing device so that the computing device is at the image as any one of claim 1 to 5 Reason method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710737479.0A CN107481186B (en) | 2017-08-24 | 2017-08-24 | Image processing method, image processing device, computer-readable storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710737479.0A CN107481186B (en) | 2017-08-24 | 2017-08-24 | Image processing method, image processing device, computer-readable storage medium and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107481186A true CN107481186A (en) | 2017-12-15 |
CN107481186B CN107481186B (en) | 2020-12-01 |
Family
ID=60602347
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710737479.0A Expired - Fee Related CN107481186B (en) | 2017-08-24 | 2017-08-24 | Image processing method, image processing device, computer-readable storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107481186B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108234882A (en) * | 2018-02-11 | 2018-06-29 | 维沃移动通信有限公司 | A kind of image weakening method and mobile terminal |
CN108259770A (en) * | 2018-03-30 | 2018-07-06 | 广东欧珀移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
CN109286720A (en) * | 2018-08-01 | 2019-01-29 | 维沃移动通信有限公司 | A kind of the main screen selection method and device of multi-screen mobile terminal |
CN110971827A (en) * | 2019-12-09 | 2020-04-07 | Oppo广东移动通信有限公司 | Portrait mode shooting method and device, terminal equipment and storage medium |
CN111402111A (en) * | 2020-02-17 | 2020-07-10 | 深圳市商汤科技有限公司 | Image blurring method, device, terminal and computer readable storage medium |
CN112217989A (en) * | 2020-09-25 | 2021-01-12 | 北京小米移动软件有限公司 | Image display method and device |
CN113313626A (en) * | 2021-05-20 | 2021-08-27 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
CN113313646A (en) * | 2021-05-27 | 2021-08-27 | Oppo广东移动通信有限公司 | Image processing method and device, electronic equipment and computer readable storage medium |
WO2021218696A1 (en) * | 2020-04-27 | 2021-11-04 | 华为技术有限公司 | Skin color detection method and apparatus, terminal and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002216129A (en) * | 2001-01-22 | 2002-08-02 | Honda Motor Co Ltd | Face area detector, its method and computer readable recording medium |
CN103473564A (en) * | 2013-09-29 | 2013-12-25 | 公安部第三研究所 | Front human face detection method based on sensitive area |
CN103973977A (en) * | 2014-04-15 | 2014-08-06 | 联想(北京)有限公司 | Blurring processing method and device for preview interface and electronic equipment |
CN105100615A (en) * | 2015-07-24 | 2015-11-25 | 青岛海信移动通信技术股份有限公司 | Image preview method, apparatus and terminal |
CN105426828A (en) * | 2015-11-10 | 2016-03-23 | 浙江宇视科技有限公司 | Face detection method, face detection device and face detection system |
CN106331492A (en) * | 2016-08-29 | 2017-01-11 | 广东欧珀移动通信有限公司 | Image processing method and terminal |
CN106778491A (en) * | 2016-11-14 | 2017-05-31 | 深圳奥比中光科技有限公司 | The acquisition methods and equipment of face 3D characteristic informations |
CN106909911A (en) * | 2017-03-09 | 2017-06-30 | 广东欧珀移动通信有限公司 | Image processing method, image processing apparatus and electronic installation |
-
2017
- 2017-08-24 CN CN201710737479.0A patent/CN107481186B/en not_active Expired - Fee Related
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002216129A (en) * | 2001-01-22 | 2002-08-02 | Honda Motor Co Ltd | Face area detector, its method and computer readable recording medium |
CN103473564A (en) * | 2013-09-29 | 2013-12-25 | 公安部第三研究所 | Front human face detection method based on sensitive area |
CN103973977A (en) * | 2014-04-15 | 2014-08-06 | 联想(北京)有限公司 | Blurring processing method and device for preview interface and electronic equipment |
CN105100615A (en) * | 2015-07-24 | 2015-11-25 | 青岛海信移动通信技术股份有限公司 | Image preview method, apparatus and terminal |
CN105426828A (en) * | 2015-11-10 | 2016-03-23 | 浙江宇视科技有限公司 | Face detection method, face detection device and face detection system |
CN106331492A (en) * | 2016-08-29 | 2017-01-11 | 广东欧珀移动通信有限公司 | Image processing method and terminal |
CN106778491A (en) * | 2016-11-14 | 2017-05-31 | 深圳奥比中光科技有限公司 | The acquisition methods and equipment of face 3D characteristic informations |
CN106909911A (en) * | 2017-03-09 | 2017-06-30 | 广东欧珀移动通信有限公司 | Image processing method, image processing apparatus and electronic installation |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108234882B (en) * | 2018-02-11 | 2020-09-29 | 维沃移动通信有限公司 | Image blurring method and mobile terminal |
CN108234882A (en) * | 2018-02-11 | 2018-06-29 | 维沃移动通信有限公司 | A kind of image weakening method and mobile terminal |
CN108259770A (en) * | 2018-03-30 | 2018-07-06 | 广东欧珀移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
CN108259770B (en) * | 2018-03-30 | 2020-06-02 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN109286720A (en) * | 2018-08-01 | 2019-01-29 | 维沃移动通信有限公司 | A kind of the main screen selection method and device of multi-screen mobile terminal |
CN110971827A (en) * | 2019-12-09 | 2020-04-07 | Oppo广东移动通信有限公司 | Portrait mode shooting method and device, terminal equipment and storage medium |
CN111402111A (en) * | 2020-02-17 | 2020-07-10 | 深圳市商汤科技有限公司 | Image blurring method, device, terminal and computer readable storage medium |
CN111402111B (en) * | 2020-02-17 | 2023-11-03 | 深圳市商汤科技有限公司 | Image blurring method, device, terminal and computer readable storage medium |
WO2021218696A1 (en) * | 2020-04-27 | 2021-11-04 | 华为技术有限公司 | Skin color detection method and apparatus, terminal and storage medium |
CN112217989A (en) * | 2020-09-25 | 2021-01-12 | 北京小米移动软件有限公司 | Image display method and device |
CN113313626A (en) * | 2021-05-20 | 2021-08-27 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
CN113313646A (en) * | 2021-05-27 | 2021-08-27 | Oppo广东移动通信有限公司 | Image processing method and device, electronic equipment and computer readable storage medium |
CN113313646B (en) * | 2021-05-27 | 2024-04-16 | Oppo广东移动通信有限公司 | Image processing method and device, electronic equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107481186B (en) | 2020-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107481186A (en) | Image processing method, device, computer-readable recording medium and computer equipment | |
US10997696B2 (en) | Image processing method, apparatus and device | |
JP7015374B2 (en) | Methods for image processing using dual cameras and mobile terminals | |
CN107977940B (en) | Background blurring processing method, device and equipment | |
CN108683862B (en) | Imaging control method, imaging control device, electronic equipment and computer-readable storage medium | |
CN108055452B (en) | Image processing method, device and equipment | |
TWI464706B (en) | Dark portion exposure compensation method for simulating high dynamic range with single image and image processing device using the same | |
EP3480784B1 (en) | Image processing method, and device | |
CN111028189A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN107835372A (en) | Imaging method, device, mobile terminal and storage medium based on dual camera | |
CN108900782A (en) | Exposal control method, device and electronic equipment | |
CN107563979A (en) | Image processing method, device, computer-readable recording medium and computer equipment | |
CN108259770B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN107704798A (en) | Image weakening method, device, computer-readable recording medium and computer equipment | |
CN107493432A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN109685853B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
WO2019105254A1 (en) | Background blur processing method, apparatus and device | |
CN107194900A (en) | Image processing method, device, computer-readable recording medium and mobile terminal | |
CN107395991A (en) | Image combining method, device, computer-readable recording medium and computer equipment | |
WO2019105260A1 (en) | Depth of field obtaining method, apparatus and device | |
CN109089041A (en) | Recognition methods, device, electronic equipment and the storage medium of photographed scene | |
CN109068060B (en) | Image processing method and device, terminal device and computer readable storage medium | |
CN107465903A (en) | Image white balance method, device and computer-readable recording medium | |
CN111242843B (en) | Image blurring method, image blurring device, equipment and storage device | |
CN107454328B (en) | Image processing method, device, computer readable storage medium and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20201201 |
|
CF01 | Termination of patent right due to non-payment of annual fee |