Priority is claimed under 35 U.S.C. §119 to Japanese Application No. 2009-034041 filed on Feb. 17, 2009, which is hereby incorporated by reference in its entirety.
1. Technical Field
The present invention relates to an image processing apparatus that detects the coordinate position of a characteristic portion of a face included in a target image.
2. Related Art
Recently, technology for detecting an image area that includes a face image as a face area from a target image has been known (JP-A-2000-149018). There are cases where incorrect detection occurs in which an image area not including a face image is incorrectly detected as a face area in the detecting of a face area. Accordingly, technology for calculating the reliability of face area detection, that is, an index indicating the reliability of the detected face area as an image area that includes an actual face image has been known. JP-A-2007-141107 is another example of related art.
However, there is room for calculating the reliability of the face area detection with higher accuracy.
An advantage of some aspects of the invention is that it provides technology for calculating the reliability of face area detection with high accuracy.
The invention employs the following aspects.
According to a first aspect of the invention, there is provided an image processing apparatus that is used for detecting a coordinate position of a characteristic portion of a face included in a target image. The image processing apparatus includes: a face area detecting unit that detects an image area including at least a part of a face image as a face area from the target image; a characteristic position detecting unit that sets a characteristic point, which is used for detecting the coordinate position of the characteristic portion, in the target image based on the face area, updates a setting position of the characteristic point so as to approach or be identical to the coordinate position of the characteristic portion by using a characteristic amount calculated based on a plurality of sample images including face images of which the coordinate positions of the characteristic portions are known, and detects the updated setting position as the coordinate position; and a face area reliability calculating unit that calculates face area reliability that represents reliability of a face image included in the face area detected by the face area detecting unit as an actual face image by using a differential amount that is calculated based on a difference between the updated setting position and the coordinate position.
According to the image processing apparatus of the first aspect, the face area reliability that is reliability of face area detection can be calculated with high accuracy by using a differential amount that is calculated based on a difference between the setting position of the characteristic point updated by the characteristic position detecting unit and the coordinate position of the characteristic portion of a face.
In the image processing apparatus of the first aspect, the face area reliability calculating unit may be configured to include: a characteristic portion reliability calculation section that calculates characteristic portion reliability that represents reliability of the detected coordinate position as the coordinate position of the characteristic portion of the face based on the differential amount; and a face area temporary reliability calculating section that calculates face area temporary reliability that represents reliability of the face image included in the detected face area as an actual face image based on a process of detecting the face area performed by the face area detecting unit. In such a case, the face area reliability is calculated by using the characteristic portion reliability and the face area temporary reliability. In the case, the face area reliability can be calculated with higher accuracy by using the characteristic portion reliability and the face area temporary reliability.
In the image processing apparatus of the first aspect, the face area reliability calculating unit may be configured to set an average value of the face area temporary reliability and the characteristic portion reliability as the face area reliability. In such a case, the face area reliability can be calculated with higher accuracy by setting an average value of the face area temporary reliability and the characteristic portion reliability as the face area reliability.
In the image processing apparatus of the first aspect, the differential amount may be a value based on an average shape image acquired by transforming a part of the target image based on the characteristic point set in the target image and an average face image that is generated based on the plurality of sample images. In such a case, the face area reliability can be calculated with higher accuracy by using a differential amount that is based on a differential value between the average shape image and the average face image.
In the image processing apparatus of the first aspect, the differential value may be represented by a difference between a pixel value of a pixel configuring the average shape image and a pixel value of a pixel of the average face image corresponding to the average shape image. In such a case, the face area reliability can be calculated with higher accuracy by using a differential value between a pixel value of a pixel that configures the average shape image and a pixel value of a pixel of the average face image corresponding to the average shape image for calculating the differential amount.
In the image processing apparatus of the first aspect, the differential amount may be a norm of the differential value. In such a case, the face area reliability can be calculated with higher accuracy by using the norm of the differential value.
In the image processing apparatus of the first aspect, the differential amount may be a norm of a corrected differential value that is acquired by applying coefficients to the differential values for each of a plurality of mesh areas that configures the average shape image. In such a case, the face area reliability can be calculated with higher accuracy by using the norm of the corrected differential value.
The image processing apparatus of the first aspect may be configured to further include a determination unit that determines whether a face image included in the face area detected by the face area detecting unit is an actual face image based on the face area reliability. In such a case, it can be accurately determined whether the face image included in the detected face area is an actual face image by using the face area reliability calculated by using the differential amount.
In the image processing apparatus of the first aspect, the characteristic amount may be a coefficient of a shape vector that can be acquired by performing a principal analysis for a coordinate vector of the characteristic portion that is included in the plurality of sample images. In such a case, the setting position of the characteristic point can be updated well by using the coefficient of the shape vector.
In the image processing apparatus of the first aspect, the characteristic portion may be some of an eyebrow, an eye, a nose, a mouth and a face line. In such a case, the face area reliability can be calculated with high accuracy by using a differential amount at the time when detecting the coordinate positions of some of the eyebrow, the eye, the nose, the mouth, and the face line.
In addition, the invention can be implemented in various forms and, for example, may be implemented as a printer, a digital still camera, a personal computer, a digital video camera, and the like. In addition, the invention can be implemented in the forms of an image processing method, an image processing apparatus, a method of detecting the positions of characteristic portions, an apparatus for detecting the positions of characteristic portions, a facial expression determining method, a facial expression determining apparatus, a computer program for implementing the functions of the above-described methods or apparatuses, a recording medium having the computer program recorded thereon, a data signal implemented in a carrier wave including the computer program, and the like.
The invention will be described with reference to the accompanying drawings, wherein like numbers reference like elements.
Hereinafter, printers as one type of image processing apparatuses according to embodiments of the invention will be described with reference to the accompanying drawings.
The printing mechanism 160 performs a printing operation based on print data. The card interface 170 is an interface that is used for exchanging data with a memory card MC inserted into a card slot 172. In this embodiment, an image file that includes the image data is stored in the memory card MC.
In the internal memory 120, an image processing unit 200, a display processing unit 310, and a print processing unit 320 are stored. The image processing unit 200 is a computer program and performs a face characteristic position detecting process by being executed by a CPU 110 under a predetermined operating system. The face characteristic detecting process is a process for detecting the positions of predetermined characteristic portions (for example, an eye area, a nose tip, and a face line) in a face image. The face characteristic detecting process will be described later in details. In addition, various functions are implemented as the CPU 110 also executes the display processing unit 310 and the printing processing unit 320.
The image processing unit 200 includes a face area detecting section 210, a characteristic position detecting section 220, a face area reliability calculating section 230, and a determination section 240 as program modules. The face area reliability calculating section 230 includes a face area temporary reliability calculating portion 232 and a characteristic portion reliability calculating portion 234. The functions of these units, sections, and portions will be described in details in a description of the face characteristic position detecting process to be described later.
The display processing unit 310 is a display driver that displays a process menu, a message, an image, or the like on the display unit 150 by controlling the display unit 150. The print processing unit 320 is a computer program that generates print data based on the image data and prints an image based on the print data by controlling the printing mechanism 160. The CPU 110 implements the functions of these units by reading out the above-described programs (the image processing unit 200, the display processing unit 310, and the print processing unit 320) from the internal memory 120 and executing the programs.
In addition, AAM information AMI, which is information on an active appearance model (also abbreviated as “AAM”) as a technique for modeling a visual event, is stored in the internal memory 120. The AAM information AMI is information that is set in advance in an AAM setting process to be described later and is referred to in the face characteristic position detecting process to be described later. The content of the AAM information AMI will be described in details in a description of the AAM setting process to be described later.
In this embodiment, the AAM setting process for setting the shape model and the texture model that are used in the face characteristic position detecting process will be described later. In the AAM setting process, in sample images that are used for setting the shape model and the texture model, predetermined positions of person's facial organs and the contour of a person's face are set as the characteristic portions. In this embodiment, as the characteristic portions, 68 portions of a person's face that include predetermined positions on the eyebrows (for example, end points, four-division points, or the like; the same in description below), predetermined positions on the contour of the eyes, predetermined positions on contours of the bridge of the nose and the wings of the nose, predetermined positions on the contours of upper and lower lips, and predetermined positions on the contour (face line) of the face are set. Accordingly, by specifying the positions of 68 characteristic points CP that represent predetermined positions of a person's facial organs and the contour of a face through the face characteristic position detecting process of this embodiment, the positions of the characteristic portions are detected.
First, the image processing unit 200 (
The face area detecting section 210 (
The face area detecting section 210 calculates an evaluation value that is used for face determination from the image area defined by the window SW in parallel with scanning of the window SW. The method of calculating the evaluation value is not particularly limited. However, in this embodiment, N filters (Filter 1 to Filter N) are used for calculating the evaluation value.
The face area detecting section 210 compares each calculated basic evaluation value with a threshold value that is set in correspondence with each basic evaluation value. In this embodiment, the face area detecting section 210 determines the image area defined by the window SW to be an image area corresponding to a face image for a filter for which the basic evaluation value is equal to or greater than the threshold value and sets “1” as the output value of the filter. On the other hand, for a filter for which the basic evaluation value is less than the threshold value, the face area detecting section 210 determines the image area that is defined by the window SW to be an image area that cannot be considered to be in correspondence with a face image and sets “0” as the output value of the filter. For each filter, a weighting factor is set, and a sum of multiplications of output values and weighting factors of all the filters is used as the evaluation value. The face area detecting section 210 determines whether an image area defined by the window SW is an image area corresponding to a face image by comparing the calculated evaluation value with the threshold value.
When there is a plurality of windows SW for which the image area defined by the windows SW are determined to be image areas corresponding to face images, the face area detecting section 210 detects one new window having the center located in average coordinates of predetermined points (for example, the center of each window SW) of the windows SW and having the size of an average size of the windows SW as the face area FA.
The method of detecting a face area FA described above is only an example. Thus, various known face detecting techniques other than the above-described detection method can be used for detecting a face area FA. As the known face detecting techniques, for example, there are a technique using pattern matching, a technique using extraction of a skin-color area, a technique using learning data that is set by learning (for example, learning using a neural network, learning using boosting, learning using a support vector machine, or the like) using sample images, and the like.
The face area temporary reliability calculating portion 232 (
In this embodiment, a value acquired by dividing the number of overlapping windows by a maximum number of overlapping windows is used as the face area temporary reliability. Here, the number of overlapping windows is the number of windows SW that are referred when the face area FA is set, that is, the number of windows SW for which the image areas defined by the windows SW are determined to be image areas corresponding to face images. For example, when the face area FA shown in
When the detected face area FA is an image area actually corresponding to a face area, there is high possibility that the image areas defined by a plurality of windows SW having the positions and the sizes close to one another are determined to be face areas corresponding to face images. On the other hand, when the detected face area FA is not an image area corresponding to a face image as a result of incorrect detection, there is high possibility that, even when an image area defined by a specific window SW is determined to be a face area corresponding to a face image, an image area defined by another window SW having the position and the size that are close to those of the specific window is determined not to be a face area corresponding to a face image. Accordingly, in this embodiment, the value acquired by dividing the number of overlapping windows by the maximum number of overlapping windows is used as the face area temporary reliability.
The characteristic position detecting section 220 (
The characteristic position detecting section 220 sets a plurality of the temporary setting positions by variously changing the values of the global parameters for the reference temporary setting position. The changing of the global parameters (the size, the tilt, the position in the vertical direction, and the position in the horizontal direction) corresponds to performing enlargement or reduction, a change in the tilt, and parallel movement of the meshes formed by the characteristic points CP with respect to the target image OI. Accordingly, the characteristic position detecting section 220, as shown in
In addition, as shown in
In addition, the characteristic position detecting section 220 also sets temporary setting positions acquired by performing parallel movement to the upper or lower side and to the left or right side for meshes, shown in
The characteristic position detecting section 220 generates an average shape image I(W(x;p)) corresponding to each temporary setting position that has been set (Step S220).
The transformation for calculating the average shape image I(W(x;p)), similarly to the transformation for calculating the sample images SIw in the AAM setting process, is performed by the warp W that is a set of affine transformations for each triangle area TA. In particular, an average shape area BSA that is an area surround by straight lines joining characteristic points CP (characteristic points CP corresponding to the face line, the eyebrows, and a region between the eyebrows) located on the outer periphery is specified by characteristic points CP disposed in the target image OI. Then, by performing an affine transformation for each triangle area TA of the average shape area BSA of the target image OI, the average shape image I(W(x;p)) is calculated. In this embodiment, the average shape image I(W(w;p)), similarly to the average face image A0(x) that is an image in which an average face of the sample images after the warp W are represented, is configured by an average shape area BSA and a mask area MA and is calculated as an image having the same size as the average face image A0(x). The warp W, the average shape area BSA, the average face image A0(x), and the mask area MA will be described in details in the AAM setting process.
Here, a set of pixels located in the average shape area BSA of the average shape s0 is denoted by a pixel group x. The pixel group in the image (the average shape area BSA of the target image OI) before performing the warp W that corresponds to the pixel group x in the image (the face image having the average shape s0) after performing the warp W is denoted by W(x;p). Since the average shape image is an image that is configured by the luminance values of each pixel group W(x;p) in the average shape area BSA of the target image OI, the average shape image is denoted by I(W(x;p)). In
The characteristic position detecting section 220 calculates a differential image Ie between the average shape image I(W(x;p)) corresponding to each temporary setting position and the average face image A0(x) set in the AAM setting process (Step S230). The differential image Ie is a difference between pixel values of the average shape image I(W(x;p)) and the average face image A0(x) and is also referred to as a differential value in this embodiment. Since the differential image Ie does not appear when the setting positions of the characteristic points CP are identical to the positions of the characteristic portions, the differential image Ie represents a difference between the setting positions of the characteristic points CP and the positions of the characteristic portions. In this embodiment, since 81 types of the temporary setting positions of the characteristic points CP are set, the characteristic position detecting section 220 calculates 81 differential images Ie.
The characteristic position detecting section 220 calculates a norm from the pixel values of the differential images Ie and sets a temporary setting position (hereinafter, also referred to as a minimal-norm temporary setting position) corresponding to the differential image Ie having norm of the smallest value as the initial position of the characteristic points CP in the target image OI (Step S240). In this embodiment, the pixel value used for calculating the norm may be either a luminance value or an RGB value. In this embodiment, the “norm of the differential images Ie” corresponds to a “differential amount” according to an embodiment of the invention. Accordingly, the initial position setting process for the characteristic points CP is completed.
When the initial position setting process for the characteristic points CP is completed, the characteristic position detecting section 220 corrects the set position of the characteristic points CP in the target image OI (Step S150).
The characteristic position detecting section 220 calculates an average shape image I(W(x;p)) from the target image OI (Step S310). The method of calculating the average shape image I(W(x;p)) is the same as that in Step S220 of the initial position setting process for the characteristic points CP.
The characteristic position detecting section 220 calculates a differential image Ie between the average shape image I(W(x;p)) and the average face image A0(x) (Step S320). The characteristic position detecting section 220 determines whether the process for correcting the characteristic point CP setting position converges based on the differential image Ie (Step S330). The characteristic position detecting section 220 calculates the norm of the differential image Ie. When the value of the norm is smaller than a threshold value set in advance, the characteristic position detecting section 220 determines convergence. On the other hand, when the value of the norm is equal to or lager than the threshold value set in advance, the characteristic position detecting section 220 determines no convergence.
Alternatively, the characteristic position detecting section 220 may be configured to determine convergence for a case where the value of the norm of the calculated differential image Ie is smaller than that calculated in Step S320 at the previous time and determine no convergence for a case where the value of the norm is equal to or larger than the previous value. Furthermore, the characteristic position detecting section 220 may be configured to determine on the convergence by combining the determination on the basis of the threshold value and the determination on the basis of the comparison with the previous value. For example, the characteristic position detecting section 220 may be configured to determine only for a case where the value of the calculated norm is smaller than the threshold value and is smaller than the previous value and to determine no convergence for other cases.
When no convergence is determined in the above-described convergence determination in Step S330, the characteristic position detecting section 220 calculates the update amount ΔP of the parameter (Step S340). The update amount ΔP represents the amount of change in the values of the four global parameters (the overall size, the tilt, the position in the X-direction, and the position in the Y-direction) and n shape parameters pi calculated in the AAM setting process. In addition, right after setting the characteristic points CP to the initial position, the values determined in the initial position setting process for the characteristic points CP are set to the global parameters. In addition, since a difference between the initial position of the characteristic points CP and the set position of the characteristic points CP of the average shape s0 at this moment is limited to a difference of the overall size, the tilt, and the positions, all the values of the shape parameters pi of the shape model are zero.
The update amount ΔP of the parameters is calculated by using the following Equation (1). In other words, the update amount ΔP of the parameters is product of an update matrix R and the difference image Ie.
ΔP=R×Ie Equation (1)
The update matrix R represented in Equation (1) is a matrix of M rows×N columns that is set by learning in advance for calculating the update amount ΔP of the parameters based on the differential image Ie and is stored in the internal memory 120 as the AAM information AMI (
The equations (4) and (5) are known in the “Active Appearance Models Revisited” issued by lain et al. The characteristic position detecting section 220 updates the parameters (four global parameters and n shape parameters pi) based on the calculated update amount ΔP of the parameters (Step S350). Accordingly, the setting position of the characteristic points CP in the target image OI is updated. The characteristic position detecting section 220 updates the parameters such that the norm of the differential image Ie decreases. After update of the parameters is performed, again, the average shape image I(W(x;p)) is calculated (Step S310) from the target image OI for which the set position of the characteristic points CP has been corrected (Step S310), the differential image Ie is calculated (Step S320), and a convergence determination is made based on the differential image Ie (Step S330). In a case where no convergence is determined in the convergence determination performed again, additionally, the update amount ΔP of the parameters is calculated based on the differential image Ie (Step S340), and correction of the set position of the characteristic points CP by updating the parameters is performed (Step S350).
When the process from Step S310 to Step S350 shown in
When the initial position setting process for the characteristic points CP is completed, the characteristic portion reliability calculating portion 234 (
After calculating the characteristic portion reliability, the face area reliability calculating section 230 (
When the face area reliability is calculated, the determination section 240 (
The print processing unit 320 generates print data of the target image OI for which the face area reliability is calculated. In particular, the print processing unit 320 generates the print data by performing a color conversion process for adjusting pixel values of pixels to the ink used by the printer 100, a halftone process for representing the gray scales of pixels after the color conversion process by distribution of dots, a rasterization process for changing the data sequence of the image data, for which the halftone process has been performed, in the order to be transmitted to the printer 100, and the like for the target image OI. The printing mechanism 160 prints the target image OI for which the face area reliability has been calculated based on the print data generated by the print processing unit 320.
In addition, the print processing unit 320 does not necessarily need to generate the print data of the target image OI for which the face area reliability has been calculated. For example, a configuration in which whether to generate the print data is determined based on the value of the face area reliability calculated in Step S170 or the result of determination made in Step S180 may be used. In addition, it may be configured that the face area reliability or the result of the determination is displayed in the display unit 150, and the print data is generated based on user's selection whether to perform printing. Furthermore, the print processing unit 320 is not limited to generating the print data of the target image OI. Thus, the print processing unit 320 may generate the print data of an image, for which a predetermined process such as face transformation or correction for the shade of a face has been performed based on the shape and the position of the detected facial organ or the contour and the shape of a face. In addition, the printing mechanism 160 may print an image for which a process such as a face transformation or correction for the shade of a face has been performed based on the print data that is generated by the print processing unit 320.
The method of calculating the characteristic portion reliability calculated in the above-described Step S160 may be changed in various forms.
First, the user prepares a plurality images that includes person's faces as sample images SI (Step S410).
Then, the characteristic points CP are set for a face image that is included in each sample image SI (Step S420).
The position of each characteristic point CP in a sample image SI is specified by coordinates.
Subsequently, the user sets the shape model of the AAM (Step S430). In particular, the face shape s that is specified by the positions of the characteristic points CP is modeled by the following Equation (4) by performing a principal component analysis for a coordinate vector (see
In the above-described Equation (4), s0 is an average shape.
In the above-described Equation (4) representing a shape model, si is a shape vector, pi is a shape parameter that represents the weight of the shape vector si. The shape vector si is a vector that represents the characteristics of the face shape s and is an eigenvector corresponding to an i-th principal vector that is acquired by performing principal component analysis. As shown in the above-described Equation (4), in the shape model according to this embodiment, a face shape s that represents the disposition of the characteristic points CP is modeled as a sum of an average shape s0 and a linear combination of n shape vectors si. By appropriately setting the shape parameter pi for the shape model, the face shapes s in all the images can be reproduced.
In addition, the average shape s0 and the shape vector si that are set in the shape model setting step (Step S430) is stored in the internal memory 120 as the AAM information AMI (
Subsequently, a texture model of the AAM is set (Step S440). In particular, first, image transformation (“warp W”) is performed for each sample image SI, so that set positions of the characteristic points CP in the sample image SI are identical to those of the characteristic points CP in the average shape s0.
In addition, each sample image SIw is generated as an image in which an area (“mask area MA”) other than the average shape area BSA is masked by using the rectangular range including the average shape area BSA (denoted by being hatched in
Next, the texture (also referred to as an “appearance”) A(x) of a face is modeled by using the following Equation (5) by performing principal component analysis for a luminance value vector that is configured by luminance values for each pixel group x of each sample image SIw. In addition, the pixel group x is a set of pixels that are located in the average shape area BSA.
In the above-described Equation (5), A0(x) is an average face image.
In the above-described Equation (5) representing a texture model, Ai(x) is a texture vector, λi is a texture parameter that represents the weight of the texture vector Ai(x). The texture vector, λi(x) is a vector that represents the characteristics of the texture Ai(x) of a face. In particular, the texture vector Ai(x) is an eigenvector corresponding to an i-th principal component that is acquired by performing principal component analysis. In other words, m eigenvectors set based on the accumulated contribution rates in the order of the eigenvectors corresponding to principal components having the higher contribution rate are used as a texture vector Ai(x). In this embodiment, the first texture vector Ai(x) corresponding to the first principal component having the highest contribution rate is a vector that is approximately correlated with a change in the color of a face (may be perceived as a difference in gender).
As shown in the above-described Equation (5), in the texture model according to this embodiment, the face texture A(x) representing the outer appearance of a face is modeled as a sum of the average face image A0(x) and a linear combination of m texture vectors Ai(x). By appropriately setting the texture parameter λi in the texture model, the face textures A(x) for all the images can be reproduced. In addition, the average face image A0(x) and the texture vector Ai(x) that are set in the texture model setting step (Step S440 in
By performing the above-described AAM setting process, a shape model that models a face shape and a texture model that models a face texture are set. By combining the shape model and the texture model that have been set, that is, by performing transformation (an inverse transformation of the warp W shown in
As described above, according to the image processing apparatus of the first embodiment, the face area reliability is calculated by using the differential amount. Accordingly, the face area reliability can be calculated with higher accuracy.
In particular, the norm of the differential image Ie is calculated based on a differential value between the average shape image I(W(x;p)) and the average face image A0(x) that represent a difference between the position of the characteristic portion specified by the characteristic point CP and the position of the actual characteristic portion of a face. Accordingly, when the value of the norm of the differential images Ie converges to around 0 by updating the setting position of the characteristic points CP by using the update amount ΔP of the parameters, there is high possibility that the detected face area FA includes an actual face image. On the other hand, when the value of the norm of the differential images Ie does not converge and the value of the norm is maintained to be great even by updating the parameters, there is high possibility that an actual face image is not included in the detected face area FA. Accordingly, by using the norm of the differential images Ie, the face area reliability can be calculated with higher accuracy.
In addition, the norm of the corrected differential values Mr is calculated based on the differential image Ie. Accordingly, the norm of the corrected differential values Mr becomes a value corresponding to a difference between the position of the characteristic portion specified by the characteristic point CP and the position of the actual characteristic portion of a face. Accordingly, by using the corrected differential value Mr, as in the case where the norm of the differential image Ie is used, the face area reliability can be calculated with higher accuracy. In addition, by using the corrected differential value Mr, the characteristic portion reliability can be calculated by changing the contribution rate of each difference (differential portion) among a plurality of areas included in a face area to the reliability.
According to the image processing apparatus of the first embodiment, the face area reliability is calculated by using the characteristic portion reliability and the face area temporary reliability. Accordingly, the face area reliability can be calculated with higher accuracy. In particular, the face area reliability can be calculated by using two indices of the characteristic portion reliability calculated based on the differential amount and the face area temporary reliability calculated based on the face area FA detecting process. Therefore, the face area reliability can be calculated with higher accuracy.
According to the image processing apparatus of the first embodiment, the average value of the face area temporary reliability and the characteristic portion reliability is used as the face area reliability. Accordingly, the face area reliability can be calculated with higher accuracy. In particular, even when the face area FA is an image area corresponding to an actual face image, in a case where the face area temporary reliability is calculated to be low such as a case where the number of overlapping windows is small or a case where the maximum number of overlapping windows is great, the detected face area FA may be determined not to be an image area corresponding to an actual face image. However, in such a case, by using the average value of the face area temporary reliability and the characteristic portion reliability, the value of the face area reliability can be increased, whereby incorrect determination can be suppressed.
According to the printer 100 of the first embodiment, the target image OI of which the face area reliability is calculated can be printed. Accordingly, any arbitrary image can be selected so as to be printed based on the result of determination for the face area. In addition, an image for which a predetermined process such as a face transformation or shade correction for a face has been performed based on the shapes and the positions of facial organs or the contour and the shape of a face that have been detected can be printed. Accordingly, after the face transformation or the face-shade correction, or the like is performed for a specific face image, the face can be printed.
The determination section 240 determines the face area temporary reliability (Step S510). In particular, the determination section 240 compares the face area temporary reliability with a threshold value TH1. When the face area temporary reliability is less than the threshold value TH1 (Step S515: NO), the determination section 240 determines that the detected face area FA is not an image area corresponding to an actual face image (Step S517). In other words, in such a case, detection of a face area is determined to have failed. On the other hand, when the face area reliability is equal to or more than the threshold value TH1 (Step S515: YES), as in the first embodiment, the initial position setting for the characteristic points CP (Step S140), correction for the characteristic point CP setting position (Step S150), and calculation of the characteristic portion reliability (Step S160) are performed.
When the characteristic portion reliability is calculated, the determination section 240 determines the characteristic portion reliability (Step S530). In particular, the determination section 240 compares the characteristic portion reliability with a threshold value TH2. When the characteristic portion reliability is equal to or more than the threshold value TH2 (Step S531: YES), the determination section 240 determines that the position of the detected characteristic portion is the position of an actual characteristic portion of a face (Step S532). In other words, in such a case, detection of a characteristic portion is determined to have succeeded.
On the other hand, when the face area reliability is less than the threshold value TH2 (Step S531: NO), the determination section 240 compares the characteristic portion reliability with a threshold value TH3 (Step S533). The threshold value TH3 has a value less than that of the threshold value TH2. When the characteristic portion reliability is equal to or more than the threshold value TH3 (Step S533: YES), the determination section 240 determines that the position of the detected characteristic potion is not the position of an actual characteristic portion of a face (Step S534). In other words, detection of the characteristic portion is determined to have failed.
On the other hand, when the characteristic portion reliability is less than the threshold value TH3 (Step S533: NO), the determination section 240 determines that the detected face area FA is not an image area corresponding to an actual face image (Step S535). In other words, the detection of a face area is determined to have failed.
According to the second embodiment, the face area reliability that represents the reliability of detection of a face image included in a face area as an actual face image does not need to be a value calculated by using the face area temporary reliability and the characteristic portion reliability all the time. Thus, the face area temporary reliability may be the face area reliability or the characteristic portion reliability may be the face area reliability in accordance with the value of the face area temporary reliability or the characteristic portion reliability. In other words, according to the second embodiment, when the face area reliability is less than the threshold value TH1 (Step S515: NO), it is determined that the detected face area FA is not an image area corresponding to an actual face image. In such a case, the face area temporary reliability is used as the face area reliability. In addition, when the characteristic portion reliability is less than the threshold value TH3 (Step S533: NO), it is determined that the detected face area FA is not an image area corresponding to an actual face image. In such a case, the characteristic portion reliability is used as the face area reliability. According to the second embodiment, whether the detected face area FA is an image area corresponding to an actual face image can be determined with high accuracy. In other words, the face area reliability having high accuracy can be calculated.
Furthermore, the invention is not limited to the above-described embodiments or examples. Thus, various embodiments can be performed without departing from the scope of the base idea of the invention. For example, the following modifications can be made.
In the above-described embodiment, the determination is made on the basis of the face area reliability by using the determination section 240. However, a configuration in which the determination section 240 is not included and only the face area reliability is output may be used.
In the above-described embodiment, an average value of the face area temporary reliability and the characteristic portion reliability is used as the face area reliability. However, the invention is not limited thereto. Thus, any arbitrary weighted value may be used as the face area reliability.
By using the face area detecting and the characteristic portion reliability of the above-described embodiment, face authentication can be performed by using a frame having high characteristic portion reliability when a face area FA is consecutively acquired from a motion picture in real time. Accordingly, the accuracy of face authentication can be improved.
In this embodiment, the sample image SI is only an example, and the number and the types of images used as the sample images SI may be set arbitrarily. In addition, the predetermined characteristic portions of a face that are represented in the positions of the characteristic points CP in this embodiment are only an example. Thus, some of the characteristic portions set in the above-described embodiments can be omitted, or other portions may be used as the characteristic portions.
In addition, in this embodiment, the texture model is set by performing principal component analysis for the luminance value vector that is configured by luminance values for each pixel group x of the sample image SIw. However, the texture mode may be set by performing principal component analysis for index values (for example, RGB values) other than the luminance values that represent the texture of the face image.
In addition, in this embodiment, the size of the average face image A0(x) is not limited to 56 pixels×56 pixels and may be configured to be different. In addition, the average face image A0(x) needs not to include the mask area MA (
In addition, in this embodiment, the shape model and the texture model that use the AAM are set. However, the shape model and the texture model may be set by using any other modeling technique (for example, a technique called a Morphable Model or a technique called an Active Blob).
In addition, in this embodiment, the image stored in the memory card MC is configured as the target image OI. However, for example, the target image OI may be an image that is acquired through a network. In addition, the detection mode information may be acquired through a network.
In addition, in this embodiment, the image processing performed by using the printer 100 as an image processing apparatus has been described. However, a part of or the whole processing may be configured to be performed by an image processing apparatus of any other type such as a personal computer, a digital still camera, or a digital video camera. In addition, the printer 100 is not limited to an ink jet printer and may be a printer of any other type such as a laser printer or a sublimation printer.
In this embodiment, a part of the configuration that is implemented by hardware may be replaced by software. On the contrary, a part of the configuration implemented by software may be replaced by hardware.
In addition, in a case where a part of or the entire function according to an embodiment of the invention is implemented by software (computer program), the software may be provided in a form being stored on a computer-readable recording medium. The “computer-readable recording medium” in an embodiment of the invention is not limited to a portable recording medium such as a flexible disk or a CD-ROM and includes various types of internal memory devices such a RAM and a ROM and an external memory device of a computer such as a hard disk that is fixed to a computer.
Number | Date | Country | Kind |
---|---|---|---|
2009-034041 | Feb 2009 | JP | national |