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.
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.
- 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