1. An image processing apparatus, comprising: one or more processors; and one or more memories storing instructions that, when executed by the one or more processors, cause the image processing apparatus to perform operations comprising: extracting a feature point from an input image including an image region which includes pixels having different depth values; determining a transformation matrix to normalize depth values of pixels of a vicinity of the feature point in the input image to be the same value; generating, in accordance with the determined transformation matrix, an image by transforming pixel positions of the vicinity of the feature point; and calculating a feature amount from a region of the vicinity of the feature point in the generated image, wherein the determining determines, as the transformation matrix, a matrix that causes a normal vector of a plane including three-dimensional coordinates of the pixels in the vicinity of the feature point which are represented by coordinates of the pixels of the vicinity of the feature point and depth values of the pixels to be parallel with a depth direction of the input image.