A subject component removed signal is obtained from an image signal representing an image by performing, with respect to a first direction and/or a second direction that is different from the first direction, one-dimensional filtering processing using a subject component removal filter that removes a low frequency component including a subject component of the image to roughly remove the subject component. Further, frequency components corresponding to the periodic pattern in the subject component removed signal are detected with respect to both of the first direction and the second direction.