Flower data measurement method and device, computer device and storage medium

By transforming pose data and mask data at multiple imaging moments, the subjectivity and inaccuracy of traditional flower measurement methods are solved, enabling non-contact and precise measurement of flower height and crown width, thus improving measurement accuracy and efficiency.

CN121366189BActive Publication Date: 2026-04-17TIBET AGRI & ANIMAL HUSBANDRY COLLEGE
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIBET AGRI & ANIMAL HUSBANDRY COLLEGE
Filing Date
2025-10-13
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional methods for measuring the height and crown width of flowers rely on manual contact measurement, which is subjective and inaccurate, making it difficult to achieve precise measurements.

Method used

By using pose data from multiple imaging moments and mask data of the flower imaging area, orthophoto coordinate system transformation and target orthophoto mask pixel extraction are performed, and non-contact measurement of flower height and crown width is carried out using computer equipment.

Benefits of technology

It improves the accuracy and efficiency of flower data measurement and enables non-contact precision measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121366189B_ABST
    Figure CN121366189B_ABST
Patent Text Reader

Abstract

This invention relates to the field of flower data processing, and particularly to a flower data measurement method, apparatus, computer equipment, and storage medium. The method includes: obtaining initial pose data of the flower at several imaging times and initial mask data of the flower imaging region; performing orthorectified imaging coordinate system transformation based on the initial pose data to obtain orthorectified pose data at several imaging times; performing orthorectified imaging coordinate system transformation on the initial mask data of the flower imaging region at corresponding imaging times based on the initial pose data and the orthorectified pose data to obtain orthorectified mask data of the flower imaging region at several imaging times; extracting target orthorectified mask pixels from the orthorectified mask data of the flower imaging region to obtain target orthorectified mask pixel data at several imaging times; and measuring flower data based on the orthorectified pose data and the target orthorectified mask pixel data to obtain the flower height and crown width of the flower to be measured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flower data processing, and in particular to a flower data measurement method, apparatus, computer equipment, and storage medium. Background Technology

[0002] Flower height and crown width, as core quantitative indicators of plant morphology, directly regulate ecological adaptability at the biological level: plant height determines resource competition efficiency and stress resistance; crown width reflects niche strategy and water use relationship.

[0003] In breeding practice, both plant height and canopy width become key selection criteria—plant height needs to match the application scenario, while canopy width compression can increase yield per unit area. In cultivation management, these two parameters work together to guide agricultural operations: plant height constrains planting density and the application of growth regulators; canopy width determines pruning thresholds and facility space configuration. In landscape design, a gradient height layout and canopy width functional zoning achieve a unity of ecological function and aesthetics.

[0004] Traditional methods for measuring the height of potted plants rely on subjective tools such as L-shaped right-angle rulers, flexible height measuring rods, and digital vernier calipers. These methods are prone to inaccuracy due to human error and the need for physical contact. Crown width measurement, using methods like measuring tapes and rotation scanning, is also a contact method and inherently involves human error. Clearly, it is necessary to develop a non-contact method for accurate measurement. Summary of the Invention

[0005] Based on this, the purpose of the present invention is to provide a method, apparatus, computer equipment, and storage medium for measuring flower data, which utilizes the pose data of the flower at multiple imaging moments and the mask data of the flower imaging area to measure the height and crown width of the flower, thereby improving the accuracy and efficiency of flower data measurement.

[0006] In a first aspect, embodiments of this application provide a method for measuring flower data, comprising the following steps:

[0007] The initial pose data of the flower to be measured at several imaging times and the initial mask data of the flower imaging area are obtained.

[0008] The orthophoto coordinate system is transformed based on the initial pose data at several imaging times to obtain orthophoto pose data at several imaging times.

[0009] Based on the initial pose data and orthophoto pose data at several imaging times, the initial mask data of the flower imaging region at the corresponding imaging times is transformed into the orthophoto coordinate system to obtain the orthophoto mask data of the flower imaging region at several imaging times.

[0010] The target orthomask pixel data at several imaging times is extracted from the orthomask data of the flower imaging area at several imaging times.

[0011] Flower data is measured based on the orthophoto pose data and the target orthophoto mask pixel data at several imaging times to obtain flower measurement data of the flower to be measured.

[0012] Secondly, embodiments of this application provide a flower data measurement device, comprising:

[0013] The pose data acquisition module is used to obtain the initial pose data of the flower to be measured at several imaging times and the initial mask data of the flower imaging area.

[0014] The first orthophoto transformation module is used to perform orthophoto coordinate system transformation based on the initial pose data at several imaging times to obtain orthophoto pose data at several imaging times.

[0015] The second orthophoto transformation module is used to perform orthophoto coordinate system transformation on the initial mask data of the flower imaging region at the corresponding imaging time based on the initial pose data and orthophoto pose data at several imaging times, so as to obtain the orthophoto mask data of the flower imaging region at several imaging times.

[0016] The pixel extraction module is used to extract the target orthomask pixels from the orthomask data of the flower imaging area at several imaging times, and obtain the target orthomask pixel data at several imaging times.

[0017] The flower data measurement module is used to perform flower data measurement based on the orthophoto pose data at several imaging times and the target orthophoto mask pixel data, so as to obtain the flower measurement data of the flower to be measured.

[0018] Thirdly, embodiments of this application provide a computer device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the flower data measurement method as described in the first aspect.

[0019] Fourthly, embodiments of this application provide a storage medium storing a computer program that, when executed by a processor, implements the steps of the flower data measurement method as described in the first aspect.

[0020] In this application embodiment, a method, apparatus, computer equipment, and storage medium for measuring flower data are provided. The method utilizes the pose data of the flower at multiple imaging moments and the mask data of the flower imaging area to measure the height and crown width of the flower, thereby improving the accuracy and efficiency of flower data measurement.

[0021] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description

[0022] Figure 1 A flowchart illustrating a method for measuring flower data according to an embodiment of this application;

[0023] Figure 2 This is a flowchart illustrating step S3 of a flower data measurement method provided in one embodiment of this application.

[0024] Figure 3 This is a flowchart illustrating step S4 of a flower data measurement method provided in one embodiment of this application.

[0025] Figure 4 This is a flowchart illustrating step S5 of a flower data measurement method provided in one embodiment of this application.

[0026] Figure 5 This is a flowchart illustrating step S51 of a flower data measurement method provided in one embodiment of this application.

[0027] Figure 6 A flowchart illustrating step S52 of a flower data measurement method provided in one embodiment of this application;

[0028] Figure 7 A flowchart illustrating step S6 of a flower data measurement method provided in another embodiment of this application;

[0029] Figure 8 This is a schematic diagram of the structure of a flower data measuring device provided in one embodiment of this application;

[0030] Figure 9 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. Detailed Implementation

[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0032] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0033] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0034] Please see Figure 1 , Figure 1 The following is a flowchart illustrating a method for measuring flower data according to an embodiment of this application. The method includes the following steps:

[0035] S1: Obtain the initial pose data of the flower to be measured at several imaging times and the initial mask data of the flower imaging area.

[0036] The subject of the flower data measurement method is the measuring device (hereinafter referred to as the measuring device). In an optional embodiment, the measuring device may be a computer device, a server, or a server cluster composed of multiple computer devices.

[0037] In this embodiment, the measuring device obtains initial pose data of the flower at several imaging moments and initial mask data of the flower imaging area.

[0038] For the initial pose data, the measuring device can obtain sensor integral data and feature point data of the flower to be measured at several imaging moments through an augmented reality device, such as a smartphone. The feature point data is obtained by feature extraction based on the imaging images at the corresponding imaging moments obtained by the area scan camera configured in the augmented reality device.

[0039] The measuring device inputs sensor data and feature point data from several imaging moments into a pre-set augmented reality system to construct pose data, obtaining initial pose data for the flower to be measured at several imaging moments. The augmented reality (SLAM) system typically constructs motion equations using sensor integral data and observation equations using feature points (such as ORB features) extracted from the imaging images obtained by the area scan camera. This allows for estimation of the current pose and the three-dimensional position of the feature points, outputting pose data for the corresponding imaging moments. The pose data provided by the augmented reality system is then used to estimate the flower height and crown width, improving the accuracy of flower data measurement.

[0040] For the initial mask data of the flower imaging region, the measuring device uses the Segment Anything model (SAM) to segment the flower imaging region from the images acquired by the array camera at each imaging time, obtaining flower imaging region images at each imaging time. The measuring device uses a large image encoder in the Segment Anything model to generate image embedding representations of the flower imaging region images at each imaging time. Subsequently, it can efficiently query the data through various input prompts to generate the target mask in real time, obtaining the initial mask data of the flower imaging region at several imaging times for the flower to be measured.

