A remote sensing image sampling distance calibration method and system based on line distance prior

By utilizing prior parameters of crop planting row spacing and image processing techniques, the problem of scale inconsistency in UAV remote sensing images in the absence of ground calibration objects was solved, achieving scale consistency and accuracy across different flights and altitudes, and providing a unified physical scale basis.

CN123181593APending Publication Date: 2026-11-27INSTITUTE OF CROP SCIENCE CHINESE ACADEMY OF AGRICULTURAL SCIENCES +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611568856.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-12
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In the absence of ground calibration objects and with incomplete flight and imaging parameters, it is difficult to obtain reliable ground sampling distance (GSD) for agricultural remote sensing images from drones. This leads to scale inconsistencies between different flights, flight altitudes, and image data, affecting the accuracy of seedling monitoring results.

Method used

By acquiring UAV remote sensing images and prior parameters of crop planting row spacing, crop row masks are extracted using vegetation enhancement and adaptive threshold segmentation. The dominant direction of crop rows is detected and directional correction is performed. Peak positions are detected by projection along the crop row direction. Clustering is used to obtain the center of crop rows. A pixel row spacing sequence is constructed. Planting patterns are identified and reference row pairs are determined. Through robust fusion of multiple reference row pairs and confidence evaluation, the correspondence between pixel scale and actual ground scale is established.

Benefits of technology

Without relying on additional ground calibration facilities, scale consistency was achieved among remote sensing images from different sources, reducing the impact of different flights and flight altitudes, providing a unified physical scale basis, and providing reliable scale information for seedling monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181593A_ABST
    Figure CN123181593A_ABST
Patent Text Reader

Abstract

The application discloses a remote sensing image sampling distance calibration method and system based on row distance prior, and belongs to the cross technical field of agricultural remote sensing and computer vision. The method comprises the following steps: acquiring a UAV remote sensing image and crop actual planting row distance prior; extracting a crop row structure and performing direction correction; identifying equal row distance or wide-narrow row planting modes according to a row distance sequence; determining a corresponding reference row pair, wherein the wide-narrow row mode adopts a same-period phase crop row center as the reference row pair; obtaining a plurality of effective ground sampling distance estimation values and performing robust fusion; combining estimation result consistency and row structure quality to perform confidence evaluation; and performing image scale standardization and local scale correction on the basis. Thus, the dependence on ground calibration objects and high-precision positioning information is reduced, the scale consistency between different flight altitudes, voyages and image sources is improved, and the method can be used for quantitative analysis of agricultural seedling stage plant number, emergence rate and seedling deficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the interdisciplinary field of agricultural remote sensing and computer vision, and particularly relates to a method and system for calibrating remote sensing image sampling distance based on row spacing priors. Specifically, it relates to an image scale self-calibration method for UAV seedling monitoring, which is particularly suitable for conditions lacking high-precision positioning equipment. Based on prior knowledge of crop row spacing, it automatically calculates the ground sampling distance (GSD) and standardizes the physical scale of the image, providing a technical foundation for cross-temporal, cross-platform, and cross-sensor agricultural remote sensing data fusion and quantitative analysis. The method described in this application is particularly suitable for seedling monitoring scenarios where UAVs acquire data from near-vertical overhead views, the monitored field has relatively small ground undulations, the row spacing prior parameters are reliable, and the crop row structure in the image is identifiable. Background Technology

[0002] Unmanned aerial vehicle (UAV) remote sensing technology is characterized by high mobility, high spatial resolution, and flexible operation. In recent years, it has been widely used in agricultural production monitoring. Among them, using UAVs equipped with RGB cameras to acquire high-resolution field images and combining them with image processing, target detection, or instance segmentation techniques to analyze the number of seedlings, seedling gaps, and row structure has become an important technical means for seedling monitoring and crop phenotypic analysis. Compared with traditional manual survey methods, UAV remote sensing can quickly acquire crop spatial distribution information over a large area, providing a data foundation for seedling production management and subsequent agricultural analysis.

[0003] Compared with applications such as surveying and inspection, agricultural seedling monitoring has higher requirements for the timeliness, ease of operation, and cost of use of remote sensing data processing. On the one hand, the seedling stage usually has a short agricultural management window, requiring data collection, processing, and evaluation to be completed in a short period of time. On the other hand, the drone operators and data processors in actual agricultural production may not necessarily have professional surveying and remote sensing technical backgrounds. At the same time, large-scale field monitoring involves a large operating area and many flights, and high-precision positioning equipment (such as RTK), ground calibration facilities, and complex data processing procedures will all increase the application cost.

[0004] Currently, UAV agricultural remote sensing typically uses a certain overlap rate for flight path planning. It acquires continuous images through UAVs, and after data acquisition, it performs image stitching, dense matching, spatial 3D reconstruction, orthorectification, and plot cropping. The processed images are then used for crop detection and seedling analysis. This method can obtain orthorectified images with good geometric consistency and is suitable for large-scale agricultural remote sensing data processing. However, the high forward and side overlap rates increase the number of original images. At the same time, the subsequent image matching, 3D reconstruction, and orthorectification processes have high requirements for computing resources and processing time, which can easily create a large data processing burden in rapid seedling monitoring scenarios.

[0005] When using UAV imagery for quantitative analysis of crop target size, plant spacing, row spacing, and target spacing, it is necessary to establish the correspondence between image pixel size and actual ground physical size. Ground sampling distance (GSD) is usually used to characterize the actual ground distance corresponding to a unit pixel. GSD directly affects the spatial scale of crop targets in the image and the results of distance, area, and size calculations based on pixels. Therefore, obtaining reliable GSD is an important foundation for conducting quantitative agricultural monitoring using UAV imagery.

[0006] Existing methods for acquiring the scale of UAV images typically rely on ground control points, high-precision positioning information, or the flight and imaging parameters of the UAV and its cameras. When using ground control points for scale and spatial position calibration, targets with known locations or sizes need to be pre-deployed in the work area and identified and registered during image processing. This method can improve the accuracy of scale and spatial positioning, but it requires additional on-site deployment and measurement work, which increases the operation time and implementation cost in agricultural monitoring of multiple plots and multiple flights in large fields.

[0007] Another approach calculates or inverts the GSD based on parameters such as camera focal length, sensor size, image resolution, and UAV flight altitude. This method does not require additional ground targets and the calculation process is relatively simple. However, its accuracy depends on the completeness and reliability of information such as camera parameters and flight altitude. In actual agricultural operations, the parameter recording methods of different UAVs, cameras, and mission platforms may differ, and the original metadata of some images may also be incomplete. At the same time, flight altitude may also be affected by factors such as terrain undulations, flight mission settings, barometric altimetry errors, and different platform altitude definition methods, which will cause deviations between the GSD obtained based on relevant parameters and the actual ground scale corresponding to the image.

[0008] Furthermore, agricultural drone operations typically require multiple flights depending on battery status, weather conditions, crop growth, and plot location. The actual flight altitudes between different flights are not entirely consistent. Even when repeatedly collecting data for the same plot, the ground speed (GSD) corresponding to different images may differ. When the GSD changes, the actual ground area covered by the same pixel window changes accordingly. The pixel size, texture details, and spatial morphology of crop targets in the image also change, thus affecting the results of pixel-scale-based plant counts, missing seedling identification, plant spacing measurements, and other quantitative analyses.

[0009] The aforementioned scale differences are particularly evident in sampling agricultural monitoring. In practical applications, not all tasks require complete orthorectification of the entire plot. Instead, local areas may be directly extracted from the original UAV imagery for analysis. Such image data may come from different cameras, different flights, different flight altitudes, different years, or different test plots. When images from different sources are used directly in the same analysis process, the actual ground extent corresponding to the same pixel area is not the same due to the different GSDs of each image. The pixel scale and image features of crop targets will also change accordingly. This affects cross-batch image comparison, reuse of different data sources, and the application of analysis models built based on existing data on images of different scales.

[0010] To address the aforementioned issues, existing technologies have proposed methods for directly estimating spatial scale using image content. For example, by pre-establishing the correspondence between image features and spatial scale, machine learning or deep learning models can be used to predict the image scale. Such methods can reduce reliance on some traditional surveying parameters, but they usually require data with reliable scale annotations for training. Furthermore, the model's prediction results are easily affected by factors such as camera type, imaging conditions, crop type, growth stage, and changes in the field environment. When there is a significant difference between the training data and the actual application data, the scale estimation results may be biased, and it is difficult to directly explain the correspondence between the predicted scale and the actual ground physical size.

[0011] Crop rows are one of the more stable spatial structures in the agricultural field environment. Existing technologies have developed a rich array of image processing methods for crop row detection, row direction estimation, and row center extraction. These methods include extracting crop row structures using color features, vegetation indices, threshold segmentation, Hough transform, projection analysis, cluster analysis, and morphological processing. Some methods also utilize deep learning, stereo vision, or depth information to identify the spatial distribution of crop rows and plants. These studies collectively demonstrate that row structures can not only be used for navigation, variable operations, and inter-row management, but also serve as an observable geometric scale, providing stable anchor points for scale calibration.

[0012] However, existing crop row detection technologies typically focus on the location, direction, continuity, or plant distribution of crop rows, with relatively limited attention paid to the scale correspondence between the actual planting spacing reflected by crop rows and the pixel spacing of the image. In actual field environments, crop rows may also be affected by factors such as missing seedlings, weed interference, local planting offsets, row curvature, and image noise, resulting in certain fluctuations in the pixel spacing obtained from local row structures. Therefore, when relying solely on local image structures for scale conversion, it is difficult to ensure the consistency of scale results between different regions, different images, and different flights.

[0013] Existing scale acquisition methods based on ground control points, flight and imaging parameters, or image learning models struggle to simultaneously ensure ease of scale acquisition, physical correspondence, and scale consistency across different imagery when additional ground calibration facilities are not required and complete flight and imaging parameters are lacking. Therefore, obtaining reliable scale information corresponding to actual ground physical dimensions from UAV agricultural imagery without incurring significant on-site calibration costs, and mitigating the impact of scale differences between different flights, flight altitudes, and image data on seedling monitoring results, has become a crucial technical challenge for quantitative analysis of UAV agricultural remote sensing. Summary of the Invention

[0014] This application aims to address the challenge of obtaining reliable ground-based spatial distribution (GSD) and performing standardized scale processing on agricultural remote sensing images from unmanned aerial vehicles (UAVs) when ground calibration is lacking, some flight and imaging parameters are incomplete, and the physical scale of images varies due to different flights and flight altitudes. This application discloses a remote sensing image sampling distance calibration method and system based on prior knowledge of actual crop row spacing. Through crop row extraction, planting pattern recognition, reference row pair determination, joint GSD estimation of multiple reference row pairs, and confidence evaluation, the known agronomic row spacing is converted into image pixel scale, and further image scale standardization is performed. This reduces reliance on additional ground calibration facilities and high-precision positioning information, improves scale consistency between agricultural remote sensing images from different sources, and provides a unified physical scale basis for quantitative analysis of seedling number, emergence rate, and missing seedlings.

[0015] The technical solution of this application is as follows:

[0016] This application discloses a remote sensing image sampling distance calibration method based on row spacing prior, including:

[0017] Acquire UAV remote sensing images and crop planting row spacing prior parameters corresponding to the UAV remote sensing images. The UAV remote sensing images are images obtained from approximately vertical downward views, images that have undergone orthorectification, or images with local perspective distortion below a preset threshold. Perform vegetation enhancement and adaptive threshold segmentation on the UAV remote sensing images to obtain a vegetation mask.

[0018] The dominant direction of the crop rows is detected based on the vegetation mask, and the orientation of the UAV remote sensing image or the vegetation mask is corrected based on the dominant direction of the crop rows so that the crop row direction is parallel to the preset coordinate axis of the corrected image.

[0019] The orientation-corrected vegetation mask is projected along a direction perpendicular to the crop row direction. The peak position in the projection curve is detected, and the peak position is clustered or merged into a neighborhood to obtain multiple crop row centers arranged in sequence. A pixel row spacing sequence is constructed based on the multiple crop row centers.

[0020] The planting pattern corresponding to the UAV remote sensing image is identified based on the pixel row spacing sequence. Different reference row pair construction rules are adopted for different planting patterns to determine multiple reference row pairs and the physical reference distances corresponding to each reference row pair. In the equal row spacing planting pattern, the centers of adjacent crop rows are used to form reference row pairs, and the prior parameters of the physical row spacing of adjacent crop rows are used as the corresponding physical reference distances. In the wide and narrow row planting pattern, the centers of crop rows with the same periodic phase are selected to form reference row pairs based on the periodic phase of the pixel row spacing sequence, and the sum of the wide row physical spacing and the narrow row physical spacing spanned between the reference row pairs is used as the corresponding physical reference distance, so that the pixel spacing of each reference row pair and its physical reference distance span the same planting cycle in space.

[0021] Based on the physical reference distance and pixel spacing corresponding to the multiple reference row pairs, multiple effective surface sampling distance estimates are obtained. The fusion weights are determined according to the structural quality index of each reference row pair, and the multiple effective surface sampling distance estimates are robustly fused to obtain the image-level effective surface sampling distance.

[0022] Based on the dispersion of multiple effective surface sampling distance estimates and the structural quality index of the reference row pairs, the confidence level of the image-level effective surface sampling distance is evaluated. When the confidence evaluation result meets the preset confidence conditions, the subsequent scale standardization step is executed. When the confidence evaluation result does not meet the preset confidence conditions, the alternative processing is performed according to the preset processing order: after removing abnormal reference row pairs, the data is re-fused. If the confidence level still does not meet the preset confidence conditions, the UAV remote sensing image is divided into local windows for local effective surface sampling distance estimation. If the confidence level still does not meet the preset confidence conditions, a low confidence mark is output and / or a manual review is prompted. Scale standardization is then performed after the alternative processing meets the preset confidence conditions, or a calibration result with a confidence mark is output.

