CN104867112B - Photo processing method and device - Google Patents

Photo processing method and device Download PDF

Info

Publication number
CN104867112B
CN104867112B CN201510146435.1A CN201510146435A CN104867112B CN 104867112 B CN104867112 B CN 104867112B CN 201510146435 A CN201510146435 A CN 201510146435A CN 104867112 B CN104867112 B CN 104867112B
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.)
Active
Application number
CN201510146435.1A
Other languages
Chinese (zh)
Other versions
CN104867112A (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.)
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

Landscapes

  • Image Processing (AREA)

Abstract

The disclosure is directed to a kind of photo processing method and device, belong to image processing field.Methods described includes:Eyeball information in identification blood-shot eye illness photo;Obtained according to the eyeball information from pre-set image storehouse and replace eyeball image, the replacement eyeball image is the eyeball image for including normal eyeball;Blood-shot eye illness eyeball image in the blood-shot eye illness photo is replaced by the replacement eyeball image, the photo after being handled according to the eyeball information.The photo processing method that the disclosure provides, pass through the eyeball information in blood-shot eye illness photo, the blood-shot eye illness eyeball image seen red in photo is substituted for the eyeball image of normal eyeball in pre-set image storehouse, so that eyeball color is natural in photo after processing, solve after handling blood-shot eye illness photo, the problem of image quality difference of photo, the effect for the image quality for improving photo is reached.

Description

