Method and device for splicing hyperspectral images of unmanned aerial vehicle
Through waypoint planning and cell latitude and longitude to determine overlapping points, the misalignment and distortion problems in the stitching of drone hyperspectral images are solved, improving the accuracy and reliability of stitching, and generating more comprehensive high-quality images.
Patent Information
- Application Number
- CN202411335732.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-10
AI Technical Summary
The existing drone hyperspectral image stitching methods have problems with dislocation and distortion, especially when splicing homogeneous areas, which are prone to matching errors, and require a large number of ground control points, which is complex in the calculation process and poor in the effect.
By acquiring multiple hyperspectral images based on waypoint planning control, using heading longitudinal overlap and side-to-side overlap of the plane belt, we can judge the rationality of waypoint planning, and determine the overlapping points through the latitude and longitude of the cells, take the mean for splicing, avoiding the use of Ground control points to reduce waypoint planning requirements.
Improves the reliability and accuracy of stitching images, eliminates the coverage and resolution limitations of a single image, and generates higher quality and more comprehensive hyperspectral images of the target area.
Smart Images

Figure CN119295311A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of unmanned aerial vehicle image processing, and more specifically, to a method and device for stitching unmanned aerial vehicle hyperspectral images. Background Art
[0002] With the rapid development of UAV technology and remote sensing technology, UAV hyperspectral imaging technology has been widely used in geographic information systems, environmental monitoring, agriculture and other fields. However, in view of the principle of hyperspectral imaging and the characteristics of existing payloads, there may be dislocation and distortion in the stitching area where there are local water bodies and other areas with strong homogeneity. It is necessary to fly multiple flight strips at a time. Multiple flight strips can ensure strong constraints. After stitching, the edge of the image is less deformed, the regional features are not obvious, and it is easy to mismatch or a large number of matching errors. It is necessary to avoid areas with large areas of water and maintain a high degree of overlap. Generally, the heading overlap and lateral overlap are not less than 50%; the existing methods usually require a large number of ground control points for matching, the calculation process is complicated and overfitting, and the effect is poor.
[0003] It can be seen that a reliable and accurate UAV image stitching method is urgently needed. Summary of the invention
[0004] The purpose of the present disclosure is to provide a method for stitching UAV hyperspectral images to improve the reliability and accuracy of the stitched images.
[0005] A first aspect of an embodiment of the present disclosure provides a method for stitching drone hyperspectral images, comprising: Acquire a plurality of first images, where the first images are hyperspectral images acquired by controlling a drone to collect data from a first area based on waypoint planning, and the first area is an area within a target area; The multiple first images are stitched together to obtain a second image, where the second image is a hyperspectral image of the target area.
[0006] A second aspect of the embodiments of the present disclosure provides a device for stitching drone hyperspectral images, comprising: An image acquisition module, used to acquire a plurality of first images, where the first images are hyperspectral images acquired by controlling the drone to acquire a first area based on waypoint planning, where the first area is an area within the target area; The image processing module is used to stitch the multiple first images to obtain a second image, where the second image is a hyperspectral image of the target area.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned method for stitching drone hyperspectral images when executing the computer program.
[0008] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for stitching drone hyperspectral images are implemented.
[0009] The method and device for stitching UAV hyperspectral images provided by the embodiments of the present disclosure have the following beneficial effects: By stitching together multiple first images, the present disclosure can eliminate the limitations of a single image in terms of coverage and resolution, and obtain a higher quality and more comprehensive hyperspectral image of the target area; by stitching together multiple first images to obtain a second image, the present disclosure can avoid the use of ground control points, reduce the requirements for waypoint planning, and improve the reliability and accuracy of the stitched image. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0011] Figure 1 A schematic diagram of a process for stitching drone hyperspectral images provided in one embodiment of the present disclosure; Figure 2 A schematic diagram of a second method for stitching drone hyperspectral images provided in an embodiment of the present disclosure; Figure 3 A structural block diagram of a device for stitching drone hyperspectral images provided in one embodiment of the present disclosure; Figure 4 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0012] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0013] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0014] Please refer to Figure 1 , Figure 1 A schematic diagram of a method for stitching drone hyperspectral images provided in an embodiment of the present disclosure, the method comprising: S101: Acquire multiple first images, where the first images are hyperspectral images obtained by controlling a drone to collect data from a first area based on waypoint planning, and the first area is an area in the target area.
[0015] In this embodiment, multiple first images can be obtained by a drone. The first image can be a hyperspectral image of a certain area in the target area. Waypoint planning is a process of pre-setting the flight altitude, waypoint spacing, flight strip spacing and drone parameters of the drone. Whether the waypoint planning is reasonable can be based on the longitudinal overlap of the heading and the lateral overlap of the flight strip. The first area can be various areas in the target area, and various first areas constitute the target area. The hyperspectral image is an image obtained by hyperspectral imaging technology.
[0016] S102: stitching the multiple first images to obtain a second image, where the second image is a hyperspectral image of the target area.
[0017] In this embodiment, the pixel values at the overlapping points of multiple first images can be taken as the pixel values at the overlapping points to stitch together to obtain a second image. Whether an overlapping point is present can be determined by calculating whether the longitude and latitude of each pixel are the same, thereby avoiding the use of ground control points, reducing the requirements for longitudinal overlap of the heading and lateral overlap of the flight strip, and improving the efficiency of UAV cruising; the second image can be a hyperspectral image of the entire target area.
[0018] From the above, it can be concluded that the present invention can eliminate the limitations of a single image in coverage and resolution by stitching multiple first images, and obtain a higher quality and more comprehensive hyperspectral image of the target area; the present invention can avoid the use of ground control points by stitching multiple first images to obtain a second image, reduce the requirements for waypoint planning, and improve the reliability and accuracy of the stitched image.
[0019] In one embodiment of the present disclosure, before acquiring a plurality of first images, the method further includes: Obtain the flight parameters of the drone based on waypoint planning; Determine the longitudinal overlap of the course and the lateral overlap of the flight strip for waypoint planning based on flight parameters; The rationality of the waypoint planning is judged based on the longitudinal overlap of the heading and the lateral overlap of the flight strip.
[0020] In one embodiment of the present disclosure, the flight parameters include: flight altitude, waypoint spacing, flight strip spacing, and drone parameters; Determine the longitudinal overlap of the course and the lateral overlap of the flight strip for waypoint planning based on flight parameters, including: The longitudinal overlap of the heading is obtained based on the flight altitude, the distance between waypoints and the parameters of the UAV; The lateral overlap of flight strips is obtained based on the flight altitude, flight strip spacing and UAV parameters.
[0021] In this embodiment, waypoint planning is the process of planning the parameters and flight trajectory of the drone in advance. The flight parameters include: flight altitude, waypoint spacing, flight strip spacing and drone parameters; the flight parameters also include: waypoint location longitude, waypoint location latitude and yaw angle. The drone parameters include: the number of image rows and columns and the flight strip width and field of view; the number of image rows and columns and the flight strip width and field of view are determined by the drone camera properties.
[0022] The first formula is used to calculate the longitudinal overlap of the waypoint planning. The first formula is:
[0023] in, Indicates the longitudinal overlap of heading, Indicates the flight strip spacing, Indicates the number of pixels of the longitudinal width of the heading. Indicates the number of pixels in the horizontal width of the flight strip. Indicates the flight altitude. Indicates the flight strip width angle.
[0024] The second formula is used to calculate the lateral overlap of the flight path planned by the waypoint. The second formula is:
[0025] in, Indicates the lateral overlap of the flight strip. Indicates the flight strip spacing, Indicates the flight altitude. Indicates the flight strip width angle.
[0026] When the calculated longitudinal overlap of the heading is less than the first threshold, the waypoint planning is defined as unreasonable; when the calculated lateral overlap of the flight strip is less than the second threshold, the waypoint planning is defined as unreasonable; when the longitudinal overlap of the heading is greater than or equal to the first threshold and the lateral overlap of the flight strip is greater than or equal to the second threshold, the waypoint planning is defined as reasonable and the drone can cruise according to the waypoint planning. The first threshold and the second threshold can be adjusted according to the actual situation.
[0027] From the above, it can be concluded that the present disclosure determines the longitudinal overlap of the heading and the lateral overlap of the flight strip based on the flight parameters, so as to accurately control the flight trajectory and shooting angle of the UAV when collecting images, which helps to reduce the gaps and uneven overlaps between images and improve the accuracy of data collection; the present disclosure determines whether the waypoint planning is reasonable by calculating the longitudinal overlap of the heading and the lateral overlap of the flight strip, which helps to timely discover and adjust the unreasonable aspects of the planning, avoid problems in the data collection process, and thus save time and resources.
[0028] In one embodiment of the present disclosure, a plurality of first images are stitched together to obtain a second image, including: determining overlapping points of the first images; splicing the plurality of first images based on overlapping points of the first images to obtain a second image; Determining overlapping points of each first image includes: The overlapping points of the first images are determined according to the longitude and latitude of each pixel of the plurality of first images.
[0029] In this embodiment, overlapping points can be determined according to the longitude and latitude of each pixel. When the longitude and latitude of multiple pixels are the same, the positions of the multiple pixels are overlapping points, and the pixel values of the overlapping points can be averaged to obtain the pixel value of the second image.
[0030] For example, the longitude and latitude of pixel A is (30.12345°, 120.67890°), the longitude and latitude of pixel B is (30.12345°, 120.67890°), and the longitude and latitude of pixel C is (30.12345°, 120.67890°). The longitude and latitude of the three pixels are the same, so pixels A, B, and C are overlapping points. The average of the pixel values of pixels A, B, and C is taken as the pixel value of the overlapping point.
[0031] From the above, it can be concluded that the present disclosure determines the overlapping points by the longitude and latitude of the pixels, thereby improving the accuracy of stitching UAV hyperspectral images and reducing the stitching error caused by the position deviation between images. The present disclosure determines the second image by multiple overlapping points, thereby improving the image quality.
[0032] In one embodiment of the present disclosure, a plurality of first images are stitched together based on overlapping points of the first images to obtain a second image, including: Determine the pixel values of the overlapping points of each first image to determine the pixel values of a plurality of target overlapping points, where the target overlapping points are the overlapping points of the second image; A second image is determined based on the pixel values of the plurality of target overlapping points.
[0033] In this embodiment, the overlapping points are points with the same longitude and latitude of the pixels. When the absolute value obtained by subtracting the pixel values of the overlapping points from each other is less than or equal to a certain threshold, the average of the pixel values of the overlapping points is taken as the pixel value of the overlapping point. When the absolute value obtained by subtracting the pixel values of the overlapping points from each other is greater than a certain threshold, the pixel value of one of the overlapping points or the average of multiple pixel values is taken as the pixel value of the overlapping point.
[0034] For example, the pixel value of the overlapping point D is 0.12, the pixel value of the overlapping point E is 0.15, and the pixel value of the overlapping point F is 0.78. The preset threshold is 0.3, the absolute value of the difference between the pixel values of the overlapping point D and the overlapping point E is 0.03, the absolute value of the difference between the pixel values of the overlapping point E and the overlapping point F is 0.63, and the absolute value of the difference between the pixel values of the overlapping point D and the overlapping point F is 0.66. 0.63 and 0.66 are greater than 0.3, so the pixel value of the overlapping point F is defined as an abnormal value. The pixel value of the overlapping point F is too different from the pixel values of the overlapping points D and E, so the mean of the pixel values of the overlapping points D and E, 0.135, is used as the pixel value of the overlapping point.
[0035] It can be concluded from the above that the present disclosure can ensure that during the stitching process, the representation of the same physical location or object in different images remains consistent by accurately determining the overlapping points in each first image and calculating the pixel values of these overlapping points, which helps to improve the stitching accuracy and reduce discontinuities caused by misalignment or offset.
[0036] In one embodiment of the present disclosure, determining the overlapping points of the first images according to the longitude and latitude of each pixel of the plurality of first images includes: Obtaining the longitude and latitude of the center points of the plurality of first images; Obtaining the longitude of each pixel point based on the longitude and latitude of the center points of the plurality of first images and the projection length of the position of each pixel point on the X-axis; The latitude of each pixel point is obtained based on the longitude and latitude of the center points of the multiple first images and the projection length of the position of each pixel point on the Y axis.
[0037] In this embodiment, the longitude and latitude of the center point of the first image (waypoint position) is obtained based on GPS or waypoint planning, and one of them can be selected according to actual conditions. The longitude of the pixel point can be calculated according to the third formula:
[0038] in, Indicates Row, No. The longitude of the pixel in the column, Indicates the longitude of the center point of the image, represents the latitude of the center point of the image, Indicates the projection length of the pixel point on the X-axis.
[0039] The longitude of the pixel point can be calculated according to the fourth formula:
[0040] in, Indicates Row, No. The latitude of the pixel in the column, represents the latitude of the center point of the image, Indicates the projection length of the pixel point on the Y axis.
[0041] From the above, it can be concluded that the present disclosure can accurately calculate the longitude and latitude of each pixel point by directly using the longitude and latitude of the image center point and the relative position of the pixel point in the image coordinate system (i.e., the projection length on the X-axis and Y-axis), which can significantly improve the accuracy of coordinate conversion.
[0042] In one embodiment of the present disclosure, the projection length of the position of each pixel point on the X-axis includes: Based on the drone parameters, the position of the pixel point and the yaw angle, the projection length of the position of each pixel point on the X-axis is obtained; The projection length of each pixel point on the Y axis includes: Based on the UAV parameters, the position of the pixel point and the yaw angle, the projection length of the position of each pixel point on the Y axis is obtained.
[0043] In this embodiment, the drone parameters include: the number of image rows and columns and the flight strip width and field of view. The position of the pixel point can be Row, No. The yaw angle is obtained based on the first image or based on the waypoint planning. You can choose one of them according to the actual situation. The first coordinate system can be established with the waypoint coordinates as the center; the yaw angle is obtained based on the first coordinate system; the Y axis of the above first coordinate system is the north-south direction, the X axis is the east-west direction, the yaw angle is 0° (-180°) in the north direction, +90° in the east direction, +180° in the south direction, and -90° in the west direction. Settings: 0° / -180°, +90°, +180°, -90° represent the north, east, south, and west directions of the nose respectively. The larger the value, the further east the point is. The smaller the value, the further west the point is. The larger the value, the further north the point is. The smaller the value, the further south the point is.
[0044] Take the yaw angle of each waypoint as the heading direction and generate the heading and vertical heading Row and column image, decompose the distance between the heading pixel and the center waypoint into the distance between the X axis and the Y axis, with the heading as the X axis and the left perpendicular to the heading as the Y axis. OK The pixel in the first column (the upper left corner is the origin of the image row and column record) is equivalent to the pixel in the first column from the center of the waypoint. OK The pixels of the column are projected on the XY axis.
[0045] The projection length of each pixel point on the X-axis can be calculated based on the fifth formula:
[0046] in, Indicates the projection length of the pixel point on the X-axis. Indicates the number of pixels of the longitudinal width of the heading. Indicates the number of pixels in the horizontal width of the flight strip. Indicates the spatial resolution of the flight strip width, represents the yaw angle, Indicates the number of rows, Indicates the number of columns, Less than or equal to , Less than or equal to .
[0047] For example,( , ) indicates that The first Row, No. The position of the column, It can be 1000, It can be 1100, Less than or equal to 1000, Less than or equal to 1100.
[0048] The projection length of each pixel point on the Y axis can be calculated based on the sixth formula:
[0049] in, Indicates the projection length of the pixel point on the Y axis. Indicates the number of pixels of the longitudinal width of the heading. Indicates the number of pixels in the horizontal width of the flight strip. Indicates the spatial resolution of the flight strip width, represents the yaw angle, Indicates the number of rows, Indicates the number of columns.
[0050] It can be concluded from the above that the present disclosure can accurately calculate the projection length of each pixel point on the X-axis (east-west direction) and the Y-axis (north-south direction) by comprehensively considering the parameters of the drone, the specific location of the pixel point, and the yaw angle of the drone. This calculation method overcomes the errors existing in the traditional method, improves the accuracy of geographic positioning, and enables the images taken by the drone to more accurately reflect the actual location of the ground target.
[0051] In one embodiment provided by the present disclosure, the drone parameters include: the number of image rows and columns, the field of view of the flight strip width, and the spatial resolution of the flight strip width; The flight swath width and spatial resolution include: The spatial resolution of the flight strip width is obtained based on the flight altitude, the number of image rows and columns, and the flight strip width field of view.
[0052] In this embodiment, the flight altitude can be obtained based on waypoint planning. The number of image rows and columns is the number of the camera configured by the drone. The flight strip width spatial resolution can be calculated according to the seventh formula:
[0053] in, Indicates the spatial resolution of the flight strip width, Indicates the flight altitude. Indicates the flight strip width field angle, Indicates the number of pixels of the longitudinal width in the heading direction.
[0054] Figure 2 A flow chart of a second method for stitching drone hyperspectral images provided in an embodiment of the present disclosure, see Figure 2 .
[0055] In this embodiment, waypoint planning is first performed to obtain the waypoint spacing, flight altitude, longitudinal overlap of the heading, and lateral overlap of the flight strip of the point.
[0056] Then, the rationality of the course planning is judged according to the course longitudinal overlap and the lateral overlap of the flight strip. When at least one of the course longitudinal overlap and the lateral overlap of the flight strip is less than the corresponding threshold, the waypoint planning is unreasonable and the waypoint planning is performed again. When the course longitudinal overlap and the lateral overlap of the flight strip are both greater than or equal to the corresponding threshold, the waypoint planning is reasonable and the drone can be dispatched to collect images of the target area according to the waypoint planning.
[0057] Then, the UAV hyperspectral image is obtained, which includes the coordinates of the center point of the waypoint, the number of image rows and columns, pixel values, and yaw angle information in the XY axis coordinate system.
[0058] Secondly, the distance from the center position of the waypoint is calculated pixel by pixel and projected to the XY axis.
[0059] Secondly, the longitude and latitude of each pixel are calculated based on the coordinates of the waypoint center and the distance between each pixel.
[0060] Finally, multiple hyperspectral images are stitched into a complete image based on the latitude and longitude and pixel value of each pixel.
[0061] It can be concluded from the above that the present disclosure ensures that the drone can fly efficiently along the predetermined path when collecting images by planning parameters such as yaw angle, waypoint spacing, and flight altitude, thereby reducing the redundancy and repetition of the flight path, thereby improving the efficiency of image collection. At the same time, the present disclosure ensures that the collected images have a certain overlap between adjacent flight strips and adjacent headings by setting thresholds for the longitudinal overlap of the heading and the lateral overlap of the flight strip, providing a reliable data basis for subsequent image stitching and improving the accuracy and integrity of the image. The present disclosure calculates the distance from the center position of the waypoint pixel by pixel, projects it to the XY axis, and further calculates the longitude and latitude of each pixel based on the coordinates of the center of the waypoint and the pixel distance, thereby ensuring that the position information of each pixel is accurate. The image stitching method based on accurate position information can significantly reduce the error in the stitching process, improve the quality of the stitched image, and make the final generated whole image clearer and more continuous.
[0062] Corresponding to the method for stitching drone hyperspectral images in the above embodiment, Figure 3 This is a structural block diagram of a device for stitching drone hyperspectral images provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 3 The device 20 for stitching drone hyperspectral images comprises: The image acquisition module 21 is used to acquire a plurality of first images, where the first image is a hyperspectral image acquired by controlling the drone to acquire a first area based on waypoint planning, and the first area is an area in the target area; The image processing module 22 is used to stitch the multiple first images to obtain a second image, where the second image is a hyperspectral image of the target area.
[0063] In one embodiment of the present disclosure, the apparatus 20 for stitching drone hyperspectral images further includes: a waypoint planning module; Waypoint planning module, used to obtain the flight parameters of the drone based on waypoint planning; Determine the longitudinal overlap of the course and the lateral overlap of the flight strip for waypoint planning based on flight parameters; The rationality of the waypoint planning is judged based on the longitudinal overlap of the heading and the lateral overlap of the flight strip.
[0064] In one embodiment of the present disclosure, the image processing module 22 is specifically configured to: determining overlapping points of the first images; splicing the plurality of first images based on overlapping points of the first images to obtain a second image; Determining overlapping points of each first image includes: The overlapping points of the first images are determined according to the longitude and latitude of each pixel of the plurality of first images.
[0065] In one embodiment of the present disclosure, the image processing module 22 is further configured to: Determine the pixel values of the overlapping points of each first image to determine the pixel values of a plurality of target overlapping points, where the target overlapping points are the overlapping points of the second image; A second image is determined based on the pixel values of the plurality of target overlapping points.
[0066] In one embodiment of the present disclosure, the image processing module 22 is further configured to: Determine the longitudinal overlap of the course and the lateral overlap of the flight strip for waypoint planning based on flight parameters, including: The longitudinal overlap of the heading is obtained based on the flight altitude, the distance between waypoints and the parameters of the UAV; The lateral overlap of flight strips is obtained based on the flight altitude, flight strip spacing and UAV parameters.
[0067] In one embodiment of the present disclosure, the image processing module 22 is further configured to: Obtaining the longitude and latitude of the center points of the plurality of first images; Obtaining the longitude of each pixel point based on the longitude and latitude of the center points of the plurality of first images and the projection length of the position of each pixel point on the X-axis; The latitude of each pixel point is obtained based on the longitude and latitude of the center points of the multiple first images and the projection length of the position of each pixel point on the Y axis.
[0068] In one embodiment of the present disclosure, the image processing module 22 is further configured to: Based on the drone parameters, the position of the pixel point and the yaw angle, the projection length of the position of each pixel point on the X-axis is obtained; The projection length of each pixel point on the Y axis includes: Based on the UAV parameters, the position of the pixel point and the yaw angle, the projection length of the position of each pixel point on the Y axis is obtained.
[0069] In one embodiment of the present disclosure, the image processing module 22 is further configured to: UAV parameters include: number of image rows and columns, strip width field of view, and strip width spatial resolution; The flight swath width and spatial resolution include: The spatial resolution of the flight strip width is obtained based on the flight altitude, the number of image rows and columns, and the flight strip width field of view.
[0070] See also Figure 4 , Figure 4 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 4 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, such as Figure 3 The functions of modules 21 to 22 are shown.
[0071] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0072] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.
[0073] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0074] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of the method for stitching drone hyperspectral images provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.
[0075] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0076] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0077] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0078] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0079] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.
[0080] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.
[0081] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0082] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for stitching UAV hyperspectral images, characterized in that: include: Acquire a plurality of first images, where the first images are hyperspectral images acquired by controlling a drone to collect data from a first area based on waypoint planning, and the first area is an area within a target area; The multiple first images are stitched together to obtain a second image, where the second image is a hyperspectral image of the target area.
2. The method for stitching UAV hyperspectral images according to claim 1, characterized in that: Before acquiring the plurality of first images, the method further includes: Acquiring flight parameters of the UAV based on waypoint planning; Determine the longitudinal overlap of the course and the lateral overlap of the flight strip of the waypoint planning based on the flight parameters; Whether the waypoint planning is reasonable is judged according to the longitudinal overlap of the heading and the lateral overlap of the flight strip.
3. The method for stitching UAV hyperspectral images according to claim 1, characterized in that: The step of stitching the plurality of first images to obtain a second image comprises: determining overlapping points of the first images; splicing the plurality of first images based on overlapping points of the first images to obtain the second image; The determining of the overlapping points of the first images comprises: The overlapping points of the first images are determined according to the longitude and latitude of each pixel of the plurality of first images.
4. The method for stitching UAV hyperspectral images according to claim 3, characterized in that: The step of stitching the plurality of first images based on the overlapping points of the first images to obtain the second image comprises: Determine the pixel values of the overlapping points of each of the first images to determine the pixel values of a plurality of target overlapping points, wherein the target overlapping points are overlapping points of the second image; The second image is determined based on the pixel values of the multiple target overlapping points.
5. The method for stitching UAV hyperspectral images according to claim 2, characterized in that: The flight parameters include: flight altitude, waypoint spacing, flight strip spacing and drone parameters; The determining of the longitudinal overlap of the course and the lateral overlap of the flight strip of the waypoint planning based on the flight parameters includes: Obtaining the heading longitudinal overlap based on the flight altitude, the waypoint spacing and the drone parameters; The lateral overlap of the flight strips is obtained based on the flight altitude, the flight strip spacing and the UAV parameters.
6. The method for stitching UAV hyperspectral images according to claim 3, characterized in that: The step of determining the overlapping points of the first images according to the longitude and latitude of each pixel of the plurality of first images comprises: Obtaining the longitude and latitude of the center points of the multiple first images; Obtaining the longitude of each pixel point based on the longitude and latitude of the center points of the multiple first images and the projection length of the position of each pixel point on the X-axis; The latitude of each pixel point is obtained based on the longitude and latitude of the center points of the multiple first images and the projection length of the position of each pixel point on the Y axis.
7. The method for stitching UAV hyperspectral images according to claim 6, characterized in that: The projection length of the position of each pixel point on the X-axis includes: Obtaining the projection length of the position of each pixel point on the X-axis based on the drone parameters, the position of the pixel point and the yaw angle; The projection length of the position of each pixel point on the Y axis includes: The projection length of the position of each pixel point on the Y axis is obtained based on the drone parameters, the position of the pixel point and the yaw angle.
8. A device for stitching drone hyperspectral images, characterized in that: include: An image acquisition module, used to acquire a plurality of first images, where the first images are hyperspectral images acquired by controlling the drone to acquire a first area based on waypoint planning, where the first area is an area within the target area; The image processing module is used to stitch the multiple first images to obtain a second image, where the second image is a hyperspectral image of the target area.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.