[0023] When the confidence evaluation result meets the preset confidence conditions or the alternative processing meets the preset confidence conditions, the scale of the UAV remote sensing image is standardized according to the effective surface sampling distance at the output image level, so as to establish the correspondence between the pixel scale of the UAV remote sensing image and the preset physical ground scale.

[0024] Furthermore, the UAV remote sensing image is an RGB image or a multispectral image;

[0025] When the UAV remote sensing image is an RGB image, the vegetation enhancement uses the Supergreen Index (ExG), which is calculated according to the following formula:

[0026] ExG = 2G - RB, where R, G, and B are the pixel values ​​of the red, green, and blue channels of the RGB image, respectively.

[0027] When the UAV remote sensing image is a multispectral image, the vegetation enhancement uses the Normalized Difference Vegetation Index (NDVI), which is calculated according to the following formula:

[0028] NDVI = (NIR - R) / (NIR + R), where NIR is the reflectance of the near-infrared band and R is the reflectance of the red band. Before calculating the normalized vegetation index, the near-infrared band and the red band are spatially registered.

[0029] Furthermore, the adaptive threshold segmentation uses the maximum inter-class variance method or the trigonometric method to determine the segmentation threshold, and performs at least one of morphological opening operation, closing operation, hole filling and connected component filtering on the segmented vegetation mask to remove isolated noise and non-crop areas.

[0030] The dominant direction of the crop row is determined by performing a Hough line transform on the vegetation mask to obtain multiple candidate lines, and by determining the corresponding direction weight based on at least one of the line segment length, number of supporting pixels, and fitting residual of the candidate lines, and by determining the dominant direction of the crop row based on the weighted distribution of the candidate line directions.

[0031] Furthermore, it also includes a secondary refinement of the dominant direction of the crop rows, the secondary refinement including:

[0032] The plant center point is detected using a target detection model or a plant segmentation model, and the plant center point is assigned to the corresponding crop row.

[0033] For the plant center point corresponding to each crop row, row line fitting is performed using at least one of RANSAC fitting, least squares fitting, or piecewise linear fitting, and the dominant direction of the crop row is corrected based on the row line fitting results.

[0034] Furthermore, the identification of the planting pattern includes:

[0035] When the coefficient of variation of the pixel row spacing sequence is less than a first preset threshold, it is determined to be an equal row spacing planting mode. The coefficient of variation of the pixel row spacing sequence is calculated according to the following formula:

[0036] CV d =σ(d i ) / mean(d i ), where d i σ(d) represents the pixel spacing between the centers of two adjacent crop rows. i ) represents the standard deviation of the pixel row spacing sequence, mean(d) iThe average value of the pixel row spacing sequence is denoted as .

[0037] When the spacing between pixels in the row spacing sequence that is one spacing index apart satisfies the periodic consistency condition, and the spacing between adjacent indexes satisfies the significant difference condition, it is determined to be a wide-narrow row planting pattern, wherein the periodic consistency condition is |d (i+2) -d i | / d i <ε, the significance condition for the difference is |d (i+1) -d i | / min(d (i+1) ,d i )>δ,d i ε is the spacing between the i-th pixels in the ordered pixel row spacing sequence, ε is the periodicity consistency threshold, and δ is the difference significance threshold.

[0038] Furthermore, in the wide-narrow row planting pattern, the centers of crop rows in the same period phase span a wide row spacing and a narrow row spacing, and the physical reference distance corresponding to the reference row pair is determined according to the following formula:

[0039] D i =D wide +D narrow

[0040] Among them, D i D is the physical reference distance corresponding to the i-th reference row pair. wide For wide line physical spacing, D narrow For narrow row physical spacing;

[0041] The effective surface sampling distance estimate corresponding to the i-th reference row is determined according to the following formula:

[0042] GSD i =D i / Δx i

[0043] Among them, GSD i Let Δx be the effective surface sampling distance estimate for the i-th reference row. i The pixel spacing between the centers of the two crop rows in the i-th reference row pair.

[0044] Furthermore, the periodic consistency condition and the difference significance condition are determined using robust statistics: the periodic consistency condition is determined by the periodic index C. p =MAD(d i +d (i+1) ) / median(d i +d (i+1) The difference is determined by the relative difference index R when it is less than a third preset threshold.wn =|median(d 奇 )-median(d 偶 )| / [(median(d 奇 )+median(d 偶 The condition is determined if )) / 2] is greater than the fourth preset threshold, where median(·) is the median operation, MAD(·) is the absolute median difference operation, and d 奇 d is the subsequence formed by the odd-numbered index spacing in the pixel row spacing sequence. 偶 The subsequence is formed by even-numbered index intervals.

[0045] Furthermore, when there is an abnormally large spacing indicating missed crop rows or an abnormally small spacing indicating the center of a false row in the pixel row spacing sequence, the periodic phase number of the crop row center is repaired according to the multiple relationship between the abnormal spacing and the periodic reference distance, or dynamic programming or sequence matching is used to select the phase numbering scheme that minimizes the residual within the group from the two periodic phase assumptions, and then the reference row pair is constructed based on the repaired periodic phase number.

[0046] Furthermore, the robust fusion employs at least one of the following: median, truncated mean, weighted mean, Huber robust estimation, or RANSAC estimation.

[0047] When using weighted mean for robust fusion, the weights of each effective surface sampling distance estimate are determined based on at least one of the following: peak significance, effective crop row length, number of plants in a row, row line fitting residual, local occlusion degree, and row spacing period consistency. The higher the peak significance, the longer the effective crop row length, the more plants in a row, the smaller the row line fitting residual, the lower the local occlusion degree, or the higher the row spacing period consistency, the greater the corresponding weight.

[0048] Furthermore, the confidence level assessment is determined at least based on the coefficients of variation of a plurality of effective surface sampling distance estimates, the coefficients of variation being calculated according to the following formula:

[0049] CV G =σ(GSD i ) / mean(GSD i )

[0050] Wherein, σ(GSD) i ) represents the standard deviation of multiple effective surface sampling distance estimates, mean(GSD) i () represents the average of multiple effective surface sampling distance estimates;

[0051] When CV GWhen the confidence level is less than the preset confidence threshold, the confidence evaluation result meets the preset confidence condition, and the effective surface sampling distance at the image level is determined to have a qualified confidence level.

[0052] When CV G When the confidence level is greater than or equal to the preset confidence threshold, the confidence evaluation result does not meet the preset confidence condition, and the effective surface sampling distance at the image level is determined to be a low confidence result.

[0053] Furthermore, the confidence level evaluation is determined based on the comprehensive confidence level, which is calculated according to the following formula: C=exp(-λ×CV) G )×(Σq i ×I i / Σq i ), where C is the overall confidence level, λ is the preset coefficient, and CV G q represents the coefficient of variation of the multiple effective surface sampling distance estimates. i Score the structural quality Q for the i-th reference row. i Normalized structural quality score, I i The i-th reference row pair is used as an identifier for whether it is a fusion interior point. When the overall confidence level is greater than the preset overall confidence threshold, it is determined that the preset confidence condition is met.

[0054] Furthermore, in the local effective area sampling distance estimation, the orientation-corrected UAV remote sensing image is divided into multiple local windows. The crop row center is extracted within each local window, and the distance is estimated based on the physical reference distance D corresponding to the local window. j and pixel pitch Δx j Calculate the locally effective surface sampling distance GSD j A spatial variation model of ground sampling distance within the image is fitted based on the center coordinates of multiple local windows and the corresponding effective local surface sampling distance;

[0055] The spatial variation model is determined according to the following formula:

[0056] GSD(x',y')=α0+α1x'+α2y'+α3x'y'

[0057] Where x'=x / W, y'=y / H, x and y are the image pixel coordinates, W and H are the image width and image height respectively, and α0, α1, α2, and α3 are model parameters;

[0058] The scale normalization includes pixel scale normalization, setting a target standard ground sampling distance GSD0, and determining the scaling factor according to the following formula:

[0059] s(x',y')=GSD(x',y') / GSD0

[0060] Based on the spatial variation model, the local scaling factor corresponding to each image block is determined, and each image block is resampled accordingly.

[0061] W out =s×W in H out =s×H in

[0062] Among them, W in H in W represents the width and height of the image before resampling, respectively. out H out These represent the width and height of the resampled image, respectively.

[0063] This application also discloses a remote sensing image sampling distance calibration system based on row spacing prior, including:

[0064] The preprocessing module is used to obtain crop vegetation masks;

[0065] The row orientation detection and correction module is used to determine the dominant direction of crop rows and perform orientation correction;

[0066] The row center extraction module is used to obtain the crop row center and pixel row spacing sequence;

[0067] The planting pattern recognition module is used to identify equal row spacing planting patterns or wide and narrow row planting patterns and determine the corresponding reference row pairs;

[0068] The multi-reference row pair effective surface sampling distance estimation module is used to obtain multiple effective surface sampling distance estimates based on the physical reference distance and pixel spacing of multiple reference row pairs and perform robust fusion.

[0069] The confidence evaluation module is used to assess the consistency of distance estimates from multiple effective surface sampling points and the reliability of the structural quality evaluation calibration results based on the reference rows.

[0070] The scale normalization module is used to scale UAV remote sensing images based on the image-level effective area sampling distance or the locally effective area sampling distance.

[0071] Furthermore, the calibration system also includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the functions of the above modules.

[0072] This application also discloses an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the steps of the above-described remote sensing image sampling distance calibration method based on row spacing prior.

[0073] This application also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described remote sensing image sampling distance calibration method based on row spacing prior.

[0074] Compared with existing technologies, the remote sensing image sampling distance calibration method and system based on row spacing prior described in this application have the following advantages:

[0075] 1. This application utilizes the characteristic that crop row spacing has a clear actual physical size and can usually be determined based on sowing schemes or agronomic parameters within the same agricultural production area. It uses crop row spacing as a physical scale prior in UAV remote sensing images. Through vegetation region extraction, crop row direction correction, row center detection, and row spacing sequence construction, a correspondence is established between the actual planting row spacing and the pixel row spacing in the image. This yields an effective ground sampling distance for pixel scale conversion. Compared to methods that directly rely on flight altitude, camera parameters, or ground control points for scale determination, this application can utilize the crop row structure that can be observed in the remote sensing image itself to acquire scale information, reducing reliance on additional ground calibration facilities and high-precision positioning equipment. Furthermore, since the scale parameters originate from the actual planting row spacing corresponding to the current image, a direct link can be established between scale estimation and specific agricultural planting conditions. Even under different flight altitudes, different flight cycles, or when some flight metadata is missing, the corresponding scale parameters can still be determined based on the crop row spatial structure in the image, thus providing a scale basis with clear physical meaning for subsequent pixel distance to actual ground distance conversion.

[0076] 2. This application further identifies equal row spacing and wide-narrow row planting patterns based on the crop row spacing sequence, and establishes reference row pairs that match the actual physical distance for different planting patterns. The equal row spacing pattern uses the centers of adjacent crop rows for scale matching, while the wide-narrow row pattern selects the centers of crop rows with the same periodic phase based on the periodic phase of the row spacing sequence, so that the reference row pair spans one wide row and one narrow row. This ensures that the pixel distance in the image remains consistent with the actual physical reference distance, avoiding systematic scale bias caused by incorrect selection of adjacent row pairs under wide-narrow row planting conditions. Furthermore, this application simultaneously utilizes multiple... The effective surface sampling distance is calculated for each reference row pair, and the overall scale result is obtained through median, truncated mean, weighted fusion or other robust methods. This ensures that the final scale is not directly determined by the influence of missing seedlings, weeds, occlusion, local row curvature or recognition error on a single reference row pair. At the same time, the reliability of different reference row pairs is evaluated using structural information such as peak significance, effective row segment length, number of plants, row line fitting quality and occlusion degree. This makes the selection of reference row pairs, scale estimation and quality evaluation an interrelated process, thereby improving the stability of scale estimation results under the complex image conditions of actual field.

[0077] 3. After obtaining the effective area sampling distance, this application further establishes the correspondence between pixel scale and actual ground physical scale, and performs scale standardization on UAV remote sensing images from different sources according to a unified target scale. This enables images obtained at different flight altitudes, different flights, different sensors, or different acquisition times to be processed under a unified physical scale. For situations where there are inconsistencies in the scale of different regions of the image due to attitude changes or terrain undulations, a local effective area sampling distance can be obtained through local reference rows, and a spatial change scale model can be established to implement local scale correction. This avoids the problem that a single global scale cannot reflect local changes in the image. After completing the scale standardization, the image can be further cropped according to a unified physical ground window and adjusted to a unified pixel size. This ensures that different images not only have a consistent pixel scale but also a consistent actual ground coverage. This provides a unified data scale basis for subsequent plant detection, plant count, seedling emergence rate calculation, seedling absence location identification, and seedling condition analysis based on machine learning. This reduces the impact of differences in the scale of different original images on the results of quantitative analysis of agricultural remote sensing and improves the comparability and reusability between different batches of agricultural remote sensing data. Attached Figure Description

[0078] Figure 1 This is a flowchart illustrating the technical process of the remote sensing image sampling distance calibration method based on row spacing prior as described in the embodiments of this application.