[0041] S2: Perform orthophoto coordinate system transformation based on the initial pose data at several imaging times to obtain orthophoto pose data at several imaging times.

[0042] To calculate flower height and crown width, in this embodiment, the measuring device performs an orthorectified imaging coordinate system transformation based on the initial pose data at several imaging moments to obtain orthorectified pose data at several imaging moments. The initial pose data includes a rotation matrix and a translation vector in the world coordinate system. The expression for the rotation matrix in the world coordinate system is:

[0043] =[ , , ]

[0044] In the formula, For the first k The rotation matrix in the world coordinate system in the initial pose data at the next imaging moment. Let be the first column vector in the rotation matrix of the initial pose data in the world coordinate system. This refers to the second column vector in the rotation matrix of the initial pose data in the world coordinate system. It is the third column vector in the rotation matrix of the initial pose data in the world coordinate system.

[0045] The measuring device performs an orthorectified imaging coordinate system transformation on the rotation matrix and translation vector in the world coordinate system from the initial pose data at several imaging moments to obtain orthorectified pose data at several imaging moments. The initial pose data includes the rotation matrix and translation vector in the orthorectified coordinate system. The expression for the rotation matrix in the orthorectified coordinate system is as follows:

[0046] =[ , , ]

[0047] =

[0048]

[0049] =

[0050] In the formula, For the first k The rotation matrix in the orthorectified coordinate system in the orthorectified pose data at the next imaging time. Let be the first column vector in the rotation matrix of the orthophoto coordinate system in the orthophoto pose data. Let be the second column vector in the rotation matrix of the orthophoto coordinate system in the orthophoto pose data. It is the third column vector in the rotation matrix of the orthophoto pose data in the orthophoto coordinate system.

[0051] The expression for the translation vector in the orthographic coordinate system is:

[0052]

[0053] In the formula, Let be the translation vector in the orthophoto coordinate system within the orthophoto pose data. The translation vector in the world coordinate system is the initial pose data.

[0054] S3: Based on the initial pose data and orthophoto pose data at several imaging times, perform orthophoto coordinate system transformation on the initial mask data of the flower imaging region at the corresponding imaging times to obtain orthophoto mask data of the flower imaging region at several imaging times.

[0055] In this embodiment, the measuring device performs orthophoto coordinate system transformation on the initial mask data of the flower imaging region at the corresponding imaging time based on the initial pose data and orthophoto pose data at several imaging times, thereby obtaining orthophoto mask data of the flower imaging region at several imaging times.

[0056] Please see Figure 2 , Figure 2 The flowchart of step S3 in the flower data measurement method provided in one embodiment of this application is as follows:

[0057] S31: Based on the rotation matrix in the world coordinate system in the initial pose data of several imaging times, the rotation matrix in the orthorectified pose data in the orthorectified coordinate system, and the preset pixel orthorectified transformation algorithm, the pixels in the world coordinate system in the initial mask data of the flower imaging region at the corresponding imaging times are transformed into the orthorectified imaging coordinate system to obtain the pixels in the orthorectified coordinate system at several imaging times, and construct the orthorectified mask data of the flower imaging region at several imaging times.

[0058] The pixel orthophoto transformation algorithm is as follows:

[0059]

[0060] In the formula, For pixels in orthographic coordinates, Orientation element matrix For the first k The rotation matrix in the orthorectified coordinate system in the orthorectified pose data at the next imaging time. T It is the transpose symbol. For the first k The rotation matrix in the world coordinate system in the initial pose data at the next imaging moment. These are the pixels in the world coordinate system in the initial mask data of the flower imaging area.

[0061] In this embodiment, the measuring device performs orthorectified imaging coordinate system transformation on the pixels in the initial mask data of the flower imaging region at the corresponding imaging time in the world coordinate system based on the rotation matrix in the world coordinate system of the initial pose data at several imaging times, the rotation matrix in the orthorectified pose data in the orthorectified coordinate system, and the preset pixel orthorectified transformation algorithm, thereby obtaining the pixels in the orthorectified coordinate system at several imaging times and constructing orthorectified mask data of the flower imaging region at several imaging times.

