Automatic Segmentation of Crop/Background Based on Luminance Partition Correction and Adaptive Threshold

Juan Liao, Yao Wang, Dequan Zhu, Yu Zou, Shun Zhang, Huiyu ZhouIEEE Access 2020 · OpenReview

Abstract

Crop segmentation is a fundamental step in extracting guidance lines for automated agricultural machinery. However, outdoor lighting conditions—ranging from harsh glare to deep shadows—frequently degrade segmentation quality. This paper presents a color-index-based crop segmentation method utilizing luminance partition correction and adaptive thresholding. The approach partitions the luminance component into dark, normal, and bright regions, applying adaptive Gamma correction to normalize illumination. Following color saturation restoration, an improved Otsu thresholding method is employed to handle the unbalanced distribution of crop and background pixels. Experimental results demonstrate a segmentation accuracy of 92.64%, significantly outperforming traditional methods under complex lighting.

Introduction

Visual navigation systems for agricultural robots rely on the accurate identification of green crop rows. In real-world field conditions, however, lighting is rarely uniform. Specular reflections on sunny days can wash out the green color of leaves, while shadows can make crops indistinguishable from the soil. Standard segmentation techniques, such as the Excess Green (ExG) index combined with Otsu’s thresholding, often fail because they assume a balanced pixel distribution and uniform illumination. This paper addresses these challenges by proposing a robust image processing pipeline that corrects luminance variations before segmentation.

Methodology

The proposed "Automatic Segmentation" pipeline consists of four primary stages:

1. Luminance Partitioning

The input RGB image is first converted to the HSV color space to isolate the luminance (V) component. The system then employs the Chebyshev probability inequality to automatically categorize pixels into three zones: dark, normal, and bright. This partitioning allows for targeted correction of problematic lighting areas.

2. Adaptive Gamma Correction

Rather than applying a global filter, the method utilizes a fast guided filter to estimate local illumination. Specific Gamma functions are then adaptively selected for the dark and bright regions. This process brightens shadows and tones down highlights, effectively normalizing the image's dynamic range.

3. Color Saturation Restoration

To ensure that luminance correction does not distort the color information necessary for crop detection, a specialized restoration operator is applied during the conversion back to the RGB space. This step preserves the relative color ratios, ensuring that green vegetation remains identifiable by color-index algorithms.

4. Improved Otsu Thresholding

Standard Otsu thresholding tends to be biased toward the majority class, which in agricultural images is typically the background soil. The authors introduced an improved version of the Otsu method that incorporates the standard deviation of both classes. This modification allows for a more accurate threshold in scenarios with unbalanced pixel distributions.

Figure 1: The proposed multi-stage pipeline: (a-c) luminance correction on a high-glare image; (d-f) illumination estimation and final segmentation on a low-light image.

Experimental Results and Discussion

The method was evaluated using a dataset of 160 crop images from the Agricultural Demonstration Base of Anhui Agricultural University, representing a variety of lighting conditions and soil types.

The proposed approach demonstrated superior performance across several metrics:

  • Accuracy: The average segmentation accuracy reached 92.64%, a significant improvement over the 85.69% achieved by the traditional Otsu method.
  • Error Reduction: The over-segmentation rate was reduced to 2.49%, compared to 9.58% for the baseline.
Figure 2: Close-up of the final segmentation result (f) for a challenging low-light field image.
  • Visual Fidelity: Quantitative analysis of Standard Deviation and Information Entropy showed that the method successfully recovered details in over-exposed regions that were lost in standard enhancement techniques like CLAHE or MSRCR.

Conclusion

Effective crop segmentation in outdoor environments requires addressing local illumination variances and class imbalances. By partitioning the image for targeted Gamma correction and refining the thresholding logic, the proposed method provides a reliable foundation for robotic visual navigation. Future research will focus on optimizing computational overhead for real-time deployment and extending the method to non-green crop varieties.

Summary updated

Abstract

Crop segmentation is a fundamental step of extracting the guidance line for an automated agricultural machine with a visual navigation system. However, the segmentation quality of green crop is seriously affected by the outdoor lighting conditions. To improve the accuracy of crop segmentation under complex lighting conditions, a color-index-based crop segmentation method with luminance partition correction and adaptive thresholding is proposed in this article. The method extracts the luminance component from the given RGB image and employs two adaptive thresholds to divide the luminance image into the dark, normal and bright areas. Then, a partition Gamma function is adaptively selected to improve the brightness levels of the dark and bright regions in which the Gamma correction parameter is adaptively determined based on the local distribution characteristics of illumination, and the corrected image is converted to the RGB counterpart through color saturation restoration. Finally, the ExG (excess green index) color index with Otsu thresholding is used to perform pre-segmentation in order to calculate the segmentation threshold for the final segmentation. Experimental results show that the proposed approach can effectively increase the brightness levels of the dark region and decrease the brightness levels in the bright region. In addition, compared with the traditional Otsu method employed in before and after luminance correction, the proposed method can achieve better segmentation results.
BibTeX
@inproceedings{liao2020automatic,
  author = {Juan Liao and Yao Wang and Dequan Zhu and Yu Zou and Shun Zhang and Huiyu Zhou},
  title = {{Automatic Segmentation of Crop/Background Based on Luminance Partition Correction and Adaptive Threshold}},
  booktitle = {IEEE Access},
  year = {2020},
  url = {https://openreview.net/forum?id=FCbH9ECoGf},
}
Figure