[0079] Figure 2 This is a schematic diagram of corn planting patterns with equal row spacing and wide and narrow rows in the embodiments of this application, wherein the row spacing parameter D corresponds to D in the text. i D wide With D narrow Select the reference row;

[0080] Figure 3 This is a schematic diagram comparing the vegetation enhancement and binarization effects in the embodiments of this application, wherein (a) is the original RGB image, (b) is a schematic diagram of the Otsu method binary mask threshold segmentation result, and (c) is a schematic diagram of the triangular method binary mask threshold segmentation result.

[0081] Figure 4 This is a schematic diagram of the row direction correction process in an embodiment of this application. (a) is the original tilted image, and (b) is a schematic diagram of the result after row rotation correction estimated by Hough transform.

[0082] Figure 5 This is a schematic diagram of the horizontal projection curve and the peak detection result of the row center in an embodiment of this application;

[0083] Figure 6These are schematic diagrams of the row structure extraction results in the embodiments of this application. (a) is a schematic diagram of the row center clustering results, and (b) is a schematic diagram of the row line fitting results based on the plant center point.

[0084] Figure 7 This is a structural block diagram of the remote sensing image sampling distance calibration system based on row spacing prior described in the embodiments of this application;

[0085] Figure 8 This is a scatter plot of predicted GSD and measured GSD in the embodiments of this application;

[0086] Figure 9 This is a schematic diagram of Bland-Altman consistency analysis in an embodiment of this application;

[0087] Figure 10 This is a schematic diagram comparing the emergence rate across voyages in the embodiments of this application. Detailed Implementation

[0088] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0089] It should be noted that all directional and positional terms used in this application, such as "up," "down," "left," "right," "front," "back," "vertical," "horizontal," "inner," "outer," "top," "bottom," "lateral," "longitudinal," and "center," are used only to explain the relative positional relationships and connections between components in a specific state (as shown in the accompanying drawings). They are merely for the purpose of describing this application and do not require that this application be constructed and operated in a specific orientation; therefore, they should not be construed as limitations on this application. Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated.

[0090] In the description of this application, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0091] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0092] This application discloses a remote sensing image sampling distance calibration method based on row spacing prior. It uses remote sensing images of crop seedlings acquired by a UAV as input and the actual crop planting row spacing corresponding to the remote sensing image as a physical scale prior. This establishes a correspondence between image pixel distances and actual ground physical distances without relying on additional ground calibration objects. The crop planting row spacing prior parameters can be obtained based on sowing schemes, agronomic parameters, or actual field planting parameters, and are matched with the crop planting method corresponding to the current remote sensing image.

[0093] The prior parameters for crop planting row spacing are selected according to the following priorities: (1) the actual row spacing measured in the field, i.e., the average row spacing of multiple points measured in the field after sowing; (2) the row spacing set by the sowing operation prescription or the seeder; (3) the historical calibrated row spacing or the regional agronomic recommended row spacing of the same plot. When there are multiple available sources, the source with the highest priority is selected, and the deviation between different sources can be used as an estimate of the prior uncertainty of row spacing.

[0094] The relative uncertainty of the effective ground sampling distance estimate of the i-th reference row pair is determined according to u(GSD) i ) / GSD i ≈[(u(D i ) / D i ) 2 +(u(Δx i ) / Δx i ) 2 ] (1 / 2) Estimate, where u(D) i The uncertainty of the physical reference distance is determined by the degree of dispersion of the prior source of the row spacing, u(Δx). i The uncertainty of the pixel spacing is determined by the positioning accuracy of the crop row center; the uncertainty is used for confidence evaluation and result output. High confidence results can be accompanied by the interval information of GSD±u(GSD) and used to support the setting of fusion weights.

[0095] First, vegetation enhancement and adaptive threshold segmentation are performed on the UAV remote sensing images to form a vegetation mask between the crop vegetation area and the soil background area, which can be used for subsequent row structure recognition.

[0096] The dominant direction of the crop row is then determined from the vegetation mask, and the image or vegetation mask is oriented to make the crop row direction parallel to the preset coordinate axis, thereby reducing the impact of the inconsistency between the UAV's flight path and the crop row direction on the extraction of the row center.

[0097] After orientation correction, the vegetation mask is projected along the direction perpendicular to the crop row direction. Since the vegetation area on the same crop row has a high pixel density in the corresponding projection direction, a peak corresponding to the crop row position can be formed on the projection curve. By clustering or merging the peaks, multiple local peaks in the same crop row and false peaks caused by factors such as missing seedlings and weeds can be suppressed, a stable crop row center can be obtained, and a pixel row spacing sequence can be formed according to the pixel distance between the crop row centers.

[0098] Further, based on the pixel row spacing sequence, an equal row spacing planting pattern or a wide-narrow row planting pattern is identified, and a reference row pair corresponding to the prior physical row spacing is selected according to different planting patterns. In the equal row spacing planting pattern, the center of adjacent crop rows is used to form a reference row pair, while in the wide-narrow row planting pattern, the center of crop rows with the same periodic phase is selected to form a reference row pair based on the periodic phase of the row spacing sequence, so that the reference row pair spans one wide row spacing and one narrow row spacing, thereby ensuring that the pixel distance of the selected reference row pair has a consistent spatial correspondence with the corresponding physical reference distance.

[0099] After obtaining effective area sampling distance estimates for multiple reference row pairs, robust fusion is used to reduce the impact of abnormal estimates caused by missing seedlings, weeds, local occlusion, row curvature or sowing offset on the overall calibration results, thus obtaining image-level effective area sampling distance.

[0100] Further, based on the degree of dispersion between the estimation results of multiple reference row pairs and the reliability of the structural quality evaluation calibration results of the reference row pairs, when the calibration results meet the preset confidence conditions, the effective surface sampling distance at the image level is output. When the confidence is insufficient, it is processed by means of abnormal reference row pair removal, reference row pair reselection, or local re-estimation, so as to avoid the scale parameters without reliability control being directly used for subsequent scale standardization.

[0101] Finally, based on the obtained effective surface sampling distance at the image level, a correspondence between pixel distance and actual ground physical distance is established, and image scale standardization is achieved between different flight altitudes, different voyages, and different image sources by unifying the physical ground window or normalizing the pixel scale.

[0102] Therefore, this application correlates crop planting row spacing priors, crop row image structure, planting pattern recognition, joint estimation of multiple reference row pairs, and confidence evaluation of calibration results, so that the actual physical spacing of crop rows can be converted into pixel scale in the image, and thus obtains an effective ground sampling distance that can be used for scale conversion and image standardization, thereby achieving scale calibration of UAV remote sensing images without relying on additional ground calibration objects.

[0103] In one embodiment of this application, the UAV remote sensing image is an RGB image, and vegetation enhancement uses the Super Green Index (ExG). ExG is calculated based on the pixel values ​​of the three RGB channels: ExG = 2G - RB, where R, G, and B correspond to the red, green, and blue channels, respectively. The pixel values ​​of the three channels are calculated using normalized values ​​or original pixel values ​​with a uniform range, and the data range is kept consistent during the calculation process. Since the response of green vegetation in the green channel is usually higher than that of background areas such as soil, ExG can enhance the spectral difference between vegetation and soil background, making seedling crops form a relatively prominent foreground area, providing a basis for subsequent threshold segmentation, row direction detection, and crop row center extraction, thereby reducing the impact of soil color and light changes on row structure extraction when directly using the original RGB channels.

[0104] In one embodiment of this application, the UAV remote sensing image is a multispectral image, and vegetation enhancement uses the Normalized Difference Vegetation Index (NDVI). NDVI is calculated as (NIR-R) / (NIR+R) based on the near-infrared reflectance (NIR) and red reflectance (R). Before calculating NDVI, spatial registration is performed on the near-infrared and red bands to ensure that the two bands have consistent spatial coordinates and spatial resolution. This ensures that the same pixel location corresponds to the same ground area, avoiding edge misalignment or local false differences in the vegetation enhancement results caused by spatial position shifts in different bands. Enhancing vegetation areas through NDVI provides a different vegetation recognition input format for multispectral UAV images compared to RGB images, making the row spacing prior calibration process of this application applicable to multispectral seedling stage remote sensing images.

[0105] In one embodiment of this application, an adaptive threshold segmentation is performed on the vegetation enhancement image after ExG or NDVI enhancement. The segmentation threshold is adaptively determined based on the pixel distribution of the current image using the Otsu method or the Triangle method, thus eliminating the need to set fixed thresholds for different lighting conditions and different seedling densities. After obtaining a binary vegetation mask, at least one of morphological opening, closing, hole filling, and connected component filtering is performed on the vegetation mask. The opening operation is used to suppress isolated small noise, the closing operation is used to connect adjacent vegetation areas with small gaps, the hole filling is used to fill the gaps inside the vegetation area, and the connected component filtering is used to remove non-crop areas with too small an area. This results in a vegetation mask with a relatively continuous crop row structure, providing a more stable spatial distribution basis for subsequent projection peak detection.

[0106] In this application, image geometric processing is organized according to the following hierarchy:

[0107] (1) Lens distortion correction: Radial and tangential distortion are corrected based on camera intrinsic parameters or lens calibration results as an optional preprocessing step;

[0108] (2) Orientation correction: By rotating, the crop row direction is made parallel to the preset coordinate axis. Its function is to unify the row spacing projection direction and reduce projection error. Orientation correction does not eliminate perspective effect, projection distortion caused by the roll and pitch of the aircraft, and local scale changes caused by terrain elevation difference.

[0109] (3) Perspective or orthophoto correction: This is performed when pose information, terrain data, or regional network adjustment conditions are available, as an optional enhancement step;

[0110] (4) Local scale estimation: For the scale space changes in the image that still exist after the above processing, the changes are detected and modeled by the reference row pairs in the local window;

[0111] (5) Scale normalization: Resample the image based on the effective surface sampling distance at the image level or locally;

[0112] Direction correction is a necessary step in the method of this application. The other levels are selected according to the data conditions, and the boundaries of each level are independent of each other.

[0113] In one embodiment of this application, a Hough line transform is performed on the vegetation mask to obtain multiple candidate lines. The candidate lines are represented by the Hessian normal form as ρ = xcosθ + ysinθ, where ρ represents the normal distance from the origin to the candidate line and θ represents the normal angle corresponding to the candidate line. The directional angle distribution of the candidate lines is further statistically analyzed, and the directional weight of the candidate lines is determined based on at least one of the line segment length, the number of supporting pixels, and the fitting residual. The longer the line segment length, the more supporting pixels, and the smaller the fitting residual, the higher the directional weight of the candidate line. The dominant angle in the weighted directional distribution is determined as the dominant direction of the crop row, and the image center is used as the rotation reference to rotate and correct the image or vegetation mask so that the crop row direction is parallel to the preset coordinate axis. This reduces the row spacing projection error caused by the inconsistency between the UAV's heading and the crop row direction, and provides a unified geometric reference for the subsequent extraction of the crop row center according to the fixed coordinate direction.

[0114] Rotation correction is achieved by resampling while maintaining the output image size. After rotation, the empty areas that exceed the original image boundary are filled with background values ​​and excluded in projection statistics and reference row pair construction. Crop rows that are only partially visible at the image edge do not participate in the construction of reference row pairs when their effective row segment length is lower than a preset threshold, but they can still participate in the estimation of crop row direction.

[0115] In one embodiment of this application, based on obtaining the dominant direction of crop rows through Hough line transform, the center point of the seedling plant can be obtained using a target detection model or a plant segmentation model. The center point of the plant is then assigned to the corresponding crop row according to the spatial distance between the center point of the plant and the candidate crop row. At least one of RANSAC fitting, least squares fitting, or piecewise line fitting is then performed on the center points of the plants in the same crop row to obtain the row direction corresponding to each crop row. The dominant direction of the crop row obtained by Hough transform is then finely adjusted according to the multiple row directions. RANSAC can reduce the influence of abnormal plant points on the row direction, and piecewise line fitting can adapt to local row curvature structures. Thus, the accuracy of row direction correction can be further improved when the seedling plants are distributed in a discrete point shape, the crop row has local breaks, or the Hough line detection results are unstable.

[0116] In one embodiment of this application, the extracted crop row centers are sorted from smallest to largest according to their corresponding coordinates in the corrected image, and denoted as x1, x2, ..., x3. n And calculate the pixel spacing d between the centers of adjacent crop rows. i =x (i+1) -x i , composed of multiple d i The pixel row spacing sequence is constructed; the coefficient of variation (CV) of the row spacing sequence is further calculated. d=σ(d i ) / mean(d i ), where σ(d) i ) represents the standard deviation of the row spacing sequence, mean(d) i ) represents the average of the row spacing sequence, when CV d When the pixel spacing is less than the first preset threshold, it indicates that the pixel spacing between different adjacent crop rows has a high degree of consistency. Therefore, the planting pattern corresponding to the image is determined to be an equal row spacing planting pattern, and the center of the adjacent crop rows is used to form the subsequent reference row pair. By using the statistical consistency of the entire row spacing sequence to determine the pattern, the impact of abnormal single row spacing measurement values ​​on the planting pattern determination is reduced.

[0117] In this application, under the condition that the crop row after orientation correction is parallel to the preset coordinate axis, the pixel spacing Δx of the reference row pair is... i The difference between the x-coordinates of the centers of the two crop rows that constitute the reference row pair is taken. In the case of local curvature of the crop row, the distance between the two fitted rows in the common normal direction is calculated in segments according to the row direction, and the average of the segmented normal distances is used as the pixel spacing of the reference row pair to avoid the systematic bias introduced by directly using the difference in x-coordinates.

