A method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix.
By using a gray-level co-occurrence matrix-based method, adaptive gray-level remapping and multi-directional statistical feature extraction, the problem of discontinuous segmentation of rotary tillage areas in complex backgrounds was solved, and high-precision trajectory boundary extraction was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LIANYUNGANG JIUQIAN MASCH MFG CO LTD
- Filing Date
- 2026-05-29
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional image processing algorithms struggle to accurately segment rotary tillage areas in complex environments, especially under conditions of uneven lighting, dust, and stubble interference. They are unable to reliably capture the physical fault features formed by changes in surface roughness, resulting in inconsistent segmentation results.
A gray-level co-occurrence matrix-based approach is adopted to construct a multidimensional feature space vector map through adaptive gray-level dynamic remapping, nonlinear quantization compression, multi-directional statistical feature extraction, and morphological evolution processing. The boundary of the rotary tillage trajectory is extracted using the inverse differential moment operator and tensor fusion.
It effectively suppresses light and noise interference, improves the segmentation accuracy and geometric coherence of the rotary tillage operation area, and provides accurate geometric topological basis for agricultural machinery path tracking.
Smart Images

Figure CN122312656A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image enhancement technology, specifically to a method for segmenting rotary tillage operation trajectory images based on gray-level co-occurrence matrix. Background Technology
[0002] In image analysis against complex backgrounds, traditional segmentation methods based on color space transformation or simple single-peak thresholding have significant limitations when processing high-grained surface images. Rotary tillage surface images consist of physically fragmented structures with random distribution patterns, and their pixel grayscale values exhibit high-frequency jumps in the spatial domain, resulting in a high degree of overlap between tilled areas and untilled backgrounds in terms of spectral components. Existing image processing operators struggle to extract accurate geometric boundaries using a single grayscale gradient when faced with non-uniform illumination distribution, low signal-to-noise ratios caused by dust, and anisotropic texture interference from stubble. Furthermore, spatial correlation interference in the image makes traditional region growing algorithms prone to getting trapped in local optima, failing to stably capture the physical fault features formed by abrupt changes in surface roughness, resulting in poor performance in terms of image topological coherence in the segmentation results.
[0003] This application aims to address the technical problems in the field of image analysis, such as low feature vector discriminativeness caused by the similarity of second-order statistical features between the target and the background, anisotropic interference of spatial texture, topological breaks in geometric boundaries, and poor robustness of segmentation algorithms to non-stationary image signals.
[0004] To address this, a method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix is proposed. Summary of the Invention
[0005] The purpose of this invention is to provide a method for segmenting rotary tillage operation trajectory images based on gray-level co-occurrence matrix, which achieves robust extraction of operation boundaries through spatial mapping of multi-directional statistical features and physical fault determination.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix includes: The original farmland images were processed by adaptive gray-level dynamic remapping and nonlinear quantization compression. By compressing the gray-level dynamic range, the low-frequency background interference caused by uneven illumination was eliminated, resulting in a quantized enhanced gray-level image. The quantized enhanced grayscale image is processed by linear combination of spectral components and convolution with a region mask. Candidate regions of interest are extracted by utilizing the gradient distribution differences of the red and blue channels to obtain a spectral feature enhancement image. The pixel sequence within the spectral feature enhancement map is processed by deriving the second-order combination probability distribution of the multi-directional gray-level co-occurrence matrix. The anisotropic second-order moment, entropy, and contrast components are statistically analyzed in the pixel neighborhood to construct a multi-dimensional feature space vector map that maps physical roughness information. The multidimensional feature space vector map is quantified by local spatial correlation measurement, and the inverse smoothness of local pixel clusters is calculated using the inverse differential moment operator to obtain a texture feature gradient map that characterizes the geometric distribution law of soil particles. The texture feature gradient map is then processed by four-directional texture feature tensor fusion and morphological evolution. By determining the physical fault coordinates of the isotropic to anisotropic transformation, a binarized trajectory segmentation result image is obtained.
[0007] Preferably, the step of obtaining the quantized enhanced grayscale image includes: The distribution of the global grayscale histogram of the original farmland image is statistically analyzed, and the mean and standard deviation of the grayscale are calculated to determine the dynamic range interval of effective information coverage. The pixels within the dynamic range interval are then re-expanded using a nonlinear logarithmic mapping operator to suppress highlight overflow and improve the contrast of dark textures. A non-uniform quantization step size is used to discretize the remapped continuous gray values to a set L-level gray level; the quantized image is spatially denoised by sliding neighborhood mean filtering to eliminate pseudo contour noise caused by the quantization step, thus obtaining the quantized enhanced grayscale image.
[0008] Preferably, the step of obtaining the spectral feature enhancement map includes: The red, green, and blue original spectral channel components corresponding to the quantized enhanced grayscale image are extracted, and the normalized red-blue difference index is calculated to obtain a spectral index mapping map that preliminarily represents the difference between soil moisture and stubble. The spectral index mapping map is then subjected to global dynamic thresholding to generate a binary region mask that distinguishes between vegetation cover areas and potential tilled areas. The binary region mask and the quantized enhanced grayscale image are then subjected to dot-multiplication and convolution operations. Spatial confinement is used to eliminate the interference of non-target features on texture feature extraction, resulting in the spectral feature enhancement map.
[0009] Preferably, the step of obtaining the multidimensional feature space vector map includes: A sliding analysis window is determined in the spectral feature enhancement map, and four feature extraction directions of 0°, 45°, 90° and 135° are set in the sliding analysis window; the joint distribution frequency of pixel pairs with a preset spatial distance in each feature extraction direction in the sliding analysis window is counted, and the co-occurrence matrix reflecting the second-order combination probability distribution is obtained after normalization. Based on the co-occurrence matrix, n feature parameters characterizing the statistical properties of image texture are calculated. These feature parameters include the second moment of the angle reflecting the uniformity of gray-level distribution, the contrast reflecting the depth of texture, and the entropy reflecting the randomness of image content. The feature parameters are then screened using a feature importance evaluation algorithm to extract a subset of target features sensitive to changes in the physical morphology of the land surface. The statistics corresponding to the target feature subset are integrated in a multi-dimensional space, and the statistical attributes of each pixel neighborhood are mapped to feature vectors to obtain the multi-dimensional feature space vector map.
[0010] Preferably, the feature importance evaluation algorithm includes: Construct a local texture training set containing cultivated samples, uncultivated samples, and stubble interference samples; calculate the Gini coefficient of each feature parameter in the target feature subset among different sample categories to quantify the contribution of each feature to the physical morphology classification of the image; sort the second moment of the angle, contrast, and entropy according to the importance from high to low contribution, set a cumulative contribution threshold, and remove redundant and / or light-sensitive contributing feature components.
[0011] Preferably, the steps for obtaining the texture feature gradient map include: In the multidimensional feature space vector map, the inverse differential moment operator is used to perform spatial correlation measurement analysis on the feature vectors in the neighborhood of each pixel. The consistency weight of local pixel clusters is calculated, and the smoothness of local texture is quantified by the inverse weighted logic of the square of the gray-level difference between pixels. The smoothness is inverted to obtain a physical roughness quantification value that characterizes the fineness and spatial randomness of soil particles; the physical roughness quantification value is spatially evolved using a first-order differential operator to extract the characteristic jump amplitude between adjacent regions, thus obtaining the texture feature gradient map.
[0012] Preferably, the step of obtaining the binarized trajectory segmentation result image includes: Gradient components in the 0°, 45°, 90°, and 135° directions are extracted from the texture feature gradient map, and multi-directional feature fusion is performed using tensor modulus operation. A dynamic segmentation threshold based on the statistical characteristics of soil fragmentation rate is set, and the fused gradient image is binarized to obtain an initial candidate region map. The morphological closing operation of the set structuring element is used to fill the holes inside the initial candidate region map and connect the edges. Morphological opening operation is used to remove the speckled signals caused by stubble interference. Combined with the spatial constraint coordinates provided by the historical pose of agricultural machinery, the morphologically processed region is filtered for connected components, and the binarized trajectory segmentation result image that defines the physical boundary between cultivated and uncultivated areas is output.
[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention effectively compresses the grayscale dynamic range of the original farmland image through adaptive grayscale dynamic remapping and nonlinear quantization compression. This processing mechanism can suppress dust scattering caused by high-speed agricultural machinery operation and low-frequency background interference caused by non-uniform lighting, extracting a quantized enhancement map with significant second-order statistical properties. Compared with traditional segmentation methods based directly on grayscale thresholds, this scheme improves the discernibility of texture structures at the underlying signal level and reduces the interference of environmental noise on subsequent feature extraction.
[0014] 2. This invention utilizes a multi-directional gray-level co-occurrence matrix to derive a second-order combination probability distribution, transforming cultivated and uncultivated areas, which are difficult to distinguish using color space, into quantified physical roughness feature vectors. By combining feature importance assessment algorithms with Gini coefficient filtering, low-contribution components sensitive to light are eliminated, constructing a high-dimensional subset of target features. This enables the algorithm to capture the microscopic texture changes formed after soil fragmentation, maintaining high feature space identification accuracy even in areas where vegetation residue and soil spectral characteristics highly overlap.
[0015] 3. This invention quantifies the reciprocal of local smoothness by calculating the inverse of the inverse moment and combines four-way tensor fusion and morphological evolution processing to transform statistical differences into explicit physical fault coordinates. Iterative morphological opening and closing operations not only eliminate discrete speckles caused by stubble interference but also repair trajectory edge breaks caused by local occlusion. Combined with connected component filtering of spatially constrained coordinates, this ensures that the output binarized image has high geometric coherence, providing accurate geometric topological basis for agricultural machinery path tracking. Attached Figure Description
[0016] Figure 1 This is a flowchart of the rotary tillage trajectory image segmentation method based on gray-level co-occurrence matrix proposed in this invention; Figure 2 This is a flowchart of the rotary tillage trajectory image segmentation method based on gray-level co-occurrence matrix proposed in this invention; Figure 3 This is a flowchart of the method for obtaining quantized enhanced grayscale images according to the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Example 1 Please see Figures 1 to 3This invention provides a method for segmenting rotary tillage operation trajectory images based on gray-level co-occurrence matrix, the technical solution of which is as follows: A method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix, such as Figures 1-2 As shown, it includes: The original farmland images were processed by adaptive gray-level dynamic remapping and nonlinear quantization compression. By compressing the gray-level dynamic range, the low-frequency background interference caused by uneven illumination was eliminated, resulting in a quantized enhanced gray-level image. The quantized enhanced grayscale image is processed by linear combination of spectral components and convolution with a region mask. Candidate regions of interest are extracted by utilizing the gradient distribution differences of the red and blue channels to obtain a spectral feature enhancement image. The pixel sequence within the spectral feature enhancement map is processed by deriving the second-order combination probability distribution of the multi-directional gray-level co-occurrence matrix. The anisotropic second-order moment, entropy, and contrast components are statistically analyzed in the pixel neighborhood to construct a multi-dimensional feature space vector map that maps physical roughness information. The multidimensional feature space vector map is quantified by local spatial correlation measurement, and the inverse smoothness of local pixel clusters is calculated using the inverse differential moment operator to obtain a texture feature gradient map that characterizes the geometric distribution law of soil particles. The texture feature gradient map is then processed by four-directional texture feature tensor fusion and morphological evolution. By determining the physical fault coordinates of the isotropic to anisotropic transformation, a binarized trajectory segmentation result image is obtained.
[0019] Furthermore, such as Figure 3 As shown, the steps for obtaining the quantized enhanced grayscale image include: The distribution of the global grayscale histogram of the original farmland image is statistically analyzed, and the mean and standard deviation of the grayscale are calculated to determine the dynamic range interval of effective information coverage. The pixels within the dynamic range interval are then re-expanded using a nonlinear logarithmic mapping operator to suppress highlight overflow and improve the contrast of dark textures. A non-uniform quantization step size is used to discretize the remapped continuous gray values to a set L-level gray level; the quantized image is spatially denoised by sliding neighborhood mean filtering to eliminate pseudo contour noise caused by the quantization step, thus obtaining the quantized enhanced grayscale image.
[0020] Specifically, the dynamic range range covered by the effective information The method for determining it is: based on the grayscale mean value Centered on, take As the initial interval, where The standard deviation is given, and a coefficient is selected. This allows the range to cover more than 95% of the cumulative pixel distribution in the histogram, thereby eliminating extreme highlights and background noise.
[0021] During the discretization process of the non-uniform quantization step, the width of the quantization step is adjusted according to the probability density function of the histogram distribution. A smaller step is used in the gray-level range where the pixel distribution is dense to refine the texture level, and a larger step is used in the range where the pixel distribution is sparse to suppress background interference, so as to ensure that the quantized L-level gray-level step can maximize the preservation of the micro-texture gradient formed by soil fragmentation.
[0022] The sliding neighborhood mean filter uses a value of A smooth window, in which and The value of is positively correlated with the gray-level jump amplitude caused by the non-uniform quantization step size. By performing neighborhood weighted averaging on the quantized abruptly changed pixels, the step-like pseudo-contours generated by discretization are eliminated, so that the obtained quantized enhanced gray-level image maintains the continuity of gray-level evolution in the spatial domain.
[0023] In this embodiment, the value range of the L level is set to an integer between [8, 32]. The specific criterion for determining the value is to balance the preservation of image texture details with the computational overhead of the gray-level co-occurrence matrix: when the speed of agricultural machinery operation is increased or the light fluctuation is drastic, the value of L is reduced (e.g., L=8) to reduce the computational dimension and enhance the ability to suppress light noise; when it is necessary to extract the fragmentation features of extremely fine soil particles, the value of L is increased (e.g., L=16 or L=32) to improve the accuracy of the gray-level co-occurrence matrix in characterizing the second-order combination probability distribution. The selection of the L level must ensure that the quantized gray-level step can cover the main energy range in the original image after being expanded by nonlinear logarithmic mapping, thereby providing a stable pixel distribution basis for the subsequent extraction of statistical parameters such as angular second moment and entropy.
[0024] This invention effectively solves the problem of low image signal-to-noise ratio caused by drastic changes in illumination and dust interference in complex farmland environments by introducing adaptive gray-level dynamic remapping and an L-level non-uniform quantization mechanism. Through a mathematically determined dynamic range and non-linear logarithmic mapping, it enhances the contrast of dark textures while suppressing highlight clipping. Combined with non-uniform quantization step size adjustment based on pixel density, it preserves the micro-texture gradient formed by soil fragmentation, and utilizes sliding neighborhood mean filtering to eliminate quantization pseudo-contours.
[0025] Further, the step of obtaining the enhanced spectral feature map includes: The red, green, and blue original spectral channel components corresponding to the quantized enhanced grayscale image are extracted, and the normalized red-blue difference index is calculated to obtain a spectral index mapping map that preliminarily represents the difference between soil moisture and stubble. The spectral index mapping map is then subjected to global dynamic thresholding to generate a binary region mask that distinguishes between vegetation cover areas and potential tilled areas. The binary region mask and the quantized enhanced grayscale image are then subjected to dot-multiplication and convolution operations. Spatial confinement is used to eliminate the interference of non-target features on texture feature extraction, resulting in the spectral feature enhancement map.
[0026] Specifically, the normalized red-blue difference index The calculation formula is: ,in and These correspond to the normalized grayscale values of the red channel component and the blue channel component of the quantized enhanced grayscale image under the same spatial coordinates.
[0027] In the global dynamic thresholding process, the histogram of the spectral index mapping map is analyzed using the maximum inter-class variance method. The gray level that maximizes the inter-class variance between the vegetation cover area and the potential tillage area is iteratively selected as the dynamic threshold T. All pixels in the mapping map are traversed, and pixels with index values greater than T are marked as the target value 1, while the rest are marked as 0, thereby generating the binarized region mask.
[0028] The dot-multiplication convolution operation is specifically performed as pixel-wise spatial mask filtering: the generated binarized region mask is used as a weight matrix and spatially multiplied pixel-wise with the quantized enhanced grayscale image. This forces the grayscale values of non-target land cover regions marked as 0 (such as tall vegetation areas) in the mask to be set to zero, while the potential working areas marked as 1 are preserved. Through this spatial confinement processing, a spectral feature enhancement map with effectively stripped background signals is constructed, providing clean pixel input for subsequent accurate feature extraction of the multi-directional grayscale co-occurrence matrix.
[0029] This invention constructs a spatially confined binarized region mask by employing algebraic operations on the normalized red-blue difference index and thresholding logic for the maximum inter-class variance, effectively separating areas with high vegetation cover interference. Combined with pixel-by-pixel spatial mask filtering, it not only removes low-frequency noise from non-target features but also locks the spectral response range of the tilled area, improving the signal-to-noise ratio and computational efficiency of subsequent texture feature extraction operators.
[0030] Further, the step of obtaining the multidimensional feature space vector map includes: A sliding analysis window is determined in the spectral feature enhancement map, and four feature extraction directions of 0°, 45°, 90° and 135° are set in the sliding analysis window; the joint distribution frequency of pixel pairs with a preset spatial distance in each feature extraction direction in the sliding analysis window is counted, and the co-occurrence matrix reflecting the second-order combination probability distribution is obtained after normalization. Based on the co-occurrence matrix, n feature parameters characterizing the statistical properties of image texture are calculated. These feature parameters include the second moment of the angle reflecting the uniformity of gray-level distribution, the contrast reflecting the depth of texture, and the entropy reflecting the randomness of image content. The feature parameters are then screened using a feature importance evaluation algorithm to extract a subset of target features sensitive to changes in the physical morphology of the land surface. The statistics corresponding to the target feature subset are integrated in a multi-dimensional space, and the statistical attributes of each pixel neighborhood are mapped to feature vectors to obtain the multi-dimensional feature space vector map.
[0031] Specifically, the preset spatial distance The value ranges from 1 to 3 pixels. The normalization formula for the co-occurrence matrix is: , in Indicates direction and distance Under the condition, grayscale value With grayscale value The frequency of simultaneous occurrence It is a joint probability distribution.
[0032] The specific calculation logic for the feature parameters is as follows: Second moment of angle ; Contrast ; entropy .
[0033] In the multidimensional spatial integration, the target feature subsets in the four extraction directions are first fused by mean averaging to obtain anisotropic balanced statistics. Then, the calculated second-order angular moment vector, contrast vector, and entropy vector are depth-stitched according to spatial coordinates to construct a k-dimensional feature vector corresponding to the neighborhood of each pixel (k being the number of parameters contained in the target feature subset), thus mapping to form the multidimensional feature space vector map. This integration method ensures accurate conversion of the image from the original grayscale domain to the physical fragmentation feature domain, providing high-dimensional data support for subsequent extraction of physical fault coordinates.
[0034] This invention achieves a quantitative characterization of the second-order probability distribution of the Earth's surface through a defined co-occurrence matrix normalization logic and characteristic parameter calculation formula. By combining multi-directional mean fusion and deep stitching integration strategies, discrete spectral signals are transformed into high-dimensional spatial vectors with isotropic characteristics, enhancing the expressive power of fragmentation features in the target area and providing a stable and physically interpretable data foundation for accurate determination of physical faults in complex contexts.
[0035] Furthermore, the feature importance evaluation algorithm includes: Construct a local texture training set containing cultivated samples, uncultivated samples, and stubble interference samples; calculate the Gini coefficient of each feature parameter in the target feature subset across different sample categories to quantify the contribution of each feature to the physical morphology classification of the image; sort the second moment of the angle, contrast, and entropy by importance from high to low contribution; set a cumulative contribution threshold to remove redundant and / or light-sensitive contributing feature components.
[0036] Specifically, the local texture training set is constructed by extracting texture blocks of 32×32 or 64×64 pixels from multiple original farmland images, and manually labeling them as cultivated, uncultivated, and stubble residue according to the physical morphology of the land surface.
[0037] In calculating the Gini coefficient At that time, the training set was set. It contains m categories, and its mathematical expression is: ,in Indicates the first The proportion of a class of samples in the set. For any feature parameter M, its contribution is quantified as the reduction in Gini impurity before and after spatial partitioning using that feature, i.e. .
[0038] The cumulative contribution threshold is set between 85% and 95%. The contribution of feature parameters is accumulated sequentially according to the ranking results. When the accumulated value reaches the cumulative contribution threshold, the currently selected features are retained to form a subset of the target features, while redundant components that contribute little to classification and are easily affected by lighting fluctuations are removed. This evaluation logic based on information entropy gain achieves dimensionality reduction of the multidimensional feature space vector, improving the robustness and computational efficiency of subsequent physical tomographic coordinate determination.
[0039] This invention achieves scientific screening of high-dimensional image features by constructing a standardized local texture training set and introducing a contribution quantification mechanism based on the Gini coefficient. The algorithm eliminates redundant features that are sensitive to illumination fluctuations and have low classification contributions, focusing the cumulative contribution on the core components reflecting soil fragmentation. This reduces the computational load on subsequent feature vector maps while ensuring the accuracy of physical fault determination.
[0040] Furthermore, the steps to obtain the texture feature gradient map include: In the multidimensional feature space vector map, the inverse differential moment operator is used to perform spatial correlation measurement analysis on the feature vectors in the neighborhood of each pixel. The consistency weight of local pixel clusters is calculated, and the smoothness of local texture is quantified by the inverse weighted logic of the square of the gray-level difference between pixels. The smoothness is inverted to obtain a physical roughness quantification value that characterizes the fineness and spatial randomness of soil particles; the physical roughness quantification value is spatially evolved using a first-order differential operator to extract the characteristic jump amplitude between adjacent regions, thus obtaining the texture feature gradient map.
[0041] Specifically, the inverse difference moment operator The calculation formula is: ; in This represents the second-order combination probability distribution of the neighborhood of the corresponding pixel in the multidimensional feature space vector map. The spatial correlation measurement analysis is performed within a local neighborhood window of size W×W, where the value of W is set according to the working diameter of the rotary tiller blade and the expected particle size of the broken soil.
[0042] In the inversion operation, the physical roughness quantification value R is defined as By taking the reciprocal of the local smoothness, the local consistency measure of the image is mapped into a numerical feature characterizing the degree of surface fragmentation.
[0043] The first-order differential operator is the Sobel operator. In the spatial evolution calculation, the first-order differential operator is used to perform horizontal and vertical convolution operations on the physical roughness quantification image to calculate the gradient magnitude of each pixel. ,in and These are the feature transition components in the horizontal and vertical directions, respectively. Through this differential evolution, edge information reflecting the amplitude of the physical morphological transitions between cultivated and uncultivated areas is extracted, thereby constructing the texture feature gradient map.
[0044] This invention achieves a scientific conversion of statistical consistency indices to physical roughness indices through a defined mathematical model of inverse differential moments and smoothness inversion logic. Combined with spatial evolution calculations using first-order differential operators, it can accurately capture the amplitude of feature jumps caused by rotary tillage fracturing, significantly enhancing the contrast and edge localization accuracy of trajectory boundaries against complex texture backgrounds.
[0045] Further, the step of obtaining the binarized trajectory segmentation result image includes: Gradient components in the 0°, 45°, 90°, and 135° directions are extracted from the texture feature gradient map, and multi-directional feature fusion is performed using tensor modulus operation. A dynamic segmentation threshold based on the statistical characteristics of soil fragmentation rate is set, and the fused gradient image is binarized to obtain an initial candidate region map. The morphological closing operation of the set structuring element is used to fill the holes inside the initial candidate region map and connect the edges. Morphological opening operation is used to remove the speckled signals caused by stubble interference. Combined with the spatial constraint coordinates provided by the historical pose of agricultural machinery, the morphologically processed region is filtered for connected components, and the binarized trajectory segmentation result image that defines the physical boundary between cultivated and uncultivated areas is output.
[0046] Specifically, the calculation formula for the tensor modulus length operation is as follows: , in This represents the gradient components of the texture features along the corresponding statistical direction. Multi-directional feature fusion is achieved through this vector addition operation to capture the omnidirectional jump features of the rotary tiller blade's cutting trajectory in the image space.
[0047] When setting the dynamic segmentation threshold, a linear regression model between the soil fragmentation rate and the image entropy value is first established, and the expected soil fragmentation rate is calculated based on the global entropy value of the current image. When the soil fragmentation rate is greater than 90%, the segmentation threshold is increased to suppress high-frequency pseudo-noise generated by fine soil particles. When the soil fragmentation rate is less than 85%, the segmentation threshold is decreased to ensure the integrity of the edges of larger soil blocks.
[0048] The morphological closing and opening operations use a 5×5 pixel square structuring element. The morphological closing operation fills small holes inside the image caused by uneven tillage and connects broken texture fault lines through a logic of first dilation and then erosion. The morphological opening operation removes isolated noise points with an area smaller than a preset pixel threshold through a logic of first erosion and then dilation.
[0049] In the connected component filtering, the morphologically processed region is transformed into a topological connected set, the geometric centroid coordinates of each connected component are calculated, and connected objects whose Euclidean distance from the spatial constraint coordinates is greater than a preset deviation threshold are removed, thereby locking in the region that conforms to the physical path of agricultural machinery operation, and outputting the binarized trajectory segmentation result image that accurately defines the physical boundary between cultivated and uncultivated areas.
[0050] This invention overcomes the interference of texture anisotropy and uneven noise distribution on segmentation accuracy in complex farmland environments by using a determined tensor modulus fusion formula and dynamic threshold adjustment based on soil fragmentation rate feedback. By combining morphological iterative processing of structural elements of specific specifications with spatial topological constraints on agricultural machinery pose, the geometric coherence of trajectory boundaries is improved, achieving robust identification and accurate positioning of physical fault coordinates in the work area.
[0051] This invention suppresses illumination interference through adaptive gray-level remapping and nonlinear quantization, and locks the working area by combining linear combination of red and blue components and mask convolution. A high-dimensional vector space is constructed using the multi-directional second-order statistical features of the gray-level co-occurrence matrix, and statistical differences are transformed into physical tomographic coordinates through inverse moment inversion and tensor fusion. Combined with morphological evolution processing, accurate extraction of rotary tillage trajectory boundaries is achieved in complex backgrounds, improving the robustness and geometric coherence of the segmentation results.
[0052] Example 2 This second embodiment details the process of rotary tillage trajectory segmentation using the method described in this invention in a farmland environment with strong sunlight and a large amount of rice stubble residue.
[0053] At the work site, the agricultural machinery's onboard vision sensor first acquires raw farmland images containing interference from non-uniform lighting and the machine's shadow. The system then initiates adaptive grayscale dynamic remapping and non-linear quantization compression processing, and calculates the mean value from the global histogram of the image. with standard deviation And by selecting a coefficient k, the dynamic range interval is limited to cover 95% of the pixel distribution. , Within the range of ], the dark texture is then expanded using a nonlinear logarithmic mapping operator, and the grayscale is discretized into L=16 levels using a non-uniform step size based on the probability density function, in conjunction with The sliding neighborhood mean filter eliminates quantization pseudo-contours, resulting in a quantized enhanced grayscale image with suppressed background signals.
[0054] In the spectral feature processing stage, the system extracts the red and blue channel components from the quantized enhanced grayscale image and calculates the normalized red-blue difference index. A spectral index mapping map is generated. To address interference from rice stubble and weeds in the field, the maximum inter-class variance method is used to iteratively find a dynamic threshold T, generating a binary region mask that distinguishes between vegetated and tilled areas. This mask is then spatially multiplied and convolved with a quantized enhanced grayscale image pixel-by-pixel. Spatial confinement forces the grayscale values of non-target vegetation areas to zero, thus constructing a spectral feature enhancement map stripped of spectral interference.
[0055] In the multidimensional feature space construction stage, the system sets a preset spatial distance of d=2 pixels within the spectral feature enhancement map, and counts the joint distribution frequency of pixel pairs in four directions: 0°, 45°, 90°, and 135°. After normalization, a joint probability distribution co-occurrence matrix is obtained. Based on this matrix, n feature parameters, including angular second moment (ASM), contrast (Contrast), and entropy (Entropy), are calculated. To improve computational efficiency, the feature importance evaluation algorithm uses a 32×32 local texture training set to calculate the Gini coefficient of each parameter, quantifying its contribution to physical morphology classification. When the cumulative contribution reaches a 90% threshold, the core parameters are retained to form a target feature subset, and multi-directional mean fusion and depth stitching are performed to finally integrate a multidimensional feature space vector map that maps surface physical roughness information.
[0056] For the feature vector map, the system uses the inverse differential moment operator (IDM) to perform spatial correlation measurement analysis within a W×W neighborhood, calculating the consistency weights of local pixel clusters. Then, the quantized smoothness is inverted to obtain the quantized physical roughness measure R=1 / IDM, reflecting the soil's fragmentation. The spatial evolution of R is calculated using the Sobel first-order differential operator, and the gradient magnitude is obtained by synthesizing the jump components in the horizontal and vertical directions. This generates a texture feature gradient map.
[0057] Finally, the system fuses the gradient components in the four directions through tensor magnitude operations. The system captures omnidirectional jumps caused by blade cutting. A regression model is established between soil fragmentation rate and image entropy. When the calculated expected soil fragmentation rate is greater than 90%, the segmentation threshold is automatically increased to binarize the fused image, generating an initial candidate region map. Morphological closing operations are performed using 5×5 square structuring elements to connect fracture edges, and morphological opening operations are performed to remove isolated stubble noise points. Combining the spatial constraint coordinates provided by the historical pose of the agricultural machinery, connected component filtering is performed on the region, and connected objects deviating from the operation path are removed. Finally, a binarized trajectory segmentation result image that accurately defines the physical boundary between cultivated and uncultivated areas is output.
[0058] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix, characterized in that, include: The original farmland images were processed by adaptive gray-level dynamic remapping and nonlinear quantization compression. By compressing the gray-level dynamic range, the low-frequency background interference caused by uneven illumination was eliminated, resulting in a quantized enhanced gray-level image. The quantized enhanced grayscale image is processed by linear combination of spectral components and convolution with a region mask. Candidate regions of interest are extracted by utilizing the gradient distribution differences of the red and blue channels to obtain a spectral feature enhancement image. The pixel sequence within the spectral feature enhancement map is processed by deriving the second-order combination probability distribution of the multi-directional gray-level co-occurrence matrix. The anisotropic second-order moment, entropy, and contrast components are statistically analyzed in the pixel neighborhood to construct a multi-dimensional feature space vector map that maps physical roughness information. The multidimensional feature space vector map is quantified by local spatial correlation measurement, and the inverse smoothness of local pixel clusters is calculated using the inverse differential moment operator to obtain a texture feature gradient map that characterizes the geometric distribution law of soil particles. The texture feature gradient map is then processed by four-directional texture feature tensor fusion and morphological evolution. By determining the physical fault coordinates of the isotropic to anisotropic transformation, a binarized trajectory segmentation result image is obtained.
2. The method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix according to claim 1, characterized in that, The steps for obtaining the quantized enhanced grayscale image include: The distribution of the global grayscale histogram of the original farmland image is statistically analyzed, and the mean and standard deviation of the grayscale are calculated to determine the dynamic range interval of effective information coverage. The pixels within the dynamic range interval are then re-expanded using a nonlinear logarithmic mapping operator to suppress highlight overflow and improve the contrast of dark textures. A non-uniform quantization step size is used to discretize the remapped continuous gray values to a set L-level gray level; the quantized image is spatially denoised by sliding neighborhood mean filtering to eliminate pseudo contour noise caused by the quantization step, thus obtaining the quantized enhanced grayscale image.
3. The method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix according to claim 1, characterized in that, The steps for obtaining the spectral feature enhancement map include: The red, green, and blue original spectral channel components corresponding to the quantized enhanced grayscale image are extracted, and the normalized red-blue difference index is calculated to obtain a spectral index mapping map that preliminarily represents the difference between soil moisture and stubble. The spectral index mapping map is then subjected to global dynamic thresholding to generate a binary region mask that distinguishes between vegetation cover areas and potential tilled areas. The binary region mask and the quantized enhanced grayscale image are then subjected to dot-multiplication and convolution operations. Spatial confinement is used to eliminate the interference of non-target features on texture feature extraction, resulting in the spectral feature enhancement map.
4. The method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix according to claim 1, characterized in that, The steps for obtaining the multidimensional feature space vector map include: A sliding analysis window is determined in the spectral feature enhancement map, and four feature extraction directions of 0°, 45°, 90° and 135° are set in the sliding analysis window; the joint distribution frequency of pixel pairs with a preset spatial distance in each feature extraction direction in the sliding analysis window is counted, and the co-occurrence matrix reflecting the second-order combination probability distribution is obtained after normalization. Based on the co-occurrence matrix, n feature parameters characterizing the statistical properties of image texture are calculated. These feature parameters include the second moment of the angle reflecting the uniformity of gray-level distribution, the contrast reflecting the depth of texture, and the entropy reflecting the randomness of image content. The feature parameters are then screened using a feature importance evaluation algorithm to extract a subset of target features sensitive to changes in the physical morphology of the land surface. The statistics corresponding to the target feature subset are integrated in a multi-dimensional space, and the statistical attributes of each pixel neighborhood are mapped to feature vectors to obtain the multi-dimensional feature space vector map.
5. The method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix according to claim 4, characterized in that, The feature importance evaluation algorithm includes: Construct a local texture training set containing cultivated samples, uncultivated samples, and stubble interference samples; calculate the Gini coefficient of each feature parameter in the target feature subset across different sample categories to quantify the contribution of each feature to the physical morphology classification of the image; sort the second moment of the angle, contrast, and entropy by importance from high to low contribution; set a cumulative contribution threshold to remove redundant and / or light-sensitive contributing feature components.
6. The method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix according to claim 1, characterized in that, The steps to obtain the texture feature gradient map include: In the multidimensional feature space vector map, the inverse differential moment operator is used to perform spatial correlation measurement analysis on the feature vectors in the neighborhood of each pixel. The consistency weight of local pixel clusters is calculated, and the smoothness of local texture is quantified by the inverse weighted logic of the square of the gray-level difference between pixels. The smoothness is inverted to obtain a physical roughness quantification value that characterizes the fineness and spatial randomness of soil particles; the physical roughness quantification value is spatially evolved using a first-order differential operator to extract the characteristic jump amplitude between adjacent regions, thus obtaining the texture feature gradient map.
7. The method for segmenting rotary tillage trajectory images based on gray-level co-occurrence matrix according to claim 1, characterized in that, The steps for obtaining the binarized trajectory segmentation result image include: Gradient components in the 0°, 45°, 90°, and 135° directions are extracted from the texture feature gradient map, and multi-directional feature fusion is performed using tensor modulus operation. A dynamic segmentation threshold based on the statistical characteristics of soil fragmentation rate is set, and the fused gradient image is binarized to obtain an initial candidate region map. The morphological closing operation of the set structuring element is used to fill the holes inside the initial candidate region map and connect the edges. Morphological opening operation is used to remove the speckled signals caused by stubble interference. Combined with the spatial constraint coordinates provided by the historical pose of agricultural machinery, the morphologically processed region is filtered for connected components, and the binarized trajectory segmentation result image that defines the physical boundary between cultivated and uncultivated areas is output.