[0062] S4: Extract target orthomask pixels from the orthomask data of the flower imaging area at several imaging times to obtain target orthomask pixel data at several imaging times.

[0063] In this embodiment, the measuring device extracts target orthomask pixel data from the orthomask data of the flower imaging area at several imaging times, thereby obtaining target orthomask pixel data at several imaging times.

[0064] Please see Figure 3 , Figure 3 The flowchart of step S4 in the flower data measurement method provided in one embodiment of this application is as follows: Steps S41 to S42 are detailed below:

[0065] S41: Construct a rectangular frame of the flower imaging range based on the orthophoto mask data of the flower imaging area at several imaging times, and obtain the rectangular frame of the flower imaging range at several imaging times.

[0066] In this embodiment, the measuring device constructs a rectangular frame of the flower imaging range based on the orthophoto mask data of the flower imaging area at several imaging times, thereby obtaining the rectangular frame of the flower imaging range at several imaging times.

[0067] S42: Extract target orthophoto mask pixels based on the rectangular frame of the flower imaging range, and construct target orthophoto mask pixel data for several imaging times.

[0068] In this embodiment, the measuring device extracts target orthophoto mask pixels based on the rectangular frame of the flower imaging range, constructing target orthophoto mask pixel data for several imaging times. The target orthophoto mask pixel data includes the first-dimensional maximum coordinate value, the first-dimensional minimum coordinate value, the second-dimensional maximum coordinate value, and the second-dimensional minimum coordinate value of the target orthophoto mask pixels, as detailed below:

[0069]

[0070]

[0071]

[0072]

[0073] In the formula, For the first k The first image within the rectangular frame of the flower imaging range at the next imaging moment The first-dimensional coordinates of a pixel in an orthophoto coordinate system. For the first k The first image within the rectangular frame of the flower imaging range at the next imaging moment The second-dimensional coordinates of a pixel in an orthophoto coordinate system. For the first k The first-dimensional maximum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. For the first k The first-dimensional minimum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. For the first kThe minimum second-dimensional coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. For the first k The second-dimensional maximum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. This is the minimum value extraction function. This is the function for extracting the maximum value.

[0074] S5: Based on the orthophoto pose data and the target orthophoto mask pixel data at several imaging moments, flower data is measured to obtain the flower height and crown width of the flower to be measured.

[0075] In this embodiment, the measuring device performs flower data measurement based on the orthophoto pose data at several imaging moments and the target orthophoto mask pixel data to obtain the flower height and crown width of the flower to be measured. Utilizing the pose data of the flower at multiple imaging moments and the mask data of the flower imaging area to measure the flower height and crown width improves the accuracy and efficiency of flower data measurement.

[0076] For the height of the flower, please refer to Figure 4 , Figure 4 The flowchart of step S5 in the flower data measurement method provided in one embodiment of this application is as follows: Steps S51 to S52 are detailed below:

[0077] S51: Extract the top point and base point of the target flower based on the orthophoto pose data and the target orthophoto mask pixel data at several imaging times to obtain the top point and base point of the target flower to be measured; calculate the flower height based on the top point and base point of the target flower to obtain the flower height of the target flower.

[0078] In this embodiment, the measuring device extracts the top point and base point of the target flower based on the orthophoto pose data and the target orthophoto mask pixel data at several imaging times, thereby obtaining the top point and base point of the target flower of the flower to be measured.

[0079] The measuring device calculates the height of the target flower based on the top and base points of the target flower, obtaining the flower height to be measured. The flower height is:

[0080]

[0081] In the formula, For the height of the flowers, Let represent the direction value of the top point of the target flower in the orthographic coordinate system. The direction value is the coordinate value of the base point of the target flower in the orthophoto coordinate system.

[0082] Please see Figure 5 , Figure 5 The flowchart of step S51 in the flower data measurement method provided in one embodiment of this application is as follows:

[0083] S511: Based on the rotation matrix and translation vector in the orthophoto coordinate system in the orthophoto pose data at several imaging times, the second-dimensional minimum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data, and the preset flower top point algorithm, obtain the initial flower top point at several imaging times.

[0084] The algorithm for the top point of the flower is as follows:

[0085]

[0086] In the formula, For the first k The minimum second-dimensional coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. This is the vector in the second row of the orientation element matrix. Let be the rotation matrix in the orthophoto coordinate system within the orthophoto pose data. The initial flower top point, It is the translation vector in the orthophoto coordinate system in the orthophoto pose data.

