In an OCT apparatus for obtaining a tomogram using optical interference between signal light and reference light, a first distance between a specific image and a coherence gate is obtained from a first tomogram obtained by imaging. The coherence gate is moved by a set moving distance along a predetermined moving direction. The positional relationship between the specific image and the coherence gate is determined based on the position of the specific image in a second tomogram obtained by imaging after movement of the coherence gate and the position of the specific image in the first tomogram.