A method for determining a center line of a field ridge, an electronic device, and a storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2026-08-11
AI Technical Summary
[0035]本发明根据获取的目标区域的多光谱反射率图像中每一像素点的近红外波段的反射率和红波段的反射率,得到对应的目标反射率图像,并对目标反射率图像进行栅格转面处理,得到若干目标矢量面,确定每一目标矢量面的候选矩形框,若候选矩形框的宽度小于相邻两行目标田垄之间的行距,则将该候选矩形框确定为目标矩形框,并将每一目标矩形框的两个短边的中点连接的线段确定为对应的田垄中心线。在传统的中心线提取方法的基础上,通过结合逻辑判断和多次迭代形态学运算、空间运算,确定出田垄中心线,与传统的中心线提取方法相比,无需大量的训练样本,也不需要复杂的栅格运算,简化了计算过程,提高了田垄中心线的提取效率,同时保证了提取的田垄中心线的准确性和连续性。
Smart Images

Figure CN117475167B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and in particular to a method for determining the center line of a field ridge, an electronic device, and a storage medium. Background Technology
[0002] The centerline of a field ridge refers to a line segment extending along the direction of the ridge. It reflects the direction and length of the ridge and is of great significance for agricultural robots to perform global path planning and precision fertilization.
[0003] The current method for obtaining the center line of the field ridge is based on traditional image processing. This involves acquiring several images of the field ridge, performing binarization to obtain several processed images, and then using deep learning on these processed images to determine the coordinates of the center line of the field ridge. Finally, agricultural robots are controlled to perform agricultural operations on the plants in the field ridge.
[0004] This traditional method has high requirements for image acquisition time, requiring image acquisition before the plant leaves have fully formed. If there is overlap between the canopies of different rows of plants, it is difficult to obtain accurate ridge locations. Furthermore, due to the spatial differences in plant growth, it is difficult to distinguish between crops and non-crops at different spatial locations using a single threshold, and to classify crops in different rows. Considering the large amount of data and clarity of the acquired ridge images, as well as the spatial differences between different regions, deep learning methods typically require a large amount of training data and computational resources, thus resulting in low efficiency in actual production. Therefore, the ridge centerline determined by traditional methods will contain errors, which will affect the agricultural robot's operation. Summary of the Invention
[0005] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:
[0006] A method for determining the center line of a field ridge includes the following steps:
[0007] Step S100: Obtain a multispectral reflectance image of the target area; the target area includes several target ridges, and the row spacing between each two adjacent target ridges is the same; several plants are planted on the target ridges, and the plant spacing between each two adjacent plants is the same.
[0008] Step S200: Obtain the corresponding target reflectance image based on the reflectance of the near-infrared band and the reflectance of the red band of each pixel in the multispectral reflectance image;
[0009] Step S300: Perform raster-to-surface processing on the target reflectivity image to obtain several target vector surfaces;
[0010] Step S400: Obtain the candidate bounding box of each target vector surface; the candidate bounding box is the minimum bounding box of the corresponding target vector surface.
[0011] Step S500: Traverse each candidate rectangle. If the width of the candidate rectangle is less than the row spacing between two adjacent target ridges, then determine the candidate rectangle as the target rectangle and execute step S600.
[0012] Step S600: Connect the midpoints of the two short sides of each target rectangle to obtain the corresponding field center line.
[0013] In one exemplary embodiment of this application, step S200 includes:
[0014] Step S210: Determine the vegetation index corresponding to each pixel in the multispectral reflectance image based on the reflectance of the near-infrared band and the reflectance of the red band of each pixel in the multispectral reflectance image.
[0015] Step S220: Traverse each pixel of the multispectral reflectance image. If the vegetation index corresponding to a pixel is greater than the preset initial vegetation index threshold, then the pixel is determined as a target pixel; otherwise, the pixel is determined as a non-target pixel. The initial vegetation index threshold is 0.
[0016] Step S230: Delete each non-target pixel in the multispectral reflectance image to obtain the corresponding target reflectance image.
[0017] In one exemplary embodiment of this application, step S500 further includes:
[0018] Step S510: If the width of the candidate rectangle is greater than or equal to the row spacing between two adjacent target ridges, then the candidate rectangle is determined as a non-target rectangle, and step S520 is executed.
[0019] Step S520: Perform morphological operations on the target reflectance image, redetermine the processed image as the target reflectance image, and execute step S300.
[0020] In one exemplary embodiment of this application, the morphological operation is an opening operation.
[0021] In one exemplary embodiment of this application, step S600 includes:
[0022] Step S610: Connect the midpoints of the two short sides of each target rectangle to obtain the target centerline corresponding to each target rectangle;
[0023] Step S620: Traverse each target centerline. If the length of the line segment corresponding to a target centerline is greater than or equal to the plant distance between two adjacent plants in the same target ridge, then the target centerline is determined as the ridge centerline.
[0024] In one exemplary embodiment of this application, step S100 includes:
[0025] Step S110: Spatial positioning of the target area is performed using carrier phase differential technology to determine the image acquisition location;
[0026] Step S120: Within a preset target time period, a drone equipped with a multispectral sensor is used to collect regional images of the target area and spectral calibration information of the multispectral calibration board at a preset target altitude at the image acquisition location.
[0027] Step S130: Based on the spectral calibration information, calibrate the regional image to obtain the multispectral reflectance image of the target region.
[0028] In one exemplary embodiment of this application, step S210 includes:
[0029] Step S211: Obtain the reflectance of the near-infrared band corresponding to each pixel in the multispectral reflectance image, and obtain the near-infrared band reflectance set V = (V1, V2, ..., V...). m ,...,V n ); where m = 1, 2, ..., n; n is the number of pixels in the multispectral reflectance image; V m Let be the reflectance of the near-infrared band corresponding to the m-th pixel in the multispectral reflectance image;
[0030] Step S212: Obtain the reflectance of the red band corresponding to each pixel in the multispectral reflectance image, and obtain the red band reflectance set F = (F1, F2, ..., F...). m ,...,F n ); where F m Let be the reflectance of the red band corresponding to the m-th pixel in the multispectral reflectance image;
[0031] Step S213: Determine the vegetation index (V) corresponding to the m-th pixel in the multispectral reflectance image. m -F m ) / (V m +F m ).
[0032] According to one aspect of this application, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the aforementioned method for determining the center line of a field ridge.
[0033] According to one aspect of this application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0034] The present invention has at least the following beneficial effects:
[0035] This invention obtains a target reflectance image based on the near-infrared and red reflectance of each pixel in the multispectral reflectance image of the target region. The target reflectance image is then rasterized to obtain several target vector surfaces. Candidate bounding boxes are determined for each target vector surface. If the width of a candidate bounding box is less than the row spacing between two adjacent target ridges, the candidate bounding box is selected as the target bounding box. The line segment connecting the midpoints of the two short sides of each target bounding box is determined as the corresponding ridge centerline. Based on traditional centerline extraction methods, this invention determines the ridge centerline by combining logical judgments and multiple iterative morphological and spatial operations. Compared to traditional centerline extraction methods, it requires no large number of training samples and no complex raster operations, simplifying the calculation process, improving the efficiency of ridge centerline extraction, and ensuring the accuracy and continuity of the extracted ridge centerlines. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 A flowchart of the method for determining the center line of a field ridge provided in an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of the multispectral reflectance image of the target area obtained in step S100 of the method for determining the center line of a field ridge provided in an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of the target reflectance image obtained in the method for determining the center line of a field ridge provided in an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the target vector surface obtained after rasterizing and converting the target reflectivity image provided in the embodiments of the present invention;
[0041] Figure 5 A schematic diagram of a candidate rectangular frame for a target vector surface provided in an embodiment of the present invention;
[0042] Figure 6 This is a schematic diagram of the center line of the field ridge determined by the method for determining the center line of the field ridge provided in the embodiment of the present invention. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] A method for determining the center line of a field ridge, such as Figure 1 As shown, it includes the following steps:
[0045] Step S100: Obtain a multispectral reflectance image of the target area; the target area includes several target ridges, and the row spacing between each two adjacent target ridges is the same; several plants are planted on the target ridges, and the plant spacing between each two adjacent plants is the same.
[0046] like Figure 2 The image shown is a multispectral reflectance image of the target area, which is the region where the centerline of the target field ridge needs to be determined. The target field ridge is the field ridge whose centerline needs to be determined. Figure 2 It can be seen that the target area includes several target field ridges. Figure 2 The orientation of several target field ridges in the left-middle half is the same, all running from the lower left to the upper right. Figure 2 The direction of several target ridges in the right half of the diagram is the same, from the upper left to the lower right. Since the plants are currently planted using mechanized equipment, the target ridges tend to be straight, and the row spacing between adjacent target ridges is the same. The plant spacing between plants planted in the same row of target ridges is also the same. Therefore, this invention only considers straight ridges and not curved ridges.
[0047] Furthermore, step S100 includes:
[0048] Step S110: Spatial positioning of the target area is performed using carrier phase differential technology to determine the image acquisition location;
[0049] Step S120: Within a preset target time period, a drone equipped with a multispectral sensor is used to collect regional images of the target area and spectral calibration information of the multispectral calibration board at a preset target altitude at the image acquisition location.
[0050] Step S130: Based on the spectral calibration information, calibrate the regional image to obtain the multispectral reflectance image of the target region.
[0051] The multispectral reflectance image of the target area is acquired by a drone equipped with a multispectral sensor. First, the target area is located using RTK (Real-time kinematic) carrier phase differential technology to determine the image acquisition position of the drone. This ensures that the image acquired by the drone at the image acquisition position can cover most of the target field ridges in the target area. Then, the drone is controlled to acquire regional images of the target area and spectral calibration information of the multispectral calibration board at a preset target altitude within a preset target time period at the image acquisition position. Finally, the regional image is calibrated based on the spectral calibration information to obtain the multispectral reflectance image of the target area.
[0052] Taking tobacco plants as an example, the optimal time for drones to collect images of tobacco ridges is between the tobacco's rosette stage and harvest period. During this time, the tobacco leaves are mature, and the collected images clearly show the plants within the ridges. Therefore, this period can be chosen as the optimal time for image collection. The preset target time period can be between 10:00 AM and 2:00 PM, as the sunlight during this time is relatively abundant, improving the clarity of the collected ridge images. The preset target height can be between 30 meters and 120 meters, with the specific height determined by the drone's acquisition accuracy. Higher accuracy allows for a higher target height, while lower accuracy allows for a lower target height, ensuring that the collected ridge images capture as many ridges as possible while maintaining sufficient clarity.
[0053] Step S200: Based on the near-infrared and red reflectance of each pixel in the multispectral reflectance image, obtain the corresponding target reflectance image, such as... Figure 3 As shown;
[0054] Furthermore, step S200 includes:
[0055] Step S210: Determine the vegetation index corresponding to each pixel in the multispectral reflectance image based on the reflectance of the near-infrared band and the reflectance of the red band of each pixel in the multispectral reflectance image.
[0056] Vegetation indices can reflect the growth status and coverage of plants planted on target ridges in a target area. They are often used for remote sensing monitoring of vegetation. By determining the vegetation index corresponding to each pixel in a multispectral reflectance image, it is possible to better distinguish between planted and non-planted areas in the multispectral reflectance image.
[0057] Step S210 includes:
[0058] Step S211: Obtain the reflectance of the near-infrared band corresponding to each pixel in the multispectral reflectance image, and obtain the near-infrared band reflectance set V = (V1, V2, ..., V...). m ,...,V n ); where m = 1, 2, ..., n; n is the number of pixels in the multispectral reflectance image; V m Let be the reflectance of the near-infrared band corresponding to the m-th pixel in the multispectral reflectance image;
[0059] Step S212: Obtain the reflectance of the red band corresponding to each pixel in the multispectral reflectance image, and obtain the red band reflectance set F = (F1, F2, ..., F...). m ,...,F n ); where F m Let be the reflectance of the red band corresponding to the m-th pixel in the multispectral reflectance image;
[0060] Step S213: Determine the vegetation index (V) corresponding to the m-th pixel in the multispectral reflectance image. m -F m ) / (V m +F m ).
[0061] Step S220: Traverse each pixel of the multispectral reflectance image. If the vegetation index corresponding to a pixel is greater than the preset initial vegetation index threshold, then the pixel is determined as a target pixel; otherwise, the pixel is determined as a non-target pixel.
[0062] Due to the unique reflectance spectral characteristics of green vegetation, it can be determined that the vegetation index of pixels containing green vegetation in the multispectral reflectance image is greater than 0, while the vegetation index of pixels containing non-green vegetation is less than or equal to 0. Therefore, the range of vegetation index corresponding to each pixel in the multispectral reflectance image is [-1, 1]. Thus, the initial vegetation index threshold is set to 0. Pixels with a vegetation index greater than 0 are considered to have vegetation, while pixels with a vegetation index less than or equal to 0 are considered to have no vegetation and may be land, water, or other geological features.
[0063] Step S230: Delete each non-target pixel in the multispectral reflectance image to obtain the corresponding target reflectance image.
[0064] In a multispectral reflectance image, non-target pixels represent areas where plants are not located. Since the goal is to determine the center line of the target ridge, which is the area where plants are grown, non-target pixels in the multispectral reflectance image are deleted. In addition, non-target pixels can also represent areas where dead plants are located. Since the purpose of determining the center line of the ridge is to enable agricultural robots to perform operations such as spraying and fertilizing on the plants, and dead plants do not require agricultural operations, their corresponding pixels in the multispectral reflectance image should also be deleted. This ensures that the area covered by the determined center line is the area where surviving plants are located, thereby reducing operational costs.
[0065] Step S300: Perform raster-to-surface processing on the target reflectivity image to obtain several target vector surfaces;
[0066] like Figure 4 The target vector surface corresponds to the area where the target field ridge is located.
[0067] Step S400: Obtain the candidate bounding box for each target vector surface; such as... Figure 5 As shown, the candidate bounding box is the minimum bounding box of the corresponding target vector surface;
[0068] Figure 5 Each candidate rectangle corresponds to a target ridge. If there is a break between target ridges in the same row, it means that no plants were planted at the break point or the planted plants have died.
[0069] Step S500: Traverse each candidate rectangle. If the width of the candidate rectangle is less than the row spacing between two adjacent target ridges, then determine the candidate rectangle as the target rectangle and execute step S600.
[0070] Since the width of the target field ridge must be smaller than the row spacing between two adjacent target field ridges, if the width of the candidate rectangle is smaller than the row spacing between two adjacent target field ridges, it means that the candidate rectangle has no error and is determined as the target rectangle.
[0071] Step S510: If the width of the candidate rectangle is greater than or equal to the row spacing between two adjacent target ridges, then the candidate rectangle is determined as a non-target rectangle, and step S520 is executed.
[0072] Step S520: Perform morphological operations on the target reflectance image, redetermine the processed image as the target reflectance image, and execute step S300.
[0073] If the width of the candidate rectangle is greater than or equal to the row spacing between two adjacent target ridges, it indicates an error in the candidate rectangle, resulting in an excessively large width exceeding the actual width of the target ridges. This indicates an error in the target reflectance image, requiring further processing, specifically morphological operations. Due to the large width of the candidate rectangle, it needs to be pruned. This is achieved by processing the target reflectance image through opening operations in morphological operations, and then re-identifying the processed image as the target reflectance image. This image is then rasterized to obtain several target vector surfaces. Candidate rectangles for each target vector surface are obtained. If the width of a candidate rectangle is less than the row spacing between two adjacent target ridges, it is identified as the target rectangle. Otherwise, morphological operations are performed again on the current target reflectance image, and the above steps are repeated until the width of the candidate rectangle for each target vector surface is less than the row spacing between two adjacent target ridges.
[0074] Step S600: Connect the midpoints of the two short sides of each target rectangle to obtain the corresponding field centerline;
[0075] Furthermore, step S600 includes:
[0076] Step S610: Connect the midpoints of the two short sides of each target rectangle to obtain the target centerline corresponding to each target rectangle;
[0077] Step S620: Traverse each target centerline. If the length of the line segment corresponding to a target centerline is greater than or equal to the plant distance between two adjacent plants in the same target ridge, then the target centerline is determined as the ridge centerline.
[0078] like Figure 6 The diagram shows the center line of each target ridge in the defined target area. If the length of the target center line segment is less than the plant spacing between two adjacent plants in the same target ridge, then the target center line is considered to have an error. It is impossible for there to be a center line shorter than the plant spacing between two adjacent plants, so the target center line is discarded.
[0079] This invention obtains a target reflectance image based on the near-infrared and red reflectance of each pixel in the multispectral reflectance image of the target region. The target reflectance image is then rasterized to obtain several target vector surfaces. Candidate bounding boxes are determined for each target vector surface. If the width of a candidate bounding box is less than the row spacing between two adjacent target ridges, it is designated as the target bounding box. The line segment connecting the midpoints of the two short sides of each target bounding box is determined as the corresponding ridge centerline. Based on traditional centerline extraction methods, this invention combines logical judgment with multiple iterative morphological and spatial operations to determine the ridge centerline. Compared to traditional centerline extraction methods, this simplifies the calculation process, improves centerline extraction efficiency, and ensures the accuracy and continuity of the extracted ridge centerlines.
[0080] Embodiments of the present invention also provide a computer program product including program code, which, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described above in various exemplary embodiments of the present invention.
[0081] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0082] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0083] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.
[0084] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuits,” “modules,” or “systems.”
[0085] An electronic device according to this embodiment of the invention. The electronic device is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the invention.
[0086] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and buses connecting different system components (including memory and processor).
[0087] The storage device stores program code that can be executed by the processor to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of the present invention.
[0088] The storage may include readable media in the form of volatile storage, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).
[0089] The storage may also include programs / utilities having a set (at least one) of program modules, including but not limited to: an operating system, one or more applications, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0090] A bus can represent one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus architectures.
[0091] The electronic device can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be achieved through input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. As shown in the figure, the network adapter communicates with other modules of the electronic device via a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0092] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0093] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section of this specification.
[0094] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0095] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0096] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0097] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0098] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0099] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0100] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for determining the center line of a field ridge, characterized in that, The method includes the following steps: Step S100: Obtain a multispectral reflectance image of the target area; the target area includes several target ridges, and the row spacing between each two adjacent target ridges is the same; several plants are planted on the target ridges, and the plant spacing between each two adjacent plants is the same; Step S200: Obtain the corresponding target reflectance image based on the reflectance of the near-infrared band and the reflectance of the red band of each pixel in the multispectral reflectance image; Step S300: Perform raster-to-surface processing on the target reflectivity image to obtain several target vector surfaces; Step S400: Obtain the candidate bounding box of each target vector surface; the candidate bounding box is the minimum bounding box of the corresponding target vector surface; Step S500: Traverse each candidate rectangle. If the width of the candidate rectangle is less than the row spacing between two adjacent target ridges, then determine the candidate rectangle as the target rectangle and execute step S600. Step S600: Connect the midpoints of the two short sides of each target rectangle to obtain the corresponding field ridge centerline.
2. The method according to claim 1, characterized in that, Step S200 includes: Step S210: Determine the vegetation index corresponding to each pixel of the multispectral reflectance image based on the reflectance of the near-infrared band and the reflectance of the red band of each pixel in the multispectral reflectance image. Step S220: Traverse each pixel of the multispectral reflectance image. If the vegetation index corresponding to a pixel is greater than the preset initial vegetation index threshold, then the pixel is determined as a target pixel; otherwise, the pixel is determined as a non-target pixel. Step S230: Delete each non-target pixel in the multispectral reflectance image to obtain the corresponding target reflectance image.
3. The method according to claim 1, characterized in that, Step S500 further includes: Step S510: If the width of the candidate rectangle is greater than or equal to the row spacing between two adjacent target ridges, then the candidate rectangle is determined as a non-target rectangle, and step S520 is executed. Step S520: Perform morphological operations on the target reflectance image, redetermine the processed image as the target reflectance image, and execute step S300.
4. The method according to claim 3, characterized in that, The morphological operation is the opening operation.
5. The method according to claim 1, characterized in that, Step S600 includes: Step S610: Connect the midpoints of the two short sides of each target rectangle to obtain the target centerline corresponding to each target rectangle; Step S620: Traverse each target centerline. If the length of the line segment corresponding to a target centerline is greater than or equal to the plant distance between two adjacent plants in the same target ridge, then the target centerline is determined as the ridge centerline.
6. The method according to claim 2, characterized in that, The initial vegetation index threshold is 0.
7. The method according to claim 1, characterized in that, Step S100 includes: Step S110: Spatial positioning of the target area is performed using carrier phase differential technology to determine the image acquisition location; Step S120: Within a preset target time period, a drone equipped with a multispectral sensor is used to collect regional images of the target area and spectral calibration information of the multispectral calibration plate at a preset target altitude at the image acquisition location. Step S130: Based on the spectral calibration information, calibrate the regional image to obtain a multispectral reflectance image of the target region.
8. The method according to claim 2, characterized in that, Step S210 includes: Step S211: Obtain the reflectance of the near-infrared band corresponding to each pixel in the multispectral reflectance image, and obtain the near-infrared band reflectance set V = (V1, V2, ..., V...). m ,...,V n ); where m = 1, 2, ..., n; n is the number of pixels in the multispectral reflectance image; V m The reflectance of the near-infrared band corresponding to the m-th pixel in the multispectral reflectance image; Step S212: Obtain the reflectance of the red band corresponding to each pixel in the multispectral reflectance image, and obtain the red band reflectance set F = (F1, F2, ..., F...). m ,...,F n ); where F m The reflectance of the red band corresponding to the m-th pixel in the multispectral reflectance image; Step S213: Determine the vegetation index (V) corresponding to the m-th pixel in the multispectral reflectance image. m -F m ) / (V m +F m ).
9. A non-transitory computer-readable storage medium, wherein the storage medium stores at least one instruction or at least one program segment, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the method as described in any one of claims 1-8.
10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.
Citation Information
Patent Citations
A method and device for extracting greenhouse based on remote sensing image
CN109087316A
Multi-source data-based urban entity range identification and delimited information processing method
CN113159406A