Plant height detection method, device, equipment and storage medium
By dividing the images captured by the target camera into regions and extracting information, the problems of large workload and low accuracy in plant height measurement were solved, and high-precision plant height measurement was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies for measuring plant height involve a large workload and have low accuracy, making them prone to errors.
By acquiring images captured by the target camera and combining them with height and parameter information, image processing and information extraction are performed using a preset region segmentation model to determine the height of the target plant region.
It reduces workload, avoids the influence of environmental factors, and improves measurement accuracy and precision.
Smart Images

Figure CN115700805B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of height detection technology, and in particular to a method, apparatus, equipment, and storage medium for detecting plant height. Background Technology
[0002] Photovoltaic panels in substations are a crucial source of electricity. Located outdoors, they are typically surrounded by weeds. During spring and summer, these weeds grow rapidly. If their height isn't monitored and cleared promptly, they can obstruct the photovoltaic panels, leading to significant power loss. Currently, weed height identification near substation photovoltaic panels relies mainly on manual visual inspection or infrared rangefinders. Manual inspection is the most intuitive but subjective, labor-intensive, and prone to errors. Infrared rangefinders are the most common method for measuring weed height near substation photovoltaic panels; however, they are susceptible to environmental influences, leading to inaccurate measurements.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a method, apparatus, device, and storage medium for detecting plant height, aiming to solve the technical problems of high workload, easy false detection, and low accuracy in measuring plant height in the prior art.
[0005] To achieve the above objectives, the present invention provides a method for detecting plant height, the method comprising the following steps:
[0006] Acquire the image to be processed captured by the target camera, and acquire the height information and parameter information of the target camera;
[0007] The image to be processed is divided into regions according to a preset region division model to obtain the target plant region image in the image to be processed.
[0008] The height of the target plant area is determined based on the image of the target plant area, the height information, and the parameter information.
[0009] Optionally, the step of dividing the image to be processed into regions according to a preset region division model to obtain the target plant region image in the image to be processed includes:
[0010] The image to be processed is processed using a preset image processing model to obtain a mask image of the target plant region.
[0011] Information is extracted from the image to be processed according to a preset information extraction model to obtain image depth information;
[0012] The target plant region image is determined based on the mask image of the target plant region and the image depth information.
[0013] Optionally, the step of processing the image to be processed using a preset image processing model to obtain a mask image of the target plant region includes:
[0014] The image to be processed is segmented according to a preset image segmentation model to obtain a plant segmentation image;
[0015] Extract the target plant distribution contour information from the plant segmentation image;
[0016] A mask image of the target plant region is determined based on the target plant distribution contour information and the plant segmentation image.
[0017] Optionally, before the step of segmenting the image to be processed according to a preset image segmentation model to obtain a segmented plant image, the method further includes:
[0018] Acquire the image samples to be processed captured by the target camera;
[0019] Extract the target plant dataset sample from the image to be processed;
[0020] The initial neural network model is trained based on the target dataset samples to obtain a preset image segmentation model.
[0021] Optionally, before the step of extracting information from the image to be processed according to a preset information extraction model to obtain image depth information, the method further includes:
[0022] Acquire the image samples to be processed captured by the target camera;
[0023] Extract image depth dataset samples from the image to be processed;
[0024] The initial neural network model is trained based on the deep dataset samples to obtain a preset information extraction model.
[0025] Optionally, the step of determining the target plant region image based on the target plant region mask image and the image depth information includes:
[0026] Extract the pixel values of each pixel in the mask image of the target plant region;
[0027] The depth information of the target plant is obtained by multiplying each pixel value in the mask image of the target plant region with the depth value of the corresponding pixel in the image depth information.
[0028] The target plant region image is determined based on the target plant depth information and the target plant region mask image.
[0029] Optionally, the step of determining the height of the target plant region based on the target plant region image, the height information, and the parameter information includes:
[0030] The straight-line distance between the target camera and the target plant is determined based on the parameter information of the target camera;
[0031] The relative distance between the target camera and the top of the target plant is determined based on the target plant depth information of the target plant area image and the parameter information of the target camera;
[0032] The height of the target plant area is determined based on the straight-line distance, the relative distance, and the height information of the target camera.
[0033] Furthermore, to achieve the above objectives, the present invention also provides a plant height measuring device, the plant height measuring device comprising:
[0034] The information acquisition module is used to acquire the image to be processed captured by the target camera, and to acquire the height information and parameter information of the target camera;
[0035] The image extraction module is used to divide the image to be processed into regions according to a preset region division model, and obtain the target plant region image in the image to be processed.
[0036] The height detection module is used to determine the height of the target plant area based on the target plant area image, the height information, and the parameter information.
[0037] Furthermore, to achieve the above objectives, the present invention also proposes a plant height measuring device, which includes: a memory, a processor, and a plant height measuring program stored in the memory and executable on the processor, the plant height measuring program being configured to implement the steps of the plant height measuring method as described above.
[0038] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a plant height measurement program, which, when executed by a processor, implements the steps of the plant height measurement method as described above.
[0039] This invention acquires the image to be processed captured by a target camera, along with the camera's height and parameter information. The image to be processed is then divided into regions to obtain the target plant region image. Finally, the height of the target plant is determined based on the target plant region image, the target camera's height information, and the parameter information. Compared to existing technologies that rely on manual identification of plant height or measurement with an infrared rangefinder, this invention divides the image to be processed using a preset region division model. This reduces the workload, avoids the reduction in measurement accuracy caused by environmental factors, and accurately distinguishes the target plant height to be measured, thus improving the measurement accuracy. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the structure of the plant height measuring device in the hardware operating environment involved in the embodiments of the present invention;
[0041] Figure 2 This is a flowchart illustrating the first embodiment of the plant height measurement method of the present invention;
[0042] Figure 3 This is a flowchart illustrating the second embodiment of the plant height measurement method of the present invention;
[0043] Figure 4 This is a structural block diagram of the first embodiment of the plant height measuring device of the present invention.
[0044] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0045] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0046] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a plant height measuring device in the hardware operating environment of an embodiment of the present invention.
[0047] like Figure 1As shown, the plant height measuring device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0048] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the plant height measuring device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0049] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a plant height measurement program.
[0050] exist Figure 1 In the plant height measuring device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the plant height measuring device of the present invention can be set in the plant height measuring device, and the plant height measuring device calls the plant height measuring program stored in the memory 1005 through the processor 1001 and executes the plant height measuring method provided in the embodiment of the present invention.
[0051] This invention provides a method for measuring plant height, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of a plant height measurement method according to the present invention.
[0052] In this embodiment, the plant height measurement method includes the following steps:
[0053] Step S10: Obtain the image to be processed captured by the target camera, and obtain the height information and parameter information of the target camera;
[0054] It should be noted that the executing entity of the method in this embodiment can be a plant height measuring device, which can be an electronic device such as a server, a control computer, or a handheld computer; it can also be other devices with the same or similar functions. This embodiment does not impose specific limitations, and this embodiment and the following embodiments will be described using a server as an example.
[0055] It is understood that the target camera can be a camera installed in the monitoring area. The camera can be a binocular integrated camera or a combination of two monocular cameras. In this embodiment, a binocular camera will be used as an example for explanation. The monitoring area is the area near the photovoltaic panels of the substation. When the camera is fixedly installed, the camera angle needs to be adjusted so that the camera can capture images of the plants and ground near the photovoltaic panels of the substation. The camera angle can be adjusted by remotely issuing commands from the server.
[0056] Understandably, the image to be processed is an image of the area near the photovoltaic panels of a substation taken by a binocular camera. This image contains the target plants and the ground image of the target plant area. After the binocular camera completes the shooting, the left view image and the right view image taken by the binocular camera are extracted and uploaded to the server.
[0057] It is worth noting that the height information of the target camera refers to the height of the camera from the ground when it is installed and fixed. Typically, the installation height of the target camera is adjusted to be approximately the height of the photovoltaic panels in a substation, for example, 70-90cm. Horizontal shooting mode is used to acquire images, which facilitates the acquisition of complete images of the target plant area. The parameter information of the target camera can be the focal length information and the baseline information of the target camera.
[0058] In a specific implementation, the camera captures images of weeds in the area near the photovoltaic panels of the substation. These images include both the weeds and the ground in the weed-covered area. After the capture is completed, the images are sent to the server for subsequent image processing.
[0059] Step S20: Divide the image to be processed into regions according to a preset region division model to obtain the target plant region image in the image to be processed;
[0060] It should be noted that the preset region segmentation model can be used to segment the image to be processed into regions, and to extract an image containing only the depth information of the target plant region from the image to be processed. The depth information of the target plant region can be the number of bits used by each pixel of the target plant image stored in the computer. The image containing only the depth information of the target plant region obtained after extracting the image to be processed is denoted as the target plant region image.
[0061] It is worth noting that, in order to obtain depth information of the target plant region, it is necessary to perform correction processing on the reference image of the target plant and the image to which the target plant belongs. The reference image is the left view of the image to be processed taken by the binocular camera; the image to which the target plant belongs is the right view of the image to be processed taken by the binocular camera. The correction processing of the reference image and the image to which the target plant belongs can be performed through a correction model. The role of the correction model is to reduce problems such as illumination, occlusion, noise and pixel depth discontinuity in the binocular camera image, so as to obtain a high-precision disparity map.
[0062] In the specific implementation, the received weed image is segmented according to the preset region division model to obtain a weed region image containing only weed depth information. The weed depth information can be the number of bits used to store each pixel of the weed image in the computer. Before extracting the weed depth information, the reference image of the weed region corresponding to the left view of the weed region and the image of the weed region corresponding to the right view of the weed region need to be corrected by a correction model. The correction model adopts a semi-global stereo algorithm, or other algorithms that can correct the left view and right view of the weed region. This embodiment does not impose specific limitations.
[0063] Step S30: Determine the height of the target plant area based on the target plant area image, the height information, and the parameter information.
[0064] It should be noted that, based on the baseline information of the same target camera, multiple images to be processed are obtained by adjusting the focal length of the target camera, the pixel depth values of the same target plant at different focal lengths are determined, and the straight-line distance between the target plant and the target camera is determined based on the functional relationship between multiple sets of pixel depth values and the corresponding focal lengths.
[0065] Understandably, the height difference between the target camera and the target plant can be determined based on the straight-line distance between the target camera and the target plant and the relative distance between the target camera and the top of the target plant. The height of the target plant area can then be determined based on the height difference and the height information of the target camera.
[0066] It is worth noting that the height of the target plant area can also be detected by establishing world coordinate system, camera coordinate system, image coordinate system, and pixel coordinate system, and calculating the height of the target plant area based on the mapping relationship between adjacent coordinates.
[0067] It is understood that the height of the target plant area usually represents the maximum height within the target plant area, that is, the maximum value of the height within the target plant area. This maximum height does not necessarily represent the general height of the target area. Therefore, it is necessary to perform statistical analysis on the obtained target plant area height to obtain a general height that can represent the target plant area. This can be achieved by weighted averaging of the target plant area height values, or by other methods that can obtain the general height of the target plant area. This embodiment does not impose specific limitations.
[0068] In a specific implementation, when the height of weeds in a general area reaches a preset height threshold, an early warning message will be generated and displayed to remind the user that the weeds need to be trimmed. The preset height threshold can be a standard value or can be set by the user. The early warning message can be a pop-up warning box on the display interface or other warning messages that can remind the user. This embodiment does not impose any specific limitations.
[0069] This embodiment acquires the image to be processed captured by the target camera, along with the target camera's height and parameter information. The image to be processed is then divided into regions to obtain the target plant region image. Finally, the height of the target plant is determined based on the target plant region image, the target camera's height information, and the parameter information. This embodiment divides the image to be processed using a preset region division model, reducing workload and avoiding the reduction in measurement accuracy caused by environmental factors. Determining the target plant's height based on the target plant region image, the target camera's height information, and the parameter information allows for accurate differentiation of the target plant's height, improving the measurement accuracy.
[0070] refer to Figure 3 , Figure 3 This is a flowchart illustrating a second embodiment of a plant height measurement method according to the present invention.
[0071] Based on the first embodiment described above, in this embodiment, step S20 includes:
[0072] Step S201: Perform image processing on the image to be processed using a preset image processing model to obtain a mask image of the target plant region;
[0073] It should be noted that the mask image is a binary image composed of 0s and 1s, and the size of the mask image is equal to the size of the reference image. The mask image is used to mark the target area of the reference image as 1 and other non-target areas as 0. That is, the pixel value of the target plant area in the reference image is 1 in the mask image, and the pixel value of other non-target plant areas in the reference image is 0 in the mask image.
[0074] Furthermore, in order to obtain a clear mask image of the target plant area, step S201 further includes:
[0075] The image to be processed is segmented according to a preset image segmentation model to obtain a plant segmentation image; the target plant distribution contour information is extracted from the plant segmentation image; and a target plant region mask image is determined based on the target plant distribution contour information and the plant segmentation image.
[0076] It is understood that the plant segmentation image is generated by inputting the left view of the original weed image into a preset image segmentation model to produce a segmented region image; the segmented region image contains basic information of the target plant and image features of the segmented region, the basic information including but not limited to: weed species, weed growth area, weed distribution density, weed distribution area, geographical location information of the collection point, etc.; the image features including but not limited to: image color threshold features, texture features, edge features, etc.
[0077] It should be noted that the preset image segmentation model can be a neural network model that segments the target plant region image to obtain a segmented plant image. The purpose of segmenting the target plant image is to facilitate the extraction of basic information and image features of the target plant region. The preset image segmentation model can be an image segmentation model based on the YOLOv4 neural network in the target detection network (You Only Look Once, YOLO), or other image segmentation models that can obtain a mask image of the target plant region. This embodiment does not impose specific limitations.
[0078] Furthermore, in order to obtain a preset image segmentation model, before the step of segmenting the image to be processed according to the preset image segmentation model to obtain the plant segmentation image, the method further includes:
[0079] Acquire the image samples to be processed captured by the target camera;
[0080] Extract the target plant dataset sample from the image to be processed;
[0081] The initial neural network model is trained based on the target dataset samples to obtain a preset image segmentation model.
[0082] Understandably, the target plant dataset can be constructed from images of crop seedlings and associated weeds collected by cameras under different plots, different light intensities, and different soil backgrounds. The target plant data and samples are constructed by randomly selecting samples from the target plant dataset according to a preset ratio to form training set samples, validation set samples, and test set samples. The target plants in the training set samples, validation set samples, and test set samples are classified and labeled. The preset ratio can be 8:1:1 for the training set samples, validation set samples, and test set samples.
[0083] It should be noted that the classification and labeling of the target plant can be done using Labelme labeling software with classification and labeling functions, or other labeling software with labeling functions. This embodiment does not impose any specific restrictions.
[0084] In practical implementation, since the area near the photovoltaic panels of the substation may not be entirely covered by weeds, it is necessary to classify and label the weed information. Only the height of the classified and labeled weeds needs to be measured, which can reduce the workload and improve work efficiency. In the image segmentation process of the weed area, it is necessary to filter based on one or more of the basic information of the weed area, such as weed type, weed growth area, and weed distribution density, to reduce the workload.
[0085] It is worth noting that during the classification and labeling of target plants, classification errors in the target plant dataset often occur. Therefore, in this embodiment, a category confidence threshold can be set in the preset image segmentation model. The category confidence threshold is a value used to determine whether the predicted result should be attributed to the target plant class. It can filter out incorrect classification labels. If the confidence of the prediction result is greater than or equal to the threshold, the prediction result is accepted; if the confidence of the prediction result is less than the threshold, the prediction result is rejected. The category confidence threshold can be obtained from field experiments or a preset value. For example, if the category confidence threshold is preset to 0.8 in the preset image segmentation model, when the obtained category confidence is 0.7, the classification label is considered incorrect and is not recorded; when the obtained category confidence is 0.9, the classification label is considered successful, the classification label box is obtained, and the labeling result is stored.
[0086] In the specific implementation, during the process of obtaining the classification and labeling of weed areas, the classification and labeling boxes may shift, resulting in incomplete segmentation of the weed areas. Therefore, in this embodiment, an Intersection over Union (IoU) threshold can be set. The IoU threshold is used to determine whether the predicted segmented weed areas can be used as the final segmented area. If the IoU ratio of the predicted segmented weed areas is greater than or equal to the IoU threshold, the predicted segmented weed areas are considered valid; if the IoU ratio is less than the IoU threshold, the predicted segmented weed areas are considered invalid. The IoU threshold can be determined by obtaining a value from field experiments or by setting a preset value. In this embodiment, the preset IoU threshold is 0.5. When the obtained IoU value is 0.1, the segmentation of the weed area image is considered invalid; when the obtained IoU value is 0.9, the segmentation of the weed area image is considered valid. Based on the effectively segmented weed area image, a weed mask image is extracted.
[0087] Step S202: Extract information from the image to be processed according to the preset information extraction model to obtain image depth information;
[0088] It should be noted that image depth information refers to depth image information obtained by using the depth value of each pixel in the target plant area image as the pixel value. This depth image information is obtained by inputting the left view of the originally acquired weed image into a preset information extraction model.
[0089] It is worth noting that, in order to obtain image depth information, it is necessary to perform correction processing on the reference image and the corresponding image. The correction processing on the reference image and the corresponding image can be performed through a correction model. The role of the correction model is to reduce problems such as illumination, occlusion, noise and pixel depth discontinuity in the binocular camera image, and obtain a high-precision disparity map.
[0090] In a specific implementation, the image depth information can be the number of bits used to store each pixel of the image in the computer. Before extracting the image depth information, the reference image of the image region corresponding to the left view of the image region and the image region corresponding to the right view of the image region need to be corrected by a correction model. The correction model adopts a semi-global stereo algorithm, or other algorithms that can correct the left view and right view of the image region. This embodiment does not impose specific limitations.
[0091] Furthermore, in order to obtain the preset information extraction model, before step S202, the method further includes: acquiring image samples to be processed captured by the target camera; extracting image depth dataset samples from the image samples to be processed; and training the initial neural network model based on the image depth dataset samples to obtain the preset information extraction model.
[0092] It should be noted that the initial neural network model is trained based on the image depth dataset samples to obtain a preset information extraction model. The preset information extraction model can be a semi-global matching neural network model based on Convolutional Neural Networks (CNN), or other neural network models that can extract image depth information. This embodiment does not impose specific limitations.
[0093] Step S203: Determine the target plant region image based on the target plant region mask image and the image depth information.
[0094] It should be noted that the target plant region image is an image that only contains the depth information of the target plant. The target plant region image is obtained by extracting the pixel values of each pixel in the target plant region mask image, multiplying each pixel value in the target plant region mask image by the depth value of the corresponding pixel in the image depth information to obtain the depth information of the target plant region, and finally determining the target plant region image based on the depth information of the target plant region and the target plant region mask image.
[0095] In a specific implementation, the depth information of the weed area can be the number of bits used by each pixel of the weed image stored in the computer. Since the information contained in the weed area image consists of 0 and 1, where the area where the weeds are located is 1 and other areas are 0, after multiplication, only the depth information of the weed area is retained.
[0096] This embodiment acquires the image to be processed captured by the target camera, along with the target camera's height and parameter information. Image processing is performed on the image to obtain a target plant mask image. Information extraction is then performed on the image to obtain image depth information. Finally, the height of the target plant is determined based on the target plant region mask image, image depth information, target camera height information, and parameter information. This embodiment obtains more accurate target plant region image information by processing the image to obtain the target plant mask image and extracting image depth information from the image to obtain the target plant mask image. This avoids the reduction in measurement accuracy caused by environmental factors. Furthermore, determining the target plant height based on the target plant region image, target camera height information, and parameter information allows for accurate differentiation of the target plant height to be measured and improves the measurement accuracy of the target plant height.
[0097] Furthermore, embodiments of the present invention also propose a storage medium storing a plant height measurement program, which, when executed by a processor, implements the steps of the plant height measurement method described above.
[0098] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0099] Reference Figure 4 , Figure 4 This is a structural block diagram of the first embodiment of the plant height measuring device of the present invention.
[0100] like Figure 4 As shown, the plant height measuring device proposed in this embodiment of the invention includes:
[0101] The information acquisition module 10 is used to acquire the image to be processed captured by the target camera, and to acquire the height information and parameter information of the target camera;
[0102] Image extraction module 20 is used to divide the image to be processed into regions according to a preset region division model to obtain the target plant region image in the image to be processed;
[0103] The height detection module 30 is used to determine the height of the target plant based on the target plant area image, the height information, and the parameter information.
[0104] This embodiment acquires the image to be processed captured by the target camera, along with the target camera's height and parameter information. The image to be processed is then divided into regions to obtain the target plant region image. Finally, the height of the target plant is determined based on the target plant region image, the target camera's height information, and the parameter information. This embodiment divides the image to be processed using a preset region division model, reducing workload and avoiding the reduction in measurement accuracy caused by environmental factors. Determining the target plant's height based on the target plant region image, the target camera's height information, and the parameter information allows for accurate differentiation of the target plant's height, improving the measurement accuracy.
[0105] In one embodiment, the image extraction module 20 is further configured to perform image processing on the image to be processed using a preset image processing model to obtain a mask image of the target plant region; extract information from the image to be processed using a preset information extraction model to obtain image depth information; and determine the target plant region image based on the mask image of the target plant region and the image depth information.
[0106] In one embodiment, the image extraction module 20 is further configured to perform image segmentation on the image to be processed according to a preset image segmentation model to obtain a plant segmentation image; extract target plant distribution contour information from the plant segmentation image; and determine a target plant region mask image based on the target plant distribution contour information and the plant segmentation image.
[0107] In one embodiment, the image extraction module 20 is further configured to acquire image samples to be processed captured by the target camera; extract target plant dataset samples from the image samples to be processed; and train an initial neural network model based on the target dataset samples to obtain a preset image segmentation model.
[0108] In one embodiment, the image extraction module 20 is further configured to acquire image samples to be processed captured by the target camera; extract image depth dataset samples from the image samples to be processed; and train an initial neural network model based on the depth dataset samples to obtain a preset information extraction model.
[0109] In one embodiment, the image extraction module 20 is further configured to extract the pixel values of each pixel in the target plant region mask image; multiply each pixel value in the target plant region mask image by the corresponding depth value of the pixel in the image depth information to obtain target plant depth information; and determine the target plant region image based on the target plant depth information and the target plant region mask image.
[0110] In one embodiment, the height detection module 30 is further configured to determine the straight-line distance between the target camera and the target plant based on the parameter information of the target camera; determine the relative distance between the target camera and the top of the target plant based on the target plant depth information of the target plant area image and the parameter information of the target camera; and determine the height of the target plant area based on the straight-line distance, the relative distance, and the height information of the target camera.
[0111] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0112] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0113] In addition, for technical details not described in detail in this embodiment, please refer to the plant height measurement method provided in any embodiment of the present invention, which will not be repeated here.
[0114] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0115] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0116] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0117] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A plant height detection method characterized by, The plant height detection method comprises: acquiring a target camera to shoot a to-be-processed image, and acquiring height information and parameter information of the target camera; dividing a region of the to-be-processed image according to a preset region division model to obtain a target plant region image in the to-be-processed image; determining a target plant region height according to the target plant region image, the height information and the parameter information; the step of dividing the region of the to-be-processed image according to the preset region division model to obtain the target plant region image in the to-be-processed image comprises: performing image processing on the to-be-processed image according to a preset image processing model to obtain a target plant region mask image; extracting information from the to-be-processed image according to a preset information extraction model to obtain image depth information; extracting pixel values of each pixel point in the target plant region mask image; multiplying the pixel values in the target plant region mask image with corresponding depth values of pixel points in the image depth information respectively to obtain target plant depth information; determining a target plant region image according to the target plant depth information and the target plant region mask image; the step of determining the target plant region height according to the target plant region image, the height information and the parameter information comprises: determining a straight-line distance between the target camera and a target plant based on the parameter information of the target camera; determining a relative distance between the target camera and a top of the target plant according to target plant depth information of the target plant region image and the parameter information of the target camera; determining a target plant region height based on the straight-line distance, the relative distance and the height information of the target camera.
2. The plant height detection method according to claim 1, wherein the step of performing image processing on the to-be-processed image according to a preset image processing model to obtain a target plant region mask image comprises: performing image segmentation on the to-be-processed image according to a preset image segmentation model to obtain a plant segmentation image; extracting target plant distribution contour information from the plant segmentation image; determining a target plant region mask image based on the target plant distribution contour information and the plant segmentation image.
3. The plant height detection method according to claim 2, wherein Before the step of performing image segmentation on the to-be-processed image according to a preset image segmentation model to obtain a plant segmentation image, the method further comprises: acquiring a to-be-processed image sample shot by a target camera; extracting a target plant dataset sample from the to-be-processed image sample; performing model training on an initial neural network model according to the target plant dataset sample to obtain a preset image segmentation model.
4. The plant height detection method according to claim 1, wherein Before the step of extracting information from the to-be-processed image according to a preset information extraction model to obtain image depth information, the method further comprises: acquiring a to-be-processed image sample shot by a target camera; extracting an image depth dataset sample from the to-be-processed image sample; performing model training on an initial neural network model according to the image depth dataset sample to obtain a preset information extraction model.
5. A plant height detection apparatus characterized by comprising: The plant height detection device comprises: The information acquisition module is configured to acquire a to-be-processed image captured by a target camera and acquire height information and parameter information of the target camera. The image extraction module is configured to perform region division on the to-be-processed image according to a preset region division model to obtain a target plant region image in the to-be-processed image. The height detection module is configured to determine a target plant region height according to the target plant region image, the height information and the parameter information. The step of performing region division on the to-be-processed image according to a preset region division model to obtain a target plant region image in the to-be-processed image comprises: performing image processing on the to-be-processed image according to a preset image processing model to obtain a target plant region mask image; performing information extraction on the to-be-processed image according to a preset information extraction model to obtain image depth information; extracting pixel values of each pixel point in the target plant region mask image; multiplying each pixel value in the target plant region mask image with a corresponding depth value of a corresponding pixel point in the image depth information to obtain target plant depth information; determining a target plant region image according to the target plant depth information and the target plant region mask image; The step of determining a target plant region height according to the target plant region image, the height information and the parameter information comprises: determining a straight-line distance between the target camera and a target plant based on the parameter information of the target camera; determining a relative distance between the target camera and a top of the target plant according to target plant depth information of the target plant region image and the parameter information of the target camera; determining a target plant region height based on the straight-line distance, the relative distance and the height information of the target camera.
6. A plant height detection apparatus characterized by comprising: The plant height detection device comprises a memory, a processor and a plant height detection program stored on the memory and executable on the processor, and the plant height detection program is configured to implement the plant height detection method according to any one of claims 1 to 4.
7. A storage medium, characterized by The storage medium stores a plant height detection program, and the plant height detection program is executed by the processor to implement the plant height detection method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Measuring method and measuring device for height of human body based on binocular vision technique
CN104173054A
Portable long-distance plant size measuring instrument and measuring method thereof
CN110749286A
Real-time remote vegetation monitoring system
CN212058660U