Photo processing method and device
Technical field
This disclosure relates to image processing field, more particularly to 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, user uses taking photos by using flashlights When, the light of flash lamp can pass through the reflection of the retina of reference object and enter in the camera lens of camera, due to being filled in retina Full red blood vessel, the eyes for causing to shoot reference object in obtained photo take on a red color.
When user shoots the photo in the presence of blood-shot eye illness, the photo such as elegant is schemed usually using PS (Photoshop) or U.S. Software for editing, it is normal eyeball color by the blood-shot eye illness processing in photo.But the eyeball color that this mode is handled out is inadequate Naturally, influence the image quality of photo.
The content of the invention
In order to solve the problems, such as in correlation technique, the embodiment of the present disclosure provides a kind of photo processing method and device, institute It is as follows to state technical scheme:
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of photo processing method, this method include:
Eyeball information in identification blood-shot eye illness photo;
Obtained according to eyeball information from pre-set image storehouse and replace eyeball image, the replacement eyeball image includes normal eyeball Eyeball image;
The blood-shot eye illness eyeball image seen red in photo is replaced by the replacement eyeball image according to eyeball information, after being handled Photo.
Optionally, obtained according to the eyeball information from pre-set image storehouse and replace eyeball image, including:
Obtained according to eyeball information from pre-set image storehouse and replace eye with the eyeball similarity highest in the blood-shot eye illness photo Pearl image.
Optionally, the eyeball information in identification blood-shot eye illness photo, including:
The facial image of reference object in identification blood-shot eye illness photo;
Identify the eyeball image and eyeball position in facial image;
The eyeball image in eyeball image and eyeball position are identified, by facial image, eyeball image, eyeball position, eyeball Image and eyeball position are as the eyeball information.
Optionally, this is obtained and the eyeball similarity in the blood-shot eye illness photo according to the eyeball information from the pre-set image storehouse Highest replaces eyeball image, including:
Inquiry belongs to the facial image of same face with the facial image in eyeball information from pre-set image storehouse;
Eyeball image, eyeball position, eyeball image and eyeball from the facial image inquired in eyeball information Position enquiring goes out similarity highest and replaces eyeball image.
Optionally, this method also includes:
Obtain an at least normal photo;
According at least one normal photo generation pre-set image storehouse, the pre-set image storehouse includes at least one replacement eyeball Image, each replacement eyeball image are corresponding with one group of eyeball information.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of picture processing device, the device include:
Information identification module, the eyeball information being configured as in identification blood-shot eye illness photo;
Image collection module, it is configured as being obtained from pre-set image storehouse according to eyeball information and replaces eyeball image, this is replaced Changing eyeball image includes the eyeball image of normal eyeball;
Image replacement module, it is configured as that the blood-shot eye illness eyeball image seen red in photo is replaced into the replacement according to eyeball information Eyeball image, the photo after being handled.
Optionally, the image collection module, it is additionally configured to be obtained from pre-set image storehouse according to eyeball information and blood-shot eye illness Eyeball similarity highest in photo replaces eyeball image.
Optionally, the information identification module, including:
Recognition of face submodule, it is configured as the facial image of reference object in identification blood-shot eye illness photo;
Eyeball identifies submodule, is configured as identifying the eyeball image and eyeball position in facial image;
Eyeball identify submodule, be configured as identify eyeball image in eyeball image and eyeball position, by facial image, Eyeball image, eyeball position, eyeball image and eyeball position are as the eyeball information.
Optionally, the image collection module, including:
Face inquires about submodule, is configured as inquiring about from pre-set image storehouse and belongs to the facial image in eyeball information The facial image of same face;
Eyeball inquires about submodule, be configured as from the facial image inquired eyeball image in eyeball information, Eyeball position, eyeball image and eyeball position enquiring go out similarity highest and replace eyeball image.
Optionally, the device also includes:
Normal photo acquisition module, it is configured as obtaining an at least normal photo;
Image library generation module, it is configured as according at least one normal photo generation pre-set image storehouse, the pre-set image Storehouse includes at least one replacement eyeball image, and each replacement eyeball image is corresponding with one group of eyeball information.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of picture processing device, the device include:
Processor;
For the memory for the executable instruction for storing the processor;
Wherein, the processor is configured as:
Eyeball information in identification blood-shot eye illness photo;
Obtained according to eyeball information from pre-set image storehouse and replace eyeball image, the replacement eyeball image includes normal eyeball Eyeball image;
The blood-shot eye illness eyeball image seen red in photo is replaced by the replacement eyeball image according to eyeball information, after being handled Photo.
The technical scheme that the embodiment of the present disclosure provides can include the following benefits:
By the eyeball information in blood-shot eye illness photo, the blood-shot eye illness eyeball image seen red in photo is substituted for pre-set image The eyeball image of normal eyeball in storehouse so that eyeball color in the photo after processing is naturally, solve at blood-shot eye illness photo After reason, the problem of the image quality difference of photo, the effect for the image quality for improving photo is reached.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the disclosure Example, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is a kind of flow chart of photo processing method according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of photo processing method according to another exemplary embodiment;
Fig. 3 A are a kind of flow charts of photo processing method according to another exemplary embodiment;
Fig. 3 B are a kind of schematic diagrames of facial image according to an exemplary embodiment;
Fig. 3 C are a kind of schematic diagrames of eyeball image according to an exemplary embodiment;
Fig. 3 D are the facial image schematic diagrames after a kind of replacement eyeball image according to an exemplary embodiment;
Fig. 4 is a kind of block diagram of picture processing device according to an exemplary embodiment;
Fig. 5 is a kind of block diagram of picture processing device according to another exemplary embodiment;
Fig. 6 is a kind of block diagram for being used to handle the device of photo according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of photo processing method according to an exemplary embodiment, as shown in figure 1, the photograph Piece processing method can include the following steps:
In a step 101, the eyeball information in identification blood-shot eye illness photo.
In a step 102, obtained according to eyeball information from pre-set image storehouse and replace eyeball image, the replacement eyeball image Eyeball image including normal eyeball.
In step 103, the blood-shot eye illness eyeball image seen red in photo is replaced by eyeball image according to eyeball information, obtained Photo after to processing.
The photo processing method that the embodiment of the present disclosure provides, by the eyeball information in blood-shot eye illness photo, blood-shot eye illness is shone Blood-shot eye illness eyeball image in piece is substituted for the eyeball image of normal eyeball in pre-set image storehouse so that eyeball in the photo after processing After color naturally, solve is handled blood-shot eye illness photo, the problem of the image quality difference of photo, reached improve photo into As the effect of quality.
Generally, when shooting photo, the eyeball size of reference object can with outside environmental elements or reference object individual because Element and change, the size of the eyeball of reference object, position are differed in the photo for causing to shoot.Wherein, outside environmental elements can To be flash of light, sleet etc., reference object individual factor can be laugh, sobbing etc..In order that eyeball in photo after must handling Image 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 a kind of flow chart of photo processing method according to an exemplary embodiment, in such as Fig. 2, step 102a's is described as follows:
In step 102a, obtained according to eyeball information from pre-set image storehouse with the eyeball similarity in blood-shot eye illness photo most High replacement eyeball image.
Eyeball information includes the eyeball image of reference object and eyeball position in blood-shot eye illness photo.
Pre-set image storehouse includes at least one replacement eyeball image, each to replace eyeball image and one group of eyeball information pair Should.Wherein, the normal eyeball image that eyeball image is reference object is replaced, can be from the normal of the reference object shot in advance Acquired in photo.
In order to handle the blood-shot eye illness photo of different eyeball information, smart machine, which can shoot multiple in advance, has different eyes The normal photo of the reference object of pearl information, then the replacement eyeball figure with different eyeball information is obtained from these normal photos Picture, the replacement eyeball image of acquisition is finally stored in pre-set image storehouse.
Therefore, smart machine, can be by the eyeball information after the eyeball information of reference object in obtaining blood-shot eye illness photo It is compared with the eyeball information for replacing eyeball image of the reference object stored in pre-set image storehouse, eyeball information is similar Degree highest is replaced eyeball image and is defined as replacing this eyeball image for seeing red eyeball image in photo obtained.
Fig. 3 A are a kind of flow charts of photo processing method according to an exemplary embodiment, as shown in Figure 3A, should Photo processing method can include the following steps:
In step 301, an at least normal photo is obtained.
Generally, when light parameter is less than certain numerical value, user is possible to shoot blood-shot eye illness photograph using taking photos by using flashlights Whether piece, therefore, smart machine can be normal photo according to the photo that light parameter determines to shoot.
When user is using smart machine shooting photo, smart machine can obtain light parameter during shooting photo, and Whether the light parameter that detection obtains reaches parameter preset threshold value.If the light parameter for detecting to obtain reaches parameter preset threshold Value, then the photo shot is defined as normal photo by smart machine.
If the light parameter for detecting to obtain is not up to parameter preset threshold value, smart machine can also pass through image procossing Technology continues whether the photo that detection is shot is blood-shot eye illness photo, will when the photo for detecting to shoot not sees red photo The 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, pre-set image storehouse is generated according at least one normal photo, the pre-set image storehouse is included at least One replacement eyeball image, each replacement eyeball image are corresponding with one group of eyeball information.
Smart machine, can be to the eyeball of the reference object in every normal photo after at least one normal photo is obtained Information is identified.
Wherein, recognition methods of the smart machine to every normal photo can be with as follows:
(1) facial image of reference object in normal photo is identified.
Smart machine obtains the facial image for identifying reference object in normal photo by face recognition technology.
(2) the eyeball image and eyeball position of reference object in normal photo are identified.
Smart machine can obtain eyeball image after the facial image of reference object is identified from the facial image.
Two eyeballs in left and right in the facial image of reference object generally be present, therefore, smart machine also needs to identify eye The location of ball image is the left eye ball position or right eye ball position of reference object.
It should be noted that in the multiple pictures that user shoots to same reference object, the closure of the eyes of reference object Degree may be different, cause the eyeball size of reference object in different photos also to have differences.
In order to obtain the details of the eyeball image of reference object, smart machine can also identify to be shot in normal photo The eyeball size of object.
(3) eyeball image and the eyeball position in eyeball image are identified.
Smart machine can obtain eyeball image after the eyeball image of reference object is identified from the eyeball image.
For same reference object, due to the focus of reference object sight, the closure degree of eyes and ambient etc. The influence of factor, position of the eyeball image that smart machine obtains from different normal photos in eyeball image have with size It there may be difference.
In order to obtain the details of the eyeball image of reference object, smart machine can identify eye from eyeball image The size of pearl image and eyeball image relative to the coboundary of eyeball image, lower boundary, left margin and right margin distance.
For every normal photo, smart machine can incite somebody to action after the eyeball information of reference object in obtaining normal photo The eyeball image of the reference object identified is defined as after replacing eyeball image, by the replacement eyeball image and the reference object Facial image, eyeball image and eyeball position, eyeball position are correspondingly stored in pre-set image storehouse as one group of eyeball information.
It should be noted is that for same reference object, the normal photo of the reference object of smart machine shooting In, it is understood that there may be the normal photo of eyeball information identical.
In order to avoid repeating to store, the eyeball information for the reference object that smart machine can be in normal photo is known After not, the eyeball information is detected with the presence or absence of in each group information of the storage in pre-set image storehouse, the eyeball is believed if detecting Breath is present in each group information of the storage in pre-set image storehouse, then the eyeball information is not stored;If detect the eye Pearl information is not present in each group information of the storage in pre-set image storehouse, then the eyeball image for the reference object that will identify that is true Be set to after replacing eyeball image, by facial image, eyeball image and the eyeball position of the replacement eyeball image and the reference object, Eyeball position is correspondingly stored in pre-set image storehouse as one group of eyeball information.
In step 303, the facial image of reference object in photo is seen red in identification.
Smart machine identifies that the photo of shooting is the face that reference object in blood-shot eye illness photo can be identified after seeing red photo Image.
Wherein, the method that the facial image of reference object in photo is seen red in smart machine identification, can be that step 302 is shown The normal photo of identification in reference object facial image method, do not repeat herein.
In step 304, the eyeball image and eyeball position in facial image are identified.
Except the eyeball image in identification facial image, smart machine may recognize that the eyeball of the eyeball image of blood-shot eye illness Position.For example the eyeball image for occurring seeing red in blood-shot eye illness photo is located at the right eye of reference object.
Wherein, the method for the eyeball image in smart machine identification facial image and eyeball position, can be that step 302 is shown The method of the eyeball image and eyeball position of reference object, is not repeated herein in the normal photo of identification gone out.
In step 305, eyeball image and the eyeball position in eyeball image are identified, by facial image, eyeball image, eye Ball position, eyeball image and eyeball position are as eyeball information.
The method of eyeball image and eyeball position in smart machine identification eyeball image, can be shown in step 302 The method of eyeball image and eyeball position in identification eyeball image, is not repeated equally herein.
Wherein, smart machine is after the eyeball information for seeing red reference object in photo is obtained, by facial image, eyeball figure Picture, eyeball position, eyeball image and eyeball position are defined as eyeball information.
Within step 306, inquiry belongs to the people of same face with the facial image in eyeball information from pre-set image storehouse Face image.
Smart machine can identify reference object according to facial image.Each reference object is stored in pre-set image storehouse Facial image, therefore, smart machine can be inquired about from pre-set image storehouse with the presence or absence of blood-shot eye illness photo in reference object people Face image, if inquiring the facial image in the presence of reference object in blood-shot eye illness photo, the face figure is obtained from pre-set image storehouse As and with the corresponding eyeball information of the facial image.
It should be noted that at least one set of eyeball information of reference object, therefore, intelligence are might have stored in pre-set image storehouse Can equipment query to the facial image of same face is belonged to the facial image in eyeball information can be multiple, corresponding, intelligence The eyeball information that energy equipment is got can also be multiple.
In step 307, eyeball image, eyeball position, the eye from the facial image inquired in eyeball information Pearl image and eyeball position enquiring go out similarity highest and replace eyeball image.
Smart machine belongs to the more personal of same face from pre-set image library inquiry to the facial image in eyeball information After face image, the phase of the eyeball information and the eyeball information of reference object in blood-shot eye illness photo of each facial image inquired is calculated Like degree, wherein, the calculation procedure of similarity can be with as follows:
The first step, according to pre-set image library inquiry to eyeball information with blood-shot eye illness photo in reference object eyeball information, The eyeball position identical eyeball image with blood-shot eye illness is obtained from pre-set image storehouse.
For each facial image inquired, smart machine eyeball information according to corresponding to the facial image determines the people In the facial image of blood-shot eye illness photo with there is the eyeball position identical eyeball image seen red in face image.
It should be noted that smart machine it is determined that with see red photo facial image in there is the eyeball position phase seen red After same eyeball image, the size for each eyeball image determined can also be identified with seeing red whether the size of eyeball is consistent, If identifying, the size of eyeball image is consistent with seeing red the size of eyeball, the step of carrying out second step using the eyeball image; If identifying, the size of eyeball image is not inconsistent with seeing red the size of eyeball, does not handle the eyeball image.
Second step, for each in pre-set image storehouse and the eyeball position identical eyeball image of blood-shot eye illness, read the eye Eyeball image and eyeball position are replaced corresponding to ball image, is calculated according to replacement eyeball image with eyeball position and replaces eyeball image With the similarity between blood-shot eye illness eyeball image.
Because in different eyeball images, the relative position of eyeball image and eyeball image in eyeball image has can Can be different, therefore smart machine can respectively calculate and replace eyeball image and blood-shot eye illness eyeball in pre-set image corresponding to eyeball image Image similarity and location similarity between image, determine to replace eyeball image further according to image similarity and location similarity With the similarity between blood-shot eye illness eyeball image.
In a kind of possible implementation, smart machine calculates by the following method replaces eyeball image and blood-shot eye illness eyeball The image similarity of image:
(1) smart machine extracts the replacement eyeball image with seeing red the characteristic vector of eyeball image respectively;
(2) according to characteristic vector calculate the replacement eyeball image with see red eyeball image similarity, wherein this feature to Amount can be at least one of characteristics of image such as color, shape, brightness.
Such as the image that smart machine calculates according to the color, shape of the replacement eyeball image and blood-shot eye illness eyeball image Similarity is 0.9.
In a kind of possible implementation, smart machine calculates eye corresponding to the replacement eyeball image by the following method Location similarity between the eyeball position corresponding with blood-shot eye illness eyeball image of pearl position:
(1) smart machine according to eyeball position obtain respectively the replacement eyeball image relative to eyeball image coboundary, The distance of lower boundary, left margin and right margin, and blood-shot eye illness eyeball image is relative to eyeball image coboundary, lower boundary, the left side Boundary and the distance of right margin.
For example the replacement eyeball image A that smart machine obtains from pre-set image storehouse is relative to eyeball image a coboundary 0.2mm, the lower boundary relative to eyeball image a are 0.5mm, are 2.5mm relative to eyeball image a left margin, relative to eye Ball image a right margin is 1.5mm;The blood-shot eye illness eyeball image E of acquisition is 0.2mm relative to eyeball image e coboundary, relatively It is 0.1mm in eyeball image e lower boundary, is 1.5mm relative to eyeball image e left margin, relative to the eyeball image e right side Border is 2.5mm.
(2) for the border of identical eyeball position, according to the replacement eyeball image with blood-shot eye illness eyeball image relative to the side Boundary apart from calculation error value.
Such as the data above obtained according to smart machine, the replacement eyeball image is calculated with seeing red eyeball image phase Error amount for the distance of coboundary is | 0.2-0.2 |=0, and the eyeball image is with blood-shot eye illness eyeball image relative to lower boundary The error amount of distance is | 0.5-0.1 |=0.4, and error of the eyeball image with blood-shot eye illness eyeball image relative to the distance of left margin Be worth and be | 2.5-1.5 |=1, the eyeball image with blood-shot eye illness eyeball image be relative to the error amount of the distance of lower boundary | 1.5-2.5 |=1.
(3) error according to the replacement eyeball image calculated with blood-shot eye illness eyeball image relative to the distance on each border Value, the position calculated between the eyeball position corresponding with seeing red eyeball image of eyeball position corresponding to the replacement eyeball image are similar Degree.
After error amount of the replacement eyeball image and blood-shot eye illness eyeball image calculated relative to the distance on each border, intelligence Energy equipment is added after each error amount being multiplied by into default weight, and will obtain and value is defined as the replacement eyeball image pair Location similarity between the eyeball position corresponding with blood-shot eye illness eyeball image of the eyeball position answered.
For example it is 1 that weight is preset corresponding to the error amount of the distance of coboundary, corresponding to the error amount of the distance of lower boundary Default weight is 1, and it is 0.1 that weight is preset corresponding to the error amount of the distance of left margin, and the error amount of the distance of right margin is corresponding Default weight be 0.1, then calculate and replace eyeball position corresponding to eyeball image with seeing red the corresponding eyeball position of eyeball image Location similarity between putting is 0 × 1+0.4 × 1+1 × 0.1+1 × 0.1=0.6.
After image similarity and location similarity is obtained, smart machine can be by image similarity and location similarity Default similarity threshold corresponding to being multiplied by respectively, so that it is determined that replacing eyeball image and seeing red the similarity between eyeball image.
For example the default similarity threshold of image similarity is 0.4, the default similarity threshold of location similarity is 0.6, Similarity between the replacement eyeball image and blood-shot eye illness eyeball image that then calculate is 0.9 × 0.4+0.6 × 0.6=0.72.
It should be noted that smart machine, which can also use other method to calculate, replaces eyeball image and blood-shot eye illness eyeball image Between similarity, the embodiment of the present disclosure not to replace eyeball image and see red eyeball image between similarity calculating side Method restricts.
It is determined that it is each replace eyeball image and see red similarity between eyeball image after, smart machine can will be similar Degree highest replaces the image that eyeball image is defined as seeing red eyeball image for replacing.
For convenience of description, what the photo processing method provided with legend the embodiment of the present disclosure was carried out 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 smart machine is inquired about from pre-set image storehouse It is A, B, C, D to the facial image of same face is belonged to the facial image in eyeball information.Smart machine determines that blood-shot eye illness is shone Blood-shot eye illness eyeball position in the facial image E of piece is left eye ball position, then obtains facial image E blood-shot eye illness eyeball image e, face Left eye in eyeball the image b, facial image C of left eye ball position in eyeball the image a, facial image B of left eye ball position in image A The eyeball image d of left eye ball position in eyeball the image c, facial image D of ball position, such as Fig. 3 C.
After smart machine obtains the eyeball position identical eyeball image in facial image with seeing red photo, read respectively red Blood-shot eye illness eyeball image ee and eyeball position corresponding to eye eyeball image e, eyeball image a is corresponding to replace eyeball image aa and eyeball Position, eyeball image bb and eyeball position are replaced corresponding to eyeball image b, replaced corresponding to eyeball image c eyeball image cc with Eyeball position, replacement eyeball image dd and eyeball position, are calculated further according to eyeball image and eyeball position corresponding to eyeball image d Each replacement eyeball image is obtained with seeing red eyeball image ee similarity as " replacement eyeball image aa:0.3 ", " eyeball is replaced Image bb:0.8 ", " eyeball image cc is replaced:0.5 ", " eyeball image dd is replaced:0.9”.
Smart machine detects to replace eyeball image dd with seeing red eyeball image ee similarity highest, then will replace eyeball Image dd is defined as the image for replacing blood-shot eye illness eyeball image ee.
In step 308, the blood-shot eye illness eyeball image seen red in photo is replaced by eyeball image according to eyeball information, obtained Photo after to processing.
After similarity highest replacement eyeball image is inquired, smart machine will see red the blood-shot eye illness eyeball image in photo Replace with and replace eyeball image, such as Fig. 3 D, Fig. 3 D, which are smart machine, will see red blood-shot eye illness eyeball image in photo in facial image E Ee replaces with the image of gained after the replacement eyeball image dd determined in Fig. 3 C.
Wherein, smart machine can will replace eyeball image and be covered on the blood-shot eye illness eyeball image seen red in photo, or Person, after the blood-shot eye illness eyeball image seen red in photo is eliminated, the position where eyeball image completion enters to see red eyeball will be replaced, then Photo after processing is preserved.
The photo processing method that the embodiment of the present disclosure provides, by the eyeball information in blood-shot eye illness photo, blood-shot eye illness is shone Blood-shot eye illness eyeball image in piece is substituted for the eyeball image of normal eyeball in pre-set image storehouse so that eyeball in the photo after processing After color naturally, solve is handled blood-shot eye illness photo, the problem of the image quality difference of photo, reached improve photo into As the effect of quality.
Following is embodiment of the present disclosure, can be used for performing embodiments of the present disclosure.It is real for disclosure device The details not disclosed in example is applied, refer to embodiments of the present disclosure.
Fig. 4 is a kind of block diagram of picture processing device according to an exemplary embodiment, as shown in figure 4, the photo Processing unit can include:Information identification module 401, image collection module 402, image replacement module 403.
Information identification module 401, the eyeball information being configured as in identification blood-shot eye illness photo;
Image collection module 402, it is configured as being obtained from pre-set image storehouse according to the eyeball information and replaces eyeball image, The replacement eyeball image is the eyeball image for including normal eyeball;
Image replacement module 403, it is configured as being replaced the blood-shot eye illness eyeball image in the blood-shot eye illness photo according to the eyeball information Change the replacement eyeball image, the photo after being handled.
The picture processing device that the embodiment of the present disclosure provides, by the eyeball information in blood-shot eye illness photo, blood-shot eye illness is shone Blood-shot eye illness eyeball image in piece is substituted for the eyeball image of normal eyeball in pre-set image storehouse so that eyeball in the photo after processing After color naturally, solve is handled blood-shot eye illness photo, the problem of the image quality difference of photo, reached improve photo into As the effect of quality.
Fig. 5 is a kind of block diagram of picture processing device according to another exemplary embodiment, as shown in figure 5, the photograph Piece treating apparatus can include:Information identification module 501, image collection module 502, image replacement module 503.
Information identification module 501, the eyeball information being configured as in identification blood-shot eye illness photo;
Image collection module 502, it is configured as being obtained from pre-set image storehouse according to the eyeball information and replaces eyeball image, The replacement eyeball image is the eyeball image for including normal eyeball;
Image replacement module 503, it is configured as being replaced the blood-shot eye illness eyeball image in the blood-shot eye illness photo according to the eyeball information Change the replacement eyeball image, the photo after being handled.
Optionally, the image collection module 502, it is additionally configured to be obtained from the pre-set image storehouse according to the eyeball information Eyeball image is replaced with the eyeball similarity highest in the blood-shot eye illness photo.
Optionally, the information identification module 501, including:Recognition of face submodule 501a, eyeball identification submodule 501b, Eyeball identification submodule 501c.
Recognition of face submodule 501a, it is configured as identifying the facial image of reference object in the blood-shot eye illness photo;
Eyeball identifies submodule 501b, is configured as identifying eyeball image and eyeball position in the facial image;
Eyeball identifies submodule 501c, is configured as identifying the eyeball image in the eyeball image and eyeball position, by this Facial image, the eyeball image, the eyeball position, the eyeball image and the eyeball position are as the eyeball information.
Optionally, the image collection module 502, including:Face inquiry submodule 502a, eyeball inquiry submodule 502b.
Face inquires about submodule 502a, is configured as inquiry and the face in the eyeball information from the pre-set image storehouse Image belongs to the facial image of same face;
Eyeball inquires about submodule 502b, is configured as from the facial image inquired being somebody's turn to do in the eyeball information Eyeball image, the eyeball position, the eyeball image and the eyeball position enquiring go out the similarity highest replacement eyeball image.
Optionally, the device also includes:Normal photo acquisition module 504, image library generation module 505.
Normal photo acquisition module 504, is configured as obtaining an at least normal photo;
Image library generation module 505, it is configured as generating the pre-set image storehouse according at least one normal photo, this is pre- If image library includes at least one replacement eyeball image, each replacement eyeball image is corresponding with one group of eyeball information.
The picture processing device that the embodiment of the present disclosure provides, by the eyeball information in blood-shot eye illness photo, blood-shot eye illness is shone Blood-shot eye illness eyeball image in piece is substituted for the eyeball image of normal eyeball in pre-set image storehouse so that eyeball in the photo after processing After color naturally, solve is handled blood-shot eye illness photo, the problem of the image quality difference of photo, reached improve photo into As the effect of quality.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
The exemplary embodiment of the disclosure one provides a kind of picture processing device, can realize at the photo that the disclosure provides Reason method, the picture processing device include:Processor, the memory for storing processor-executable instruction;
Wherein, processor is configured as:
Eyeball information in identification blood-shot eye illness photo;
Obtained according to eyeball information from pre-set image storehouse and replace eyeball image, the replacement eyeball image is to include normal eyes The eyeball image of pearl;
The blood-shot eye illness eyeball image seen red in photo is replaced by eyeball image, the photograph after being handled according to eyeball information Piece.
Fig. 6 is a kind of block diagram for being used to handle the device of photo according to an exemplary embodiment.For example, device 600 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, and medical treatment is set It is standby, body-building equipment, personal digital assistant etc..
Reference picture 6, device 600 can include following one or more assemblies:Processing component 602, memory 604, power supply Component 606, multimedia groupware 608, audio-frequency assembly 610, input/output (I/O) interface 612, sensor cluster 614, Yi Jitong Believe component 616.
The integrated operation of the usual control device 600 of processing component 602, such as communicated with display, call, data, phase The operation that machine operates and record operation is associated.Processing component 602 can refer to including one or more processors 618 to perform Order, to complete all or part of step of above-mentioned method.In addition, processing component 602 can include one or more modules, just Interaction between processing component 602 and other assemblies.For example, processing component 602 can include multi-media module, it is more to facilitate Interaction between media component 608 and processing component 602.
Memory 604 is configured as storing various types of data to support the operation in device 600.These data are shown Example includes the instruction of any application program or method for being operated on device 600, contact data, telephone book data, disappears Breath, picture, video etc..Memory 604 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM) are erasable to compile Journey read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 606 provides electric power for the various assemblies of device 600.Power supply module 606 can include power management system System, one or more power supplys, and other components associated with generating, managing and distributing electric power for device 600.
Multimedia groupware 608 is included in the screen of one output interface of offer between device 600 and user.In some realities Apply in example, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can To be implemented as touch-screen, to receive the input signal from user.Touch panel include one or more touch sensors with Gesture on sensing touch, slip and touch panel.Touch sensor can the not only border of sensing touch or sliding action, and And also detection and the duration and pressure touched or slide is related.In certain embodiments, multimedia groupware 608 includes One front camera and/or rear camera.It is preceding during such as screening-mode or video mode when device 600 is in operator scheme The multi-medium data of outside can be received by putting camera and/or rear camera.Each front camera and rear camera can To be a fixed optical lens system or there is focusing and optical zoom capabilities.
Audio-frequency assembly 610 is configured as output and/or input audio signal.For example, audio-frequency assembly 610 includes a Mike Wind (MIC), when device 600 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The audio signal received can be further stored in memory 604 or via communication set Part 616 is sent.In certain embodiments, audio-frequency assembly 610 also includes a loudspeaker, for exports audio signal.
Input/output interface 612 provides interface, above-mentioned peripheral interface between processing component 602 and peripheral interface module Module can be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, startup are pressed Button and locking press button.
Sensor cluster 614 includes one or more sensors, and the state for providing various aspects for device 600 is commented Estimate.For example, sensor cluster 614 can detect opening/closed mode of device 600, the relative positioning of component, such as component For the display and keypad of device 600, sensor cluster 614 can be with the position of 600 1 components of detection means 600 or device Put change, the existence or non-existence that user contacts with device 600, the orientation of device 600 or acceleration/deceleration and the temperature of device 600 Change.Sensor cluster 614 can include proximity transducer, be configured in no any physical contact near detection The presence of object.Sensor cluster 614 can also include optical sensor, such as CMOS or ccd image sensor, for should in imaging With middle use.In certain embodiments, the sensor cluster 614 can also include acceleration transducer, gyro sensor, magnetic Sensor, pressure sensor or temperature sensor.
Communication component 616 is configured to facilitate the communication of wired or wireless way between device 600 and other equipment.Device 600 can access the wireless network based on communication standard, such as Wi-Fi, 2G or 3G, or combinations thereof.In an exemplary reality Apply in example, communication component 616 receives broadcast singal or the related letter of broadcast from external broadcasting management system via broadcast channel Breath.In one exemplary embodiment, communication component 616 also includes near-field communication (NFC) module, to promote junction service.Example Such as, in NFC module radio frequency identification (RFID) technology can be based on, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 600 can be believed by one or more application specific integrated circuits (ASIC), numeral Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing above-mentioned photo processing method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 604 of instruction, above-mentioned instruction can be performed by the processor 618 of device 600 to complete above-mentioned photo disposal side Method.For example, non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, Floppy disk and optical data storage devices etc..
Those skilled in the art will readily occur to the disclosure its after considering specification and putting into practice invention disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledges in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the precision architecture that the disclosure is not limited to be described above and is shown in the drawings, and And various modifications and changes can be being carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (7)

