1. A pattern detection apparatus comprising: an input unit configured to input an image of an object including repetitive patterns; an estimation unit configured to estimate a period of the repetitive patterns in the object input by said input unit; a generation unit configured to generate a reference image based on images divided by the period estimated by said estimation unit; a comparison unit configured to compare the reference image generated by said generation unit and the image of the object input by said input unit; and a pattern detection unit configured to detect positions of individual patterns in the repetitive patterns based on a comparison result of said comparison unit.