Abstract:Camera calibration, image acquisition, stereo rectification, stereo match and depth calculation were developed to research a detection method of various obstacles in farmland by using the methods such as Bouguet algorithm, area match, and triangulation and so on. As a result, five different obstacles and their position information in different environments were got, and open computer vision library OpenCV was used to improve the real time property. The experiment showed that the accuracy rate of the obstacle detection reached 96% and the absolute error of depth was maintained within ±30mm (under 1.5% of the relative error) when the depth was less than 2000mm, and it takes less than 100ms to finish a obstacle detection.