An image processing apparatus according to the present invention includes a first identifying unit configured to identify the position of at least a part of a layer boundary based on a tomography image of a target to be captured, a setting unit configured to set a search range for a portion whose position has not been identified by the first identifying unit based on a depth directional position of the layer boundary whose position has been identified by the first identifying unit, and a second identifying unit configured to identify the position of a layer boundary portion whose position has not been identified based on a luminance value in the search range having been set.