Provided is an image processing apparatus configured to process an image acquired by an acquiring unit configured to acquire a plurality of pixel value rows aligned in a depth direction of an object to be measured based on interference light obtained by causing return light of scanned measurement light from the object to be measured and reference light corresponding to the measurement light to interfere with each other, a forming unit configured to form a two-dimensional image based on a pixel value selected in accordance with a predetermined selection criterion from each of the plurality of pixel value rows, a setting unit configured to set a selection range of the selected pixel value in the depth direction in each of the plurality of pixel value rows, and a criterion changing unit configured to change the predetermined selection criterion in accordance with the set selection range are provided.