1. A position and orientation measurement apparatus comprising: storage means for storing a three-dimensional model of a target object; two-dimensional image obtaining means for obtaining a two-dimensional image of the target object; extraction means for extracting an occluded region in which illumination irradiated onto the target object is occluded in the two-dimensional image; projection means for projecting a line segment that constitutes the three-dimensional model onto the two-dimensional image based on approximate values of position and orientation of the target object; association means for associating a point that constitutes the projected line segment with a point that constitutes an edge in the two-dimensional image as a pair; determination means for determining whether the associated point that constitutes an edge in the two-dimensional image is present within the occluded region; and position and orientation measurement means for measuring the position and orientation of the target object based on a distance on the two-dimensional image between the point that constitutes the projected line segment and the point that constitutes the edge in the two-dimensional image, the points being associated as the pair, and a result of the determination made by the determination means with respect to the point that constitutes the edge in the two-dimensional image.