Abstract:
An electronic image is received by a system to process the image for the presence of a face. The image is repeatedly electronically scanned using a plurality of windows for the presence of facial poses. A plurality of directional poses is detected during the scanning process. Reliabilities for each type of detected poses are calculated. The reliabilities are based on the amount of times the directional poses are detected during the scanning process and directions of the directional poses.

Description:
[0001]    This application claims priority to Japanese Patent Application No. 2009-291960, filed Dec. 24, 2009, the entirety of which is incorporated by reference herein. 
       BACKGROUND 
       [0002]    The present invention relates to an image processing apparatus capable of detecting a face from an image. 
         [0003]    Regarding detecting human faces in an image, there has been known a technique regarding a face detection system, which performs learning on the basis of a plurality of sample image data, to determine and detect whether or not an image region within a detection window set in the image is a face region (refer to JP-A-2009-32018). 
         [0004]    In the photographed image, faces in various poses may exist. For example, the photographed image may capture not only faces (frontal faces) which are directed to the front or substantially to the front but also faces (profile faces) which are turned by a certain degree in the horizontal direction and faces (tilted faces) for which the lengthwise directions are tilted with respect to the image. In such a situation, when the faces turned to various directions are intended to be detected, two methods are mainly used. The first method detects faces (the faces and the poses thereof) from the inside of the image by use of a single face detector which learns on the basis of an enormous volume of sample image data so as to be able to detect faces in all poses. The second method provides a face detector (a frontal face detector), which learns only frontal face detection, another detector (a profile face detector), which learns only profile face detection, and the like and individually applies the frontal face detector and the profile face detector to the image. 
         [0005]    In the first method, it is difficult to generate one face detector capable of accurately detecting the poses of faces in all poses. Hence, problems arise in low detection accuracy and slow detection speed. Therefore, the second method is employed in order to solve the problems of the corresponding first method. However, in the second method, it is problematic that a plurality of detection results can be generated from one face. Specifically, when the frontal face detector is used for the person&#39;s face captured in an image, one face may be detected (a frontal face), and when the profile face detector is used therefor, another face may be also detected (a profile face). That is, if poses of a plurality of faces are detected, it is problematic as to which detection result is correct and should be adopted. 
       SUMMARY 
       [0006]    An advantage of the invention is to provide an image processing apparatus capable of appropriately determining which pose is correct when a plurality of poses is detected from the same face so as to thereby contribute to high accuracy and fast face detection. 
         [0007]    According to an aspect of the invention, an image processing apparatus includes: a detection section that performs a process of detecting an image of a face, which is turned to a predetermined direction, on poses of a plurality of faces by determining the presence/absence of the image of the face, which is turned to a predetermined direction, from the basis of image information within an input image; and a determination section that, when a pose overlap region in which the face images of the plurality of face poses are multiply detected by the detection section is generated, calculates reliabilities of the detection results for each pose of the face images detected in the pose overlap region and determines the pose of the face images which reside in the pose overlap region depending on the comparison result of the respective calculated reliabilities. 
         [0008]    In the aspect of the invention, reliabilities of the detection results are calculated for each pose of the face images detected in the pose overlap region, the respective reliabilities are compared, and a pose of a higher reliability is determined as the pose of the face images which reside in the pose overlap region. Hence, when a plurality of poses is detected from the same face, it is possible to appropriately determine which pose is correct. As a result, the pose of face is determined fast with a high accuracy as compared with the related art. 
         [0009]    The detection section may repeatedly perform a process of setting detection windows within the input image for each target pose of the plurality of faces and determining the presence/absence of a face image with the target pose on the basis of image information within the detection window by changing the detection window, and the determination section may calculate reliabilities on the basis of the number of times the face images are detected in the pose overlap region, for each pose of the face images detected in the pose overlap region. With such a configuration, it is possible to appropriately calculate the reliabilities of the detection results for each pose of the face images detected in the pose overlap region on the basis of a numerical value of the number of detections for each pose. 
         [0010]    Furthermore, the determination section may calculate the reliabilities of the detection results for each pose of the face images detected in the pose overlap region by respectively correcting the number of detections of the face image in the pose overlap region for each pose of face images detected in the pose overlap region with predetermined correction coefficients corresponding to the poses of the face images. With such a configuration, where it is difficult to compare priorities of the detection results detected for each pose in a simple comparison of the numbers of times detected for each pose, it is possible to calculate more appropriate reliabilities by use of comparison. 
         [0011]    In the course of repeatedly performing the process of determining the presence/absence of the face image by changing the detection window, the detection section may exclude a region in which the number of times that the face image can be detected exceeds a predetermined threshold from the detection window setting target, for the detection of the face images which correspond to the one corresponding face pose and other face poses. With such a configuration, when the face image corresponding to the one face pose can be detected many times to some extent that the face image is reliably present in the region including the input image, then the process of detecting the face image is suspended. Hence, it is possible to reduce the processing load of the image processing apparatus. 
         [0012]    The detection section may be able to respectively detect an image of a face which is directed substantially to the front and an image of a face which is turned from the frontal pose. Furthermore, the detection section may be able to respectively detect a face image of a pose which is upright (not tilted) with respect to the input image and a face image of a pose which is tilted with respect to the input image. With such a configuration, in the case of detecting one face image as a frontal face and detecting the face image as a profile face, or in the case of detecting the face image as a frontal face and detecting the face image as a tilted face, it is possible to appropriately determine the pose of the face image on the basis of the reliabilities based on the detection results of the respective poses. 
         [0013]    The determination section may change a correspondence relationship between the pose of the face image and the correction coefficient depending on whether the input image is a still image or a moving image. According to the corresponding configuration, for example, when the input image is a still image, it is possible to make the detected face image be easily determined as a frontal face. In addition, when the input image is a moving image, it is possible to make the detected face image be easily determined as a profile face. 
         [0014]    When the calculated reliabilities are the same, the determination section may determine the pose of the face image which resides in the pose overlap region on the basis of the predetermined priority between the poses of the face. With such a configuration, even when the calculated reliabilities are the same, it is possible to appropriately and finally determine the pose of the face image which resides in the pose overlap region. The priority between the poses of the face may be set to be changed depending on, for example, whether the input image is a still image or a moving image. 
         [0015]    The technical idea of the invention can be realized by means other than the image processing apparatus. For example, the idea can be realized as a method of providing the processing processes which are performed by the respective parts of the above-mentioned image processing apparatus, and a program causing a prescribed hardware (such as a computer built in an image processing apparatus) to execute the functions which are performed by the respective parts of the above-mentioned image processing apparatus. Further, the image processing apparatus may be a single apparatus, and may be a system formed of a plurality of devices. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0016]    The invention will be described with reference to the accompanying drawings. 
           [0017]      FIG. 1  is a block diagram illustrating a schematic configuration of an example of an image processing apparatus. 
           [0018]      FIG. 2  is a flowchart illustrating a face image detection/determination process. 
           [0019]      FIG. 3  is a diagram illustrating an example of image data. 
           [0020]      FIG. 4  is a flowchart illustrating details of a frontal face detection process. 
           [0021]      FIG. 5  is a diagram illustrating a setting of a detection window in the image data. 
           [0022]      FIG. 6  is a diagram illustrating an example of a frontal face detector. 
           [0023]      FIG. 7  is a diagram illustrating an example of a condition in which a rectangular filter is applied to the image within the detection window. 
           [0024]      FIG. 8  is a diagram illustrating an example of a detection success window which is stored as a result of the frontal face detection process. 
           [0025]      FIG. 9  is a flowchart illustrating details of a profile face detection process. 
           [0026]      FIG. 10  is a diagram illustrating an example of a detection success window which is stored as a result of the profile face detection process. 
           [0027]      FIG. 11  is a diagram illustrating an example of a condition in which the detection window is set in the image data which is rotated in the clockwise rotation direction. 
           [0028]      FIG. 12  is a diagram illustrating an example of a condition in which the detection window is set in the image data which is rotated in the counter-clockwise rotation direction. 
           [0029]      FIG. 13  is a diagram illustrating an example of the detection success windows which is stored through the face detection process performed on each pose. 
           [0030]      FIG. 14  is a flowchart illustrating a process of selecting any of the two detection success windows. 
           [0031]      FIG. 15  is a diagram illustrating an example of the detection success window which is stored as a result of the face image detection/determination process. 
           [0032]      FIG. 16  is a block diagram schematically illustrating a system according to a modified example. 
           [0033]      FIG. 17  is a flowchart illustrating a part of the face image detection/determination process according to the modified example. 
           [0034]      FIG. 18  is a flowchart illustrating a part of a process of selecting any of the two detection success windows according to the modified example. 
       
    
    
     DETAILED DESCRIPTION 
       [0035]    Schematic Configuration of Image Processing Apparatus: 
         [0036]      FIG. 1  schematically shows a configuration of a printer  10  as an example of an image processing apparatus according to an embodiment of the invention. The printer  10  prints an image on the basis of image data which is acquired from a computer readable storage medium (for example, a memory card MC or the like), and supports so-called direct printing. The printer  10  is provided with: a CPU  11  which controls respective units of the printer  10 ; an internal memory  12  which includes, for example, a ROM and a RAM; an operation unit  14  which includes buttons or a touch panel; a display unit  15  which includes a liquid crystal display; a printer engine  16 ; a card interface (card I/F)  17 ; and an I/F unit  13  which connects with external devices such as a personal computer (PC), a server, a digital still camera, and a scanner. The components of the printer  10  are interconnected through a bus. 
         [0037]    The print engine  16  is a printing mechanism which performs a printing operation on the basis of print data. The card I/F  17  is an I/F used for exchanging data with the memory card MC which is inserted into a card slot  172 . In the memory card MC, image data is stored, and the printer  10  can receive an input of the image data, which is stored in the memory card MC, through the card I/F  17 . As a storage medium used for providing the image data, various media other than the memory card MC can be used. The printer  10  is able to receive the image data as an input from the external devices, which are connected thereto through the I/F unit  13 , other than the storage medium. The printer  10  may receive the print data as an input from a PC or a server which is connected through the I/F unit  13 . 
         [0038]    The internal memory  12  contains a face image detection section  20 , a face image determination section  30 , a display processing section  40  and a print processing section  50 . The face image detection section  20  and the face image determination section  30  are computer programs which are used for performing a face image detection/determination process, which will be described further under a prescribed operating system. The display processing section  40  is a display driver which displays the processing menu, or the message on the display unit  15  by controlling the display unit  15 . The print processing section  50  is a computer program used for generating the print data from the image data, and printing an image based on the print data by controlling the printer engine  16 . The CPU  11  reads the programs from the internal memory  12 , and executes the programs, thereby implementing functions of the respective sections. 
         [0039]    The face image detection section  20  includes: a detection window setting portion  21  as a program module; a frontal face detection portion (frontal face detector)  22 ; a profile face detection portion (profile face detector)  23 ; an image rotation portion  24 ; and an overlapping window unification portion  25 . The functions of the respective portions will be described elsewhere The face image detection section  20  performs a process of detecting an image of a face, which is turned to a predetermined direction, from poses of a plurality of faces by determining the presence/absence of the image of the face based on image information within an input image. Further, the face image determination section  30 , when a pose overlap region (in which the face images of the plurality of face poses are multiply detected by the detection section) is generated, calculates reliabilities of the detection results for each pose of the face images detected in the pose overlap region, and determines the pose of the face images which reside in the pose overlap region depending on the comparison result of the respective calculated reliabilities. The printer  10  may be a printing apparatus intended for consumer use or may be an office printing apparatus intended for DPE use (so-called minilab machine). Further, the printer  10  may be a multi-function peripheral which also has various other types of functions, such as a copy function and a scan function. 
         [0040]    Face Image Detection/Determination Process: 
         [0041]      FIG. 2  shows a face image detection/determination process, which is performed by the printer  10 , via a flowchart. In S 100 , the face image detection section  20  acquires image data D, which represents an image (the input image) as an image processing target, from the prescribed storage medium such as the memory card MC. The input image described herein is a still image. When the printer  10  includes a hard disk drive (HDD), the face image detection section  20  acquires the image data D stored in the corresponding HDD, and can also acquire the image data D from the external devices connected therewith through the I/F unit  13  as described above. The image data D is bitmap data generated from a plurality of pixels. For example, each pixel can be represented by a combination of gray levels (for example, 256 gray levels ranging from 0 to 255) of each RGB channel. 
         [0042]      FIG. 3  shows an example of the image data D. In the image data D according to the example, human faces P 1 , P 2 , and P 3  are captured. Here, the face P 1  is a frontal face which is directed substantially to the front, but the lengthwise direction of the face is tilted with respect to the vertical direction of the image data D. The face P 2  is an upright frontal face. The face P 3  is upright, but is a profile face (a side face) where the entire face is turned to the left side (the left side in the image) in the image data D. 
         [0043]    In S 200 , the face image detection section  20  performs the frontal face detection process on the image data D. In addition, when the process during and after S 200  is performed on the image data D with the input image size, the processing load of the printer  10  may be excessively increased. This can be presented by reducing the image size, for example, by allowing the face image detection section  20  to reduce the number of pixels in the image data D, and the process during and after S 200  may be performed on the reduced image data. The reduced image data is also represented as the image data D for the sake of convenience. 
         [0044]      FIG. 4  details S 200  (the frontal face detection process) in a flowchart. In S 210 , the detection window setting portion  21  sets one detection window SW in the image data D. The detection window setting portion  21  sets the detection window SW as described in the following example. 
         [0045]      FIG. 5  shows a condition in which the detection window SW is set in the image data D. In the first execution of S 210 , the detection window setting portion  21  sets the rectangular detection window SW (the chain double-dashed line), which includes a plurality of pixels and has a predetermined size, at a beginning position (for example, the left top corner position of the image) within the image. In the second execution of S 210 , the detection window setting portion  21  moves the detection window SW in a horizontal direction and/or a vertical direction by a predetermined distance (by a predetermined number of pixels). Then, the detection window setting portion  21  sets a new detection window SW at the moved position. The detection window setting portion  21  repeatedly sets the detection window SW while moving the detection window SW centrally to a last position (for example, the right bottom corner position of the image) of the image data D, where the size of the detection window SW is maintained, and then sets the detection window SW back to the beginning position. 
         [0046]    When the detection window SW is returned to the beginning position, the detection window setting portion  21  reduces the detection window SW, i.e., the rectangle is reduced in size. Then, in the same manner as described above, the detection window setting portion  21  sets the detection window SW at each position while moving the detection window SW to the last position of the image data D, during which the reduced size of the detection window SW is maintained. The detection window setting portion  21  repeats the movement and the setting of the detection window SW (repeats the change of the detection window SW) for further reduced sizes of the detection window SW in a stepwise fashion for a predetermined amount of times. As described above, when one detection window SW is set in S 210 , the process during and after S 220  is performed. 
         [0047]    In S 220 , the frontal face detection portion  22  determines the presence/absence of the frontal face on the basis of the image information in the latest detection window SW which is set in S 210 . 
         [0048]      FIG. 6  is a diagram illustrating a frontal face detector  22   a  used by the frontal face detection portion  22 . The frontal face detector  22   a  has a plurality of (N) determination stages St 1  to StN connected in series. In each determination stage St, based on the result obtained by applying one or more rectangular filters F to the image within the detection window SW, “Accept”, (i.e., a value that the frontal face is present) or “Reject” (i.e., a value to the effect that the frontal face is absent) is output as the determination result. During the first determination stage St 1 , only when “Accept” is output, the determination in the next determination stage St 2  is performed. Also during and after the determination stage St 2 , only when “Accept” is output, the process advances to the next determination stage St. In the last determination stage StN, when “Accept” is output, the frontal face detector  22   a  determines that a frontal face is present in the detection window SW (detection success of a frontal face). On the other hand, when “Reject” is output in several determination stages St, the frontal face detector  22   a  determines that a frontal face is absent in the detection window SW (detection failure of a frontal face). 
         [0049]      FIG. 7  shows an example of a condition in which the rectangular filter F 11  provided in advance is applied to the image within the detection window SW in the determination stage St 1 . Here, the image within the detection window SW is represented as image data WD. In  FIG. 7 , the rectangular filter F 11  (a kind of the rectangular filter F) is superimposed on the image data WD. The image data WD and the rectangular filter F 11  have a square shape with the same size. In the rectangular filter F 11 , the regions A 11   a  and A 11   b  for extracting an amount of characteristic of the image are set. If the image data WD on which the rectangular filter F 11  is superimposed includes a frontal face, the region A 11   a  is set to the range in which it is estimated that the nose of the corresponding face is present. In addition, if the image data WD on which the rectangular filter F 11  is superimposed includes a frontal face, the regions A 11   b  are set to the ranges in which it is estimated that the right and left cheeks of the corresponding face are present. When the rectangular filter F 11  is superimposed on the image data WD, the frontal face detector  22   a  calculates the summation Ysum 1  of the brightness of the pixels in the region A 11   a,  and calculates the summation Ysum 2  of the brightness of the pixels within the regions A 11   b.  Then, if a difference E (an absolute value) between both summations is equal to or more than a predetermined threshold Th 11 , the frontal face is highly likely to be present, and thus a value U 11  is output as the result (a filter determination value) obtained by applying the rectangular filter F 11 . In contrast, if the corresponding difference E of both summations is less than a predetermined threshold Th 11 , the frontal face is less likely to be present, and thus a value V 11  is output as the filter determination value. Here, U 11 &gt;V 11 . All of the thresholds Th 11  and the values U 11  and V 11  are predetermined values which are set in advance so as to correspond to the rectangular filter F 11 . 
         [0050]    In the determination stage St 1 , similarly to the case where the rectangular filter F 11  is applied by using the plurality of rectangular filters F provided in advance in addition to the rectangular filter F 11 , the respective rectangular filters F are applied to the image data WD, thereby acquiring the filter determination values of the respective rectangular filters F. The regions (corresponding to the regions A 11   a  and A 11   b ) for extracting the amount of image characteristics are mutually different in position and size between the respective rectangular filters F. Thus, the thresholds, which are used in the comparison of the difference E and the like, and the filter determination values as outputs may be not the same. In addition, in the determination stage St 1 , the summation of the respective filter determination values, which can be obtained as results by applying the respective rectangular filters F, is calculated. Then, if the summation of the filter determination values is equal to or more than the predetermined threshold which is set in advance in the determination stage St 1 , “Accept” is output. In contrast, if the summation of the filter determination values is smaller than the threshold which is set in advance in the determination stage St 1 , “Reject” is output. Likewise, also in the following determination stages St 2  to StN, the threshold determination is performed on the summation of the filter determination values by use of the plurality of rectangular filters F provided for each stage, thereby outputting “Accept” or “Reject”. It is apparent that the number and the contents of the used rectangular filters F and the thresholds for comparing with the summation of the filter determination values may be different for each determination stage. Specifically, in the image processing apparatus of the embodiment, the frontal face detector  22   a  is provided in advance. The frontal face detector  22   a  performs learning on the basis of the plurality of sample image data generated from the frontal face image, the near frontal face image, and other face images, thereby optimizing the rectangular filters F, the thresholds, the filter determination values, and the like. 
         [0051]    In S 230 , the frontal face detection portion  22  branches the process in accordance with the determination result of the previous S 220 . That is, if the detection of a frontal face is successful in the previous S 220 , the process advances to S 240 . In contrast, if the detection of a frontal face fails in the previous S 220 , the process advances to S 250 . 
         [0052]    In S 240 , the frontal face detection portion  22  stores information, which relates to the detection window SW (the detection window SW which succeeds in detection of the face image) set in the previous S 210 , in a predetermined region of the internal memory  12 . Here, the stored information includes the position of detection window SW (for example, the center coordinates of the detection window SW in the image data D), the size of the rectangle of the detection window SW, the pose of the face image which resides (is certain to reside) in the detection window SW, the rotation angle of the rectangular filter F, and the like. Hereinafter, the detection window SW, which succeeds in detection of the face image, is also referred to as a detection success window SSW. 
         [0053]    It should be understood that, “the pose of the face (the face image)” includes the “profile” of the face and the “tilt” of the face. The “profile” of the face includes profiles which are turned to the horizontal direction (refer to the face P 3  of  FIG. 3 ) and the vertical direction, and thus means a situation in which the face is turned to any of the up, down, right, or left side from the frontal pose (no profile) as a reference. The “tilt” of the face means the tilt (refer to the face P 1  of  FIG. 3 ) of the lengthwise direction of the face with respect to the vertical direction of the image data D or the horizontal direction of the image data D. In the corresponding S 200  (the frontal face detection process), the face image is detected as a frontal face which is upright, and thus information to the effect that there is no profile to the face and uprightness of the face is stored as “the pose of the face image”. 
         [0054]    “The rotation angle of the rectangular filter F” is a rotation angle which is formed by rotating the rectangular filter F when the frontal face detector  22   a  superimposes the rectangular filter F on the image of the detection window SW in S 220 , and is any one of 0° (no rotation), 90°, 180°, and 270°. The rotation angle of the rectangular filter F is common in the first S 220 . In the above description of S 220 , since the rectangular filter F is not rotated, (S 230  interlaid in between) in the next S 240 , the rotation angle of the rectangular filter F is stored as “0°”. In the current S 200  (the frontal face detection process), the process of S 220  to S 240  is repeatedly performed on the first set detection window SW the number of times (four times) corresponding to the number of the rotation angles of the rectangular filter F (refer to S 250 ). That is, in the second S 220 , each rectangular filter F is rotated by 90° with reference to 0°, and is then applied to the next detection window SW. In the third S 220 , each rectangular filter F is rotated by 180° with reference to 0°, and is then applied to the next detection window SW. In the fourth S 220 , each rectangular filter F is rotated by 270° with reference to 0°, and is then applied to the next detection window SW. In such a manner, even when the upper side of the face within the detection window SW is directed toward any of the top, bottom, left, and right side of the detection window SW, it is possible to detect a face within the detection window SW. 
         [0055]    In S 260 , with regard to setting the detection window SW described by use of  FIG. 5 , the detection window setting portion  21  may still have another cycle of setting the detection window SW by moving the detection window SW and further reducing the size thereof. In this case, the process returns to S 210 , and one detection window SW is newly set in the image data D. On the other hand, if setting the detection window SW by repeatedly reducing the detection window SW a predetermined number of times is completed, the process advances to S 270 . 
         [0056]    In S 270 , if the detection success windows SSW which can be obtained from the image data D through the process of S 210  to S 260  performed hitherto overlap with each other, the overlapping window unification portion  25  unifies the overlapped detection success windows SSW. The overlapping window unification portion  25  specifies and unifies the detection success windows SSW overlapping in the image data D with reference to the information (the positions and sizes of the detection success windows SSW) stored in the internal memory  12  in S 240  mentioned above. 
         [0057]      FIG. 8  shows an example of a plurality of detection success windows SSW (the detection success windows SSW 1  to SSW 7 ) stored as windows which succeeded in detection of frontal faces, where the process of S 210  to S 260  is performed on the image data D. Here,  FIG. 8  shows only a partial range of the image data D. As described above, the detection windows SW are repeatedly set while shifting in position by an amount of several pixels and changing in size in the image data D. Hence, as shown in  FIG. 8 , in the vicinity of the face P 2  as an upright frontal face, the frontal face detection is successfully achieved by using a plurality of detection windows SW of which positions and sizes are slightly different from each other. The overlapping window unification portion  25  specifies a plurality of detection success windows SSW to be unified, among the plurality of detection success windows SSW, in accordance with a degree of the overlap. For example, when the overlapping window unification portion  25  sets one detection success window SSW as an attention window, there may be another detection success window SSW which overlaps with the attention window in an area of a predetermined percent (for example, about 70 percent) or more. In this case, the overlapping window unification portion  25  specifies the corresponding attention window and another detection success window SSW as unification targets. 
         [0058]    The overlapping window unification portion  25  specifies a set of the detection success windows SSW as the unification target by sequentially setting all the detection success windows SSW, which can be obtained from the image data D, as the attention windows as described above. In the example of  FIG. 8 , the detection success windows SSW 1  to SSW 6  overlap with each other in a large area, and thus are specified as a set of unification targets. The detection success window SSW 7  overlaps with a part of the detection success window SSW 1 , but the overlap area is small, and thus the detection success window SSW 7  does not belong to the set of the unification targets. The detection success window SSW 7  is stored as a detection success window SSW although there is no upright frontal face in practice (a tilted frontal face (the face P 1 ) and the like are detected as the upright frontal faces). In other words, a region, in which more and more detection success windows SSW overlap with each other in the image data D, is determined more likely to include a face (here, an upright frontal face) which is set as the detection target in practice at that time. 
         [0059]    The overlapping window unification portion  25  unifies the set of the detection success windows SSW (the detection success windows SSW 1  to SSW 6 ) which are specified as the unification targets, and thereby generates a new detection success window SSW. For example, the positions and the sizes of the respective detection success windows SSW 1  to SSW 6  constituting the corresponding set are averaged, and a rectangle having the averaged position and size is formed as a new detection success window SSW 8 . In  FIG. 8 , an example of the detection success window SSW 8  is indicated by the chain line. The overlapping window unification portion  25  stores the information (the position, the size, the pose of the face image, and the rotation angle of the rectangular filter F), which relates to the detection success window SSW 8 , in the internal memory  12 . In addition, the overlapping window unification portion  25  removes the information, which relates to the respective detection success windows SSW 1  to SSW 6  belonging to the set as a unification source of the detection success window SSW 8 , from the internal memory  12 . The pose of the face image and the rotation angle of the rectangular filter F in the information on the detection success window SSW 8  are the same as the poses of the face images (no profile of the face and uprightness of the face) and the rotation angles (0°) of the rectangular filters F of the detection success windows SSW 1  to SSW 6  formed as the unification source. In addition, it is convenient to think that the rotation angle of the rectangular filter F is common to the detection success windows SSW 1  to SSW 6  formed as the unification source. 
         [0060]    In S 280 , as a result of the process of S 210  to S 270 , currently, the face image detection section  20  adds the number of detections (successes) Vfe to the information on the detection window SW (the detection success window SSW) stored in the internal memory  12 . Here, the number of detections Vfe=1 is given to each detection success window SSW (in the example of  FIG. 8 , the detection success window SSW 7 ) which is not determined as a unification target in S 270 . In contrast, the number of detections Vfe corresponding to the number of the detection success windows SSW formed as the unification source, is added to the information of each detection success window SSW generated by the unification in S 270  (regarding the detection success window SSW 8  generated by unifying the detection success windows SSW 1  to SSW 6 , the number of detections Vfe thereof is equal to 6). It is not necessary to perform the additional process of giving the number of detections Vfe in S 280 , and the process may be performed in S 240  and/or S 270  instead. As a result of the process of S 210  to S 260 , if the detection success windows SSW overlapping with each other are absent, the process of S 270  is not performed. In addition, as a result of the process of S 210  to S 260 , if all of the detection success windows SSW are absent, the process of S 270  and the process of giving the number of detections are not performed (hereinafter the same). Accordingly, the process of S 200  (the frontal face detection process) is terminated. 
         [0061]    In S 300  ( FIG. 2 ), the face image detection section  20  performs a profile face detection process on the image data D. 
         [0062]      FIG. 9  shows a flowchart of a profile face detection process S 300 . The profile face detection process S 300  is different from the process of S 200  in that the face image as a detection target is a profile face which is turned in the horizontal direction (to the left side or the right side). However, the basic process flow is the same as described with regards to the process of S 200  ( FIG. 4 ). S 310  is largely the same as S 210 . In S 320 , the profile face detection portion  23  determines the presence/absence of a horizontal profile face on the basis of the image information in the latest detection window SW which is set in S 310 . Specifically, in the image processing apparatus of the embodiment, similarly to where the frontal face detector  22   a  is provided, a profile face detector is provided. The profile face detector is formed of respective determination stages of performing learning on the basis of a plurality of sample image data generated from the image of a horizontal profile face and other face images so as to thereby optimize the rectangular filters F, the thresholds, the filter determination values, and the like. In addition, the profile face detection portion  23  determines the presence/absence (success/failure of detection of the profile face) of the horizontal profile face in the detection window SW by using the profile face detector. 
         [0063]    In S 330 , similarly to S 230 , the profile face detection portion  23 , branches the process in accordance with the determination result of S 320 . If the detection of a profile face was successful in the previous S 320 , the process advances to S 340 . In contrast, if the detection of a profile face failed in the previous S 320 , the process advances to S 350 . In S 340 , similarly to S 240  the profile face detection portion  23  stores information (the position, size, pose of a face image and the rotation angle of the rectangular filter F), which relates to the detection window SW (the detection success window SSW) set in S 310 , in a predetermined region of the internal memory  12 . In the corresponding S 300  (the profile face detection process), the face image is detected as an upright profile face which is turned horizontally, and thus information to the effect that the profile (the horizontal profile) of a face is present and uprightness of the face is stored as “the pose of the face image”. S 350  and S 360  are largely the same as the S 250  and S 260 . In S 370 , similarly to S 270 , if the detection success windows SSW obtained from the image data D through S 310  to S 360  overlap with each other, the overlapping window unification portion  25  unifies the overlapped detection success windows SSW. 
         [0064]      FIG. 10  shows an example of a plurality of detection success windows SSW (the detection success windows SSW 9  to SSW 16 ) stored as windows that succeeded in detecting horizontal profile faces in S 310  to S 360  performed on the image data D. Here,  FIG. 10  shows only a partial range of the image data D. In the example of  FIG. 10 , the detection success window SSW 9  is located at a position of the face P 1 , the detection success windows SSW 10  and SSW 11  are overlapped at a position at which the windows encloses a half of the face P 2 , and the detection success windows SSW 12  to SSW 16  are overlapped at the position of the face P 3 . Accordingly, the overlapping window unification portion  25  unifies the detection success windows SSW 10  and SSW 11  into a new detection success window SSW 17 , and unifies the detection success windows SSW 12  to SSW 16  into a new detection success window SSW 18 . The detection success window SSW 9  to SSW 11  are stored as detection success windows SSW although there is no profile face detected, e.g., a tilted frontal face (the face P 1 ) and a half of an upright frontal face (the face P 2 ) are detected as the upright profile faces). 
         [0065]    In S 370 , similarly to S 270 , the overlapping window unification portion  25  stores the respective information (the position, the size, the pose of the face image, and the rotation angle of the rectangular filter F), which relates to respective detection success windows SSW 17  and SSW 18  generated by the unification, in the internal memory  12 . In addition, the overlapping window unification portion  25  removes information which relates to detection success windows SSW 10  and SSW 11 , which were the unification sources of detection success window SSW 17 , and also the information which relates to detection success windows SSW 12  to SSW 16 , which were the unification sources of detection success window SSW 18 , from the internal memory  12 . The poses of the face images and the rotation angles of the rectangular filters F in the information of windows SSW 17  and SSW 18  are respectively the same as the poses of the face images (the horizontal profile of the face and uprightness of the face) and the rotation angles (0°) of the rectangular filters F of the detection success windows SSW 10  and SSW 11 , and the detection success windows SSW 12  to SSW 16 . 
         [0066]    In S 380 , as a result of S 310  to S 370 , and similarly to S 280 , the face image detection section  20  adds the number of detections (successes) Vpe to the information on the detection success window SSW stored in the internal memory  12 . Here, the number of detections Vpe=1 is given to each detection success window SSW (in the example of  FIG. 10 , SSW 9 ) which is not determined as the unification target in S 370 . In contrast, the number of detections Vpe=2 corresponding to unified detection success windows SSW 10  and SSW 11  is given to detection success window SSW 17 . Likewise, the number of detections Vpe=5 corresponding to unified detection success windows SSW 12  to SSW 16  is given to success window SSW 18 . Accordingly, the process of S 300  (the profile face detection process) ends. 
         [0067]    In S 400  ( FIG. 2 ), the image rotation portion  24  rotates all of the image data D by a predetermined angle. 
         [0068]    In S 500 , the face image detection section  20  performs the frontal face detection process on the image data D which was rotated in S 400 . The frontal face detection process performed in S 500  is largely the same as the frontal face detection process of S 200  (refer to  FIG. 4 ). However, the rectangle of the detection window SW set in the image data D is not parallel to the vertical side and horizontal side of the image data D as shown in  FIG. 11  since the image data D was tilted.  FIG. 11  shows a condition in which the detection window SW is set in the image data D which was rotated by 30° in the clockwise rotation direction (+side) in S 400 . 
         [0069]    In the frontal face detection process of S 500 , if the information on the detection success window SSW is stored in the internal memory  12  (the process corresponding to S 240 ), and if the information on the detection success window SSW after the unification of the plurality of detection success windows SSW is stored in the internal memory  12  (the process corresponding to S 270 ), then information that there is no profile to the face and that the face is tilted (tilt=−30°) is stored. That is, in S 400 , when the image data D is rotated by 30° in the clockwise rotation direction (+side) and then it is determined that a frontal face is present, this leads to the following determination. The corresponding face is tilted by about 30° in the counter-clockwise rotation direction (−side) with respect to the vertical direction or the horizontal direction of the image data D in the image data D. Hence, the information that the face is tilted (tilt=−30°) is stored. Further, in the frontal face detection process of S 500 , if the information of the detection success window SSW is stored in the internal memory  12  as a result of S 210  to S 270 , the number of detections (successes) Vfg is added to the corresponding information (the process corresponding to S 280 ). Also in this case, the number of detections Vfg=1 is given to each detection success window SSW which is not determined as the unification target. In addition, the number of detections Vfg corresponding to the number of the detection success windows SSW formed as the unification source is given to each detection success window SSW generated by the unification. If the image data D exemplified in  FIG. 3  is the process target, there is no frontal face which is tilted by about 30° in the counter-clockwise rotation direction. Hence, there is a low possibility that a face image will be detected in the corresponding S 500 . 
         [0070]    In S 600 , the face image detection section  20  performs the profile face detection process on the image data D which was rotated in S 400 . The profile face detection process performed in S 600  is largely the same as the profile face detection process of S 300  (refer to  FIG. 9 ). In the profile face detection process of S 600 , if the information on the detection success window SSW, which is determined to have succeeded in detection of a profile face, is stored in the internal memory  12  (the process corresponding to S 340 ), and if the information on the detection success window SSW after the unification of the plurality of detection success windows SSW is stored in the internal memory  12  (the process corresponding to S 370 ), regarding the pose of the face image, then the information that the face is turned (horizontal profile) and the face is tilted (tilt=−30°) is stored. Further in S 600 , if the information about the detection success window SSW is stored in the internal memory  12  as a result S 310  to S 370 , then the number of detections (successes) Vpg is added to the corresponding information (the process corresponding to S 380 ). Also, the number of detections Vpg=1 is given to each detection success window SSW which is not determined as the unification target. In addition, the number of detections Vpg corresponding to the number of the detection success windows SSW formed as the unification source is given to each detection success window SSW generated by the unification. If the image data D exemplified in  FIG. 3  is the process target, there is no profile face which is tilted by about 30° in the counter-clockwise rotation direction. Hence, there is a low possibility that a face image will be detected in the corresponding S 600 . 
         [0071]    In S 700 , the image rotation portion  24  rotates the entire image data D by a predetermined angle in the direction opposite to the rotation direction of S 400 . In S 800 , the face image detection section  20  performs the frontal face detection process on the image data D which was rotated in S 700 . The frontal face detection process performed in S 800  is largely the same as the frontal face detection process of S 500 . The rectangle of the detection window SW set in the image data D is not parallel to the vertical side and horizontal side of the image data D as shown in  FIG. 12  since the image data D itself is tilted.  FIG. 12  shows a condition in which the image data D rotated in S 400  is rotated by 60° in the counter-clockwise rotation direction (−side) in S 700  and then the detection window SW is set in the image data D in S 800 . 
         [0072]    In the frontal face detection process of S 800 , if the information on the detection success window SSW, which is determined to have succeeded in detection of a frontal face, is stored in the internal memory  12  (the process corresponding to S 240 ), and if the information on the detection success window SSW after the unification of the plurality of detection success windows SSW is stored in the internal memory  12  (the process corresponding to S 270 ), regarding the pose of the face image, then the information that there is no profile to the face and the face is tilted (tilt=+30°) is stored. That is, in S 700 , when the image data D is rotated by 60° in the counter-clockwise rotation direction (−side) and then it is determined that the frontal face is present, this leads to the following determination. The corresponding face is tilted by about 30° in the clockwise rotation direction (+side) with respect to the vertical direction or the horizontal direction of the image data D in the image data D. Hence, the information that the face is tilted (tilt=+30°) is stored. Also in S 800 , similarly to S 500 , the number of detections (successes) Vfg can be added as the information on the detection success window SSW (the process corresponding to S 280 ). If the image data D exemplified in  FIG. 3  is the process target, then there is a frontal face which is tilted by about 30° in the clockwise rotation direction. Hence, in the corresponding S 800 , there is a high possibility that the detection success window SSW (the detection success window SSW into which the plurality of detection success windows SSW is unified) will be generated and positioned to include the face P 1 . 
         [0073]    In S 900 , the face image detection section  20  performs the profile face detection process on the image data D which was rotated in S 700 . The profile face detection process performed in S 900  is largely the same as the profile face detection process of S 600 . In the profile face detection process of S 900 . If the information on the detection success window SSW, which is determined to have succeeded in detection of the profile face, is stored in the internal memory  12  (the process corresponding to S 340 ), and if the information on the detection success window SSW after the unification of the plurality of detection success windows SSW is stored in the internal memory  12  (the process corresponding to S 370 ), regarding the pose of the face image, then the information that the face is turned (horizontal profile) and that the face is tilted (tilt=+30°) is stored. Also in S 900 , similarly to S 600 , the number of detections (successes) Vpg can be added as the information on the detection success window SSW (the process corresponding to S 380 ). If the image data D exemplified in  FIG. 3  is the process target, there is no profile face which is tilted by about 30° in the clockwise rotation direction. Hence, there is a low possibility that the face image will be detected in the corresponding S 900 . 
         [0074]      FIG. 13  shows detection success windows SSW (including the ununified detection success windows and the detection success windows which are generated by unifying the plurality of detection success windows), which are stored in the internal memory  12  via S 100  to S 900 , in the image data D.  FIG. 13  exemplifies the detection success windows SSW 7 , SSW 8 , SSW 9 , SSW 17 , SSW 18 , SSW 19 , and SSW 20 . The detection success windows SSW 7  and SSW 8  are stored in S 200  as described above (refer to  FIG. 8 ), and the detection success windows SSW 9 , SSW 17 , and SSW 18  are stored in S 300  as described above (refer to  FIG. 10 ). Further, the detection success window SSW 19  is stored in S 800  (the detection of the tilted frontal face), and for example, the number of detections Vfg is equal to 6. Further, the detection success window SSW 20  is stored in S 900  (the detection of the tilted profile face), and for example, the number of detections Vpg is equal to 1. As shown in  FIG. 13 , the detection success windows SSW 7 , SSW 9 , and SSW 19  overlap with each other on the face P 1 , the detection success windows SSW 8 , SSW 17  overlap with each other on the face P 2 , and the detection success windows SSW 18  and SSW 20  overlap with each other on the face P 3 . Consequently, in image data D, as a result of the process of S 100  to S 900 , the plurality of face poses are detected from all of the faces P 1  to P 3 . 
         [0075]    In S 1000 , the face image determination section  30  selects two detection success windows SSW, for use as comparison targets from the information of the detection success windows SSW which are stored in the internal memory  12  from S 100  to S 900 . 
         [0076]    In S 1100 , the face image determination section  30  determines whether or not the comparison targets, i.e., the two selected detection success windows SSW from S 100 , overlap with each other. For example, one of the two detection success windows SSW is set as the attention window. If the attention window overlaps with the other detection success window SSW in an area of a predetermined percent or more, it is determined that the corresponding two detection success windows SSW overlap with each other. When it is determined that the two detection success windows SSW overlap with each other, the region formed by the two detection success windows SSW corresponds to a pose overlap region. 
         [0077]    If the face image determination section  30  determines that the two detection success windows SSW overlap with each other in S 1100 , the process advances to S 1200 . In contrast, if it is determined that the two detection success windows SSW do not overlap with each other, the process advances to S 1400 . S 1000  and S 1100  are performed on all possible combinations of the detection success windows SSW from S 100 -S 900 . 
         [0078]      FIG. 14  details S 1200  in a flowchart. In S 1210 , the face image determination section  30  calculates respective reliabilities of the detection results from S 1100 , i.e., two detection success windows overlapping to a predetermined extent. In the face image determination section  30 , the number of detections may be defined to be equal to the reliability. For example, overlapping detection success windows SSW 8  and SSW 17  (refer to  FIG. 13 ) may be set as comparison targets. In this case, the reliability of the pose (no profile to the face and uprightness of the face) of the face corresponding to the detection success window SSW 8  is equal to the number of detections Vfe (=6) for the detection success window SSW 8 . In addition, the reliability of the pose (the profile of the face and uprightness of the face) of the face corresponding to the detection success window SSW 17  is equal to the number of detections Vpe (=2) for the detection success window SSW 17 . 
         [0079]    The face image determination section  30  calculates the reliabilities of the detection results for each pose of the face images detected in the pose overlap region by respectively correcting the number of detections of the detection success window SSW with a predetermined correction coefficient corresponding to each pose of the face images. In the embodiment, the correction coefficient corresponding to a frontal face (no profile) is set as (a) the correction coefficient corresponding to a profile face is set as (b), (a) and (b) being predetermined values. Accordingly, the face image determination section  30  calculates the reliability of the pose (no profile to the face and uprightness of the face) of the face of the detection success window SSW 8  as the number of detections (a)Vfe for the detection success window SSW 8 , and calculates the reliability of the pose (the profile of the face and uprightness of the face) of the face of the detection success window SSW 17  as the number of detections (b)Vpe for the detection success window SSW 17 . 
         [0080]    As described above, the correction coefficients a and b are provided because the respective accuracies of singular detections corresponding to different pose faces may not be the same. That is, the accuracy of the frontal face detection performed by the frontal face detection portion (the frontal face detector)  22  may not coincide with the accuracy of the profile face detection performed by the profile face detection portion (the profile face detector)  23 . In particular, in the profile face detection portion  23 , the variety of the profile face as a detection target is large, and thus it is more difficult to increase the detection accuracy as compared with the frontal face detection portion  22 . Thus, the number of detections of the detection success window SSW corresponding to the frontal face and the number of detections of the detection success window SSW corresponding to the profile face are respectively corrected by the correction coefficients (a) and (b) corresponding to the poses of the faces. In such a manner, the difference between the detection accuracies is compensated, thereby enabling comparison between the corrected both values. Here, basically, (a)&gt;(b). 
         [0081]    In S 1220 , the face image determination section  30  determines whether or not there is a difference between the two reliabilities, by comparing the reliabilities of the two detection success windows SSW as the comparison targets. If there is a difference between the reliabilities, the process advances to S 1260 , the detection success window SSW corresponding to a higher reliability is selected. From the example above, when the reliability corresponding to the detection success window SSW 8  and the reliability corresponding to the detection success window SSW 17  are compared, the reliability corresponding to the detection success window SSW 8  of the frontal face with a larger number of detections is greater, and thus the detection success window SSW 8  is selected in S 1260 . In contrast, if it is determined that there is no difference between the two reliabilities in S 1220 , the face image determination section  30  selects, on the basis of the predetermined priority order of the face poses, one of the two detection success windows SSW set as the comparison targets. 
         [0082]    If there is no determined difference in reliabilities, then the face image determination section  30  determines whether or not there is the comparison between the frontal face and the profile face in S 1230 . Continuing the example from above, the detection success window SSW 8  and the detection success window SSW 17  are set as the comparison targets, with success window SSW 8  corresponding to a frontal face and detection success window SSW 17  corresponding to a profile face, and thus “Yes” is determined in the corresponding S 1230 . In this case, the face image determination section  30  advances the process to S 1270 , and selects the detection success window SSW corresponding to the frontal face. That is, in the case where the reliabilities are the same, if there is the comparison between the frontal face and the profile face, the frontal face is prioritized (the determination that the frontal face is present in the pose overlap region is prioritized). In contrast, if it is determined that a frontal face and a profile face are not being compared in S 1230 , then the face image determination section  30  advances the process to S 1240 . For example, (this would be true for) a comparison between the detection success windows SSW 7  and SSW 19 , respectively corresponding to a upright frontal face and a tilted frontal face (refer to  FIG. 13 ). 
         [0083]    In S 1240 , the face image determination section  30  determines whether or not there is a comparison between an upright face image and a titled face image. For example, if the detection success window SSW 7  and the detection success window SSW 19  are used, this is the respective comparison between an upright face image and a titled face image, and thus “Yes” is determined in the corresponding S 1240 . In this case, the face image determination section  30  advances the process to S 1280 , and selects the detection success window SSW corresponding to the upright face image. Accordingly, if the reliabilities are the same and there is no comparison between the frontal face and the profile face, the upright face image is prioritized (the determination that the upright face image is present in the pose overlap region is prioritized). 
         [0084]    However, if it is determined that there is no comparison between the upright face image and the titled face image in S 1240 , the face image determination section  30  advances the process to S 1250 . The process advances to S 1250 , which is a result the two detection success windows SSW have the same reliabilities and have the same poses of the face images. From this it is inferred that originally one unified detection success window SSW was divided into two. Accordingly, the face image determination section  30  unifies the two detection success windows SSW set as the comparison targets. The unification method is as described above. Then, the information corresponding to the unified detection success window SSW is stored in the internal memory  12 . A case advancing the process to S 1250  may be very rare. 
         [0085]    In S 1300  ( FIG. 2 ), the face image determination section  30  removes the information corresponding to the detection success window SSW which was not selected in S 1200 . In addition, if the above-mentioned process of S 1250  is performed in S 1200 , the information, which corresponds to the two detection success windows SSW as the unification source of the detection success windows SSW unified in S 1250 , is removed. As a result, the overlap state between the detection success windows SSW, which are determined to overlap with each other in the previous S 1100 , is released. That is, the pose of the face image which is selected in S 1200 , between the two detection success windows SSW determined to overlap with each other in S 1100 , is determined as the pose of a face image which is present in the shared region, unless there are further detection success windows SSW in the shared region). 
         [0086]    In S 1400 , if combination of the detection success windows SSW which are not yet used as comparison targets in S 1000  still exists among the detection success windows SSW of which the information are stored in the internal memory  12 , the face image determination section  30  returns the process to S 1000 . Then, the face image determination section  30  processes the information of two detection success windows SSW, which are a combination of not yet compared windows, as new comparison targets. In contrast, in S 1400 , if the face image determination section  30  determines that all combinations of the applicable detection success windows SSW were used as comparison targets in S 1000 , then the face image determination process is terminated. 
         [0087]      FIG. 15  shows an example of the detection success windows SSW in the image data D in S 1400  when it is determined that all the combinations of the detection success windows SSW were used as comparison targets in S 1000 . By comparing  FIG. 15  (at the time of the end of S 1400 ) with  FIG. 13  (at the time of the end of S 900 ), it is noted that: the detection success windows SSW 7  and SSW 9  are removed from the detection success windows SSW 7 , SSW 9 , and SSW 19  which overlap with each other on the face P 1 ; the detection success window SSW 17  is removed from the detection success windows SSW 8  and SSW 17  which overlap with each other on the face P 2 ; and the detection success window SSW 20  is removed from the detection success windows SSW 18  and SSW 20  which overlap with each other on the face P 3 . In other words, the face image determination section  30  determines that the face image of the face pose (no profile and a tilt=+30°) relating to the detection success window SSW 19  is present in the region in which the detection success windows SSW 7 , SSW 9 , and SSW 19  overlap with each other. The face image determination section  30  also determines that the face image of the face pose (no profile and upright) relating to the detection success window SSW 8  is present in the region in which the detection success windows SSW 8  and SSW 17  overlap with each other. In addition, the face image determination section  30  also determines that the face image of the face pose (the profile (the horizontal profile) and upright) relating to the detection success window SSW 18  is present in the region in which the detection success windows SSW 18  and SSW 20  overlap with each other. 
         [0088]    As described above, the printer  10  repeatedly sets the detection window SW while changing the position and the size of the detection window SW in the image data D, and attempts to detect a face image having a certain pose on the basis of the image information within the detection window SW when setting the detection widow SW. In addition, when the detection of the face image of the corresponding pose is repeated, a plurality of the detection success windows SSW which succeed in detection may overlap with each other. In this case, the plurality of the corresponding detection success windows SSW overlapping with each other is unified into one, and the number of detections in the corresponding overlap region is stored (the number of the detection success windows SSW of the unification source). Further, by changing the face pose as the detection target, the process is performed on the plurality of face poses. As a result, when the detection success windows SSW corresponding to the poses of the different faces overlaps with each other, that is, when a plurality of poses is detected from the same face, the reliabilities of the poses of the faces for each overlapped detection success window SSW are calculated on the basis of the numbers of detections for each overlapped detection success window SSW. In addition, the face pose corresponding to the detection success window SSW having a higher reliability is determined as the pose of a face image which is present in the corresponding overlap region. Hence, when the plurality of poses is detected from the same face in the image data, the pose (profile of the face and tilt of the face) of the corresponding face is determined faster and with a higher accuracy as compared with the prior art. In addition, by accurately determining the face pose from which a plurality of poses are detected in the image data, it is possible to accurately perform various processes, which require the face pose as information, such as a modification process for a face and a process of monitoring a person. 
       ALTERNATIVE EMBODIMENTS 
       [0089]    The invention is not limited to the above-mentioned embodiments, and may be modified into various forms without departing from the technical scope of the invention. Additionally, the following modified examples fall under this scope. It is apparent that the technical scope of the invention also involves configurations obtained by combinations of the embodiments and the modified examples. The above description may be also applied to items which are not described in the following section. 
       Example 1 
       [0090]    The face image detection section  20  performs the process, which determines the presence/absence of the face image for one face pose of a plurality of face poses as detection targets, multiple times in the image data D by changing the detection window SW. In the course of this process, the region, in which the number of times that the face image can be detected exceeds the predetermined threshold, may be thereafter excluded from the targets for setting detection windows SW in order to detect the face image corresponding to the one face pose and the other face pose. That is, the face image detection section  20  detects a face image (for example, the upright frontal face) of a certain pose by repeatedly setting the detection window SW. In the course of the detection, if the detection success windows SSW overlap with each other, at each time of occurrence of the overlap, the face image detection section  20  counts the number of overlaps (that is, the number of detections) of the detection success windows SSW within the region in which the corresponding overlap occurs. By using the count, if the upright frontal face is detected (S 200 ), the process advances to the above-mentioned S 240 . 
         [0091]    In addition, at a time when the count value for a group including the detection success windows SSW (a group of the detection success windows SSW overlapping with each other) exceeds a predetermined threshold, the face image detection section  20  unifies the group of the detection success windows SSW as described above, and stores information (including the number of detections) on the unified detection success windows SSW in the internal memory  12 . Then, the region within the image data D corresponding to the unified detection success windows SSW is excluded from the face image detection targets, and thereafter the setting of the detection window SW is also not performed thereon. That is, on the basis of the corresponding count value being larger than the threshold, it is determined that the face of the pose set as a detection target at the time is reliably present in the corresponding region, and thus the face image detection process is performed no more on the corresponding region. As a result, for example, in the course of the upright profile face detection (S 300 ), if there is a region in which the detection success windows SSW, of which the number exceeds the corresponding threshold, for the upright profile face overlaps with each other, the region corresponding to the detection success window SSW, which is obtained after the overlapped detection success windows SSW are unified, may not be subjected to the following face image detection including the face image detection for different poses. Hence, it is possible to greatly reduce the processing load of the printer  10 . 
       Example 2 
       [0092]    In the above-mentioned example, the image processing apparatus is embodied as the printer  10 . However, the image processing apparatus may be embodied as various image processing devices such as a PC, a server, a digital camera, and a scanner. That is, the various image processing devices functionally have at least the face image detection section  20  and the face image determination section  30 , and perform the face image detection/determination process on the input image. 
       Example 3 
       [0093]    The image processing apparatus may change the correspondence relationship between the pose of a face image and the correction coefficients (a) and (b) depending on whether the input image is a still image or a moving image.  FIG. 16  schematically shows the system according to the modified example. In the modified example, the image data generated through photographing by a camera  60  is output to a PC  70  capable of communicating with the camera  60  through a wired or wireless connection. The PC  70  corresponds to an example of the image processing apparatus according to the embodiment. The PC  70  implements the functions of the face image detection section  20  and the face image determination section  30  by executing related programs. The camera  60  is able to photograph both still images and moving images. In the corresponding configuration, the PC  70  determines whether the image data which is input from the camera  60  corresponds to a still image or a moving image. It is determined whether the image data corresponds to a still image or a moving image, with reference to, for example, information in the header attached to the image data, the file format of the image, and the like. If the PC  70  determines that the image data corresponds to a still image, correction coefficients (a) and (b), which are set for the still image in advance, are used. If the PC  70  determines that the image data corresponds to a moving image, correction coefficients (a′) and (b′), which are set for the moving image in advance, are used. The correction coefficients (a) and (b) for the still image satisfies the relationship of (a)&gt;(b), and the correction coefficients (a′) and (b′) for the moving image satisfies the relationship of (a)&lt;(b). 
         [0094]    Specifically, when the face image detection determination process is intended to be performed on the image data as a still image as described above, the reliability of the number of detections of the detection success window SSW corresponding to the frontal face (no profile) is calculated through correction using the correction coefficient (a) which is set for the still image. In addition, the reliability of the number of detections of the detection success window SSW corresponding to the profile face is calculated through correction using the correction coefficient (b) which is set for the still image. On the other hand, when the face image detection determination process is intended to be performed on the respective stills of the image data taken from a moving image, the reliability of the number of detections of the detection success window SSW corresponding to the frontal face is calculated through correction using the correction coefficient (a′) which is set for a moving image. In addition, the reliability of the number of detections of the detection success window SSW corresponding to the profile face is calculated through correction using the correction coefficient (b′) which is set for the moving image. 
         [0095]    According to the corresponding configuration, in the case where the input image is a still image, it becomes comparatively simpler to determine the pose of the face image, which is detected from the inside of the image, from a non-profile pose (frontal pose). In addition, when the input image is a moving image, it becomes easy to determine the pose of the face image, which is detected from the inside of the image, as a profile pose. That is, since the still image is mostly photographed in front of a person, by setting (a)&gt;(b) as described above, it becomes simpler to determine the pose of the face image which matches with its actual pose (it is possible to prevent the frontal face from being determined as a profile face). On the other hand, in the case of video cameras, such as a surveillance camera, for taking moving images, a walking person is usually photographed from the side. Hence, by setting (b′)&gt;(a′) as described above, it becomes easy to determine the pose of the face image which matches with the actual pose of the moving image taken by a video camera (it is possible to prevent a profile face from being determined as a frontal face). Further, in the case where the input image is a moving image, if it is determined that there is a comparison between the frontal face and the profile face in S 1230  ( FIG. 14 ), the detection success window SSW corresponding to the profile face may be selected in S 1270 . 
       Example 4 
       [0096]    In the above description, the profile face detection portion (the profile face detector)  23  sets a horizontal profile face as the detection target. However, an upward/downward profile face may be detected in addition thereto. The upward/downward profile face means that an upwardly-turned face (an upward face) or a downwardly-turned face (a downward face). That is, in the image processing apparatus of the modified example, just as the frontal face detector  22   a  and the profile face detector (for detecting the horizontal profile face) are provided, a profile face detector for detecting the upward/downward profile face is provided in advance. The profile face detector is formed of respective determination stages of performing learning on the basis of a plurality of sample image data generated from the image of upward/downward profile faces and other face images so as to thereby optimize the rectangular filters F, the thresholds, the filter determination values, and the like. In addition, by using the profile face detector for detecting upward/downward profile faces, the profile face detection portion  23  performs the following S 350 , S 650 , and S 950 , and determines the presence/absence (success/failure of detection of a profile face) of the upward/downward profile face for the image in the detection window SW. 
         [0097]    S 350 , S 650 , and S 950  are incorporated in the range of S 100  to S 1000  of  FIG. 2  mentioned above at predetermined timings, for example, as shown in  FIG. 17 . In S 350 , the face image detection section  20  performs an upward/downward profile face detection process on the image data D. The profile face detection process performed in S 350  is largely the same as the process of S 300  (refer to  FIG. 9 ) except that the profile face detector for detecting an upward/downward profile face is used. In the profile face detection process of S 350 , if the information on the detection success window SSW, which is determined to have succeeded in detection of the profile face, is stored in the internal memory  12  (the process corresponding to S 340 ), and if the information on the detection success window SSW after the unification of the plurality of detection success windows SSW is stored in the internal memory  12  (the process corresponding to S 370 ), regarding the pose of the face image, the information that the face is turned (upward/downward profile) and the face is upright is stored. 
         [0098]    In S 650 , the face image detection section  20  performs the upward/downward profile face detection process on the image data D which was rotated in S 400 . The profile face detection process performed in S 650  is largely the same as the profile face detection process of S 350 . However, in the profile face detection process of S 650 , if the information on the detection success window SSW, which is determined to have succeeded in detection of the profile face, is stored in the internal memory  12  (the process corresponding to S 340 ), and if the information on the detection success window SSW after the unification of the plurality of detection success windows SSW is stored in the internal memory  12  (the process corresponding to S 370 ), regarding the pose of the face image, then information that the face is turned (upward/downward profile) and the face is tilted (tilt=−30°) is stored. In S 950 , the face image detection section  20  performs the upward/downward profile face detection process on the image data D which was rotated in S 700 . The profile face detection process performed in S 950  is the same as the profile face detection process of S 650 . However, in the profile face detection process of S 950 , if the information on the detection success window SSW, which is determined to have succeeded in detection of the profile face, is stored in the internal memory  12  (the process corresponding to S 340 ), and if the information on the detection success window SSW after the unification of the plurality of detection success windows SSW is stored in the internal memory  12  (the process corresponding to S 370 ), regarding the pose of the face image, then information that the face is turned (upward/downward profile) and the face is tilted (tilt=+30°) is stored. 
         [0099]    As described above, the face image detection section  20  is able to respectively detect, regarding the profile of the face, the non-profile face (the frontal face), the horizontally turned profile face, and the upwardly-or-downwardly turned profile face, through the detection window SW. In this case, the face image determination section  30  uses correction coefficients (a), (b), and (c) when calculating the reliabilities in S 1210  ( FIG. 14 ). Coefficient (b) is a correction coefficient for calculating a reliability by correcting the number of detections of the detection success window SSW corresponding to a horizontal profile face. Coefficient (c) is a correction coefficient for calculating a reliability by correcting the number of detections of the detection success window SSW corresponding to an upward/downward profile face. Basically, in the relationship of (b)=(c), for example, if the input image is a still image, (a)&gt;(b) or (c), and if the input image is a moving image, (a)&lt;(b) or (c). As described above, the face image detection section  20  is able to respectively detect, regarding the profile of the face, the non-profile face (the frontal face), the horizontally turned profile face, and the upward/downward profile face, through the detection window SW. In this case, the face image determination section  30  performs the following S 1245  and S 1290 . 
         [0100]    S 1245  is incorporated, for example, as shown in  FIG. 18 , at a predetermined timing after the determination if there is no difference between the reliabilities of the two detection success windows SSW which are set as the comparison targets in S 1220  of  FIG. 14 . In this example, after “No” is determined in S 1240 , the face image determination section  30  determines whether or not there is a comparison between a horizontal profile face and a upward/downward profile face in S 1245 . If “Yes,” the process advances to S 1290 , and if “No,” the process advances to S 1250 . In S 1290 , on the basis of the prescribed priority criterion (here, it is assumed that the horizontal profile face is prioritized), any one of the detection success window SSW corresponding to the horizontal profile face and the detection success window SSW corresponding to the upward/downward profile face is selected. However, it is inferred that the detection success window SSW corresponding to the horizontal profile face is less likely to overlap with the detection success window SSW corresponding to an upward/downward profile face in the image data in practice. 
         [0101]    The magnitude relation of the correction coefficients (a), (b), and (c) are not limited to the above description. For example, the input image may be photographed by the camera  60  (for example, a security camera of ATM) installed at a position at which the supposed subject is photographed from the upper side or the lower side of the subject. In this case, by setting the correction coefficient (c) of the correction coefficients (a), (b), and (c) to a larger value, the face pose detected from the input image may be easily determined as the upward/downward profile. Further, the input image may be photographed by the camera  60  (for example, a camera that photographs a walking person) installed at a position at which the supposed subject is photographed from the side of the subject. In this case, by setting the correction coefficient b of the correction coefficients (a), (b), and (c) to a larger value, the face pose detected from the input image may be easily determined as the horizontal profile. That is, in accordance with the photographing position and angle of the camera  60 , the setting of the correction coefficients (a), (b), and (c) may be changed.