[0087] In this embodiment, the measuring device obtains the initial flower top point at several imaging times based on the rotation matrix and translation vector in the orthophoto coordinate system in the orthophoto pose data at several imaging times, the second-dimensional minimum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data, and a preset flower top point algorithm.

[0088] S512: Based on the rotation matrix and translation vector in the orthophoto coordinate system in the orthophoto pose data at several imaging times, the second-dimensional maximum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data, and the preset flower base point algorithm, the initial flower base point is obtained at several imaging times.

[0089] The algorithm for calculating the base point of the flower is as follows:

[0090]

[0091] In the formula, For the first kThe second-dimensional maximum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. This is the initial base point of the flower.

[0092] In this embodiment, the measuring device obtains the initial flower base point at several imaging times based on the rotation matrix and translation vector in the orthophoto coordinate system in the orthophoto pose data at several imaging times, the second-dimensional maximum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data, and a preset flower base point algorithm.

[0093] S513: Based on the initial flower top point and initial flower base point at several imaging times, the nonlinear least squares problem optimization method is used to optimize and obtain the target flower top point and target flower base point of the flower to be measured.

[0094] The optimization method for the nonlinear least squares problem adopts the Levenberg-Marquardt algorithm.

[0095] In this embodiment, the measuring device uses a nonlinear least squares problem optimization method to optimize and obtain the target flower top point and target flower base point of the flower to be measured based on the initial flower top point and initial flower base point at several imaging times.

[0096] S52: Calculate the flower crown width based on the orthophoto pose data, target orthophoto mask pixel data, and target flower top point at several imaging times to obtain the flower crown width at several imaging times; average the flower crown width at several imaging times to obtain the flower crown width of the flower to be measured.

[0097] In this embodiment, the measuring device calculates the crown width of the flower based on the orthophoto pose data, the target orthophoto mask pixel data, and the top point of the target flower at several imaging times, and obtains the crown width of the flower at several imaging times; the crown width of the flower at several imaging times is averaged to obtain the crown width of the flower to be measured.

[0098] For the flower crown width, please refer to Figure 6 , Figure 6 The flowchart of S52 in the flower data measurement method provided in one embodiment of this application is as follows: S521~S522 are detailed below:

[0099] S521: Based on the rotation matrix and translation vector in the orthophoto coordinate system in the orthophoto pose data at several imaging times, the top point of the target flower, and the preset coordinate algorithm, obtain the coordinate values ​​of the top point of the target flower in the orthophoto coordinate system at several imaging times.

[0100] The coordinate algorithm is as follows:

[0101]

[0102] In the formula, For the top point of the target flower at the k The coordinates of the image in the orthophoto coordinate system at the next imaging moment. The target flower's top point.

[0103] In this embodiment, the measuring device obtains the coordinate values ​​of the top point of the target flower in the orthophoto coordinate system based on the rotation matrix and translation vector in the orthophoto pose data at several imaging times, the top point of the target flower, and a preset coordinate algorithm.

[0104] S522: Based on the third row vector of the coordinate values ​​of the top point of the target flower in the orthophoto coordinate system at several imaging times, the first dimension maximum coordinate value and the first dimension minimum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data, and the preset flower crown width algorithm, obtain the flower crown width at several imaging times.

[0105] The algorithm for calculating the crown width of the flowers is as follows:

[0106]

[0107] In the formula, For the first k Flower crown width at the next imaging moment For the first k The first-dimensional maximum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. For the first k The first-dimensional minimum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. The focal length parameter of the first camera. For the top point of the target flower at the k The direction value in the coordinates of the orthophoto coordinate system at the next imaging moment.

[0108] In this embodiment, the measuring device obtains the flower crown width at several imaging times based on the third row vector of the coordinate values ​​of the top point of the target flower in the orthophoto coordinate system at several imaging times, the first dimension maximum coordinate value and the first dimension minimum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data, and the preset flower crown width algorithm.

[0109] Please see Figure 7 , Figure 7A flowchart illustrating a flower data measurement method provided in another embodiment of this application further includes steps S61-S62, as detailed below:

[0110] S61: Construct the view matrix and projection matrix based on the top point of the target flower, the base point of the target flower, the height of the flower, and the crown width of the flower to be measured, and obtain the view matrix and projection matrix of the flower to be measured.