1. a kind of photo processing method, it is characterised in that methods described includes:
Eyeball information in identification blood-shot eye illness photo;
Obtained from pre-set image storehouse according to the eyeball information and replaced with the eyeball similarity highest in the blood-shot eye illness photo Eyeball image, the eyeball image of replacing include the eyeball image of normal eyeball;
Blood-shot eye illness eyeball image in the blood-shot eye illness photo is replaced by the replacement eyeball image according to the eyeball information, obtained everywhere Photo after reason;
Wherein, it is described to be obtained according to the eyeball information from pre-set image storehouse with the eyeball similarity in the blood-shot eye illness photo most High replacement eyeball image, including:
Inquiry belongs to the facial image of same face with the facial image in the eyeball information from the pre-set image storehouse;
Eyeball image, eyeball position, the eyeball figure from the facial image inquired in the eyeball information As and the eyeball position enquiring go out similarity highest described in replace eyeball image.
2. according to the method for claim 1, it is characterised in that the eyeball information in the identification blood-shot eye illness photo, including:
Identify the facial image of reference object in the blood-shot eye illness photo;
Identify eyeball image and the eyeball position in the facial image;
The eyeball image in the eyeball image and eyeball position are identified, by the facial image, the eyeball image, the eye Ball position, the eyeball image and the eyeball position are as the eyeball information.
3. method according to claim 1 or 2, it is characterised in that methods described also includes:
Obtain an at least normal photo;
The pre-set image storehouse is generated according at least one normal photo, the pre-set image storehouse includes at least one replace Eyeball image is changed, each replacement eyeball image is corresponding with one group of eyeball information.
4. a kind of picture processing device, it is characterised in that described device includes:
Information identification module, the eyeball information being configured as in identification blood-shot eye illness photo;
Image collection module, it is configured as being obtained from pre-set image storehouse according to the eyeball information and is seen red with described in photo Eyeball similarity highest replaces eyeball image, and the eyeball image of replacing includes the eyeball image of normal eyeball;
Image replacement module, it is configured as that the blood-shot eye illness eyeball image in the blood-shot eye illness photo is replaced into institute according to the eyeball information State and replace eyeball image, the photo after being handled;
Wherein, described image acquisition module, including:
Face inquires about submodule, is configured as inquiry and the facial image category in the eyeball information from the pre-set image storehouse In the facial image of same face;
Eyeball inquires about submodule, is configured as the eyeball figure in the eyeball information from the facial image inquired As, eyeball position, the eyeball image and the eyeball position enquiring go out similarity highest described in replace eyeball image.
5. device according to claim 4, it is characterised in that described information identification module, including:
Recognition of face submodule, it is configured as identifying the facial image of reference object in the blood-shot eye illness photo;
Eyeball identifies submodule, is configured as identifying eyeball image and eyeball position in the facial image;
Eyeball identifies submodule, is configured as identifying the eyeball image in the eyeball image and eyeball position, by the face Image, the eyeball image, the eyeball position, the eyeball image and the eyeball position are as the eyeball information.
6. the device according to claim 4 or 5, it is characterised in that described device also includes:
Normal photo acquisition module, it is configured as obtaining an at least normal photo;
Image library generation module, it is configured as generating the pre-set image storehouse according at least one normal photo, it is described pre- If image library includes at least one replacement eyeball image, each replacement eyeball image is corresponding with one group of eyeball information.
A kind of 7. picture processing device, it is characterised in that including:
Processor;
For the memory for the executable instruction for storing the processor;
Wherein, the processor is configured as:
Eyeball information in identification blood-shot eye illness photo;
Obtained from pre-set image storehouse according to the eyeball information and replaced with the eyeball similarity highest in the blood-shot eye illness photo Eyeball image, the eyeball image of replacing include the eyeball image of normal eyeball;
Blood-shot eye illness eyeball image in the blood-shot eye illness photo is replaced by the replacement eyeball image according to the eyeball information, obtained everywhere Photo after reason;
Wherein, it is described to be obtained according to the eyeball information from pre-set image storehouse with the eyeball similarity in the blood-shot eye illness photo most High replacement eyeball image, including:
Inquiry belongs to the facial image of same face with the facial image in the eyeball information from the pre-set image storehouse;
Eyeball image, eyeball position, the eyeball figure from the facial image inquired in the eyeball information As and the eyeball position enquiring go out similarity highest described in replace eyeball image.
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 CN104867112A (en) 2015-08-26
CN104867112B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN108449543A (en) * 2018-03-14 2018-08-24 广东欧珀移动通信有限公司 Image synthetic method, device, computer storage media and electronic equipment

