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 division unit configured to divide the image into divided images based on the period estimated by said estimation unit; a correction unit configured to correct a dividing position of the divided images with respect to a position of the patterns; a generation unit configured to generate a reference image based on the divided images corrected with respect to the position of the patterns; 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.