[0118] In one embodiment of this application, a periodic analysis is performed on the pixel row spacing sequence, and the odd-numbered spacing and even-numbered spacing are used as two candidate periodic phases for testing, so that the row spacing within the same periodic phase satisfies |d (i+2) -d i | / d i <ε, where ε is the periodic consistency threshold, for example, ε can be taken as 10%, and further calculate the relative difference between the wide and narrow line spacing corresponding to the two periodic phases, when |d (i+1) -d i | / min(d (i+1) ,d i When the difference is greater than the significance threshold δ, the image is determined to be a wide-narrow row planting pattern, for example, δ can be 30%. Since the starting position of the row spacing sequence may correspond to a wide row or a narrow row, the two periodic phase hypotheses are tested separately, and the phase that satisfies the conditions of periodic consistency and phase spacing difference is taken as the valid planting pattern. If there is less than one complete wide-narrow row cycle in the image and a complete periodic reference row pair cannot be formed, the wide-narrow row pattern is not forcibly determined, but the equal row spacing pattern is used for downgrading or a manual confirmation prompt is output. One-dimensional K-Means clustering or the bimodal test of row spacing distribution is used as an auxiliary method for periodic determination, but the periodic phase constraint of the row spacing sequence is used as the main basis for the selection of reference row pairs, so as to avoid misjudgment of planting pattern phase caused by clustering based solely on row spacing values.

[0119] When there are abnormally large spacings (indicating missed rows between two crop rows with the same phase) or abnormally small spacings (indicating false peaks or the same crop row splitting into two row centers) in the pixel row spacing sequence, the periodic phase number is restored through sequence repair: the abnormal spacing is compared with the periodic reference distance estimated and converted according to the current scale, the number of missed rows is determined according to the nearest integer multiple relationship and the row number is filled in, or the centers of adjacent crop rows with spacing less than the preset lower limit are merged; for row spacing sequences with multiple discontinuities, dynamic programming or sequence matching is used to select the phase numbering scheme that minimizes the residual within the group from two periodic phase assumptions, so as to restore the periodic phase constraint after missed detection or false detection.

[0120] Preferably, the periodic consistency condition and the difference significance condition are determined using robust statistics: periodic consistency is determined by the periodic index C. p =MAD(d i +d (i+1) ) / median(d i +d (i+1) The difference is determined by the relative difference index R when the difference is less than the third preset threshold. wn =|median(d 奇 )-median(d 偶 )| / [(median(d 奇 )+median(d 偶 The condition is determined if )) / 2] is greater than the fourth preset threshold, where median(·) is the median operation, MAD(·) is the absolute median difference operation, and d 奇 d is the subsequence formed by the odd-numbered index spacing in the pixel row spacing sequence. 偶 The subsequence is formed by even-numbered sequence intervals; the median and absolute median difference are used for judgment, which can reduce the impact of missing seedlings, weeds and row center positioning errors on planting pattern recognition; the third preset threshold can be taken in the range of 10%-15%, and the fourth preset threshold can be taken in the range of 25%-35%.

[0121] In one embodiment of this application, under the wide-narrow row planting pattern, instead of using any two adjacent crop row centers as reference row pairs with a physical reference distance equal to the sum of the wide and narrow row distances, reference row pairs are formed by selecting crop row centers from one periodic phase to the next crop row center with the same periodic phase, based on the periodic phase of the row spacing sequence. For example, two adjacent crop row centers located on either side of the wide row spacing or two adjacent crop row centers located on either side of the narrow row spacing are selected. The two crop row centers with the same phase span one wide row spacing and one narrow row spacing. Since the reference row pairs span exactly one wide row spacing and one narrow row spacing, their physical reference distance is determined to be D. i =D wide +Dnarrow For example, if the physical spacing of a wide row is 80cm and the physical spacing of a narrow row is 40cm, then the physical reference distance corresponding to the phase reference row pair in the same period is 120cm. This ensures that the pixel spacing of the reference row pair and the physical reference distance are strictly corresponded in space, avoiding the systematic scale deviation caused by incorrectly corresponding the pixel distance of a single wide or narrow row to the sum of the physical distances of the wide and narrow rows. This phase correspondence is also an important constraint for effective self-calibration of the surface sampling distance in the wide and narrow row planting mode.

[0122] In one embodiment of this application, effective surface sampling distance estimates (GSDs) are obtained for multiple reference row pairs respectively. i Robust fusion is performed, and the fusion method adopts at least one of the following: median, truncated mean, weighted mean, Huber robust estimation, or RANSAC estimation. Among them, the median is suitable for situations where there are few reference row pairs or obvious outlier estimates; the truncated mean is suitable for situations where there are many reference row pairs and the estimates are approximately continuously distributed; the weighted mean is suitable for situations where there are significant differences in the structural quality of different reference row pairs; and Huber robust estimation or RANSAC estimation is used to reduce the impact of outlier reference row pairs on the final scale estimation. By jointly estimating multiple reference row pairs, the errors of individual reference row pairs caused by local missing seedlings, weed occlusion, sowing offset, and local bending of crop rows will not directly determine the effective surface sampling distance at the image level.

[0123] In one embodiment of this application, in order to enable the structural quality of reference row pairs to participate in effective surface sampling distance fusion, a structural quality score Q is constructed for each reference row pair. i The quality score is composed of at least two of the following indicators: peak significance, effective row length, number of plants within a row, row line fitting residual, degree of local shading, and row spacing period consistency. Each indicator is normalized and then calculated according to Q... i =λ1 q i ,peak+λ2 q i ,length+λ3 q i ,plant+λ4 q i ,fit+λ5 q i A comprehensive evaluation is conducted on occlusion, where Σλ k =1, and the inverse normalized value of the residuals is used as the quality index for the line fitting residuals; the higher the quality score, the greater the corresponding fusion weight of the reference line pair, and thus according to GSD=Σ i (Q i ×GSD i ) / Σ i Qi Perform weighted fusion; furthermore, the weights can also be w i =q i / (r i The form of +ε0) is determined, where q i r is the composite score after normalization of quality indicators such as peak significance and number of plants in the row. i The line fitting residuals of the corresponding row pair are represented by ε0, which is a positive constant to prevent the denominator from being zero. This allows the structural quality of the reference row pair to participate in both GSD estimation and subsequent confidence evaluation, thus forming a correlation between the quality of the reference row pair, scale estimation, and reliability judgment.

[0124] In one embodiment of this application, the GSD calculated based on each reference row is... i Calculate its sample coefficient of variation (CV) G =σ(GSD i ) / mean(GSD i ), where σ(GSD) i ) represents the sample standard deviation of the effective surface sampling distance estimates for multiple reference rows, according to each GSD i The square root of the sum of squared deviations from the mean divided by the degrees of freedom n-1 is obtained, where n is the number of valid reference row pairs. i ) is the average of multiple estimates; when CV G When the value is less than a preset threshold, such as 5%, it indicates that multiple reference rows have high internal consistency in the obtained scale estimate, and the output image effectively represents the surface sampling distance. G If the value is greater than or equal to the preset threshold, the internal consistency of the current calibration result is considered insufficient and an anomaly handling process is initiated. Thus, the scale estimation dispersion between multiple reference row pairs is used to quantify and evaluate the calibration result, so that the final output effective ground sampling distance not only has a scale value, but also has its corresponding reliability information.

[0125] In one embodiment of this application, the number of effective reference row pairs is used as one of the structural quality indicators for confidence evaluation. When the number of effective reference row pairs is less than a preset minimum number, instead of outputting the effective area sampling distance of the image level with high confidence based on the insufficient number of reference row pairs, a low confidence label is directly output or a manual review is triggered. The preset minimum number can be set to 3, and preferably to 5, so that the coefficient of variation has basic statistical significance. By combining the number of reference row pairs with the dispersion of the GSD estimation results, the scaling results that appear to be certain but lack sufficient structural support are avoided when there are only a single or a few unstable reference row pairs.

[0126] Preferably, the confidence level evaluation is determined based on the comprehensive confidence level C, which is calculated according to C=exp(-λ×CV).G )×(Σq i ×I i / Σq i The calculation is performed, where λ is a preset coefficient (e.g., 5-10), and CV is calculated. G q is the coefficient of variation of multiple effective surface sampling distance estimates. i Score the structural quality Q for the i-th reference row. i Normalized structural quality score, q i =Q i / max(Q) 1, Q 2,..., Qn), after each quality index is normalized to the [0,1] interval, it is synthesized according to the aforementioned weighting coefficients, I i This is the identifier for whether the i-th reference row is used as a fusion interior point; when C is greater than the preset comprehensive confidence threshold (e.g., C≥0.85), it is judged as high confidence; when C is in the middle range (e.g., 0.6≤C<0.85), it is judged as medium confidence; when C is lower than the lower limit threshold (e.g., C<0.6), it is judged as low confidence. The low confidence result is used for downstream processes to reduce weight or prompt manual review.

[0127] In one embodiment of this application, when the image is subject to changes in shooting posture tilt, terrain undulation, or other factors that cause changes in the scale of different regions of the image, the orientation-corrected image is divided into multiple local windows. Within each local window, crop row center extraction and reference row pair determination are performed, and the local physical reference distance D is used as the basis for the determination. j With the corresponding pixel spacing Δx j Calculate the locally effective surface sampling distance GSD j =D j / Δx j Furthermore, by using the center position of each local window as a spatial position parameter, a correspondence is established between the effective surface sampling distance of each local area and its spatial position, and a spatial variation model is fitted. This expands the single image-level scale parameter into a spatial variation scale parameter, enabling different image regions to be standardized according to their actual scale, thereby adapting to UAV remote sensing images with non-uniform scale variations.

[0128] In one embodiment of this application, the pixel coordinates x and y at the center of the local window are divided by the width W and height H of the image after orientation correction, respectively, to obtain normalized image coordinates x'=x / W and y'=y / H. A spatial variation model GSD(x',y')=α0+α1x'+α2y'+α3x'y' is established, where α0, α1, α2, and α3 are model parameters obtained by fitting the effective surface sampling distance of each local window. The model simultaneously includes a first-order variation term in two directions and an interaction term between the two directions, thereby describing the continuous variation of the effective surface sampling distance in the image along different spatial directions. The model fitting adopts a robust regression method such as weighted least squares or RANSAC, and the applicability of the model is evaluated by the fitting residuals. When the fitting residuals exceed a preset threshold, the model is transferred to block-based independent standardization or manual review, thereby avoiding new scale errors caused by inapplicable spatial scale models.

[0129] It should be noted that the main purpose of the spatial variation model is to determine whether the scale within an image is uniform and to quantify the degree of spatial scale variation. Only when the image satisfies geometric assumptions such as approximately vertical imaging and small local tilt components will the local scaling factor of each block be determined according to the spatial variation model and non-uniform block resampling be performed. This application does not uniquely determine the two-dimensional coordinate mapping based on the scalar scale field. When the image has obvious perspective distortion or terrain undulations and requires complete geometric correction, homography transformation or orthorectification is used in conjunction with additional geometric information for processing. In this case, the scale information output by the spatial variation model is used for cross-validation of the correction quality.

[0130] In one embodiment of this application, the effective surface sampling distance of each local window is obtained according to the spatial variation model, and the preset target standard ground sampling distance GSD0 is used as a unified scale. The local scaling factor s(x',y')=GSD(x',y') / GSD0 corresponding to each local window is calculated according to the effective surface sampling distance. Then, block resampling or local scale transformation is performed according to the scaling factor corresponding to each local window. An overlapping area with a certain range is set between adjacent local windows, and a gradual transition fusion is applied to the overlapping area to reduce scale abruptness, target breakage, and image seams at the block boundaries. For local scale changes with small rotation, shearing, and translation components, local affine correction is used. For areas with obvious perspective distortion, homography transformation or orthorectification is further applied. Thus, local scale correction can not only adjust pixel size but also adapt to spatial scale changes caused by image geometry.

[0131] In one embodiment of this application, to achieve pixel scale uniformity among images acquired at different flight altitudes, different voyages, or different sensors, a target standard ground sampling distance GSD0 is set, and a scaling factor s(x',y')=GSD(x',y') / GSD0 is calculated based on the effective surface sampling distance GSD at the image level, according to W out =s×W in H out =s×H in Determine the output image size so that the resampled ground sampling distance meets GSD. out =GSD / s=GSD0; For example, if the effective ground sampling distance of the original image is 0.6cm / pixel and the target standard ground sampling distance is 0.3cm / pixel, then s=2. After resampling the original image by 2 times, the ground physical scale corresponding to its pixels is unified to 0.3cm / pixel. For continuous tone images such as RGB, resampling uses bilinear interpolation or bicubic interpolation. For binary vegetation masks, nearest neighbor interpolation is used or the mask is regenerated according to the transformation parameters to avoid the interpolation producing transitional pseudo values, thereby achieving a unified pixel scale while maintaining the spatial relationship of image content.

[0132] After resampling, the width and height of the output image are rounded to the nearest integer, and the effective ground sampling distance of the output image is verified according to the actual integer size. The annotation data associated with the image, including the detection box, vegetation mask, crop row center coordinates and missing seedling positions, are synchronously transformed according to the same scaling relationship. The scale standardization only unifies the ground scale corresponding to the pixels, does not increase the inherent spatial resolution of the original image, and cannot restore details that are not present in the original image.

