CN104867112A - Photo processing method and apparatus - Google Patents

Photo processing method and apparatus Download PDF

Info

Publication number
CN104867112A
CN104867112A CN201510146435.1A CN201510146435A CN104867112A CN 104867112 A CN104867112 A CN 104867112A CN 201510146435 A CN201510146435 A CN 201510146435A CN 104867112 A CN104867112 A CN 104867112A
Authority
CN
China
Prior art keywords
eyeball
image
photo
information
blood
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
Application number
CN201510146435.1A
Other languages
Chinese (zh)
Other versions
CN104867112B (en
Inventor
高毅
葛云源
王振淦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510146435.1A priority Critical patent/CN104867112B/en
Publication of CN104867112A publication Critical patent/CN104867112A/en
Application granted granted Critical
Publication of CN104867112B publication Critical patent/CN104867112B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The disclosure, which belongs to the image processing filed, relates to a photo processing method and apparatus. The method comprises: identifying eyeball information in a red-eye photo; according to the eyeball information, obtaining a replacement eyeball image being an eyeball image containing a normal eyeball from a preset image base; on the basis of the eyeball information, replacing the red-eye image in the red-eye photo with the replacement eyeball image, thereby obtaining a processed photo. According to the provided photo processing method, on the basis of the eyeball information in the red-eye photo, the red-eye ball image in the red-eye photo is replaced by the eyeball image of the normal eyeball in the preset image base, so that the eyeball color in the processed photo is natural. Therefore, a problem of poor photo imaging quality after red-eye photo processing can be solved; and an effect of improvement of the photo imaging quality can be realized.

Description

Photo processing method and device
Technical field
The disclosure relates to image processing field, particularly a kind of photo processing method and device.
Background technology
Red eye phenomenon is a kind of phenomenon common in photography.Under the environment such as night, half-light, when user uses taking photos by using flashlights, the light of flashlamp can enter in the camera lens of camera through the amphiblestroid reflection of reference object, and owing to being full of red blood vessel in retina, the eyes causing taking reference object in the photo obtained take on a red color.
When user shoots the photo that there is blood-shot eye illness, usually use PS (Photoshop) or U.S. to scheme the photo-editing software such as elegant, the blood-shot eye illness in photo is treated to normal eyeball color.But the eyeball color that this mode process goes out is natural not, affects the image quality of photo.
Summary of the invention
In order to solve the problem in correlation technique, disclosure embodiment provides a kind of photo processing method and device, and described technical scheme is as follows:
According to the first aspect of disclosure embodiment, provide a kind of photo processing method, the method comprises:
Identify the eyeball information in blood-shot eye illness photo;
Obtain from pre-set image storehouse according to eyeball information and replace eyeball image, this replacement eyeball image comprises the eyeball image of normal eyeball;
According to eyeball information, the blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced this replacement eyeball image, obtain the photo after processing.
Optionally, obtain from pre-set image storehouse according to this eyeball information and replace eyeball image, comprising:
From pre-set image storehouse, the replacement eyeball image the highest with the eyeball similarity in this blood-shot eye illness photo is obtained according to eyeball information.
Optionally, the eyeball information in this identification blood-shot eye illness photo, comprising:
Identify the facial image of reference object in blood-shot eye illness photo;
Identify the eyeball image in facial image and eyeball position;
Identify the eyeball image in eyeball image and eyeball position, using facial image, eyeball image, eyeball position, eyeball image and eyeball position as this eyeball information.
Optionally, this obtains the replacement eyeball image the highest with the eyeball similarity in this blood-shot eye illness photo according to this eyeball information from this pre-set image storehouse, comprising:
From pre-set image storehouse, inquiry and the facial image in eyeball information belong to the facial image of same face;
The highest replacement eyeball image of similarity is gone out according to the eyeball image in eyeball information, eyeball position, eyeball image and eyeball position enquiring from the facial image inquired.
Optionally, the method also comprises:
Obtain at least one Zhang Zhengchang photo;
Generate pre-set image storehouse according at least one Zhang Zhengchang photo, this pre-set image storehouse comprises at least one and replaces eyeball image, and each replacement eyeball image is corresponding with one group of eyeball information.
According to the second aspect of disclosure embodiment, provide a kind of picture processing device, this device comprises:
Information identification module, is configured to identify the eyeball information in blood-shot eye illness photo;
Image collection module, be configured to obtain from pre-set image storehouse according to eyeball information replace eyeball image, this replacement eyeball image comprises the eyeball image of normal eyeball;
Image replacement module, is configured to, according to eyeball information, the blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced this replacement eyeball image, obtains the photo after processing.
Optionally, this image collection module, is also configured to from pre-set image storehouse, obtain the replacement eyeball image the highest with the eyeball similarity in blood-shot eye illness photo according to eyeball information.
Optionally, this information identification module, comprising:
Recognition of face submodule, is configured to the facial image identifying reference object in blood-shot eye illness photo;
Eyeball recognin module, is configured to identify the eyeball image in facial image and eyeball position;
Eyeball recognin module, is configured to identify the eyeball image in eyeball image and eyeball position, using facial image, eyeball image, eyeball position, eyeball image and eyeball position as this eyeball information.
Optionally, this image collection module, comprising:
Face inquiry submodule, is configured to inquiry and this facial image in eyeball information from pre-set image storehouse and belongs to the facial image of same face;
Eyeball inquiry submodule, is configured to go out the highest replacement eyeball image of similarity according to the eyeball image in eyeball information, eyeball position, eyeball image and eyeball position enquiring from the facial image inquired.
Optionally, this device also comprises:
Normal photo acquisition module, is configured to obtain at least one Zhang Zhengchang photo;
Image library generation module, be configured to generate pre-set image storehouse according at least one Zhang Zhengchang photo, this pre-set image storehouse comprises at least one and replaces eyeball image, and each replacement eyeball image is corresponding with one group of eyeball information.
According to the third aspect of disclosure embodiment, provide a kind of picture processing device, this device comprises:
Processor;
For storing the storer of the executable instruction of this processor;
Wherein, this processor is configured to:
Identify the eyeball information in blood-shot eye illness photo;
Obtain from pre-set image storehouse according to eyeball information and replace eyeball image, this replacement eyeball image comprises the eyeball image of normal eyeball;
According to eyeball information, the blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced this replacement eyeball image, obtain the photo after processing.
The technical scheme that disclosure embodiment provides can comprise following beneficial effect:
By according to blood-shot eye illness photo in eyeball information, blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced to the eyeball image of normal eyeball in pre-set image storehouse, make eyeball color nature in the photo after processing, solve after blood-shot eye illness photo is processed, the problem of the image quality difference of photo, reaches the effect of the image quality improving photo.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing to be herein merged in instructions and to form the part of this instructions, shows and meets embodiment of the present disclosure, and is used from instructions one and explains principle of the present disclosure.
Fig. 1 is the process flow diagram of a kind of photo processing method according to an exemplary embodiment;
Fig. 2 is the process flow diagram of a kind of photo processing method according to another exemplary embodiment;
Fig. 3 A is the process flow diagram of a kind of photo processing method according to another exemplary embodiment;
Fig. 3 B is the schematic diagram of a kind of facial image according to an exemplary embodiment;
Fig. 3 C is the schematic diagram of a kind of eyeball image according to an exemplary embodiment;
Fig. 3 D is the facial image schematic diagram after a kind of according to an exemplary embodiment replaces eyeball image;
Fig. 4 is the block diagram of a kind of picture processing device according to an exemplary embodiment;
Fig. 5 is the block diagram of a kind of picture processing device according to another exemplary embodiment;
Fig. 6 is the block diagram of a kind of device for the treatment of photo according to an exemplary embodiment.
Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the disclosure.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present disclosure are consistent.
Fig. 1 is the process flow diagram of a kind of photo processing method according to an exemplary embodiment, and as shown in Figure 1, this photo processing method can comprise following several step:
In a step 101, the eyeball information in blood-shot eye illness photo is identified.
In a step 102, obtain from pre-set image storehouse according to eyeball information and replace eyeball image, this replacement eyeball image comprises the eyeball image of normal eyeball.
In step 103, according to eyeball information, the blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced eyeball image, obtain the photo after processing.
The photo processing method that disclosure embodiment provides, by according to blood-shot eye illness photo in eyeball information, blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced to the eyeball image of normal eyeball in pre-set image storehouse, make eyeball color nature in the photo after processing, solve after blood-shot eye illness photo is processed, the problem of the image quality difference of photo, reaches the effect of the image quality improving photo.
Usually, when taking pictures, the eyeball size of reference object can change with outside environmental elements or reference object individual factor, causes the size of the eyeball of reference object in the photo shot, position differs.Wherein, outside environmental elements can be flash of light, sleet etc., and reference object individual factor can be laugh, sobbing etc.In order to make the image of eyeball in the photo after processing press close to real shooting effect, the step 102 in Fig. 1 can be replaced with step 102a, as shown in Figure 2.
Fig. 2 is the process flow diagram of a kind of photo processing method according to an exemplary embodiment, and in such as Fig. 2, step 102a is described below:
In step 102a, from pre-set image storehouse, obtain the replacement eyeball image the highest with the eyeball similarity in blood-shot eye illness photo according to eyeball information.
Eyeball information comprises eyeball image and the eyeball position of reference object in blood-shot eye illness photo.
Pre-set image storehouse comprises at least one and replaces eyeball image, and each replacement eyeball image is corresponding with one group of eyeball information.Wherein, replacing the normal eyeball image that eyeball image is reference object, can be acquire from the normal photo of the reference object taken in advance.
In order to the blood-shot eye illness photo of different eyeball information can be processed, smart machine can take the normal photo that multiple have the reference object of different eyeball information in advance, from these normal photos, obtain the replacement eyeball image with different eyeball information again, finally the replacement eyeball image of acquisition is stored in pre-set image storehouse.
Therefore, smart machine is after the eyeball information obtaining reference object in blood-shot eye illness photo, the eyeball information of the replacement eyeball image of this reference object stored in this eyeball information and pre-set image storehouse can being compared, replacement eyeball image the highest for eyeball information similarity being defined as the eyeball image for replacing eyeball image in this blood-shot eye illness photo obtained.
Fig. 3 A is the process flow diagram of a kind of photo processing method according to an exemplary embodiment, and as shown in Figure 3A, this photo processing method can comprise following several step:
In step 301, at least one Zhang Zhengchang photo is obtained.
Usually, when light parameter is lower than certain numerical value, user uses taking photos by using flashlights just likely to shoot blood-shot eye illness photo, and therefore, according to light parameter, smart machine can determine whether the photo shot is normal photo.
When user uses smart machine to take pictures, smart machine can obtain light parameter when taking pictures, and whether the light parameter detecting acquisition reaches parameter preset threshold value.If detect, the light parameter of acquisition reaches parameter preset threshold value, then the photo shot is defined as normal photo by smart machine.
If detect, the light parameter of acquisition does not reach parameter preset threshold value, then smart machine can also continue to detect whether the photo shot is blood-shot eye illness photo by image processing techniques, when detecting that photo not seen red by the photo shot, this photo is defined as normal photo.
It should be noted that, smart machine can obtain the normal photo of at least one reference object.
In step 302, generate pre-set image storehouse according at least one Zhang Zhengchang photo, this pre-set image storehouse comprises at least one and replaces eyeball image, and each replacement eyeball image is corresponding with one group of eyeball information.
Smart machine, after at least one Zhang Zhengchang photo of acquisition, can identify the eyeball information of the reference object often opened in normal photo.
Wherein, smart machine can be as follows to the recognition methods of often opening normal photo:
(1) facial image of reference object in normal photo is identified.
Smart machine obtains the facial image identifying reference object in normal photo by face recognition technology.
(2) eyeball image and the eyeball position of reference object in normal photo is identified.
Smart machine, after identifying the facial image of reference object, can obtain eyeball image from this facial image.
Usually there are two eyeballs in left and right in the facial image of reference object, therefore, smart machine also needs the position identified residing for eyeball image to be left eye ball position or the right eye ball position of reference object.
It should be noted that, in the multiple pictures that user takes same reference object, the closed degree of the eyes of reference object may be different, cause the eyeball size of reference object in different photo also can there are differences.
In order to obtain the details of the eyeball image of reference object, smart machine can also identify the eyeball size of reference object in normal photo.
(3) the eyeball image in eyeball image and eyeball position is identified.
Smart machine, after identifying the eyeball image of reference object, can obtain eyeball image from this eyeball image.
For same reference object, due to the impact of the factors such as the focus of reference object sight line, the closed degree of eyes and extraneous light, the position of the eyeball image that smart machine obtains from the normal photo of difference in eyeball image and size all likely there are differences.
In order to obtain the details of the eyeball image of reference object, smart machine can identify the size of eyeball image and the eyeball image distance relative to the coboundary of eyeball image, lower boundary, left margin and right margin from eyeball image.
For often opening normal photo, smart machine is after the eyeball information obtaining reference object in normal photo, after the eyeball image of the reference object identified can being defined as replacing eyeball image, using the facial image of this replacement eyeball image and this reference object, eyeball image and eyeball position, eyeball position as one group of eyeball information corresponding stored in pre-set image storehouse.
It should be noted is that, for same reference object, in the normal photo of this reference object of smart machine shooting, the normal photo that eyeball information is identical may be there is.
In order to avoid repeated storage, smart machine can after identifying the eyeball information of the reference object in normal photo, whether detect this eyeball information is present in each group of information of the storage in pre-set image storehouse, if detect, this eyeball information is present in each group of information of the storage in pre-set image storehouse, then do not store this eyeball information; If detect, this eyeball information is not present in each group of information of the storage in pre-set image storehouse, after then the eyeball image of the reference object identified being defined as replacing eyeball image, using the facial image of this replacement eyeball image and this reference object, eyeball image and eyeball position, eyeball position as one group of eyeball information corresponding stored in pre-set image storehouse.
In step 303, the facial image of reference object in blood-shot eye illness photo is identified.
Smart machine identifies the photo of shooting for after blood-shot eye illness photo, can identify the facial image of reference object in blood-shot eye illness photo.
Wherein, in smart machine identification blood-shot eye illness photo, the method for the facial image of reference object, can be the method for the facial image of reference object in the normal photo of identification shown in step 302, not repeat herein.
In step 304, the eyeball image in facial image and eyeball position is identified.
Except identifying the eyeball image in facial image, smart machine can also identify the eyeball position of the eyeball image of blood-shot eye illness.Such as, see red in photo and occur that the eyeball image of seeing red is positioned at the right eye of reference object.
Wherein, the eyeball image in smart machine identification facial image and the method for eyeball position, can be the eyeball image of reference object and the method for eyeball position in the normal photo of identification shown in step 302, not repeat herein.
In step 305, the eyeball image in eyeball image and eyeball position is identified, using facial image, eyeball image, eyeball position, eyeball image and eyeball position as eyeball information.
Eyeball image in smart machine identification eyeball image and the method for eyeball position, can be the method for eyeball image in the identification eyeball image shown in step 302 and eyeball position, not repeat equally herein.
Wherein, facial image, eyeball image, eyeball position, eyeball image and eyeball position, after the eyeball information obtaining reference object in blood-shot eye illness photo, are defined as eyeball information by smart machine.
Within step 306, from pre-set image storehouse, inquiry and the facial image in eyeball information belong to the facial image of same face.
Smart machine can identify reference object according to facial image.The facial image of each reference object is stored in pre-set image storehouse, therefore, smart machine can inquire about the facial image that whether there is reference object in blood-shot eye illness photo from pre-set image storehouse, there is the facial image of reference object in blood-shot eye illness photo if inquire, then from pre-set image storehouse, obtain this facial image and the eyeball information corresponding with this facial image.
It should be noted that, at least one group of eyeball information of reference object is might have stored in pre-set image storehouse, therefore, it can be multiple that smart machine inquires the facial image belonging to same face with the facial image in eyeball information, corresponding, the eyeball information that smart machine gets also can be multiple.
In step 307, from the facial image inquired, the highest replacement eyeball image of similarity is gone out according to the eyeball image in eyeball information, eyeball position, eyeball image and eyeball position enquiring.
Smart machine is from pre-set image library inquiry to after belonging to multiple facial images of same face with the facial image eyeball information, calculate the eyeball information of each facial image inquired and the similarity of the eyeball information of reference object in blood-shot eye illness photo, wherein, the calculation procedure of similarity can be as follows:
The first step, according to pre-set image library inquiry to eyeball information and the eyeball information of reference object in blood-shot eye illness photo, from pre-set image storehouse, obtain the eyeball image identical with the eyeball position of seeing red.
For each facial image inquired, the eyeball information that smart machine is corresponding according to this facial image determines the eyeball image that this facial image is identical with the eyeball position occurring in the facial image of blood-shot eye illness photo seeing red.
It should be noted that, smart machine is after the eyeball image that the eyeball position determined with occur in the facial image of blood-shot eye illness photo seeing red is identical, can also identify whether the size of each eyeball image determined conforms to the size of blood-shot eye illness eyeball, if the size identifying eyeball image conforms to the size of blood-shot eye illness eyeball, then this eyeball image is used to carry out the step of second step; If the size identifying eyeball image is not inconsistent with the size of blood-shot eye illness eyeball, then do not process this eyeball image.
Second step, for each eyeball image identical with the eyeball position of blood-shot eye illness in pre-set image storehouse, read replacement eyeball image corresponding to this eyeball image and eyeball position, replace the similarity between eyeball image and blood-shot eye illness eyeball image according to replacement eyeball image and eyeball position calculation.
Due in different eyeball images, eyeball image and the relative position of eyeball image in eyeball image are all likely different, therefore smart machine can calculate the image similarity between replacement eyeball image and blood-shot eye illness eyeball image and location similarity that in pre-set image, eyeball image is corresponding respectively, then determines to replace the similarity between eyeball image and blood-shot eye illness eyeball image according to image similarity and location similarity.
In a kind of possible implementation, smart machine calculates by the following method replaces eyeball image and the image similarity of seeing red eyeball image:
(1) smart machine extracts this replacement eyeball image and the proper vector of seeing red eyeball image respectively;
(2) calculate this replacement eyeball image and the similarity of seeing red eyeball image according to proper vector, wherein this proper vector can be at least one in the characteristics of image such as color, shape, brightness.
Such as, the image similarity that smart machine calculates according to the color of this replacement eyeball image and blood-shot eye illness eyeball image, shapometer is 0.9.
In a kind of possible implementation, smart machine calculates the location similarity between the eyeball position corresponding with blood-shot eye illness eyeball image, eyeball position corresponding to this replacement eyeball image by the following method:
(1) smart machine obtains the distance of this replacement eyeball image relative to the coboundary of eyeball image, lower boundary, left margin and right margin respectively according to eyeball position, and blood-shot eye illness eyeball image is relative to the distance of eyeball image coboundary, lower boundary, left margin and right margin.
Such as, the replacement eyeball image A that smart machine obtains from pre-set image storehouse is 0.2mm relative to the coboundary of eyeball image a, be 0.5mm relative to the lower boundary of eyeball image a, being 2.5mm relative to the left margin of eyeball image a, is 1.5mm relative to the right margin of eyeball image a; The blood-shot eye illness eyeball image E obtained is 0.2mm relative to the coboundary of eyeball image e, and being 0.1mm relative to the lower boundary of eyeball image e, is 1.5mm relative to the left margin of eyeball image e, is 2.5mm relative to the right margin of eyeball image e.
(2) for the border of identical eyeball position, according to this replacement eyeball image and the distance calculating error values of blood-shot eye illness eyeball image relative to this border.
Such as, according to the above data that smart machine obtains, calculating this replacement eyeball image with blood-shot eye illness eyeball image relative to the error amount of the distance of coboundary is | 0.2-0.2|=0, this eyeball image with blood-shot eye illness eyeball image relative to the error amount of the distance of lower boundary is | 0.5-0.1|=0.4, this eyeball image with blood-shot eye illness eyeball image relative to the error amount of the distance of left margin is | 2.5-1.5|=1, and this eyeball image with blood-shot eye illness eyeball image relative to the error amount of the distance of lower boundary is | 1.5-2.5|=1.
(3) according to this replacement eyeball image calculated and the error amount of blood-shot eye illness eyeball image relative to the distance on each border, the location similarity between the eyeball position corresponding with blood-shot eye illness eyeball image, eyeball position corresponding to this replacement eyeball image is calculated.
At this replacement eyeball image calculated and blood-shot eye illness eyeball image after the error amount relative to the distance on each border, smart machine is added after each error amount can being multiplied by default weight, by obtain and location similarity that value is defined as between the eyeball position corresponding with blood-shot eye illness eyeball image, eyeball position corresponding to this replacement eyeball image.
Such as, the default weight that the error amount of the distance of coboundary is corresponding is 1, the default weight that the error amount of the distance of lower boundary is corresponding is 1, the default weight that the error amount of the distance of left margin is corresponding is 0.1, the default weight that the error amount of the distance of right margin is corresponding is 0.1, then calculating the location similarity replaced between the eyeball position corresponding with blood-shot eye illness eyeball image, eyeball position corresponding to eyeball image is 0 × 1+0.4 × 1+1 × 0.1+1 × 0.1=0.6.
After acquisition image similarity and location similarity, image similarity and location similarity can be multiplied by corresponding default similarity threshold by smart machine respectively, thus determine to replace the similarity between eyeball image and blood-shot eye illness eyeball image.
Such as, the default similarity threshold of image similarity is 0.4, and the default similarity threshold of location similarity is 0.6, then the similarity between the replacement eyeball image calculated and blood-shot eye illness eyeball image is 0.9 × 0.4+0.6 × 0.6=0.72.
It should be noted that, smart machine also can use additive method to calculate the similarity of replacing eyeball image and seeing red between eyeball image, and disclosure embodiment does not restrict the computing method of the similarity of replacing between eyeball image and blood-shot eye illness eyeball image.
After determining each similarity of replacing between eyeball image and blood-shot eye illness eyeball image, replacement eyeball image the highest for similarity can be defined as the image for replacing blood-shot eye illness eyeball image by smart machine.
For convenience of explanation, that carries out the photo processing method that disclosure embodiment provides with legend is described as follows:
As shown in Figure 3 B, in figure 3b, E is the facial image of blood-shot eye illness photo, and it is A, B, C, D that smart machine inquires the facial image belonging to same face with the facial image in eyeball information from pre-set image storehouse.Smart machine determines that the blood-shot eye illness eyeball position in the facial image E of blood-shot eye illness photo is left eye ball position, then obtain the blood-shot eye illness eyeball image e of facial image E, the eyeball image a of left eye ball position in facial image A, the eyeball image b of left eye ball position in facial image B, the eyeball image c of left eye ball position in facial image C, the eyeball image d of left eye ball position in facial image D, as Fig. 3 C.
After smart machine obtains eyeball image identical with the eyeball position of blood-shot eye illness photo in facial image, read blood-shot eye illness eyeball image ee corresponding to blood-shot eye illness eyeball image e and eyeball position respectively, the replacement eyeball image aa that eyeball image a is corresponding and eyeball position, the replacement eyeball image bb that eyeball image b is corresponding and eyeball position, the replacement eyeball image cc that eyeball image c is corresponding and eyeball position, the replacement eyeball image dd that eyeball image d is corresponding and eyeball position, obtaining each similarity of replacing eyeball image and blood-shot eye illness eyeball image ee according to eyeball image and eyeball position calculation is again " replacing eyeball image aa:0.3 ", " replace eyeball image bb:0.8 ", " replace eyeball image cc:0.5 ", " replace eyeball image dd:0.9 ".
Smart machine detects that the similarity of replacing eyeball image dd and blood-shot eye illness eyeball image ee is the highest, be then defined as replacing eyeball image dd for replacing the image of seeing red eyeball image ee.
In step 308, according to eyeball information, the blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced eyeball image, obtain the photo after processing.
After inquiring the highest replacement eyeball image of similarity, blood-shot eye illness eyeball image in blood-shot eye illness photo replaces with and replaces eyeball image by smart machine, as the image of gained after Fig. 3 D, Fig. 3 D to be smart machine by the blood-shot eye illness eyeball image ee in facial image E in blood-shot eye illness photo replace with replacement eyeball image dd determined in Fig. 3 C.
Wherein, replacement eyeball image can be covered on the blood-shot eye illness eyeball image in blood-shot eye illness photo by smart machine, or, after the blood-shot eye illness eyeball image in blood-shot eye illness photo is eliminated, replacement eyeball image completion is entered to see red the position at eyeball place, then the photo after process is preserved.
The photo processing method that disclosure embodiment provides, by according to blood-shot eye illness photo in eyeball information, blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced to the eyeball image of normal eyeball in pre-set image storehouse, make eyeball color nature in the photo after processing, solve after blood-shot eye illness photo is processed, the problem of the image quality difference of photo, reaches the effect of the image quality improving photo.
Following is disclosure device embodiment, may be used for performing disclosure embodiment of the method.For the details do not disclosed in disclosure device embodiment, please refer to disclosure embodiment of the method.
Fig. 4 is the block diagram of a kind of picture processing device according to an exemplary embodiment, and as shown in Figure 4, this picture processing device can comprise: information identification module 401, image collection module 402, image replacement module 403.
Information identification module 401, is configured to identify the eyeball information in blood-shot eye illness photo;
Image collection module 402, be configured to obtain from pre-set image storehouse according to this eyeball information replace eyeball image, this replacement eyeball image is the eyeball image comprising normal eyeball;
Image replacement module 403, is configured to, according to this eyeball information, the blood-shot eye illness eyeball image in this blood-shot eye illness photo is replaced this replacement eyeball image, obtains the photo after processing.
The picture processing device that disclosure embodiment provides, by according to blood-shot eye illness photo in eyeball information, blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced to the eyeball image of normal eyeball in pre-set image storehouse, make eyeball color nature in the photo after processing, solve after blood-shot eye illness photo is processed, the problem of the image quality difference of photo, reaches the effect of the image quality improving photo.
Fig. 5 is the block diagram of a kind of picture processing device according to another exemplary embodiment, and as shown in Figure 5, this picture processing device can comprise: information identification module 501, image collection module 502, image replacement module 503.
Information identification module 501, is configured to identify the eyeball information in blood-shot eye illness photo;
Image collection module 502, be configured to obtain from pre-set image storehouse according to this eyeball information replace eyeball image, this replacement eyeball image is the eyeball image comprising normal eyeball;
Image replacement module 503, is configured to, according to this eyeball information, the blood-shot eye illness eyeball image in this blood-shot eye illness photo is replaced this replacement eyeball image, obtains the photo after processing.
Optionally, this image collection module 502, is also configured to from this pre-set image storehouse, obtain the replacement eyeball image the highest with the eyeball similarity in this blood-shot eye illness photo according to this eyeball information.
Optionally, this information identification module 501, comprising: recognition of face submodule 501a, eyeball recognin module 501b, eyeball recognin module 501c.
Recognition of face submodule 501a, is configured to the facial image identifying reference object in this blood-shot eye illness photo;
Eyeball recognin module 501b, is configured to identify the eyeball image in this facial image and eyeball position;
Eyeball recognin module 501c, is configured to identify the eyeball image in this eyeball image and eyeball position, using this facial image, this eyeball image, this eyeball position, this eyeball image and this eyeball position as this eyeball information.
Optionally, this image collection module 502, comprising: face inquiry submodule 502a, eyeball inquiry submodule 502b.
Face inquiry submodule 502a, is configured to inquiry and this facial image in this eyeball information from this pre-set image storehouse and belongs to the facial image of same face;
Eyeball inquiry submodule 502b, is configured to go out this highest replacement eyeball image of similarity according to this eyeball image in this eyeball information, this eyeball position, this eyeball image and this eyeball position enquiring from this facial image inquired.
Optionally, this device also comprises: normal photo acquisition module 504, image library generation module 505.
Normal photo acquisition module 504, is configured to obtain at least one Zhang Zhengchang photo;
Image library generation module 505, is configured to generate this pre-set image storehouse according at least one this normal photo, and this pre-set image storehouse comprises at least one and replaces eyeball image, and each replacement eyeball image is corresponding with one group of eyeball information.
The picture processing device that disclosure embodiment provides, by according to blood-shot eye illness photo in eyeball information, blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced to the eyeball image of normal eyeball in pre-set image storehouse, make eyeball color nature in the photo after processing, solve after blood-shot eye illness photo is processed, the problem of the image quality difference of photo, reaches the effect of the image quality improving photo.
About the device in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
The disclosure one exemplary embodiment provides a kind of picture processing device, can realize the photo processing method that the disclosure provides, and this picture processing device comprises: processor, storer for storage of processor executable instruction;
Wherein, processor is configured to:
Identify the eyeball information in blood-shot eye illness photo;
Obtain from pre-set image storehouse according to eyeball information and replace eyeball image, this replacement eyeball image is the eyeball image comprising normal eyeball;
According to eyeball information, the blood-shot eye illness eyeball image in blood-shot eye illness photo is replaced eyeball image, obtain the photo after processing.
Fig. 6 is the block diagram of a kind of device for the treatment of photo according to an exemplary embodiment.Such as, device 600 can be mobile phone, computing machine, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc.
With reference to Fig. 6, device 600 can comprise following one or more assembly: processing components 602, storer 604, power supply module 606, multimedia groupware 608, audio-frequency assembly 610, I/O (I/O) interface 612, sensor module 614, and communications component 616.
The integrated operation of the usual control device 600 of processing components 602, such as with display, call, data communication, camera operation and record operate the operation be associated.Processing components 602 can comprise one or more processor 618 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 602 can comprise one or more module, and what be convenient between processing components 602 and other assemblies is mutual.Such as, processing components 602 can comprise multi-media module, mutual with what facilitate between multimedia groupware 608 and processing components 602.
Storer 604 is configured to store various types of data to be supported in the operation of device 600.The example of these data comprises for any application program of operation on device 600 or the instruction of method, contact data, telephone book data, message, picture, video etc.Storer 604 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), ROM (read-only memory) (ROM), magnetic store, flash memory, disk or CD.
The various assemblies that power supply module 606 is device 600 provide electric power.Power supply module 606 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for device 600 and be associated.
Multimedia groupware 608 is included in the screen providing an output interface between device 600 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant with touch or slide and pressure.In certain embodiments, multimedia groupware 608 comprises a front-facing camera and/or post-positioned pick-up head.When device 600 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 610 is configured to export and/or input audio signal.Such as, audio-frequency assembly 610 comprises a microphone (MIC), and when device 600 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The sound signal received can be stored in storer 604 further or be sent via communications component 616.In certain embodiments, audio-frequency assembly 610 also comprises a loudspeaker, for output audio signal.
Input/output interface 612 is for providing interface between processing components 602 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor module 614 comprises one or more sensor, for providing the state estimation of various aspects for device 600.Such as, sensor module 614 can detect the opening/closing state of device 600, the relative positioning of assembly, such as assembly is display and the keypad of device 600, the position of all right pick-up unit 600 of sensor module 614 or device 600 1 assemblies changes, the presence or absence that user contacts with device 600, the temperature variation of device 600 orientation or acceleration/deceleration and device 600.Sensor module 614 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor module 614 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor module 614 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 616 is configured to the communication being convenient to wired or wireless mode between device 600 and other equipment.Device 600 can access the wireless network based on communication standard, as Wi-Fi, 2G or 3G, or their combination.In one exemplary embodiment, communications component 616 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, communications component 616 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 600 can be realized, for performing above-mentioned photo processing method by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD) (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 604 of instruction, above-mentioned instruction can perform above-mentioned photo processing method by the processor 618 of device 600.Such as, non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.
Those skilled in the art, at consideration instructions and after putting into practice invention disclosed herein, will easily expect other embodiment of the present disclosure.The application is intended to contain any modification of the present disclosure, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present disclosure and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Instructions and embodiment are only regarded as exemplary, and true scope of the present disclosure and spirit are pointed out by claim below.
Should be understood that, the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.The scope of the present disclosure is only limited by appended claim.

Claims (11)

1. a photo processing method, is characterized in that, described method comprises:
Identify the eyeball information in blood-shot eye illness photo;
Obtain from pre-set image storehouse according to described eyeball information and replace eyeball image, described replacement eyeball image comprises the eyeball image of normal eyeball;
According to described eyeball information, the blood-shot eye illness eyeball image in described blood-shot eye illness photo is replaced described replacement eyeball image, obtain the photo after processing.
2. method according to claim 1, is characterized in that, described acquisition from pre-set image storehouse according to described eyeball information replaces eyeball image, comprising:
From described pre-set image storehouse, the replacement eyeball image the highest with the eyeball similarity in described blood-shot eye illness photo is obtained according to described eyeball information.
3. method according to claim 2, is characterized in that, the described eyeball information identified in blood-shot eye illness photo, comprising:
Identify the facial image of reference object in described blood-shot eye illness photo;
Identify the eyeball image in described facial image and eyeball position;
Identify the eyeball image in described eyeball image and eyeball position, using described facial image, described eyeball image, described eyeball position, described eyeball image and described eyeball position as described eyeball information.
4. method according to claim 3, is characterized in that, describedly obtains from described pre-set image storehouse and the highest replacement eyeball image of eyeball similarity in described blood-shot eye illness photo according to described eyeball information, comprising:
From described pre-set image storehouse, inquiry and the described facial image in described eyeball information belong to the facial image of same face;
The highest described replacement eyeball image of similarity is gone out according to the described eyeball image in described eyeball information, described eyeball position, described eyeball image and described eyeball position enquiring from the described facial image inquired.
5., according to the arbitrary described method of Claims 1-4, it is characterized in that, described method also comprises:
Obtain at least one Zhang Zhengchang photo;
Generate described pre-set image storehouse according to the normal photo of at least one Zhang Suoshu, described pre-set image storehouse comprises at least one and replaces eyeball image, and each replacement eyeball image is corresponding with one group of eyeball information.
6. a picture processing device, is characterized in that, described device comprises:
Information identification module, is configured to identify the eyeball information in blood-shot eye illness photo;
Image collection module, be configured to obtain from pre-set image storehouse according to described eyeball information replace eyeball image, described replacement eyeball image comprises the eyeball image of normal eyeball;
Image replacement module, is configured to, according to described eyeball information, the blood-shot eye illness eyeball image in described blood-shot eye illness photo is replaced described replacement eyeball image, obtains the photo after processing.
7. device according to claim 6, is characterized in that, described image collection module, is also configured to from described pre-set image storehouse, obtain the replacement eyeball image the highest with the eyeball similarity in described blood-shot eye illness photo according to described eyeball information.
8. device according to claim 7, is characterized in that, described information identification module, comprising:
Recognition of face submodule, is configured to the facial image identifying reference object in described blood-shot eye illness photo;
Eyeball recognin module, is configured to identify the eyeball image in described facial image and eyeball position;
Eyeball recognin module, is configured to identify the eyeball image in described eyeball image and eyeball position, using described facial image, described eyeball image, described eyeball position, described eyeball image and described eyeball position as described eyeball information.
9. device according to claim 8, is characterized in that, described image collection module, comprising:
Face inquiry submodule, is configured to inquiry and the described facial image in described eyeball information from described pre-set image storehouse and belongs to the facial image of same face;
Eyeball inquiry submodule, is configured to go out the highest described replacement eyeball image of similarity according to the described eyeball image in described eyeball information, described eyeball position, described eyeball image and described eyeball position enquiring from the described facial image inquired.
10., according to the arbitrary described device of claim 6 to 9, it is characterized in that, described device also comprises:
Normal photo acquisition module, is configured to obtain at least one Zhang Zhengchang photo;
Image library generation module, is configured to generate described pre-set image storehouse according to the normal photo of at least one Zhang Suoshu, and described pre-set image storehouse comprises at least one and replaces eyeball image, and each replacement eyeball image is corresponding with one group of eyeball information.
11. 1 kinds of picture processing devices, is characterized in that, comprising:
Processor;
For storing the storer of the executable instruction of described processor;
Wherein, described processor is configured to:
Identify the eyeball information in blood-shot eye illness photo;
Obtain from pre-set image storehouse according to described eyeball information and replace eyeball image, described replacement eyeball image comprises the eyeball image of normal eyeball;
According to described eyeball information, the blood-shot eye illness eyeball image in described blood-shot eye illness photo is replaced described replacement eyeball image, obtain the photo after processing.
CN201510146435.1A 2015-03-31 2015-03-31 Photo processing method and device Active CN104867112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510146435.1A CN104867112B (en) 2015-03-31 2015-03-31 Photo processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510146435.1A CN104867112B (en) 2015-03-31 2015-03-31 Photo processing method and device

Publications (2)

Publication Number Publication Date
CN104867112A true CN104867112A (en) 2015-08-26
CN104867112B CN104867112B (en) 2018-02-06

Family

ID=53912929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510146435.1A Active CN104867112B (en) 2015-03-31 2015-03-31 Photo processing method and device

Country Status (1)

Country Link
CN (1) CN104867112B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516588A (en) * 2015-12-07 2016-04-20 小米科技有限责任公司 Photographic processing method and device
CN105827943A (en) * 2015-10-19 2016-08-03 维沃移动通信有限公司 Human eye-based self-shooting method and electronic device
CN106412450A (en) * 2016-05-26 2017-02-15 北京小米移动软件有限公司 Image processing method and apparatus of red-eye reduction
CN108234878A (en) * 2018-01-31 2018-06-29 广东欧珀移动通信有限公司 Image processing method, device and terminal
WO2019037471A1 (en) * 2017-08-24 2019-02-28 中兴通讯股份有限公司 Video processing method, video processing device and terminal
WO2019174544A1 (en) * 2018-03-14 2019-09-19 Oppo广东移动通信有限公司 Image synthesis method and apparatus, and computer storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101213828A (en) * 2005-04-28 2008-07-02 惠普开发有限公司 Method and apparatus for incorporating iris color in red-eye correction
US20090324103A1 (en) * 2008-06-27 2009-12-31 Natasha Gelfand Method, apparatus and computer program product for providing image modification
CN102655565A (en) * 2011-03-02 2012-09-05 鸿富锦精密工业(深圳)有限公司 Anti-red-eye portrait shooting system and method
US20130308857A1 (en) * 2010-06-28 2013-11-21 Nokia Corporation Method, apparatus and computer program product for compensating eye color defects

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101213828A (en) * 2005-04-28 2008-07-02 惠普开发有限公司 Method and apparatus for incorporating iris color in red-eye correction
US20090324103A1 (en) * 2008-06-27 2009-12-31 Natasha Gelfand Method, apparatus and computer program product for providing image modification
US20130308857A1 (en) * 2010-06-28 2013-11-21 Nokia Corporation Method, apparatus and computer program product for compensating eye color defects
CN102655565A (en) * 2011-03-02 2012-09-05 鸿富锦精密工业(深圳)有限公司 Anti-red-eye portrait shooting system and method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105827943A (en) * 2015-10-19 2016-08-03 维沃移动通信有限公司 Human eye-based self-shooting method and electronic device
CN105827943B (en) * 2015-10-19 2019-01-22 维沃移动通信有限公司 A kind of self-timer method and electronic equipment of human eye
CN105516588A (en) * 2015-12-07 2016-04-20 小米科技有限责任公司 Photographic processing method and device
CN106412450A (en) * 2016-05-26 2017-02-15 北京小米移动软件有限公司 Image processing method and apparatus of red-eye reduction
WO2019037471A1 (en) * 2017-08-24 2019-02-28 中兴通讯股份有限公司 Video processing method, video processing device and terminal
CN109429098A (en) * 2017-08-24 2019-03-05 中兴通讯股份有限公司 Method for processing video frequency, device and terminal
CN108234878A (en) * 2018-01-31 2018-06-29 广东欧珀移动通信有限公司 Image processing method, device and terminal
WO2019174544A1 (en) * 2018-03-14 2019-09-19 Oppo广东移动通信有限公司 Image synthesis method and apparatus, and computer storage medium and electronic device

Also Published As

Publication number Publication date
CN104867112B (en) 2018-02-06

Similar Documents

Publication Publication Date Title
CN106651955B (en) Method and device for positioning target object in picture
CN108764069B (en) Living body detection method and device
CN104156149B (en) Acquisition parameters control method and device
WO2021051857A1 (en) Target object matching method and apparatus, electronic device and storage medium
CN104867112A (en) Photo processing method and apparatus
CN105183156A (en) Screen control method and apparatus
CN105205479A (en) Human face value evaluation method, device and terminal device
CN105809704A (en) Method and device for identifying image definition
CN105488527A (en) Image classification method and apparatus
CN105469056A (en) Face image processing method and device
CN104519282A (en) Image shooting method and device
CN104035558A (en) Terminal device control method and device
CN104408402A (en) Face identification method and apparatus
CN107463903B (en) Face key point positioning method and device
CN104933419A (en) Method and device for obtaining iris images and iris identification equipment
CN104460185A (en) Automatic focusing method and device
CN104699250A (en) Display control method, display control device and electronic equipment
CN105357425A (en) Image shooting method and image shooting device
CN105554389A (en) Photographing method and photographing apparatus
CN105069083A (en) Determination method and device of associated user
CN105279499A (en) Age recognition method and device
CN104580886A (en) Photographing control method and device
CN105069426A (en) Similar picture determining method and apparatus
CN105354560A (en) Fingerprint identification method and device
CN104077585A (en) Image correction method and device and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant