An image generator configured to generate a face detecting image used in a face detection processing, the image generator comprising: a representative luminance calculation unit configured to calculate a representative luminance value (Yav) representing a luminance value (Ya) of a photographed image obtained by photographing; and a gamma conversion unit configured to generate the face detecting image by performing gamma conversion processing on the photographed image, a luminance value of each pixel of the photographed image being converted using a gamma value, wherein the gamma conversion processing is performed using an arithmetic expression having a conversion characteristic corresponding to the gamma value, wherein the gamma conversion unit is configured to perform the gamma conversion processing using a first gamma value when the representative luminance value (Yav) calculated by the representative luminance calculation unit is greater than or equal to a predetermined threshold (Yth) and the gamma conversion unit is configured to perform the gamma conversion processing using a second gamma value when the representative luminance value (Yav) is less than the predetermined threshold (Yth), the second gamma value being smaller than the first gamma value such that a face detecting image lighter than the face detecting image obtained by using the first gamma value is obtained, wherein the predetermined threshold (Yth) is larger than 0.25 and smaller than 0.41 when the possible representative luminance value (Yav) ranges from 0 to 1, the first gamma value is larger than 0.55 and smaller than 1, and the second gamma value is larger than 0.15 and smaller than 1. a representative luminance calculation unit configured to calculate a representative luminance value (Yav) representing a luminance value (Ya) of a photographed image obtained by photographing; and a gamma conversion unit configured to generate the face detecting image by performing gamma conversion processing on the photographed image, a luminance value of each pixel of the photographed image being converted using a gamma value, wherein the gamma conversion processing is performed using an arithmetic expression having a conversion characteristic corresponding to the gamma value, wherein the gamma conversion unit is configured to perform the gamma conversion processing using a first gamma value when the representative luminance value (Yav) calculated by the representative luminance calculation unit is greater than or equal to a predetermined threshold (Yth) and the gamma conversion unit is configured to perform the gamma conversion processing using a second gamma value when the representative luminance value (Yav) is less than the predetermined threshold (Yth), the second gamma value being smaller than the first gamma value such that a face detecting image lighter than the face detecting image obtained by using the first gamma value is obtained, wherein the predetermined threshold (Yth) is larger than 0.25 and smaller than 0.41 when the possible representative luminance value (Yav) ranges from 0 to 1, the first gamma value is larger than 0.55 and smaller than 1, and the second gamma value is larger than 0.15 and smaller than 1.