[0111] In this embodiment, the measuring device constructs a view matrix and a projection matrix based on the top point of the target flower, the base point of the target flower, the height of the flower, and the crown width of the flower to be measured, thereby obtaining the view matrix and projection matrix of the flower to be measured.

[0112] S62: Construct an augmented reality scene based on the view matrix and projection matrix of the flower to be measured, and display the constructed augmented reality scene in a preset display interface.

[0113] In this embodiment, the measuring device constructs an augmented reality scene based on the view matrix and projection matrix of the flower to be measured, and displays the constructed augmented reality scene on a preset display interface. The measurement results can be displayed using the augmented reality scene and manual supervision can be performed.

[0114] Please refer to Figure 8 , Figure 8 This is a schematic diagram of a flower data measuring device provided in one embodiment of this application. The device can be implemented entirely or partially through software, hardware, or a combination of both. The device 8 includes:

[0115] The pose data acquisition module 81 is used to acquire the initial pose data of the flower at several imaging moments and the initial mask data of the flower imaging area.

[0116] The first orthophoto transformation module 82 is used to perform orthophoto coordinate system transformation based on the initial pose data at several imaging times to obtain orthophoto pose data at several imaging times.

[0117] The second orthophoto transformation module 83 is used to perform orthophoto coordinate system transformation on the initial mask data of the flower imaging region at the corresponding imaging time based on the initial pose data and orthophoto pose data at several imaging times, so as to obtain the orthophoto mask data of the flower imaging region at several imaging times.

[0118] The pixel extraction module 84 is used to extract the target orthomask pixel data from the orthomask data of the flower imaging area at several imaging times, and obtain the target orthomask pixel data at several imaging times.

[0119] The flower data measurement module 85 is used to measure flower data based on the orthophoto pose data at several imaging times and the target orthophoto mask pixel data, so as to obtain the flower height and crown width of the flower to be measured.

[0120] In this embodiment, the measuring device obtains initial pose data of the flower at several imaging moments and initial mask data of the flower imaging area through a pose data acquisition module; it then performs orthorectified imaging coordinate system transformation based on the initial pose data at several imaging moments through a first orthorectified transformation module to obtain orthorectified pose data at several imaging moments through a second orthorectified transformation module; finally, it extracts target orthorectified mask pixels from the orthorectified mask data of the flower imaging area at several imaging moments through a pixel extraction module; and finally, it performs flower data measurement based on the orthorectified pose data and target orthorectified mask pixel data at several imaging moments through a flower data measurement module to obtain the flower height and crown width of the flower to be measured. By utilizing pose data from multiple imaging moments of the flower under test, along with mask data of the flower imaging area, the height and crown width of the flower can be measured, thereby improving the accuracy and efficiency of flower data measurement.

[0121] Please refer to Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application. The computer device 10 includes: a processor 91, a memory 92, and a computer program 93 stored in the memory 92 and executable on the processor 91; the computer device can store multiple instructions, which are adapted to be loaded and executed by the processor 91. Figures 1 to 7 The method steps of the illustrated embodiment can be found in the following documentation for detailed execution. Figures 1 to 7 The specific details of the illustrated embodiments will not be elaborated here.

[0122] The processor 91 may include one or more processing cores. The processor 91 connects to various parts of the server using various interfaces and lines, and executes various functions and processes data of the flower data measurement device 8 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 92, and by calling data stored in the memory 92. Optionally, the processor 91 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 91 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU mainly handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required to be displayed on the touch screen; and the modem is used for wireless communication. It is understood that the modem may also not be integrated into the processor 91 and may be implemented as a separate chip.

[0123] The memory 92 may include random access memory (RAM) or read-only memory. Optionally, the memory 92 may include a non-transitory computer-readable storage medium. The memory 92 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 92 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory 92 may also be at least one storage device located remotely from the aforementioned processor 91.

[0124] This application also provides a storage medium that can store multiple instructions. These instructions are applicable to being loaded and executed by a processor using the method steps described in Embodiments 1 to 4 above. For details of the execution process, please refer to the specific descriptions of Embodiments 1 to 4, which will not be repeated here.

[0125] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. In the embodiments, each functional unit and module 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. The integrated unit can be implemented in hardware or as a software functional unit. In addition, the specific names of each functional unit and module are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0126] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0127] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 algorithm. 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 invention.

