Agricultural unmanned vehicle high-definition image modeling method and device, medium, terminal and program product
By using a binocular camera and an RTK positioning system on an agricultural unmanned vehicle to acquire image data and perform georegistration, the problems of unmanned vehicle positioning accuracy and image data loading were solved, achieving high-precision positioning and efficient operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies cannot meet the centimeter-level positioning accuracy requirements of agricultural unmanned vehicles, georeferencing has significant accuracy errors, and it is not possible to directly load high-definition image data at the hundred-megabyte level.
Image data and latitude and longitude coordinates of reference points are acquired by using a binocular camera and RTK positioning system mounted on an agricultural unmanned vehicle. The true geographic coordinates of candidate control points are calculated, and geographic registration tools are used to perform geographic registration of the image data to generate raster data with geographic information. The raster data is then cropped into a tile dataset and loaded onto the base map.
It achieves centimeter-level high-precision positioning for agricultural unmanned vehicles, reduces georeferencing errors, and avoids memory shortage problems by dynamically loading tile datasets, thereby improving operational efficiency.
Smart Images

Figure CN121767579A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart agriculture technology, and in particular to a method, device, medium, terminal and program product for high-definition image modeling of agricultural unmanned vehicles. Background Technology
[0002] In the field of smart agriculture, autonomous navigation and precision operation of agricultural unmanned vehicles have become a development trend. The core foundation for realizing this function lies in high-precision electronic maps, among which visualized remote sensing imagery base maps are crucial for path planning, obstacle recognition, and variable-rate operations.
[0003] Currently, the satellite imagery raster data provided by common commercial map services (such as Google Earth and Baidu Maps) typically has a spatial resolution between 0.5 meters and 10 meters. While this level of accuracy is sufficient for general applications such as navigation and regional planning, it cannot meet the centimeter-level positioning accuracy requirements of agricultural drones within fields. Furthermore, traditional methods often directly overlay existing high-resolution imagery onto the base map using latitude and longitude information, leading to significant errors in georeferencing. Additionally, the remote control platform of agricultural drones is an embedded mobile device with limited computing power, memory capacity, and graphics rendering performance, making it unable to directly load hundreds of megabytes of high-resolution imagery data.
[0004] Therefore, it is necessary to provide a high-definition image modeling method, device, medium, terminal, and program product for agricultural unmanned vehicles to solve the above-mentioned problems in the existing technology. Summary of the Invention
[0005] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a method, device, medium, terminal and program product for high-definition image modeling of agricultural unmanned vehicles, to solve the technical problems that the prior art cannot meet the requirements of centimeter-level positioning accuracy in agriculture, that georeferencing has large accuracy errors, and that it cannot directly load high-definition image data of hundreds of megabytes.
[0006] To achieve the above and other related objectives, a first aspect of this application provides a high-definition image modeling method for agricultural unmanned vehicles, comprising: acquiring operational image data collected by a binocular camera on an agricultural unmanned vehicle and latitude and longitude coordinates of a reference point collected by an RTK positioning system, and recording the tilt angle of the operational image data relative to a preset direction; defining candidate control points to be registered, and calculating the pixel coordinates of the reference point and the candidate control points based on the resolution parameters of the operational image data; calculating the true geographic coordinates of the candidate control points based on the latitude and longitude coordinates of the reference point, the pixel coordinates of the reference point and the candidate control points, and the tilt angle; performing georegistration on the operational image data based on the pixel coordinates and true geographic coordinates of the candidate control points using a georegistration tool to generate raster data with geographic information; cropping the registered raster data according to preset configuration parameters to obtain a tile dataset, storing the cropped tile dataset, and loading the tile dataset onto a map base map.
[0007] In some embodiments of the first aspect of this application, the process of calculating the true geographic coordinates of the candidate control point based on the latitude and longitude coordinates of the reference reference point, the pixel coordinates of the reference reference point and the candidate control point, and the tilt angle includes: establishing a local Cartesian coordinate system with the pixel coordinates of the reference reference point as the origin, and converting the pixel coordinates of the candidate control point into a displacement in the local Cartesian coordinate system; performing a two-dimensional rotation transformation on the displacement in the local Cartesian coordinate system according to the tilt angle of the operational image data relative to a preset direction to obtain a displacement after correcting the direction deviation; converting the displacement after correcting the direction deviation into a latitude and longitude offset based on the Android Location API projection algorithm to map it to the geographic coordinate system; and superimposing the converted latitude and longitude offset onto the latitude and longitude coordinates of the reference reference point to obtain the true geographic coordinates of the candidate control point.
[0008] In some embodiments of the first aspect of this application, the georegistration tool performs georegistration on the operational image data based on the pixel coordinates of the candidate control points and the real geographic coordinates to generate raster data with geographic information. The process includes: performing an affine transformation on the operational image data based on a first-order polynomial model specified by the gdalwarp tool according to the mapping relationship between the pixel coordinates of the candidate control points and the real geographic coordinates to generate raster data with geographic information and saving it as a GeoTIFF file.
[0009] In some embodiments of the first aspect of this application, the process of cropping the registered raster data to obtain a tile dataset according to pre-set configuration parameters, storing the cropped tile dataset, and loading the tile dataset onto a map base map includes: pre-setting the scaling level, tile size, and WGS-84 coordinate system parameters; cropping the registered GeoTIFF file using the gdal2tiles.py tool to generate a tile dataset in a standard directory structure format; storing the generated standard directory structure format tile dataset in a local file system; and specifying a local file system path to load the standard directory structure format tile dataset onto the map base map.
[0010] In some embodiments of the first aspect of this application, the upper left corner, upper right corner, lower left corner, lower right corner, and center point of the operation image data are selected as the candidate control points.
[0011] In some embodiments of the first aspect of this application, the tilt angle of the operation image data relative to a preset direction is recorded based on an inertial measurement unit.
[0012] To achieve the above and other related objectives, a second aspect of this application provides a high-definition image modeling device for agricultural unmanned vehicles, comprising: a data acquisition module, used to acquire operational image data collected by a binocular camera on an agricultural unmanned vehicle and the latitude and longitude coordinates of a reference point collected by an RTK positioning system, and to record the tilt angle of the operational image data relative to a preset direction; a pixel coordinate calculation module, used to define candidate control points to be registered, and to calculate the pixel coordinates of the reference point and the candidate control point based on the resolution parameters of the operational image data; a geographic coordinate calculation module, used to calculate the true geographic coordinates of the candidate control point based on the latitude and longitude coordinates of the reference point, the pixel coordinates of the reference point and the candidate control point, and the tilt angle; a geographic registration module, used to perform geographic registration on the operational image data based on the pixel coordinates and true geographic coordinates of the candidate control point using a geographic registration tool, so as to generate raster data with geographic information; and a cropping module, used to crop the registered raster data according to preset configuration parameters to obtain a tile dataset, and to store the cropped tile dataset for loading and overlaying onto a map base map.
[0013] To achieve the above and other related objectives, a third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method.
[0014] To achieve the above and other related objectives, a fourth aspect of this application provides a computer program product comprising computer program code that, when executed on a computer, causes the computer to implement the method.
[0015] To achieve the above and other related objectives, a fifth aspect of this application provides an electronic terminal, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the method.
[0016] As described above, the high-definition image modeling method, device, medium, terminal, and program product for agricultural unmanned vehicles of this application have the following beneficial effects:
[0017] First, the agricultural unmanned vehicle (AWDV) uses a binocular camera and an RTK positioning system to acquire operational image data and the latitude and longitude coordinates of reference points, meeting the centimeter-level high-precision positioning requirements for AWDV operations. Then, based on the resolution parameters of the operational image data, the pixel coordinates of the reference points and candidate control points are calculated. Furthermore, based on the latitude and longitude coordinates of the reference points, the pixel coordinates of the reference points and candidate control points, and the tilt angle of the operational image data relative to a preset direction, the true geographic coordinates of each candidate control point are calculated. A georegistration tool is then used to georegulate the operational image data, achieving accurate latitude and longitude mapping and significantly reducing georegistration errors. Finally, the original 100MB high-precision operational image data is cropped into a tile dataset according to pre-set configuration parameters. This allows for dynamic, on-demand loading of images based on user screen zooming, avoiding OOM (Out of Memory) issues caused by a single loading and improving the operational efficiency of the agricultural AWDV. Attached Figure Description
[0018] Figure 1 The diagram shown is a flowchart illustrating a high-definition image modeling method for agricultural unmanned vehicles in one embodiment of this application.
[0019] Figure 2 The diagram shown illustrates the working principle of a high-definition image modeling method for agricultural unmanned vehicles in one embodiment of this application.
[0020] Figure 3 The diagram shown is a flowchart illustrating the calculation of real geographic coordinates in one embodiment of this application.
[0021] Figure 4 The diagram shown is a block diagram of a high-definition image modeling device for agricultural unmanned vehicles according to an embodiment of this application.
[0022] Figure 5 The diagram shown is a structural schematic of an electronic terminal according to an embodiment of this application. Detailed Implementation
[0023] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0024] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, "first XX" and "second XX" are merely used to distinguish different XXs and do not limit their order. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.
[0025] It should be noted that, in the embodiments of this application, the words "exemplary" or "for example" indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0026] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0027] Before providing a further detailed description of the present invention, the nouns and terms used in the embodiments of the present invention are explained, and the nouns and terms used in the embodiments of the present invention are subject to the following interpretations:
[0028] <1> Binocular camera: A device that simulates human binocular vision. It uses two cameras to capture the same scene from different angles to obtain three-dimensional information about objects. Its basic principle is based on parallax. By comparing the images captured by the left and right cameras, the distance between the target object and the camera is calculated. Binocular cameras are widely used in fields such as robot navigation, autonomous driving, and virtual reality, and can achieve depth perception and three-dimensional reconstruction.
[0029] <2> RTK (Real-Time Kinematic) is a high-precision differential GNSS (Global Navigation Satellite System) positioning technology based on carrier phase observation. Through real-time differential processing, it improves positioning accuracy from meter-level to centimeter-level, greatly meeting the demand for high-precision positioning. An RTK system mainly consists of a base station and a rover. The base station is fixed at a known location, receives satellite signals in real time, and calculates precise position information. The rover moves to the location to be measured and receives correction data from the base station, thereby achieving high-precision positioning.
[0030] <3> Android Location API projection algorithm: It provides a series of tools and services for obtaining device geolocation information. Developers can use these APIs to implement various application scenarios, such as map services, location sharing, localization services, emergency services, etc.
[0031] <4> GDAL (Geospatial Data Abstraction Library) is an open-source raster spatial data transformation library that uses an abstract data model to represent various supported file formats. GDAL provides a series of command-line tools for data transformation and processing, and also supports the OGR library for vector data processing.
[0032] <5> gdalwarp is a command-line tool in the GDAL suite used for complex geometric transformations of raster images, such as geospatial correction, reprojection, mosaicking, cropping, and format conversion.
[0033] <6> The WGS-84 coordinate system (World Geodetic System-1984 Coordinate System) is an internationally adopted geocentric coordinate system. Its origin is located at the Earth's center of mass. The Z-axis points to the Conventional Earth Pole (CTP) of BIH 1984.0, the X-axis points to the intersection of the BIH 1984.0 zero meridian and the CTP equator, and the Y-axis forms a right-handed orthogonal coordinate system. The corresponding ellipsoid adopts the parameters recommended by the International Union of Geodesy and Geophysics (IUGG), with a semi-major axis of 6,378,137.0 meters and an oblateness of 1 / 298.257223563.
[0034] <7> The gdal2tiles.py tool is a GDAL-based tool used to generate TMS (Tile Map Service) format tile maps from raster image tiles, while also supporting the generation of KML files and a simple web viewer.
[0035] <8> An Inertial Measurement Unit (IMU) is an electronic device used to measure and report the linear motion (acceleration) and angular motion (angular velocity) of an object. It enables autonomous navigation and motion tracking through the principle of inertia and is widely used in spacecraft, drones, and autonomous driving. IMUs typically contain gyroscopes and accelerometers, and some also include magnetometers and barometers to improve the accuracy and reliability of measurements.
[0036] <9> GeoTIFF files are raster data storage formats that extend geospatial reference information on top of the TIFF image format.
[0037] <10> OOM (Out of Memory) problem: refers to the situation where a program runs out of memory, resulting in the inability to allocate the required memory and thus throwing an Out Of Memory Error exception. Common scenarios include heap memory overflow, metaspace overflow, stack overflow, and direct memory overflow.
[0038] <11> Ground Control Station (GCS): This is the core command center of the UAV system, undertaking key responsibilities such as flight control, mission management, data interaction, and system monitoring.
[0039] To facilitate understanding of the embodiments of this application, in conjunction with Figure 1 and Figure 2 Detailed explanation. Figure 1 A flowchart illustrating a high-definition image modeling method for agricultural unmanned vehicles is shown in an embodiment of the present invention. Figure 2 A schematic diagram illustrating the working principle of the high-definition image modeling method for agricultural unmanned vehicles in this embodiment of the invention is shown. The high-definition image modeling method for agricultural unmanned vehicles in this embodiment includes the following steps:
[0040] Step S11: Acquire the operational image data collected by the binocular camera on the agricultural unmanned vehicle and the latitude and longitude coordinates of the reference point collected by the RTK positioning system, and record the tilt angle of the operational image data relative to the preset direction.
[0041] During the operation, the agricultural unmanned vehicle's binocular camera collects operational image data. For example, the resolution of the operational image data is 1 cm / pixel, which is used for high-precision image data modeling. At the same time, the agricultural unmanned vehicle's RTK positioning system collects the latitude and longitude coordinates of the reference point with centimeter-level high precision, which is used as the reference point for subsequent processes. It also records the tilt angle of the entire operational image data relative to the preset direction for subsequent orientation correction.
[0042] In some embodiments of this application, the tilt angle of the operation image data relative to a preset direction is recorded based on an inertial measurement unit.
[0043] Specifically, the accelerometer of the inertial measurement unit measures acceleration, the gyroscope measures angular velocity, and the magnetometer measures the geomagnetic field strength vector. Then, attitude calculation is performed based on the measured acceleration, angular velocity, and geomagnetic field strength vector, and a data fusion algorithm is used to output the tilt angle of the operational image data relative to a preset direction. For example, the preset direction is true north; the tilt angle of the entire operational image data relative to true north is recorded as a direction correction in subsequent processes.
[0044] Step S12: Define candidate control points to be registered, and calculate the pixel coordinates of the reference point and the candidate control points based on the resolution parameters of the work image data.
[0045] In some embodiments of this application, the top-left, top-right, bottom-left, bottom-right, and center points of the work image data are selected as candidate control points. The pixel coordinates of the four corner points and the center point of the work image data are calculated using the resolution parameters of the work image data, and these coordinates are used as candidate control points to be registered.
[0046] For example, the resolution parameters of the operational image data acquired by the binocular camera are 8000×6000 (width×height). The top left corner of the operational image data is defined as the origin, the horizontal direction to the right is the X-axis (0-7999), and the vertical direction downward is the Y-axis (0-5999), establishing a pixel coordinate system. Based on the established pixel coordinate system, the pixel coordinates of each candidate control point are calculated, specifically: top left corner (0, 0), top right corner (7999, 0), bottom left corner (0, 5999), bottom right corner (7999, 5999), and center point (3999.5, 2999.5). The coordinates of the center point are rounded to (4000, 3000), thus obtaining the pixel coordinates of the five candidate control points: top left corner, top right corner, bottom left corner, bottom right corner, and center point. In addition, the center point of the operational image data is defined as the reference point, that is, the pixel coordinates of the reference point are (4000, 3000), thereby improving the georegistration accuracy.
[0047] Step S13: Calculate the true geographic coordinates of the candidate control point based on the latitude and longitude coordinates of the reference point, the pixel coordinates of the reference point and the candidate control point, and the tilt angle.
[0048] In some embodiments of this application, such as Figure 3 As shown, the process of calculating the true geographic coordinates of the candidate control point based on the latitude and longitude coordinates of the reference reference point, the pixel coordinates of the reference reference point and the candidate control point, and the tilt angle includes: Step S31: Establishing a local Cartesian coordinate system with the pixel coordinates of the reference reference point as the origin, and converting the pixel coordinates of the candidate control point into displacement in the local Cartesian coordinate system; Step S32: Performing a two-dimensional rotation transformation on the displacement in the local Cartesian coordinate system according to the tilt angle of the operational image data relative to a preset direction to obtain the displacement after correcting the direction deviation; Step S33: Converting the displacement after correcting the direction deviation into latitude and longitude offset based on the Android Location API projection algorithm to map it to the geographic coordinate system; Step S34: Superimposing the converted latitude and longitude offset onto the latitude and longitude coordinates of the reference reference point to obtain the true geographic coordinates of the candidate control point.
[0049] Specifically, using the pixel coordinates (4000, 3000) of the reference point (center point) as the origin, with the horizontal axis to the right as the X-axis and the vertical axis downwards as the Y-axis, a local Cartesian coordinate system is established. The pixel displacements of each candidate control point are converted into actual ground displacements in cm, i.e., the displacements in the local Cartesian coordinate system. These displacements are not directionally corrected relative to the reference point, thus mapping pixels to planar coordinates. For example, the displacements of the upper left control point (-4000×1cm, -3000×1cm) are calculated, and the other candidate control points are calculated similarly. Due to directional deviations in the operational image data, a two-dimensional rotation transformation is needed to correct the directional deviations in the local Cartesian coordinate system, resulting in the corrected north-south and east-west displacements in cm, thus achieving rotational correction. The Android Location API projection algorithm is used to convert the corrected planar displacement into latitude and longitude offsets, calculate the latitude and longitude offsets of each candidate control point, realize geographic projection conversion, and map the corrected planar offsets to the geographic coordinate system. The latitude and longitude offsets of each candidate control point are then superimposed on the latitude and longitude coordinates of the reference point to obtain the true geographic coordinates of each candidate control point.
[0050] Step S14: Based on the pixel coordinates and real geographic coordinates of the candidate control points, the georegistration tool performs georegistration on the operational image data to generate raster data with geographic information.
[0051] In some embodiments of this application, the georegistration tool performs georegistration on the operational image data based on the pixel coordinates of the candidate control points and the real geographic coordinates to generate raster data with geographic information. The process includes: based on the mapping relationship between the pixel coordinates of the candidate control points and the real geographic coordinates, performing an affine transformation on the operational image data using a first-order polynomial model specified by the gdalwarp tool to generate raster data with geographic information, and saving it as a GeoTIFF file.
[0052] The above calculations yielded a mapping table between the pixel coordinates and actual geographic coordinates of five candidate control points: the top-left corner, top-right corner, bottom-left corner, bottom-right corner, and center point. This mapping table of the original operational imagery data and the five candidate control points was then input into the gdalwarp tool and API provided by GDAL. A first-order polynomial model was specified to resample the operational imagery data, generating geographically informative raster data, which was then saved as a GeoTIFF file, thus achieving geographic mapping of the original high-resolution operational imagery data. The gdalwarp tool enables accurate latitude and longitude mapping, significantly reducing georegistration errors.
[0053] Step S15: The registered raster data is cropped according to the preset configuration parameters to obtain a tile dataset, and the cropped tile dataset is stored and loaded onto the map base map.
[0054] In some embodiments of this application, the process of cropping the registered raster data to obtain a tile dataset according to pre-set configuration parameters, storing the cropped tile dataset, and loading the tile dataset onto the map base map includes: pre-setting the scaling level, tile size, and WGS-84 coordinate system parameters; cropping the registered GeoTIFF file using the gdal2tiles.py tool to generate a tile dataset in a standard directory structure format; storing the generated standard directory structure format tile dataset in the local file system; and specifying a local file system path to load the standard directory structure format tile dataset onto the map base map.
[0055] For example, the zoom level is specified as 18-22, the tile size is configured as 256, and the WGS-84 coordinate system is EPSG:4326. The gdal2tiles.py tool is used to crop the georegistered large-size GeoTIFF file into smaller tiles according to the configured parameters, generating a standard xyz format tile dataset. Here, z represents the zoom level; x represents the horizontal coordinate (longitude); and y represents the vertical coordinate (latitude). The xyz format tile dataset is stored in the local file system. In application, an online map base map is first loaded on the remote control platform. Tiles from the high-resolution xyz format tile dataset are loaded through the specified local file system path and overlaid as a new layer onto the online map base map, achieving accurate overlay display of the operational imagery data on the map base map.
[0056] The gdal2tiles.py tool is used to crop the original 100MB high-precision GeoTIFF file into an xyz tile dataset. It can dynamically load parts of the image on demand based on the user's screen swiping and zooming operation, avoiding OOM problems caused by loading all at once.
[0057] In practical applications, the agricultural unmanned vehicle (UAV) activates its high-definition recording mode. The GCS (Geometric Control System) controls the UAV to move along the required work path. After the movement is completed, the UAV's avionics transmits high-precision work image data and other information to the GCS via the image transmission module. The GCS then performs geographic configuration and cropping to obtain tile data and displays it on the map interface. Users can see high-definition images of the recorded area with a precision of 1cm, enabling them to mark points and accurately specify work paths, greatly improving the efficiency of agricultural UAV operations.
[0058] Figure 4 This is a schematic block diagram of the high-definition image modeling device for agricultural unmanned vehicles provided in the embodiments of this application. Figure 4 As shown, the high-definition image modeling device for agricultural unmanned vehicles includes:
[0059] The data acquisition module 401 is used to acquire the operation image data collected by the binocular camera on the agricultural unmanned vehicle and the latitude and longitude coordinates of the reference point collected by the RTK positioning system, and record the tilt angle of the operation image data relative to the preset direction.
[0060] The pixel coordinate calculation module 402 is used to define candidate control points to be registered, and to calculate the pixel coordinates of the reference point and the candidate control points based on the resolution parameters of the work image data.
[0061] The geographic coordinate calculation module 403 is used to calculate the true geographic coordinates of the candidate control point based on the latitude and longitude coordinates of the reference reference point, the pixel coordinates of the reference reference point and the candidate control point, and the tilt angle.
[0062] The georeferencing module 404 is used to georeferencing the operational image data based on the pixel coordinates of the candidate control points and the actual geographic coordinates using a georeferencing tool, so as to generate raster data with geographic information.
[0063] The cropping module 405 is used to crop the registered raster data according to the preset configuration parameters to obtain a tile dataset, and to store the cropped tile dataset so as to load the tile dataset onto the map base map.
[0064] It should be understood that the specific process of each module performing the above-mentioned steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.
[0065] It should also be understood that the module division in the embodiments of this application is illustrative and only represents a logical functional division; in actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of this application can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0066] Figure 5 This is a schematic block diagram of the electronic terminal provided in an embodiment of this application. Figure 5 As shown, the electronic terminal 500 includes at least one processor 501, a memory 502, at least one network interface 503, and a user interface 505. The various components in the electronic terminal 500 are coupled together via a bus system 504. It is understood that the bus system 504 is used to implement communication between these components. In addition to a data bus, the bus system 504 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 5 The general will label all buses as bus systems.
[0067] The user interface 505 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touch screen.
[0068] It is understood that memory 502 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable categories of memory.
[0069] In this embodiment of the invention, the memory 502 is used to store various types of data to support the operation of the electronic terminal 500. Examples of this data include: any executable program for operation on the electronic terminal 500, such as the operating system 5021 and application programs 5022; the operating system 5021 contains various system programs, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. The application program 5022 may contain various applications, such as a media player, browser, etc., for implementing various application services. The methods provided in this embodiment of the invention can be included in the application program 5022.
[0070] The methods disclosed in the above embodiments of the present invention can be applied to processor 501, or implemented by processor 501. Processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 501 or by instructions in the form of software. The processor 501 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 501 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. General-purpose processor 501 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of the present invention can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.
[0071] In an exemplary embodiment, the electronic terminal 500 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs) to execute the aforementioned method.
[0072] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to execute... Figures 1 to 3 The method of any of the embodiments shown.
[0073] According to the method provided in the embodiments of this application, this application also provides a computer-readable storage medium storing program code, which, when executed on a computer, causes the computer to perform... Figures 1 to 3 The method of any of the embodiments shown.
[0074] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).
[0075] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0076] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0077] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0078] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0079] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0080] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs, DVDs), or semiconductor media (e.g., solid-state disks, SSDs, etc.).
[0081] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0082] In summary, addressing the technical problems of existing technologies failing to meet the centimeter-level positioning accuracy requirements in agriculture, significant accuracy errors in georeferencing, and the inability to directly load high-definition image data at the 100-megabyte level, this application provides a high-definition image modeling method, device, medium, terminal, and program product for agricultural unmanned vehicles. First, the agricultural unmanned vehicle uses a binocular camera and an RTK positioning system to acquire the latitude and longitude coordinates of operational image data and reference points, respectively, meeting the centimeter-level high-precision positioning requirements of agricultural unmanned vehicle operations. Then, based on the resolution parameters of the operational image data, the pixel coordinates of the reference points and candidate control points are calculated. Furthermore, based on the latitude and longitude coordinates of the reference points, the pixel coordinates of the reference points and candidate control points, and the tilt angle of the operational image data relative to a preset direction, the true geographic coordinates of each candidate control point are calculated. A georeferencing tool is then used to perform georeferencing on the operational image data, achieving accurate latitude and longitude mapping and significantly reducing georeferencing errors. Finally, the original 100-megabyte high-precision operational image data is cropped into a tile dataset according to pre-set configuration parameters. This allows for dynamic, on-demand loading of images based on user screen zooming, avoiding OOM (Out of Memory) issues caused by single loading and improving the operational efficiency of agricultural unmanned vehicles. Therefore, this application effectively overcomes the various shortcomings of the prior art and has high industrial application value.
[0083] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. An agricultural unmanned vehicle high-definition image modeling method, characterized in that, The method comprises the following steps: acquiring the working image data collected by the binocular camera on the agricultural unmanned vehicle and the latitude and longitude coordinates of the reference datum point collected by the RTK positioning system, and recording the tilt angle of the working image data relative to the preset direction; defining a candidate control point to be registered, and calculating the pixel coordinates of the reference datum point and the candidate control point according to the resolution parameter of the working image data; calculating the real geographic coordinates of the candidate control point according to the latitude and longitude coordinates of the reference datum point, the pixel coordinates of the reference datum point and the candidate control point, and the tilt angle; performing geographic registration on the working image data according to the pixel coordinates and real geographic coordinates of the candidate control point based on a geographic registration tool, to generate raster data with geographic information; cutting the registered raster data according to the preset configuration parameters to obtain a tile data set, and storing the cut tile data set, so as to load the tile data set to be superimposed on a map base map.
2. The agricultural unmanned vehicle high-definition image modeling method according to claim 1, wherein, The process of calculating the real geographic coordinates of the candidate control point according to the latitude and longitude coordinates of the reference datum point, the pixel coordinates of the reference datum point and the candidate control point, and the tilt angle comprises: establishing a local plane rectangular coordinate system with the pixel coordinates of the reference datum point as the origin, and converting the pixel coordinates of the candidate control point into displacement in the local plane rectangular coordinate system; performing two-dimensional rotation transformation on the displacement in the local plane rectangular coordinate system according to the tilt angle of the working image data relative to the preset direction, to obtain displacement after correcting the directional deviation; converting the displacement after correcting the directional deviation into latitude and longitude offset based on the Android Location API projection algorithm, to map to the geographic coordinate system; superimposing the converted latitude and longitude offset on the latitude and longitude coordinates of the reference datum point, to obtain the real geographic coordinates of the candidate control point.
3. The method of claim 1, wherein, The process of performing geographic registration on the working image data according to the pixel coordinates and real geographic coordinates of the candidate control point based on a geographic registration tool, to generate raster data with geographic information, comprises: specifying a first-order polynomial model based on the gdalwarp tool according to the mapping relationship between the pixel coordinates and real geographic coordinates of the candidate control point, to perform affine transformation on the working image data, to generate raster data with geographic information, and save it as a GeoTIFF file.
4. The agricultural unmanned vehicle high-definition image modeling method according to claim 3, characterized in that, The process of cutting the registered raster data according to the preset configuration parameters to obtain a tile data set, and storing the cut tile data set, so as to load the tile data set to be superimposed on a map base map, comprises: pre-setting the parameters of the zoom level, tile size and WGS-84 coordinate system; cutting the registered GeoTIFF file based on the gdal2tiles.py tool, to generate a tile data set in the standard directory structure format; storing the generated tile data set in the standard directory structure format in the local file system; The local file system path is designated to load a tile dataset in a standard directory structure format onto a map base map.
5. The method of claim 1, wherein, Upper left corner, upper right corner, lower left corner, lower right corner and center of the job image data are selected as the candidate control points.
6. The method of claim 1, wherein, An inclination angle of the job image data relative to a preset direction is recorded based on an inertial measurement unit.
7. An agricultural unmanned vehicle high-definition image modeling device, characterized in that, The method comprises the following steps: a data acquisition module is configured to acquire job image data collected by a binocular camera on an agricultural unmanned vehicle and latitude and longitude coordinates of a reference datum point collected by an RTK positioning system, and record an inclination angle of the job image data relative to a preset direction; a pixel coordinate calculation module is configured to define candidate control points to be registered, and calculate pixel coordinates of the reference datum point and the candidate control points according to resolution parameters of the job image data; a geographic coordinate calculation module is configured to calculate real geographic coordinates of the candidate control points according to the latitude and longitude coordinates of the reference datum point, the pixel coordinates of the reference datum point and the candidate control points, and the inclination angle; a geographic registration module is configured to perform geographic registration on the job image data according to the pixel coordinates and real geographic coordinates of the candidate control points based on a geographic registration tool, so as to generate raster data with geographic information; a cutting module is configured to cut the registered raster data according to preset configuration parameters to obtain a tile dataset, and store the obtained tile dataset, so as to load the tile dataset onto a map base map.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1 to 6.
9. A computer program product, characterised in that, The computer program product comprises computer program code, which, when executed on a computer, causes the computer to implement the method of any one of claims 1 to 6.
10. An electronic terminal comprising a memory, a processor and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the method of any one of claims 1 to 6.