1. An ophthalmologic apparatus comprising:a detection unit configured to detect a movement amount of a subject's eye;
an error obtaining unit configured to obtain a value of tracking error based on a result of the detection;
a determining unit configured to determine each position of a plurality of scanning lines at intervals corresponding to the value of tracking error;
a tomographic image obtaining unit configured to obtain a plurality of tomographic images by scanning each position of the plurality of scanning lines with measurement light; and
a generation unit configured to generate an averaged tomographic image by averaging pixel values of the plurality of tomographic images obtained by the tomographic image obtaining unit,
wherein the determining unit determines the intervals based on the value of tracking error.