摘要 |
When generating distance data, a stereo matching unit (30) searches for a corresponding point on a reference image (G2) corresponding to each pixel on a base image (G1). A distance image generation unit (31) generates distance data based on the corresponding points. When a plurality of corresponding points are searched out for one target pixel, a corresponding point determination unit (32) calculates at least partial subject shape around the target pixel based on distance values of a plurality of pixels around the target pixel, calculates a target distance value, which is a distance value of the target pixel, with respect to each of the plurality of corresponding points based on the target pixel and each of the plurality of corresponding points, and determines a valid corresponding point from the plurality of corresponding points having a smallest difference from the subject shape. |