[0133] In one embodiment of this application, after obtaining the effective surface sampling distance GSD, the actual width W of the preset physical ground window is used as the basis for the calculation. physical and height H physical Calculate the corresponding pixel size W pixel =W physical / GSD、H pixel =H physical / GSD, and crop the corresponding region from different original images according to the calculated pixel size, so that the cropped windows in different images cover the same actual ground area; further, the cropped image windows are resampled to a unified preset output size, for example, windows covering the same physical ground area are uniformly adjusted to 640×640 pixels, thus forming a dual standardization of "unified physical distance + unified pixel size", so that the subsequent crop condition detection, sampling analysis or machine learning model input has a consistent spatial coverage and pixel scale, reducing the systematic impact of the original image GSD difference on downstream quantitative analysis.

[0134] In one embodiment of this application, after image scale standardization is completed, target detection or instance segmentation is performed on the plants in the standardized image to obtain the position of each plant. Based on the spatial relationship between the plant position and the center of the crop row or the fitted row line, the detected plants are assigned to the corresponding crop rows. Furthermore, the actual number N of plants in each crop row is counted. actual And combined with the predetermined theoretical number of plants N theoretical Calculate the germination rate, which is based on N. actual / N theoretical The calculation is performed at 100%, and the location of missing seedlings is determined based on the correspondence between the theoretical plant location and the actual detected plant location. By first performing scale self-calibration and standardization, and then performing plant detection and row-level statistics, the pixel distance in different images has a consistent physical meaning, so that seedling condition indicators such as the number of plants, seedling emergence rate and location of missing seedlings can be established on a unified spatial scale.

[0135] In this application, the "effective surface sampling distance" refers to a scale parameter estimated based on the known prior parameters of crop planting row spacing and the pixel spacing between the centers of crop rows in the image, used for image physical scale conversion and scale standardization. When the UAV remote sensing image is an approximately vertical overhead image, has undergone orthorectification, has an approximately horizontal ground surface with minimal perspective distortion, the effective surface sampling distance can approximately represent the average ground sampling distance of the image region. When the image has attitude tilt, terrain undulation, or spatial scale changes, the effective surface sampling distance can represent the local ground sampling distance of the corresponding local window, or represent a spatial scale change model fitted based on multiple local ground sampling distances.

[0136] The effective surface sampling distance obtained by the reference row in this application is the effective lateral scale perpendicular to the crop row direction. When the image is approximately vertically imaged and the pixel scales are isotropic in both directions, the effective lateral scale is approximately equal to the ground sampling distance of the entire image. The longitudinal scale along the crop row direction can be estimated using the plant spacing prior according to the same principle, or the effective lateral scale can be directly used when the above isotropic assumption is satisfied.

[0137] The method of this application is applicable to remote sensing images acquired by UAVs from near-vertical downward view, remote sensing images that have undergone orthorectification, and remote sensing images where the perspective distortion in local areas is below a preset threshold. It is also applicable to agricultural monitoring scenarios where the ground slope and elevation changes are within a preset allowable range, the prior parameters of crop planting row spacing are real and clear, and the crop row structure in the image can be identified. In particular, when seedling crops form continuous or quasi-continuous strip-shaped row structures in the image, it is beneficial to extract crop row direction, row center, and row spacing information through image processing.

[0138] This application does not simply perform a conversion between physical distance and pixel distance using known crop row spacing. Instead, it addresses the characteristic of regular spatial arrangement of crop rows in UAV seedling remote sensing images by associating prior crop row spacing with the crop row structure in the image. Through vegetation mask extraction, crop row direction correction, projection peak detection, row center extraction, and row spacing sequence construction, the crop row structure in the original remote sensing image is converted into a pixel structure that can be physically scaled. Furthermore, based on the row spacing sequence, it identifies equal row spacing or wide-narrow row planting patterns and adopts different reference row pair construction methods for different planting patterns. In particular, in the wide-narrow row planting pattern, crop row centers with the same periodic phase are selected as reference row pairs, ensuring that the physical reference distance and the corresponding pixel distance span the same planting cycle, thereby avoiding incorrect correspondence between physical row spacing and pixel row spacing. On this basis, multiple reference row pairs are used to obtain effective area sampling distance estimates and robustly fused, so that individual row pairs are not directly affected by missing seedlings, weeds, occlusion, row curvature, or local recognition errors, thus preventing them from directly affecting the overall image. The calibration results are scaled; simultaneously, the confidence of the calibration results is evaluated by assessing the dispersion of the effective surface sampling distance estimate and the structural quality of the reference row pairs. Based on the evaluation results, anomaly processing or local re-estimation is performed step by step, thus forming a complete processing link from crop row structure identification, physical scale matching, joint estimation of multiple reference row pairs to reliability control of calibration results. Finally, scale standardization is implemented based on the obtained image-level or locally effective surface sampling distance, so that remote sensing images obtained under different flight altitudes, different flights, or different image acquisition conditions can establish a unified physical scale benchmark. Therefore, this application achieves effective ground sampling distance calibration of UAV remote sensing images without relying on additional ground calibration objects through the synergistic cooperation between crop planting row spacing prior, planting pattern recognition, periodic phase reference row pair selection, robust fusion of multiple reference row pairs, and confidence control. It also provides physically meaningful scale parameters for subsequent image scale unification, and provides image data with a consistent scale basis for subsequent quantitative agricultural remote sensing analysis such as seedling detection, seedling count, seedling emergence rate calculation, and seedling gap location identification.

[0139] This application also discloses a remote sensing image sampling distance calibration system based on row spacing prior, such as... Figure 7As shown, the system includes a preprocessing module, a row orientation detection and correction module, a row center extraction module, a planting pattern recognition module, a multi-reference row pair GSD estimation module, a confidence evaluation module, and a scale normalization module, which work in sequence. The preprocessing module performs ExG or NDVI vegetation enhancement and OTSU or Triangle adaptive threshold segmentation, and performs morphological processing as needed. The row orientation detection and correction module uses Hough transform to obtain the dominant direction of the crop rows and performs secondary refinement of the row orientation using plant detection points. The row center extraction module obtains the crop row centers and forms a row spacing sequence through projection, peak detection, and clustering. The planting pattern recognition module distinguishes between equal row spacing and wide / narrow row patterns based on the statistical consistency and periodic phase relationship of the row spacing sequence, and selects adjacent reference row pairs or reference row pairs with the same periodic phase according to the corresponding planting pattern. The multi-reference row pair GSD estimation module obtains multiple GSDs based on the physical reference distance and pixel spacing of each reference row pair. i Robust fusion is performed using median, truncated mean, weighted mean, Huber estimation, or RANSAC estimation. The confidence evaluation module evaluates the calibration results based on the dispersion of the GSD estimates, peak significance, row spacing periodicity, row line fitting residuals, and the number of effective reference row pairs. If the confidence is insufficient, it sequentially performs outlier reference row pair removal, re-fusion, local window estimation, spatial scale modeling, low confidence labeling, or manual verification. The scale standardization module performs physical ground window unification, pixel scale normalization, and local spatial scale correction based on the image-level or locally effective surface sampling distance. The seedling analysis module completes plant detection, crop row allocation, actual plant count, seedling emergence rate calculation, and seedling location identification based on the standardized image. The result output module can further output standardized images, GSD values, confidence, row and plant statistics, and visualization results or structured reports, thus forming a complete processing link from image input, scale self-calibration, reliability control, scale standardization to seedling analysis.

[0140] In one embodiment of this application, the remote sensing image sampling distance calibration system based on row spacing prior further includes:

[0141] Seedling Analysis Module: This module is used to extract seedling information from scale-standardized remote sensing images. It obtains the location and number of crop plants through target detection, instance segmentation, or plant center detection. It also determines the theoretical number of plants based on the row spacing, plant spacing within the row, or preset planting density. Furthermore, it calculates the actual number of seedlings, the theoretical number of seedlings, and the seedling emergence rate. Finally, it determines the location and number of missing seedlings based on the correspondence between the actual and theoretical plant locations.

[0142] The germination rate can be expressed as the ratio of the actual number of germinations to the theoretical number of germinations. The seedling condition analysis module can also output seedling condition analysis results such as plant location, row number, number of plants, germination rate, and location of missing seedlings.

[0143] By performing crop condition analysis after scaling, images obtained from different flight altitudes, different flight batches, or different imaging devices have a uniform pixel scale and physical ground coverage, which facilitates quantitative comparison of crop condition analysis results at different times or in different regions.

[0144] In one embodiment of this application, the remote sensing image sampling distance calibration system based on row spacing prior further includes:

[0145] The results output module is used to output the scale-normalized remote sensing image, the effective area sampling distance (GSD) and its corresponding confidence level, and, as needed, to output reference row pairs, the GSD estimate corresponding to each reference row pair, outlier reference row pairs and local scale correction results.

[0146] It also generates visualizations and structured reports containing information such as crop row center, plant location, missing seedling location, and scale standardization results, to facilitate subsequent seedling condition analysis, cross-batch data comparison, and model input.

[0147] This application also discloses an electronic device, which includes a processor and a memory. The memory stores a program for executing the above-described remote sensing image sampling distance calibration method based on row spacing prior. After the program is executed by the processor, the electronic device sequentially completes the following steps: UAV remote sensing image acquisition, vegetation enhancement, vegetation mask generation, crop row direction detection and correction, crop row center extraction, row spacing sequence construction, planting pattern recognition, reference row pair selection, multiple effective surface sampling distance estimation, robust fusion, confidence evaluation, anomaly handling, and image scale standardization. It can also further perform local scale correction and crop condition analysis, thereby enabling the above method to be deployed as a computational program in UAV ground stations, agricultural monitoring terminals, edge computing devices, servers, or other electronic devices with image processing capabilities.

[0148] This application also discloses a computer-readable storage medium storing a computer program for implementing the above-described remote sensing image sampling distance calibration method based on row spacing prior. When executed by a processor, the computer program can perform functions such as vegetation enhancement and segmentation, crop row direction detection, row center extraction, planting pattern recognition, reference row pair determination, effective surface sampling distance estimation, robust fusion, confidence evaluation, anomaly handling, global or local scale standardization, and seedling condition analysis. The computer program can select either the ExG processing flow for RGB images or the NDVI processing flow for multispectral images based on the input image type, and select either image-level effective surface sampling distance output or a local scale correction flow based on the calibration confidence level. This allows the scale self-calibration and standardization method of this application to be stored, copied, and deployed in a data processing device with computing power in the form of a software program.

[0149] Example 1

[0150] like Figure 1 As shown, this embodiment provides a low-cost, highly robust, and strongly generalizable remote sensing image sampling distance calibration method based on row spacing prior, which solves the problem of inconsistent image scales between flights caused by fluctuations in flight altitude, realizes the physical scale uniformity of agricultural remote sensing data across years, sensors, and platforms, and improves the accuracy and comparability of quantitative analysis of crop conditions.

[0151] Core design goals for agricultural scenarios:

[0152] (1) Timeliness: The entire process is automated, with a single image processing time of less than 3 seconds. From data collection to result output, it can be completed in real time in the field, meeting the urgent agricultural production needs.

[0153] (2) Simplicity: No manual setting of calibration objects is required, and no professional remote sensing knowledge is needed. Ordinary agricultural practitioners can operate it. Only agronomic parameters such as planting row spacing need to be input, and the system will automatically complete GSD calibration and scale standardization.

[0154] (3) Low cost: No need for high-precision positioning equipment such as RTK / PPK, no need for ground control point targets, and monitoring can be achieved using ordinary consumer-grade drones, reducing the dependence on additional ground calibration facilities and high-precision positioning equipment.

[0155] Applicable conditions:

[0156] The applicable conditions for the method in this application are:

[0157] (1) The image is obtained by the UAV from an approximate vertical downward view, or orthorectification has been completed, or the perspective distortion in the local area of ​​the image is lower than the preset threshold;

[0158] (2) The changes in the ground slope and elevation of the monitored fields are within the allowable range;

[0159] (3) The prior parameters for crop planting row spacing are real and clear (the planting plan is known);

[0160] (4) The crop row structure in the image can be identified, for example, the crop rows in the seedling stage are continuous or quasi-continuous strip structure.

[0161] Method and Flow:

[0162] Step S1: Vegetation enhancement and binarization segmentation

[0163] To isolate crop seedlings (green vegetation) from the soil background, the Excess Green Index (ExG) is introduced, calculated using the following formula:

[0164] ExG=2×GRB

[0165] Among them, R, G, and B are the RGB three-channel pixel values ​​(normalized values ​​or original values ​​of 0-255 can be used, and they must be kept consistent).

[0166] Thresholding the ExG image yields a binary mask M(x,y):

[0167] M(x,y)=1 when ExG(x,y)>T; otherwise M(x,y)=0

[0168] Where M(x,y) represents the mask value of the orientation-corrected crop vegetation mask at pixel coordinates (x,y), x and y represent the horizontal and vertical coordinates of the pixel in the orientation-corrected remote sensing image, respectively, and T is the threshold. The threshold can be adaptively determined using the Otsu's method or the Triangle method, such as... Figure 3 As shown, robustness under different light conditions and sparse seedling stages can be improved. When the input is a multispectral image, the Normalized Difference Vegetation Index (NDVI) can be used instead of ExG.

[0169] As a preferred option, at least one of the following post-processing methods is applied to the segmentation results: morphological opening operation, closing operation, hole filling, and connected component screening, in order to remove isolated noise, small weed areas, and small connected components of non-crop areas, thereby improving the quality of vegetation masking.

[0170] Step S2: Crop row orientation estimation and geometric pre-rotation

[0171] Since the UAV's heading may not align with the crop row direction, the image suffers from geometric deformation due to rotation and orientation. This application first estimates the dominant row direction angle θ through line detection, and then rotates the image to make the crop row as close to the vertical direction as possible.

