The invention belongs to the technical field of
agricultural machinery, and discloses a method for measuring the stacking height of materials in a grain tank of a grain transport vehicle based on
binocular vision, which comprises the following steps of: constructing a
binocular vision system which comprises two cameras with the same parameters, installing the
binocular vision system on the grain transport vehicle, shooting the grain tank at a
fixed angle, and calculating the stacking height of the materials in the grain tank according to
parallax caused by the positions of the cameras; the space coordinates of the feature points are calculated through
triangulation by using the difference between the pixel coordinate values of the left image and the right image, the depth information of the measured target is obtained, and the object is positioned and measured; through accurate binocular camera calibration and an efficient
stereo matching algorithm, rapid and non-contact measurement of the material stacking height is achieved, the error rate is as low as 4% or below, the high-precision operation requirement is met, measurement data are further optimized through introduction of a
linear regression model, errors are effectively reduced, and the measurement accuracy is improved. And the stability and the reliability of a measurement result are improved.