[0128] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or 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 devices or units may be electrical, mechanical, or other forms.

[0129] 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.

[0130] Furthermore, in the various embodiments of the present invention, the functional units 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. The integrated unit can be implemented in hardware or as a software functional unit.

[0131] If the integrated module / unit 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, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms.

[0132] This invention is not limited to the above-described embodiments. If any modifications or variations to this invention do not depart from the spirit and scope of this invention, and if such modifications and variations fall within the scope of the claims and equivalent technologies of this invention, then this invention also intends to include such modifications and variations.

Claims

1. A method of measuring flower data, characterized by, Includes the following steps: The initial pose data of the flower to be measured at several imaging times and the initial mask data of the flower imaging area are obtained. The orthophoto coordinate system is transformed based on the initial pose data at several imaging times to obtain orthophoto pose data at several imaging times. Based on the initial pose data and orthophoto pose data at several imaging times, the initial mask data of the flower imaging region at the corresponding imaging times is transformed into the orthophoto coordinate system to obtain the orthophoto mask data of the flower imaging region at several imaging times. The target orthomask pixel data at several imaging times is extracted from the orthomask data of the flower imaging area at several imaging times. Flower data is measured based on the orthophoto pose data and the target orthophoto mask pixel data at several imaging times to obtain the flower height and crown width of the flower to be measured.

2. The flower data measuring method of claim 1, wherein: The initial pose data includes a rotation matrix and a translation vector in the world coordinate system; the orthogonal pose data includes a rotation matrix and a translation vector in the orthogonal coordinate system. The step of transforming the initial mask data of the flower imaging region at the corresponding imaging time into the orthorectified imaging coordinate system based on the initial pose data and orthorectified pose data at several imaging times to obtain orthorectified mask data of the flower imaging region at several imaging times includes the following steps: Based on the rotation matrix in the world coordinate system from the initial pose data at several imaging times, the rotation matrix in the orthorectified pose data in the orthorectified coordinate system, and a preset pixel orthorectification algorithm, the pixels in the initial mask data of the flower imaging region at the corresponding imaging times in the world coordinate system are transformed into the orthorectified imaging coordinate system to obtain the pixels in the orthorectified coordinate system at several imaging times. This constructs the orthorectified mask data of the flower imaging region at several imaging times. The pixel orthorectification algorithm is as follows: In the formula, For pixels in orthographic coordinates, This is a matrix of directional elements. For the first k The rotation matrix in the orthorectified coordinate system in the orthorectified pose data at the next imaging time. T It is the transpose symbol. For the first k The rotation matrix in the world coordinate system in the initial pose data at the next imaging moment. These are the pixels in the world coordinate system in the initial mask data of the flower imaging area.

3. The method for measuring flower data according to claim 2, characterized in that, The step of extracting target orthomask pixel data from the orthomask data of the flower imaging region at several imaging times, to obtain target orthomask pixel data at several imaging times, includes the following steps: Based on the orthophoto mask data of the flower imaging area at several imaging times, the rectangular bounding box of the flower imaging range is constructed to obtain the rectangular bounding box of the flower imaging range at several imaging times. Based on the rectangular frame of the flower imaging range, target orthophoto mask pixels are extracted, and target orthophoto mask pixel data at several imaging times are constructed. The target orthophoto mask pixel data includes the first-dimensional maximum coordinate value, the first-dimensional minimum coordinate value, the second-dimensional maximum coordinate value, and the second-dimensional minimum coordinate value of the target orthophoto mask pixels.

4. The method for measuring flower data according to claim 3, characterized in that, The step of measuring flower data based on the orthophoto pose data at several imaging times and the target orthophoto mask pixel data to obtain the flower height and crown width of the flower to be measured includes the following steps: Based on the orthophoto pose data and the target orthophoto mask pixel data at several imaging times, the top point and the base point of the target flower are extracted to obtain the top point and the base point of the target flower of the flower to be measured. The height of the flower is calculated based on the top point and the base point of the target flower to obtain the height of the flower to be measured. The crown width of the flower is calculated based on the orthophoto pose data, the target orthophoto mask pixel data, and the top point of the target flower at several imaging times. The crown width of the flower at several imaging times is then averaged to obtain the crown width of the flower to be measured.