[0172] Line detection is performed using the Hough transform, such as Figure 4As shown, the polar coordinate form of a straight line (Hesse normal form):

[0173] ρ=xcosθ+ysinθ

[0174] The directional weight of each candidate line is determined by at least one of the line segment length, the number of supporting pixels, and the fitting residual. The dominant angle of the weighted directional distribution is used as the dominant direction of the row (which is more suitable for stable estimation of continuous angle data than simple mode).

[0175] Using the image center as the rotation reference, rotate the image counterclockwise by an angle θ to make the crop rows parallel to the image coordinate axes, thus eliminating shooting angle deviation.

[0176] Considering that seedlings are mostly discrete point-like or short strip-like targets and that row structures may be locally broken, this step may also include secondary row orientation refinement as a preferred option: based on the target detection model, the plant center point is detected, the plant is assigned to the nearest row, robust linear fitting (such as least squares fitting or RANSAC fitting) is performed on the plant point set of each row, and the rotation correction result is finely adjusted according to the fitted row line direction, so that a reliable row orientation can still be obtained when the Hough transform detection result is unstable.

[0177] Step S3: Projection measurement, row center extraction and row spacing sequence construction

[0178] After rotation correction, the crop rows approximate a vertical strip structure. Projecting the binary mask horizontally yields the column projection curves; as shown... Figure 5 As shown, its peak value corresponds to the high-density area of ​​the crop row, thus allowing for the location of candidate points for the row center.

[0179] Column projection (x-direction projection):

[0180] P(x) = Σ y M(x,y)

[0181] Wherein, P(x) represents the column projection value obtained after projecting the mask along the Y direction, which is used to characterize the number (or weighted sum) of crop vegetation pixels at the position corresponding to the horizontal coordinate x, and the peak position in the column projection curve is used to characterize the candidate position of the crop row center.

[0182] A peak detection algorithm is used to detect the peak positions of the projected curves, and these peak positions are used as candidate points for the center positions of crop rows. Since noise, missing seedlings, or weeds can cause multiple peaks or spurious peaks, the peak positions are clustered to obtain a stable set of row centers. The clustering objective function is:

[0183] min C Σ k=1 K Σx i∈ C k ||xi -μ k || 2

[0184] Where K is the number of rows (or the number of row center clusters), C k For the k-th cluster, μ k Let its center pixel coordinates be given.

[0185] After obtaining stable row centers, sort the row centers in ascending order of their coordinates, such as... Figure 6 As shown, let them be denoted as x1, x2, ..., x n Calculate the center-to-center spacing between adjacent rows to form a row spacing sequence:

[0186] d i =x (i+1) -x i i=1,2, …,n-1

[0187] The row spacing sequence is the basis for subsequent planting pattern recognition and reference row pair selection.

[0188] Step S4: Planting Pattern Recognition and Reference Row Pair Selection

[0189] Statistical analysis was performed on the row spacing sequence to determine the planting pattern:

[0190] (1) Equal row spacing pattern determination: When all elements of the row spacing sequence are approximately equal (variance or coefficient of variation is less than a preset threshold), it is determined to be an equal row spacing planting pattern; (coefficient of variation CV) d =σ(d i ) / mean(d i ))

[0191] (2) Wide and narrow row pattern determination: When the odd-numbered sequence spacing and the even-numbered sequence spacing in the row spacing sequence are approximately equal and alternately distributed, i.e., d1≈d3≈d5…, d2≈d4≈d6…, and there is a significant difference between the two sets of spacing, it is determined to be a wide and narrow row planting pattern. “Approximately equal” and “significant difference” are quantitatively determined using the relative error threshold: the spacing of the same sequence number meets the periodic consistency condition |d (i+2) -d i | / d i <ε (e.g., ε is taken as 10%), and the wide line spacing and narrow line spacing satisfy the condition of significant difference |d (i+1) -d i | / min(d (i+1) ,d i)>δ (e.g., δ is 30%; when the wide row is 80cm and the narrow row is 40cm, the ratio is 100%). Since the starting point of the row spacing sequence may be located in the wide row or the narrow row, the two periodic phase assumptions are tested separately during the determination, and the one that meets the above conditions is selected; when the row spacing sequence in the image is less than a complete wide and narrow row cycle, and the effective reference row pair cannot cross the complete cycle, it is not determined as a wide and narrow row pattern, and is downgraded to equal row spacing or prompts manual confirmation of the planting pattern;

[0192] (3) Pattern recognition is based on the periodic constraints of the row spacing sequence as the main logic; one-dimensional clustering (such as K-Means, where the wide and narrow row pattern takes k=2 pairs of row spacing values) or bimodal test of row spacing distribution is only used as an auxiliary implementation method.

[0193] Determine the reference row pairs and their physical reference distances based on the planting pattern:

[0194] Under the planting pattern with equal row spacing, such as Figure 2 As shown in (a), the reference row pair is the center of two adjacent rows, and the physical reference distance D is the prior parameter of row spacing (the physical distance between two adjacent rows).

[0195] Under the wide-narrow row planting pattern, such as Figure 2 As shown in (b), the reference row pair is two row centers with the same periodic phase, that is, a row pair from one wide row center to the next wide row center, or from one narrow row center to the next narrow row center. The row pair spans one wide row and one narrow row. The physical reference distance D is the sum of the physical spacing between the wide row and the narrow row (e.g., when the wide row is 80cm and the narrow row is 40cm, D=120cm).

[0196] It should be noted that in the wide-narrow row mode, the pixel spacing between any two adjacent rows cannot be correlated with the sum of the wide and narrow rows; this step ensures that the physical reference distance and the pixel spacing of the selected row pair are strictly spatially correlated through periodic phase analysis of the row spacing sequence.

[0197] Step S5: GSD self-calibration calculation (joint estimation of multiple reference row pairs)

[0198] The crop row spacing prior D is used to replace the height constraint. For each reference row pair, its pixel spacing Δx is calculated to obtain the GSD estimate for that row pair:

[0199] GSD i =D i / Δx i

[0200] Among them, D i Let Δx be the physical reference distance of the i-th reference row pair. i This represents the pixel spacing of the row pair.

[0201] When multiple available reference row pairs exist in the image, the GSD of each reference row pair is calculated separately. i And robust fusion is performed to obtain an effective surface sampling distance:

[0202] GSD = median(GSD1, GSD2, ..., GSD) n )

[0203] In the case where the number of reference row pairs is even, median(·) represents the average of the two values ​​in the middle position after sorting; in the case where the number of reference row pairs is odd, median(·) represents the middle value after sorting.

[0204] This can be achieved by taking the median of all reference rows; or by using the truncated mean; or by using the weighted mean:

[0205] GSD=(Σ i w i GSD i ) / (Σ i w i )

[0206] Among them, w i To integrate the weights, the weights are determined based on at least one of the following: peak significance, row segment length, number of plants in a row, and row line fitting residuals: the reference row pair with higher peak significance, longer row segment, more plants, or smaller fitting residuals has a greater weight.

[0207] The quality score Q of the constructed structure for the i-th reference row. i The quality score is composed of at least two of the following indicators: peak significance, effective row length, number of plants within a row, row fit residual, and degree of local shading. After normalizing each indicator, the quality score is obtained as follows: Q i =λ1 q i ,peak+λ2 q i ,length+λ3 q i ,plant+λ4 q i ,fit+λ5 q i occlusion, q i ,peak represents the significance score of the peak detected in the center of the reference row, used to characterize the prominence of the corresponding peak relative to the surrounding background; q i ,length represents the effective line segment length score, used to characterize the effective line segment length or continuous detection length determined by the reference line pair; q i"plant" represents the plant count score, used to characterize the number of valid plants in the corresponding area that can be used to help determine the row center for that reference row; q i `fit` represents the line fit quality score, used to characterize the reliability of the reference line fit result. It can be obtained by normalizing the fit residuals; the smaller the fit residuals, the higher the score. `q` i Occlusion represents the occlusion score, which characterizes the degree to which the reference row is affected by plant occlusion, weed occlusion, or other occlusion factors in the corresponding area. The lower the degree of occlusion, the higher the corresponding score, where Σλ k =1. Q i Q is the overall quality score for the i-th reference row pair. i A larger Q value indicates higher quality for the reference row pair. The weight of the reference row pair is determined based on the quality score; a higher quality score results in a greater weight. For the row line fitting residuals, the inversely normalized value of the residuals is used as the quality index. i The ground sampling distance for weighted fusion is normalized and weighted as a weighting coefficient: GSD = Σ i (Q i ×GSD i ) / Σ i Q i .

[0208] The quality scoring mechanism integrates confidence evaluation and robustness using the same set of row structure quality indicators, forming a closed loop that links reference row pair selection, weighted estimation, and confidence determination.

[0209] The three fusion methods are applicable in the following situations: the median is suitable for situations where the number of reference row pairs is small or there are obvious outliers; the truncated mean is suitable for situations where the number of reference row pairs is large and the estimation results are approximately continuously distributed; the weighted mean is suitable for situations where there are significant differences in the quality indicators among the reference row pairs. Preferably, the weights can be implemented in the following executable form: w i =q i / (r i +ε0), where q i r is the composite score after normalization of quality indicators such as peak significance and number of plants in the row. i ε0 represents the line fitting residual for this row pair, and ε0 is a positive constant to prevent the denominator from being zero.

[0210] Compared to relying on a single row pair, joint estimation using multiple reference row pairs can suppress the failure of individual row pairs caused by sowing offset, missing seedlings, and local row curvature, significantly improving calibration stability.

[0211] Step S6: Calibration Confidence Evaluation and Anomaly Handling

[0212] The calibration confidence level is determined based on the degree of dispersion of the GSD calculation results for each reference row, using the coefficient of variation (CV). G Characterization:

[0213] CV G =σ(GSD i ) / mean(GSD i )

[0214] Wherein, σ(GSD) i The standard deviation of each reference row for the calculated results is the sample standard deviation (first calculate each GSD). i The sum of squared deviations from the relative mean, divided by the degrees of freedom n-1, and then taken as the square root (where n is the number of reference row pairs), mean(GSD) i The mean of the values ​​is given. To ensure the statistical significance of the confidence level evaluation, the number of valid reference rows should be no less than 3, and the number of preferred rows should be no less than 5; if the number is less than the minimum, the CV will not be calculated. G It directly outputs low-confidence tags.

[0215] It should be noted that CV G This only reflects the internal consistency of the estimated values ​​across rows; if the row spacing prior itself is incorrect, each GSD... i Possibly highly consistent with CV G Still low. Therefore, the calibration confidence level is determined comprehensively from two dimensions:

[0216] (1) The confidence level of internal consistency is determined by the degree of dispersion of the GSD estimate for each reference row;

[0217] (2) The confidence level of structure identification is determined by row structure quality indicators such as the significance of projection peak, the periodicity of row spacing sequence, the row line fitting residual and the number of effective reference row pairs.

[0218] The overall confidence level is output in three levels: high, medium, and low. The criteria for confidence level are: sufficient number of reference row pairs, significant peak value, and high CV. G A score below the threshold and a small fitting residual indicate high confidence; CV G A medium confidence level is given when some structural indicators are acceptable but not particularly strong; a low confidence level is given when there are insufficient reference rows or unstable local structures. Low confidence results are used for downstream processes to reduce their weight or to prompt manual review.

[0219] When CV G When the value is less than a preset threshold (e.g., 5%), the calibration result is considered reliable, and a valid GSD is output; when the CV value is less than the preset threshold (e.g., 5%), the calibration result is considered reliable, and a valid GSD is output. G When the threshold is exceeded, exception handling is performed, including at least one of the following:

[0220] (1) Re-estimate after removing outlier reference rows;

[0221] (2) Divide the image into local windows and re-estimate the local GSD for each window;

[0222] (3) Output low confidence markers for use in downstream processes to reduce weight;

[0223] (4) Prompt manual review.

[0224] The confidence evaluation mechanism adds a confidence index to the calibration results of this method, avoiding erroneous scale output caused by single-point failure and meeting the reliability requirements of agricultural monitoring results.

[0225] When CV G When the preset threshold is exceeded, the exception handling will proceed as follows:

[0226] (1) Calculate the GSD of all reference row pairs i ;

[0227] (2) Calculate CV G ;

[0228] (3) If CV G If the distance is less than the first threshold T1, output the effective surface sampling distance at the image level.

[0229] (4) If CV G ≥T1, based on the quality score, remove one or more reference row pairs with the lowest quality score;

[0230] (5) Recalculate GSD and CV if the number of remaining reference row pairs is not less than the preset minimum number. G ;

[0231] (6) If CV is recalculated G If the value still exceeds the preset threshold, the image is divided into multiple local windows, and the effective surface sampling distance of each local window is calculated.

[0232] (7) If the spatial variation between the effective surface sampling distances is small, output the local fusion result;

[0233] (8) If the local scale changes significantly, fit a spatial scale model and perform local scale correction;

[0234] (9) If the number of valid reference rows in the local window is still insufficient, output a low confidence mark and prompt manual review.

[0235] The process uses confidence index as the main thread and organizes outlier removal, local reassessment, spatial modeling and manual review into a progressively upgraded processing chain to avoid uncontrolled scale parameters from directly entering downstream analysis.

[0236] Step S7: Scale Standardization

[0237] Once GSD is obtained, any pixel-scale quantity Lpixel (pixel) can be converted to a physical-scale quantity Lphysical (cm):

[0238] L physical =L pixel ×GSD

