This paper presents an advanced stereo vision-based solution aimed at enhancing the perception capabilities of combine harvesters during operations, with a specific focus on header height detection and rice crop height detection. To improve the accuracy of header height measurement, two novel methods for image-based header recognition are proposed: a barcode marking scheme-based method and an adjacent frame-based method, enabling real-time detection of header height. For crop height detection, the RANSAC plane fitting method is employed to obtain the fitting plane of crop height. Experimental evaluations conducted in the farmlands of Jiading and Fengxian districts in Shanghai demonstrate the performance of the two header and crop height detection methods. The method based on the barcode marking scheme exhibits superior accuracy, achieving a recognition rate of 93.3% with an average error of 0.04m, fulfilling the requirements for precise header height measurement. Conversely, the adjacent frame-based method achieves a recognition rate of 70.2% with an average error of 0.15m. The RANSAC-based crop point cloud height plane fitting method yields an average error of approximately 0.03m, which is adequate for accurate crop height measurement. Furthermore, the algorithms exhibit a speed that allows for timely calculations, completing image processing within 550ms per frame, thereby meeting the real-time requirements of combine harvester operations.