5. The method for measuring flower data according to claim 4, characterized in that, The step of extracting the top and base points of the target flower based on the orthophoto pose data and the target orthophoto mask pixel data at several imaging times to obtain the top and base points of the target flower of the flower to be measured includes the following steps: Based on the rotation matrix and translation vector in the orthophoto coordinate system from the orthophoto pose data at several imaging times, the second-dimensional minimum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data, and a preset flower top point algorithm, the initial flower top point is obtained at several imaging times. The flower top point algorithm is as follows: In the formula, For the first k The minimum second-dimensional coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. This is the vector in the second row of the orientation element matrix. Let be the rotation matrix in the orthophoto coordinate system within the orthophoto pose data. The initial flower top point, This refers to the translation vector in the orthophoto coordinate system within the orthophoto pose data. Based on the rotation matrix and translation vector in the orthophoto coordinate system from the orthophoto pose data at several imaging times, the second-dimensional maximum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data, and a preset flower base point algorithm, the initial flower base points at several imaging times are obtained, wherein the flower base point algorithm is as follows: In the formula, For the first k The second-dimensional maximum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. This is the initial base point of the flower; Based on the initial flower top point and initial flower base point at several imaging times, the nonlinear least squares problem optimization method is used to optimize and obtain the target flower top point and target flower base point of the flower to be measured.

6. The method for measuring flower data according to claim 5, characterized in that, The step of calculating the flower crown width based on the orthophoto pose data, target orthophoto mask pixel data, and the top point of the target flower at several imaging times, to obtain the flower crown width at several imaging times, includes the following steps: Based on the rotation matrix and translation vector in the orthorectified coordinate system from the orthorectified pose data at several imaging times, the top point of the target flower, and a preset coordinate algorithm, the coordinate values ​​of the top point of the target flower in the orthorectified coordinate system at several imaging times are obtained, wherein the coordinate algorithm is as follows: In the formula, For the top point of the target flower at the k The coordinates of the image in the orthophoto coordinate system at the next imaging moment. The target flower's top point; Based on the third row vector of the coordinates of the top point of the target flower in the orthorectified coordinate system at several imaging times, the first-dimensional maximum coordinate value and the first-dimensional minimum coordinate value of the target orthorectified mask pixel points in the target orthorectified mask pixel point data, and a preset flower crown width algorithm, the flower crown width at several imaging times is obtained, wherein the flower crown width algorithm is as follows: In the formula, For the first k Flower crown width at the next imaging moment For the first k The first-dimensional maximum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. For the first k The first-dimensional minimum coordinate value of the target orthophoto mask pixel in the target orthophoto mask pixel data at the next imaging time. The focal length parameter of the first camera. For the top point of the target flower at the k The direction value in the coordinates of the orthophoto coordinate system at the next imaging moment.

7. The method for measuring flower data according to claim 1 or 6, characterized in that, It also includes the following steps: Based on the top point, base point, height, and crown width of the target flower, a view matrix and a projection matrix are constructed to obtain the view matrix and projection matrix of the flower to be measured. An augmented reality scene is constructed based on the view matrix and projection matrix of the flower to be measured, and the constructed augmented reality scene is displayed in a preset display interface.

8. A flower data measuring device, characterized in that, include: The pose data acquisition module is used to obtain the initial pose data of the flower to be measured at several imaging times and the initial mask data of the flower imaging area. The first orthophoto transformation module is used to perform orthophoto coordinate system transformation based on the initial pose data at several imaging times to obtain orthophoto pose data at several imaging times. The second orthophoto transformation module is used to perform orthophoto coordinate system transformation on the initial mask data of the flower imaging region at the corresponding imaging time based on the initial pose data and orthophoto pose data at several imaging times, so as to obtain the orthophoto mask data of the flower imaging region at several imaging times. The pixel extraction module is used to extract the target orthomask pixels from the orthomask data of the flower imaging area at several imaging times, and obtain the target orthomask pixel data at several imaging times. The flower data measurement module is used to measure flower data based on the orthophoto pose data at several imaging times and the target orthophoto mask pixel data, to obtain the flower height and crown width of the flower to be measured.

9. A computer device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the flower data measurement method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a computer program that, when executed by a processor, implements the steps of the flower data measurement method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Hydroponic flower flowering stage flower grade evaluation method based on deep neural network

    CN111428990A

  • Plant point cloud data segmentation method and system

    CN113112504A