[0239] Pixel scale normalization: To achieve scale normalization across sensors / altitudes / flights, a target standard ground sampling distance GSD0 is set, and the scaling factor is calculated.

[0240] s=GSD / GSD0

[0241] Image resampling is performed based on the relationship between the output image size and the input image size.

[0242] W out =s×W in H out =s×H in

[0243] Among them, W in H in W represents the width and height of the input image. out H out This defines the width and height of the output image. For example, if the original image's GSD is 0.6 cm / pixel and the target standard ground sampling distance GSD0 is 0.3 cm / pixel, then with a scaling factor s=2, the output image size is magnified by a factor of 2. After resampling, the pixel scale of the image is unified to 0.3 cm / pixel, thus satisfying the validation relation GSD. out =GSD in / s, GSD in GSD represents the effective ground sampling distance of the input image before scale normalization. out This represents the effective ground sampling distance of the output image after scale standardization.

[0244] The resampling interpolation method should be selected according to the data type: bilinear or bicubic interpolation should be used for continuous tone images such as RGB; bilinear interpolation should not be used for binary masks, and nearest neighbor interpolation or regenerating the mask from the transformation parameters should be used to avoid introducing transition pseudo-values.

[0245] Double standardization (for sampling monitoring):

[0246] 1. Physical distance uniformity: Calculate the pixel size corresponding to a uniform physical window (e.g., 1.5m × 1.5m) based on GSD, and crop the image according to the pixel size so that each image covers the same ground area;

[0247] 2. Pixel scale uniformity: Scale the cropped image to a uniform pixel size (e.g., 640×640).

[0248] Step S8: Local scale correction (optional)

[0249] When an image exhibits intra-image scale variations due to shooting tilt or terrain undulations, a single GSD is insufficient to describe the overall image scale. The amount of intra-image scale variation is determined by the relative range R of the local GSD estimates for each sub-window. scale =(GSD max -GSD min / median(GSD) i Characterization:

[0250] R scale If the preset threshold is not exceeded, the global average effective GSD is output; if the preset threshold is exceeded, the global image-level effective surface sampling distance is no longer output, and local scale correction is switched.

[0251] The image is then divided into multiple sub-windows (at least four sub-windows, each containing at least one usable reference row pair). The local GSD of each sub-window is calculated from at least one valid reference row pair, preferably from multiple valid reference row pairs. The local GSD of each sub-window is calculated according to step S5, and a spatial variation model of the GSD is fitted.

[0252] GSD(x',y')=α0+α1x'+α2y'+α3x'y'

[0253] Where x and y are normalized image coordinates (x'=x / W, y'=y / H, where x and y are pixel coordinates, and W and H are image width and height), to ensure comparability of fitting coefficients under different image sizes; α0, α1, α2, and α3 are model parameters. Model fitting employs weighted least squares or robust regression (such as RANSAC), and the model effectiveness is evaluated using the fitting residuals: if the residuals exceed a preset threshold, the spatial variation model is deemed unsuitable, and block-based independent standardization is used or manual review is prompted. Based on the spatial variation model, the local scaling factor s(x',y')=GSD(x',y') / GSD0 for each image block is determined, and block resampling is performed based on the target standard ground sampling distance GSD0; overlapping areas are set between adjacent blocks and a gradual transition is used to avoid target deformation and boundary breaks. Local affine correction is suitable for scenes with small rotation, shearing, and translation components; when the image has significant perspective distortion, homography transformation or orthorectification can be used as a further extension of this step.

[0254] Step S9: Seedling Condition Analysis and Output (Optional)

[0255] On the scale-normalized image, the plant location is detected by the target detection model, the plants are assigned to the corresponding rows, the actual number of plants in each row is counted, and the seedling emergence rate, missing seedling location and other indicators are calculated by combining the theoretical number of plants; the standardized image (PNG / TIFF), GSD value and confidence score (JSON), row and plant statistics (CSV) and visualization results are saved.

[0256] Example 2

[0257] Implementation environment:

[0258] Hardware: Ordinary consumer-grade drones (DJI Mavic 3 / Matrice 300 / M600, etc.), without RTK module or with RTK disabled.

[0259] Software: Python 3.8+, OpenCV 4.5+, scikit-learn, scipy.signal, object detection model (such as YOLOv5, optional)

[0260] Data: RGB images of corn seedlings (multiple resolutions, flight altitude 15-37 m), acquired from an approximately vertical overhead view.

[0261] Parameter configuration:

[0262]

[0263] Detailed implementation steps

[0264] Step S1:

[0265] Read the RGB image and separate the R / G / B channels;

[0266] Calculate ExG=2×GRB to generate a single-channel vegetation enhancement map;

[0267] The OTSU algorithm is applied to automatically determine the threshold T and generate a binary mask M(x,y): if ExG(x,y)>T, then M=1, otherwise M=0;

[0268] (Optional) Compare the Triangle method and select the result that performs better.

[0269] Step S2:

[0270] Perform a Hough linear transform on the binary mask and statistically analyze the angular distribution of all detected lines.

[0271] Weighted by line segment length, the dominant angle θ is taken as the row direction;

[0272] Rotate the image by -θ degrees using an affine transformation matrix so that the rows are parallel to the Y-axis;

[0273] (Optional, row refinement) The target detection model outputs the plant center point, which is then assigned to the nearest row and subjected to robust straight-line fitting. The rotation angle is then finely adjusted based on the fitting direction.

[0274] Step S3:

[0275] Projecting the vegetation mask along the Y-axis yields the column projection curve P(x)=Σ about the X coordinate. y M(x,y);

[0276] Call scipy.signal.find_peaks to detect peak values, with the following parameters: distance ≥ 50, prominence ≥ 0.1 × max;

[0277] Where find_peaks represents the peak detection function used to detect local peaks from the column projection curve, distance represents the minimum allowed pixel distance between adjacent detected peaks, prominence represents the peak significance index, and max represents the maximum value in the column projection curve P(x);

[0278] Cluster the peak X coordinates and output a sorted list of row centers {x1, x2, ..., x...} n};

[0279] Calculate the row spacing sequence d i =x (i+1) -x i , i=1,2,…,n-1.

[0280] Step S4:

[0281] Statistical row spacing sequence: Calculate within-group variation and between-group differences;

[0282] Equal line spacing determination: All d i Approximately equal (within-group coefficient of variation less than a preset threshold), the reference row pair is taken as the adjacent row pair, D = row spacing prior (e.g., 60 cm).

[0283] Width / narrowness determination: The spacing between odd-numbered rows {d1, d3, ...} and the spacing between even-numbered rows {d2, d4, ...} satisfy |d (i+2) -d i | / d i <ε (consistent period within the group) and |d (i+1) -d i | / min(d (i+1) ,d iIf the difference between groups is significant (e.g., 80cm wide and 40cm narrow), it is determined to be a wide-narrow row pattern; the two periodic phase hypotheses are tested separately, and those that meet the conditions are taken; if it is less than a complete wide-narrow row cycle, it is not determined to be a wide-narrow row; the reference row pair is the same periodic phase row pair (wide row center to wide row center, or narrow row center to narrow row center), D = wide row + narrow row (e.g., 120cm).

[0284] Generate a list of all available reference row pairs and their physical reference distances {D}. i}

[0285] Step S5:

[0286] Load the pre-trained target detection model and detect the coordinates of the plant center;

[0287] Calculate the vertical distance of each plant to the center of each row, and assign it to the nearest row;

[0288] By performing a least-squares linear fit on the point set of each row, the linear model for the row lines is as follows:

[0289] y=ax+b

[0290] Where a represents the slope of the fitted line, b represents the intercept of the line on the y-axis, and x and y represent the x-coordinate and y-coordinate of the pixel on the line, respectively.

[0291] Its least squares solution is in matrix form:

[0292] (a,b) T =(X T X) -1 X T Y

[0293] Where X = [x1, x2, ..., x] n ] T Y=[y1,y2,...,y n ] T , where n represents the number of valid reference row pairs participating in the joint estimation, X T Let X be the transpose of X, (X T X) -1 For X T The inverse matrix of X, and Y represents the corresponding column vector of the y-coordinate;

[0294] Calculate the deflection angle based on the slope 'a', and then make fine adjustments to the angle.

[0295] The line fitting residuals can be used as inputs for the reference row pair weights in Step 6.

[0296] Step S6:

[0297] For each reference row pair i, calculate the pixel spacing Δx. i=|x j -x i |, where x j x i Let x and y represent the x-coordinates of the centers of the two crop rows that make up the i-th reference row pair, and |·| represents taking the absolute value;

[0298] Calculate each reference row for GSD i =D i / Δx i (cm / pixel);

[0299] Robust Fusion: Take All GSDs i The median is used as the effective GSD (or truncated mean / weighted mean).

[0300] Confidence assessment: Calculate CV G =σ(GSD i ) / mean(GSD i ), σ is the sample standard deviation (n≥3, preferably n≥5, otherwise output low confidence); CV G Output results if the percentage is less than the threshold (e.g., 5%), otherwise execute the anomaly handling strategy (re-evaluate outlier rows / re-evaluate local windows / mark low confidence / manual review prompts); the confidence level is determined by combining high / medium / low level with peak significance and row line fitting residuals.

[0301] Step S7:

[0302] Option A: Pixel scale normalization only

[0303] Set the target standard ground sampling distance GSD0 (e.g., 0.3 cm / pixel).

[0304] Calculate the scaling factor s = GSD / GSD0

[0305] Press W out =s×W in H out =s×H in Resampling (e.g., when GSD=0.6 or GSD0=0.3, s=2, image magnification by 2 times)

[0306] Option B: Double standardization (recommended for sampling monitoring)

[0307] Physical distance uniformity: Calculate the pixel size corresponding to the physical window based on GSD. For example, 150cm×150cm is 500×500 pixels when GSD=0.3; crop the image to this pixel size.

[0308] Pixel scale uniformity: resize to the model input size (e.g., 640×640).

[0309] Option C: Local spatial scale correction (when there is attitude tilt or terrain undulation)

[0310] Divide the image into multiple sub-windows (no fewer than 4), and estimate the local GSD for each sub-window.

[0311] Calculate the relative range R scale This scheme will be activated when the threshold is exceeded;

[0312] The spatial variation model GSD(x',y')=α0+α1x'+α2y'+α3x'y' was fitted using normalized coordinates with weighted least squares or RANSAC, and the model validity was verified by fitting the residuals.

[0313] Based on the model, the local scaling factor s(x',y')=GSD(x',y') / GSD0 for each block is determined, and block resampling is performed, with gradual transition and fusion of overlapping areas between adjacent blocks.

[0314] Step S9:

[0315] Detecting plant locations on standardized images;

[0316] Assign the plants to the corresponding rows and count the actual number of plants in each row;

[0317] Calculate indicators such as seedling emergence rate and location of missing seedlings based on the theoretical number of plants;

[0318] Save: Normalized image (PNG / TIFF), GSD values ​​and confidence scores (JSON), row statistics (CSV), and visualization results.

[0319] Example verification

[0320] Dataset: Cornfields in Horqin District, Tongliao City, Inner Mongolia, 2023-2025, covering 11 scenes using 3 sensors (SONY ILCE-7M2, DJI EP800, DJI ZENMUSE P1) at flight altitudes of 15-37m. The units for GSD and other error metrics in the table are cm / pixel. The measured GSD (reference value) was obtained independently of the row spacing inversion process (either through RTK ground measurement, flight altitude and camera parameter inversion, or independently calibrated orthophoto resolution), and is independent of the prior row spacing sources used for prediction, avoiding self-validation.

[0321] Verification results:

[0322]

[0323] Overall accuracy indicators such as Figures 8-10 As shown:

[0324] Average MAE: 0.0121cm / pixel

[0325] Average MAPE: 3.15%

[0326] Fitting R 2 0.9890

[0327] RMSE: 0.0114 cm / pixel

[0328] Bland-Altman 95% consensus interval: [-0.025, 0.025] cm / pixel

[0329] Bias: ≈0 (no systematic bias)

[0330] Emergence rate verification (data from May 28, 2025):

[0331] Manual vs GSD-norm: p=0.996 (no significant difference);

[0332] Manual vs Theory-raw: p=1.34×10 -24 (Highly significant difference);

[0333] GSD-norm vs Theory-raw: p=4.78×10 -20 (Highly significant difference);

[0334] Wherein, Manual represents the reference result of seedling emergence rate obtained by manual survey; GSD-norm represents the seedling emergence rate estimate after GSD calibration and scale standardization by the method of this application; and Theory-raw represents the seedling emergence rate estimate corresponding to the original image without scale standardization processing of this application.

[0335] Processing efficiency: Average time per image <3 seconds (Intel i7-11800H, 32 GB RAM)

[0336] Error index definition: Mean Absolute Error (MAE) = (1 / N)Σ j GSD pred j-GSD ref ,j|;Mean Absolute Percentage Error (MAPE)=(100% / N)Σ j |GSD_pred,j-GSD_ref,j| / GSD_ref,j;Root mean square error RMSE=[(1 / N)Σj(GSD_pred,j-GSD_ref,j| / GSD_ref,j; pred j-GSD ref ,j) 2 ] (1 / 2) Where N is the number of samples, GSD pred ,j is the predicted value of the j-th image, GSDref j is a reference value; GSD is in cm / pixel, and is statistically analyzed separately for images, land parcels, and flights. Reference GSD is obtained through one of the following methods: independent ground measurement / flight altitude conversion / resolution of independently calibrated orthophotos, or a combination thereof.

[0337] Example 3

[0338] Multispectral data adaptation:

[0339] Replace ExG with NDVI=(NIR-Red) / (NIR+Red);

[0340] Spatial registration is performed in advance between the near-infrared band and the red band to ensure that the spatial resolution of the two bands is consistent.

[0341] The other procedures are the same as in Example 2.

[0342] Industrial applicability

[0343] Adaptability to agricultural application scenarios

[0344] This application is specifically designed for agricultural monitoring scenarios, taking into full account the three core needs of agricultural applications:

[0345]

[0346] Synergy with sampling monitoring strategies

[0347] This application, in conjunction with the sampling monitoring strategy, achieves a closed-loop application of lightweight data collection, lightweight processing, and near real-time output: the sampling monitoring strategy addresses the question of "how many sampling points to collect"; this application addresses the question of "the comparability of scale for each sampling point".

[0348] Practical application cases

[0349] This application has been successfully applied to a maize seedling stage monitoring project in Tongliao, Inner Mongolia, and the verification data covers:

[0350] Data for the three years from 2023 to 2025;

[0351] Three types of drone platforms and sensors;

[0352] 11 different flight altitude and scenario combinations;

[0353] The consistency with the results of the manual survey has been verified.

[0354] This method, under the condition that the line spacing prior is reliable, requires no additional hardware investment, the algorithm is lightweight and easy to deploy, and has broad industrialization prospects.

[0355] The embodiments of this application have been described above with reference to the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. This application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for calibrating remote sensing image sampling distance based on row spacing prior, characterized in that, include: Acquire UAV remote sensing images and crop planting row spacing prior parameters corresponding to the UAV remote sensing images. The UAV remote sensing images are images obtained from approximately vertical downward views, images that have undergone orthorectification, or images with local perspective distortion below a preset threshold. Perform vegetation enhancement and adaptive threshold segmentation on the UAV remote sensing images to obtain a vegetation mask. The dominant direction of the crop rows is detected based on the vegetation mask, and the orientation of the UAV remote sensing image or the vegetation mask is corrected based on the dominant direction of the crop rows so that the crop row direction is parallel to the preset coordinate axis of the corrected image. The orientation-corrected vegetation mask is projected along a direction perpendicular to the crop row direction. The peak position in the projection curve is detected, and the peak position is clustered or merged into a neighborhood to obtain multiple crop row centers arranged in sequence. A pixel row spacing sequence is constructed based on the multiple crop row centers. The planting pattern corresponding to the UAV remote sensing image is identified based on the pixel row spacing sequence. Different reference row pair construction rules are adopted for different planting patterns to determine multiple reference row pairs and the physical reference distances corresponding to each reference row pair. In the equal row spacing planting pattern, the centers of adjacent crop rows are used to form reference row pairs, and the prior parameters of the physical row spacing of adjacent crop rows are used as the corresponding physical reference distances. In the wide and narrow row planting pattern, the centers of crop rows with the same periodic phase are selected to form reference row pairs based on the periodic phase of the pixel row spacing sequence, and the sum of the wide row physical spacing and the narrow row physical spacing spanned between the reference row pairs is used as the corresponding physical reference distance, so that the pixel spacing of each reference row pair and its physical reference distance span the same planting cycle in space. Based on the physical reference distance and pixel spacing corresponding to the multiple reference row pairs, multiple effective surface sampling distance estimates are obtained. The fusion weights are determined according to the structural quality index of each reference row pair, and the multiple effective surface sampling distance estimates are robustly fused to obtain the image-level effective surface sampling distance. Based on the dispersion of multiple effective surface sampling distance estimates and the structural quality index of the reference row pairs, the confidence level of the image-level effective surface sampling distance is evaluated. When the confidence evaluation result meets the preset confidence conditions, the subsequent scale standardization step is executed. When the confidence evaluation result does not meet the preset confidence conditions, the alternative processing is performed according to the preset processing order: after removing abnormal reference row pairs, the data is re-fused. If the confidence level still does not meet the preset confidence conditions, the UAV remote sensing image is divided into local windows for local effective surface sampling distance estimation. If the confidence level still does not meet the preset confidence conditions, a low confidence mark is output and / or a manual review is prompted. Scale standardization is then performed after the alternative processing meets the preset confidence conditions, or a calibration result with a confidence mark is output. When the confidence evaluation result meets the preset confidence conditions or the alternative processing meets the preset confidence conditions, the scale of the UAV remote sensing image is standardized according to the effective surface sampling distance at the output image level, so as to establish the correspondence between the pixel scale of the UAV remote sensing image and the preset physical ground scale.

2. The remote sensing image sampling distance calibration method based on row spacing prior as described in claim 1, characterized in that, The UAV remote sensing images are RGB images or multispectral images; When the UAV remote sensing image is an RGB image, the vegetation enhancement uses the Supergreen Index (ExG), which is calculated according to the following formula: ExG = 2G - RB, where R, G, and B are the pixel values ​​of the red, green, and blue channels of the RGB image, respectively. When the UAV remote sensing image is a multispectral image, the vegetation enhancement uses the Normalized Difference Vegetation Index (NDVI), which is calculated according to the following formula: NDVI = (NIR - R) / (NIR + R), where NIR is the reflectance of the near-infrared band and R is the reflectance of the red band. Before calculating the normalized vegetation index, the near-infrared band and the red band are spatially registered.

3. The remote sensing image sampling distance calibration method based on row spacing prior as described in claim 1, characterized in that, The adaptive threshold segmentation uses the maximum inter-class variance method or the trigonometric method to determine the segmentation threshold, and performs at least one of morphological opening operation, closing operation, hole filling and connected component filtering on the segmented vegetation mask to remove isolated noise and non-crop areas. The dominant direction of the crop row is determined by performing a Hough line transform on the vegetation mask to obtain multiple candidate lines, and by determining the corresponding direction weight based on at least one of the line segment length, number of supporting pixels, and fitting residual of the candidate lines, and by determining the dominant direction of the crop row based on the weighted distribution of the candidate line directions.

4. The remote sensing image sampling distance calibration method based on row spacing prior as described in claim 1, characterized in that, It also includes secondary refinement of the dominant direction of the crop rows, the secondary refinement including: The plant center point is detected using a target detection model or a plant segmentation model, and the plant center point is assigned to the corresponding crop row. For the plant center point corresponding to each crop row, row line fitting is performed using at least one of RANSAC fitting, least squares fitting, or piecewise linear fitting, and the dominant direction of the crop row is corrected based on the row line fitting results.

5. The remote sensing image sampling distance calibration method based on row spacing prior according to claim 1, characterized in that, The identification of the planting pattern includes: When the coefficient of variation of the pixel row spacing sequence is less than a first preset threshold, it is determined to be an equal row spacing planting mode. The coefficient of variation of the pixel row spacing sequence is calculated according to the following formula: CV d =σ(d i ) / mean(d i ), where d i σ(d) represents the pixel spacing between the centers of two adjacent crop rows. i ) represents the standard deviation of the pixel row spacing sequence, mean(d) i The average value of the pixel row spacing sequence is denoted as . When the spacing between pixels in the row spacing sequence that is one spacing index apart satisfies the periodic consistency condition, and the spacing between adjacent indexes satisfies the significant difference condition, it is determined to be a wide-narrow row planting pattern, wherein the periodic consistency condition is |d (i+2) -d i | / d i <ε, the significance condition for the difference is |d (i+1) -d i | / min(d (i+1) ,d i )>δ,d i ε is the spacing between the i-th pixels in the ordered pixel row spacing sequence, ε is the periodic consistency threshold, and δ is the difference significance threshold. Alternatively, the periodic consistency condition and the difference significance condition are determined using robust statistics: the periodic consistency condition is determined by the periodic index C. p =MAD(d i +d (i+1) ) / median(d i +d (i+1) The difference is determined by the relative difference index R when it is less than the third preset threshold. wn =|median(d 奇 )-median(d 偶 )| / [(median(d 奇 )+median(d 偶 The condition is determined if )) / 2] is greater than the fourth preset threshold, where median(·) is the median operation, MAD(·) is the absolute median difference operation, and d 奇 d is the subsequence formed by the odd-numbered index spacing in the pixel row spacing sequence. 偶 The subsequence is formed by even-numbered index intervals; When there is an abnormally large spacing indicating a missed crop row or an abnormally small spacing indicating the center of a false row in the pixel row spacing sequence, the periodic phase number of the crop row center is repaired according to the multiple relationship between the abnormal spacing and the periodic reference distance, or dynamic programming or sequence matching is used to select the phase numbering scheme that minimizes the residual within the group from the two periodic phase assumptions, and then the reference row pair is constructed based on the repaired periodic phase number.

6. The remote sensing image sampling distance calibration method based on row spacing prior as described in claim 1 or 5, characterized in that, In the wide-narrow row planting pattern, the centers of crop rows in the same period phase are separated by a wide row spacing and a narrow row spacing. The physical reference distance for the reference row pair is determined according to the following formula: D i =D wide +D narrow Among them, D i D is the physical reference distance corresponding to the i-th reference row pair. wide For wide line physical spacing, D narrow For narrow row physical spacing; The effective surface sampling distance estimate corresponding to the i-th reference row is determined according to the following formula: GSD i =D i / Δx i Among them, GSD i Let Δx be the effective surface sampling distance estimate for the i-th reference row. i The pixel spacing between the centers of the two crop rows in the i-th reference row pair.

7. The remote sensing image sampling distance calibration method based on row spacing prior as described in claim 1, characterized in that, The robust fusion employs at least one of the following: median, truncated mean, weighted mean, Huber robust estimation, or RANSAC estimation. When using weighted mean for robust fusion, the weights of the effective surface sampling distance estimates are determined based on at least one of the following: peak significance, effective crop row length, number of plants in a row, row line fitting residual, local occlusion degree, and row spacing period consistency. The higher the peak significance, the longer the effective crop row length, the more plants in a row, the smaller the row line fitting residual, the lower the local occlusion degree, or the higher the row spacing period consistency, the greater the corresponding weight.

8. The remote sensing image sampling distance calibration method based on row spacing prior according to claim 1, characterized in that, The confidence level assessment is determined at least based on the coefficients of variation of a plurality of effective surface sampling distance estimates, the coefficients of variation being calculated according to the following formula: CV G =σ(GSD i ) / mean(GSD i ) Wherein, σ(GSD) i ) represents the standard deviation of multiple effective surface sampling distance estimates, mean(GSD) i () represents the average of multiple effective surface sampling distance estimates; When CV G When the confidence level is less than the preset confidence threshold, the confidence evaluation result meets the preset confidence condition, and the effective surface sampling distance at the image level is determined to have a qualified confidence level. When CV G When the confidence evaluation result is greater than or equal to the preset confidence threshold, the confidence evaluation result does not meet the preset confidence condition, and the effective surface sampling distance at the image level is determined to be a low confidence result. Alternatively, the confidence level evaluation is determined based on the comprehensive confidence level, which is calculated according to the following formula: C=exp(-λ×CV) G )×(Σq i ×I i / Σq i ), where C is the overall confidence level, λ is the preset coefficient, and CV G q represents the coefficient of variation of the multiple effective surface sampling distance estimates. i Score the structural quality Q for the i-th reference row. i Normalized structural quality score, I i The i-th reference row pair is used as an identifier for whether it is a fusion interior point. When the overall confidence level is greater than the preset overall confidence threshold, it is determined that the preset confidence condition is met.

9. The remote sensing image sampling distance calibration method based on row spacing prior according to claim 1, characterized in that, In the local effective surface sampling distance estimation, the orientation-corrected UAV remote sensing image is divided into multiple local windows. The crop row center is extracted within each local window, and the physical reference distance D corresponding to the local window is used as the basis for the estimation. j and pixel pitch Δx j Calculate the locally effective surface sampling distance GSD j A spatial variation model of the ground sampling distance within the image is fitted based on the center coordinates of multiple local windows and the corresponding effective local surface sampling distance; The spatial variation model is determined according to the following formula: GSD(x',y')=α0+α1x'+α2y'+α3x'y' Where x'=x / W, y'=y / H, x and y are the image pixel coordinates, W and H are the image width and image height respectively, and α0, α1, α2, and α3 are model parameters; The scale normalization includes pixel scale normalization, setting a target standard ground sampling distance GSD0, and determining the scaling factor according to the following formula: s(x',y')=GSD(x',y') / GSD0 Based on the spatial variation model, the local scaling factor corresponding to each image block is determined, and each image block is resampled accordingly. W out =s×W in ,H out =s×H in Among them, W in H in W represents the width and height of the image before resampling, respectively. out H out These represent the width and height of the resampled image, respectively.

10. A remote sensing image sampling distance calibration system based on row spacing prior, characterized in that, include: The preprocessing module is used to obtain crop vegetation masks; The row orientation detection and correction module is used to determine the dominant direction of crop rows and perform orientation correction; The row center extraction module is used to obtain the crop row center and pixel row spacing sequence; The planting pattern recognition module is used to identify equal row spacing planting patterns or wide and narrow row planting patterns and determine the corresponding reference row pairs; The multi-reference row pair effective surface sampling distance estimation module is used to obtain multiple effective surface sampling distance estimates based on the physical reference distance and pixel spacing of multiple reference row pairs and perform robust fusion. The confidence evaluation module is used to assess the consistency of distance estimates from multiple effective surface sampling points and the reliability of the structural quality evaluation calibration results based on the reference rows. The scale normalization module is used to scale UAV remote sensing images based on the image-level effective area sampling distance or the locally effective area sampling distance. The calibration system also includes a processor and a memory. The memory stores a computer program, and the processor executes the computer program to implement the functions of the above modules.