Citations (2)

* 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
CN102655565A (en) * 2011-03-02 2012-09-05 鸿富锦精密工业(深圳)有限公司 Anti-red-eye portrait shooting system and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8768070B2 (en) * 2008-06-27 2014-07-01 Nokia Corporation Method, apparatus and computer program product for providing image modification
US9355456B2 (en) * 2010-06-28 2016-05-31 Nokia Technologies Oy Method, apparatus and computer program product for compensating eye color defects

Patent Citations (2)

* 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
CN102655565A (en) * 2011-03-02 2012-09-05 鸿富锦精密工业(深圳)有限公司 Anti-red-eye portrait shooting system and method

Also Published As

Publication number Publication date
CN104867112A (en) 2015-08-26

Similar Documents

Publication Publication Date Title
CN104867112B (en) Photo processing method and device
CN104408402B (en) Face identification method and device
CN104850828B (en) Character recognition method and device
CN107123081A (en) image processing method, device and terminal
CN105302315A (en) Image processing method and device
CN108712603B (en) Image processing method and mobile terminal
CN105809704A (en) Method and device for identifying image definition
CN107122679A (en) Image processing method and device
CN107582028A (en) Sleep monitor method and device
CN105488527A (en) Image classification method and apparatus
CN107463903B (en) Face key point positioning method and device
CN106980840A (en) Shape of face matching process, device and storage medium
CN106778531A (en) Face detection method and device
CN106682736A (en) Image identification method and apparatus
CN104933419A (en) Method and device for obtaining iris images and iris identification equipment
CN107766820A (en) Image classification method and device
CN104460185A (en) Automatic focusing method and device
CN107463052A (en) Shoot exposure method and device
CN105357425A (en) Image shooting method and image shooting device
CN105631804A (en) Image processing method and device
CN105139033A (en) Classifier construction method and device and image processing method and device
CN110399934A (en) A kind of video classification methods, device and electronic equipment
CN105100193A (en) Cloud business card recommendation method and device
CN107992811A (en) Face identification method and device
CN107330391A (en) Product information reminding method and device

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