1. An apparatus comprising: an obtaining unit configured to obtain a range image including a target object; a holding unit configured to hold sample points obtained from a three-dimensional shape model of the target object; an association unit configured to associate pixels in the range image with the sample points except for a pixel which does not store a distance value in the range image; and a derivation unit configured to derive a position and orientation of the target object based on a result of an association by the association unit.