A disparity deriving apparatus for deriving disparity of an object based on a reference image of the object captured at a first image capturing position and a comparison image of the object captured at a second image capturing position, the disparity deriving apparatus comprising: a calculator to calculate costs C(p,d) between a first reference area p(x,y) in the reference image and each one of corresponding areas q(x+d, y) corresponding to the first reference area p(x,y) in a given region in the comparison image, and costs between second reference area p'(x',y'), surrounding the first reference area p(x,y) in the reference image, and each one of corresponding areas q'(x'+d, y') corresponding to the second reference area p'(x',y') in a given region in the comparison image; a synthesizer to synthesize the costs of the first reference area p(x, y) and the costs of the second reference area p'(x',y') as synthesis costs Ls(p,d), wherein the synthesis cost Ls(p,d) is obtained by using the Semi-Global Matching method and the equation Ls(p,d)=ΣLr(p,d), wherein a directional path cost Lr(p,d) is calculated as Lr(p,d) = C(p,d) + Ad x min {(Lr(p-r,d), Lr(p-r,d-1) + P1, Lr(p-r,d+1) + P1, Lrmin(p-r) + P2}, where 0 < Ad < 1, "r" indicates a direction vector along an aggregated direction having two directional components such as the x direction component and the y direction component, the term min{} is a function for obtaining the minimum value, Lrmin(p-r) indicates the minimum value of Lr(p-r,d) when the shift value "d" is changed in the coordinates where "p" is shifted in "r" direction, and P1 and P2 are fixed parameters that are set in advance; and a deriving unit to derive a certain shift value d as a disparity value of an object captured on the first reference area p(x, y) based on the synthesis costs Ls(p,d) synthesized by the synthesizer, characterized in that the weight coefficient Ad is changed by an input operation by a user in which a value of the weight coefficient is set differently for each directional path for each frame data in the images. a calculator to calculate costs C(p,d) between a first reference area p(x,y) in the reference image and each one of corresponding areas q(x+d, y) corresponding to the first reference area p(x,y) in a given region in the comparison image, and costs between second reference area p'(x',y'), surrounding the first reference area p(x,y) in the reference image, and each one of corresponding areas q'(x'+d, y') corresponding to the second reference area p'(x',y') in a given region in the comparison image; a synthesizer to synthesize the costs of the first reference area p(x, y) and the costs of the second reference area p'(x',y') as synthesis costs Ls(p,d), wherein the synthesis cost Ls(p,d) is obtained by using the Semi-Global Matching method and the equation Ls(p,d)=ΣLr(p,d), wherein a directional path cost Lr(p,d) is calculated as Lr(p,d) = C(p,d) + Ad x min {(Lr(p-r,d), Lr(p-r,d-1) + P1, Lr(p-r,d+1) + P1, Lrmin(p-r) + P2}, where 0 < Ad < 1, "r" indicates a direction vector along an aggregated direction having two directional components such as the x direction component and the y direction component, the term min{} is a function for obtaining the minimum value, Lrmin(p-r) indicates the minimum value of Lr(p-r,d) when the shift value "d" is changed in the coordinates where "p" is shifted in "r" direction, and P1 and P2 are fixed parameters that are set in advance; and a deriving unit to derive a certain shift value d as a disparity value of an object captured on the first reference area p(x, y) based on the synthesis costs Ls(p,d) synthesized by the synthesizer, characterized in that the weight coefficient Ad is changed by an input operation by a user in which a value of the weight coefficient is set differently for each directional path for each frame data in the images.