Incubator plant parameter calculation analysis method, system and device based on double cameras
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG TUOPUYUN AGRI SCI & TECH CO LTD
- Filing Date
- 2026-05-08
- Publication Date
- 2026-08-07
AI Technical Summary
然而,在实际应用中,该双相机装置仍面临显著的技术瓶颈:
1、本发明通过植株区域扩展、边界限制及颜色阈值分割等预处理步骤,有效剔除背景干扰,生成高精度二值图,为后续参数计算奠定坚实基础。相较于传统单相机检测方法,本方案利用第二个相机的视角,分析植株距相机的距离信息,计算相应比例尺参数,从而进行植株参数的高精度分析,让株高、冠幅等参数的计算更贴合植株实际生长状态,适用于各类盆栽作物的生长监测场景。
Smart Images

Figure CN122134730B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, system and device for calculating and analyzing plant parameters in a dual-camera incubator. Background Technology
[0002] In the fields of modern agricultural breeding and plant physiology research, monitoring plant growth is a core step in revealing growth patterns, optimizing breeding programs, and selecting superior varieties. The accurate acquisition and analysis of plant morphological parameters (such as plant height, crown width, stem diameter, number and area of leaves) directly relates to the scientific assessment of plant growth status, providing crucial data support for breeders and ultimately affecting breeding efficiency and the reliability of research results.
[0003] To achieve continuous and efficient monitoring of plant growth in incubators, existing technologies have proposed a dual-camera image acquisition scheme. This involves installing cameras on the top and side of the incubator to acquire real-time top-down and side-view images of the plants, and then calculating relevant phenotypic parameters based on image analysis techniques. Compared to traditional manual measurement or single-camera monitoring, this scheme can capture more comprehensive three-dimensional growth information of the plants, improving the automation level of monitoring to a certain extent. However, in practical applications, this dual-camera device still faces significant technical bottlenecks:
[0004] On the one hand, the randomness of the plant placement in the incubator (such as deviations in sowing location, plant tilting or lodging during growth) means that the distance between the plant and the side camera is always uncertain. Furthermore, the measurement of plant size in the side view image relies on the conversion of the distance between the camera and the object being measured. This uncertainty makes it impossible to accurately calculate parameters such as plant height and stem diameter using a fixed scale, easily leading to measurement errors. On the other hand, plants undergo continuous morphological changes during growth (such as increased plant height and canopy expansion). Relative to the top-view camera, the reference plane for actual imaging (i.e., the plane where the plant canopy or growth point is located) will continuously move upward or change with the growth process, causing the calibration plane of the top-view camera (usually set based on the initial culture medium surface) to mismatch with the actual imaging plane, further affecting the measurement accuracy of parameters such as canopy width and leaf distribution.
[0005] To address the instability of calibration plane and distance parameters caused by the uncertainty of plant location and growth dynamics, it is difficult to meet the demand for high-precision phenotypic data in breeding research.
[0006] This invention proposes a method, system, and device for calculating and analyzing plant parameters in a culture chamber based on dual cameras. It can dynamically adapt to the calibration method of plant position changes and growth process, so as to solve the technical defects of existing single-camera devices in parameter calculation and provide more reliable technical support for the accurate monitoring of plants in the culture chamber. Summary of the Invention
[0007] The purpose of this invention is to provide a method, system, and device for calculating and analyzing plant parameters in a dual-camera incubator in order to solve the above-mentioned problems.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: A method for calculating and analyzing plant parameters in a dual-camera incubator, including: S100: Collect top view and side view images of the plants in the incubator, respectively; S200: Utilizes deep learning detection algorithms to detect the plant area and the potting area in the side view and top view images; S300: Preprocess the acquired side view and top view images to segment out side view binary images and top view binary images containing only the plant. S400: Calculate the ordinate values of the leftmost and rightmost points in the side view binary image, and the abscissa values of the leftmost and rightmost points in the top view binary image, respectively. S500: Calculate the new scale of the plant's side view image and top view image using the linear scaling method; S600: Calculate the morphological parameters of the plant in side and top views based on a new scale of the plant's side and top views.
[0009] Preferably, the step of using a deep learning detection algorithm to detect the plant area and the cultivation pot area in the side view image and the top view image specifically includes: S201: Collect various potted plants, and collect plants of different heights for each plant type; S202: Place the collected potted plants in an incubator and capture an image from the top-view camera and a side-view camera respectively to obtain a side view image and a top view image of one side of the plant. Then rotate the plant 90 degrees relative to the side-view camera and capture another top view image and a side view image. Rotate each plant 4 times to obtain 4 side view images and 4 top view images for each plant, thus obtaining the training set for deep learning. S203: Classify and label the side view and top view images, and use rectangles to frame the plant area and the pot area in the image respectively. S204: Divide the labeled image dataset into training, validation and test sets. Input the divided dataset into YOLOv5 model for training to obtain a depth detection model that can detect plant areas and pot areas. S205: Based on the trained deep learning detection model, detect the plant area and the pot area in the side view and top view images.
[0010] Preferably, the preprocessing of the acquired side view and top view images to segment out a side view binary image and a top view binary image containing only the plant specifically includes: S301: Based on detected plant regions The detected plant area is expanded outwards, with an expansion ratio of 1 / 2. Then the number of pixels that expand outward is ; S302: Based on the number of pixels extended outwards To prevent the expansion from exceeding the image boundaries, the plant area is... Restrictions were applied in the top, bottom, left, and right directions to obtain the treatment area for the new plant. Set up a new plant treatment area The coordinates of the top left point are The coordinates of the lower right point are .
[0011] Preferably, the method further includes: S303: For the culture tray area Without performing boundary expansion processing, only processing is performed to restrict the area from exceeding the image boundary, resulting in a new culture basin region. Let the coordinates of the upper left point of the new culture pot treatment area be... The coordinates of the lower right point are ; S304: Based on the new culture tray area New plant treatment area Compare the side view image with the top view image in areas not in the culture pot. and plant treatment area The pixels are assigned a value of 0. The area is divided into green and yellow sections; New plant area The yellow and green pixels are assigned a value of 255 for the culture pot area. The green part is assigned a value of 255, resulting in the preprocessed side view binary image and top view binary image.
[0012] Preferably, the step of calculating the ordinate values of the leftmost and rightmost points in the side-view binary image, and the abscissa values of the leftmost and rightmost points in the top-view binary image, specifically includes: S401: Based on the side-view binary image, find the set of points representing the outer contour of the image, and calculate the point with the minimum x-coordinate in the set. side_left_point The point with the largest x-coordinate in the set of points is... side_right_point The leftmost point of the side-view binary image can be obtained. side_left_point And the rightmost point side_right_point ordinate value side_left_y and side_right_ y .
[0013] Preferably, the method further includes: S402: Based on the top-view binary image, find the set of points representing the outer contour of the image, and calculate the point with the minimum x-coordinate in the set. top_left_point The point with the largest x-coordinate in the set of points is... top_right_point The leftmost point of the top-view binary graph can be obtained. top_left_point And the rightmost point top_right_point x-coordinate value top_left_x and top_right_x .
[0014] Preferably, the step of calculating the new scale of the plant's side view image and top view image using the linear scaling method specifically includes: S501: Place the calibration plate on the side of the incubator opposite the side camera. After the calibration plate is placed, the side camera will capture one calibration image and the top camera will capture one calibration image. Then place the calibration plate on the bottom surface opposite the top camera. After the calibration plate is placed, the top camera will capture one calibration image and the side camera will capture one calibration plate image. S502: Calculate the side-view reference scale based on the calibration image from the side-view camera. side_base_rate Based on the calibration images from the top-view camera, the top-view reference scale is calculated as follows: top_base_rate ; S503: Analyze the position of the calibration board on the side-view camera calibration image. position_ side and the number of pixels between the top-view camera and the calibration board. side_ps Based on the calibration images from the top-view camera, the position of the calibration board in the top-view camera calibration images is analyzed. position_top The number of pixels between the side-view camera and the calibration board top_ps ; S504: Based on the leftmost point of the top-view binary map top_left_point And the rightmost point top_right_point x-coordinate value top_left_x and top_right_x The position of the calibration plate in the calibration image of the side-view camera. position_side Number of pixels between the top-view camera and the calibration board side_psThe new scale of the side view image is calculated. new_side_rate ; S505: Based on the leftmost point of the side-view binary map side_left_point And the rightmost point side_right_point The vertical coordinate value and the horizontal coordinate value side_left_y and side_right_y The position of the calibration plate in the calibration image of the side-view camera. position_top Number of pixels between the top-view camera and the calibration board top_ps To obtain a new scale for the side view image new_top_rate .
[0015] Preferably, the calculation of the plant's morphological parameters in side and top views based on a new scale of the plant's side and top views specifically includes: Based on the plant images segmented from the side view binary image and the top view binary image, the side view image of the plant is used to calculate the plant height, plant width, stem diameter, and side view projected area, while the top view image of the plant is used to analyze the plant crown width, maximum spread, and top view projected area.
[0016] A dual-camera-based incubator plant parameter calculation and analysis system includes: Dual-camera image acquisition module: The side-view camera and top-view camera that come with the incubator are used to acquire side-view and top-view images of the plants in the incubator, respectively. Plant and pot region detection module: Based on a dataset constructed from images of potted plants of multiple types and angles, a YOLOv5 deep learning model is trained. Image preprocessing and binary image generation module: The detected plant area is scaled up and its boundaries are restricted, while the culture pot area is restricted only. The target area is then segmented using the set green and yellow pixel thresholds to generate side view binary images and top view binary images containing only the plant. Binary image feature point coordinate extraction module: extracts the ordinates of the leftmost and rightmost points of the outer contour of the side view binary image, and the abscissas of the leftmost and rightmost points of the outer contour of the top view binary image; Dual-camera image new scale calibration module: The reference scale is calculated by acquiring multiple sets of calibration images through the calibration plate, and the new scale of the side view image and the top view image is derived by combining the feature point coordinates of the binary image with the calibration parameters and using the linear scale mapping method. Plant morphology parameter calculation module: Based on the calibrated new scale, the plant pixel information of the side view and top view binary images is converted into the corresponding side view and top view morphology parameters.
[0017] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements all steps of a method for calculating and analyzing plant parameters in a dual-camera incubator.
[0018] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. This invention effectively removes background interference and generates a high-precision binary image through preprocessing steps such as plant region expansion, boundary restriction, and color threshold segmentation, laying a solid foundation for subsequent parameter calculations. Compared to traditional single-camera detection methods, this solution utilizes the perspective of a second camera to analyze the distance information between the plant and the camera, calculates the corresponding scale parameters, and thus performs high-precision analysis of plant parameters. This makes the calculation of parameters such as plant height and crown width more consistent with the actual growth state of the plant, making it suitable for growth monitoring scenarios of various potted crops.
[0019] 2. This invention employs a linear scaling method to calibrate the dual-camera reference scale based on a calibration board. By combining the contour feature points of the top and side view binary images, a new scale adapted to the current position of the plant is dynamically calculated, solving the problem of parameter calculation deviation caused by changes in the plant's placement position in traditional fixed scales. The side view image and the top view image have a clear division of labor, and can simultaneously calculate various morphological parameters such as plant height, stem diameter, crown width, and projected area. Length and area parameters are accurately converted using the scale and the square of the scale, respectively, and the entire detection and calculation process can be completed without manual intervention. Attached Figure Description
[0020] Further details, features, and advantages of this application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which: Figure 1 This is a structural diagram of the method of the present invention; Figure 2 This is a system flowchart of the present invention; Figure 3 A schematic diagram showing the camera installation inside the incubator; Figure 4 This is a side-view binary image; Figure 5 This is a top-view binary image. Detailed Implementation
[0021] Several embodiments of this application will now be described in more detail with reference to the accompanying drawings to enable those skilled in the art to implement this application. This application may be embodied in many different forms and for various purposes and should not be limited to the embodiments set forth herein. These embodiments are provided to make this application thorough and complete, and to fully convey the scope of this application to those skilled in the art. The embodiments described do not limit this application.
[0022] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It will be further understood that terms such as those defined in commonly used dictionaries shall be interpreted as having a meaning consistent with their meaning in the relevant field and / or the context of this specification, and shall not be interpreted in an idealized or overly formal sense unless expressly defined herein.
[0023] Example 1 Its specific implementation method is combined with the appendix Figure 1 and attached Figure 2 Please provide a detailed explanation.
[0024] Appendix Figure 1 The flowchart of the plant parameter calculation and analysis method based on dual cameras in a culture box provided in this embodiment of the invention shows the complete steps from acquiring top and side view images of plants in the culture box to calculating the morphological parameters of the plants in the side and top views.
[0025] Appendix Figure 2 The diagram below shows the structure of a dual-camera-based plant parameter calculation and analysis system for an embodiment of the present invention. It illustrates the connection between the dual-camera image acquisition module and the plant morphology parameter calculation module, and marks the main functional interaction flow of each module.
[0026] In this embodiment, it includes: S100: Top view and side view images of the plants in the incubator are acquired by a side view camera and a top view camera, respectively. S200: Based on the acquired side view and top view images of the plant, a deep learning detection algorithm is used to detect the plant area and the culture pot area in the side view and top view images. Specifically, it includes: S201: Collect various potted plants, such as rice, wheat, corn, sorghum, cucumber, and as many plant types as possible. For each plant type, collect plants of different height ranges to ensure the diversity and richness of the dataset. S202: Place the collected potted plants in an incubator and capture an image from the top-view camera and a side-view camera respectively, to obtain a side view image and a top view image of one side of the plant. Then rotate the plant 90 degrees relative to the side-view camera and capture another top view image and a side view image. Repeat the above method, rotating each plant 4 times, to obtain 4 side view images and 4 top view images for each plant. Following the above image capture logic, capture images of all the collected plants in sequence to obtain the training set for deep learning. S203: Based on the acquired image training set, the side view images and top view images are classified and labeled, and the plant area and the cultivation pot area in the image are respectively outlined with a rectangle. S204: Divide the labeled image dataset into training, validation and test sets in a 7:2:1 ratio. Then, use the divided dataset to train the YOLOv5 model to obtain a depth detection model that can detect plant areas and potting areas. S205: Based on the trained deep learning detection model, detect the plant area and the pot area in the side view and top view images.
[0027] S300: Based on the detected plant area and pot area, the acquired side view image and top view image are preprocessed to segment out a side view binary image and a top view binary image containing only the plant. Specifically, it includes: S301: Based on detected plant regions The detected plant area is expanded outwards, with an expansion ratio of 1 / 2. Then the number of pixels that expand outward is ,but The calculation method is as follows:
[0028] in: , , , Plant areas The coordinates of the top left and bottom right points.
[0029] S302: Based on the number of pixels extended outwards To prevent the expansion from exceeding the image boundaries, the plant area is... Restrictions were applied in the top, bottom, left, and right directions to obtain the treatment area for the new plant. Set up a new plant treatment area The coordinates of the top left point are The coordinates of the lower right point are Then point With point The calculation method is as follows: ; ; ; ; in: The width of the input image. The height of the input image.
[0030] S303: For the culture tray area Without performing boundary expansion processing, only processing is performed to restrict the area from exceeding the image boundary, resulting in a new culture basin region. Let the coordinates of the upper left point of the new culture pot treatment area be... The coordinates of the lower right point are Then point With point The calculation method is as follows: ; ; ; ; S304: Based on the new culture tray area New plant treatment area Compare the side view image with the top view image in areas not in the culture pot. and plant treatment area The pixels are assigned a value of 0. The area is divided into green and yellow sections. The criteria for determining green are as follows: ( g 2>( b + r ) 1.15&( b + g + r )>30& r > b 1.1& g >1.1 r ); in: r , g , b The values represent the red, green, and blue channel pixel values in the image. "&" represents the "AND" operation.
[0031] The criteria for determining yellow are as follows: ( g >1.25 b & r >1.2 b &( g + r )> b 2.2&( b + g + r )>60&abs(g - r <10) Where: "abs" means taking the absolute value.
[0032] New plant area The yellow and green pixels are assigned a value of 255 for the culture pot area. The green part is assigned a value of 255, resulting in the preprocessed side view binary image and top view binary image.
[0033] S400: Based on the segmented side view binary map and top view binary map, calculate the ordinate values of the leftmost and rightmost points in the side view binary map, and the abscissa values of the leftmost and rightmost points in the top view binary map, respectively. Specifically, it includes: S401: Based on the side-view binary image, find the set of points representing the outer contour of the image, and calculate the point with the minimum x-coordinate in the set. side_left_point The point with the largest x-coordinate in the set of points is... side_right_point The leftmost point of the side-view binary image can be obtained. side_left_point And the rightmost point side_right_point ordinate value side_left_y and side_right_ y .
[0034] S402: Based on the top-view binary image, find the set of points representing the outer contour of the image, and calculate the point with the minimum x-coordinate in the set. top_left_point The point with the largest x-coordinate in the set of points is... top_right_point The leftmost point of the top-view binary graph can be obtained. top_left_point And the rightmost point top_right_point x-coordinate value top_left_x and top_right_x .
[0035] S500: Based on the ordinate values of the leftmost and rightmost points of the side view binary image and the abscissa values of the leftmost and rightmost points of the top view binary image, the new scale of the plant's side view image and top view image is calculated using the linear scaling method. Specifically, it includes: S501: Place the calibration plate on the side of the incubator opposite the side camera. After the calibration plate is placed, the side camera will capture one calibration image and the top camera will capture one calibration image. Then, place the calibration plate on the bottom surface opposite the top camera. After the calibration plate is placed, the top camera will capture one calibration image and the side camera will capture one calibration plate image. The calibration plate can be a flat plate with specific calibration objects, which can be used to convert scales, and is not limited to the form of the calibration plate. S502: Calculate the side-view reference scale based on the calibration image from the side-view camera. side_base_rateBased on the calibration images from the top-view camera, the top-view reference scale is calculated as follows: top_base_rate ; S503: Analyze the position of the calibration board on the side-view camera calibration image. position_ side and the number of pixels between the top-view camera and the calibration board. side_ps Based on the calibration images from the top-view camera, the position of the calibration board in the top-view camera calibration images is analyzed. position_top The number of pixels between the side-view camera and the calibration board top_ps ; S504: Based on the leftmost point of the top-view binary map top_left_point And the rightmost point top_right_point x-coordinate value top_left_x and top_right_x The position of the calibration plate in the calibration image of the side-view camera. position_side Number of pixels between the top-view camera and the calibration board side_ps The new scale of the side view image is calculated. new_side_rate : ; S505: Based on the leftmost point of the side-view binary map side_left_point And the rightmost point side_right_point The vertical coordinate value and the horizontal coordinate value side_left_y and side_right_y The position of the calibration plate in the calibration image of the side-view camera. position_top Number of pixels between the top-view camera and the calibration board top_ps To obtain a new scale for the side view image new_top_rate : .
[0036] S600: Calculate the morphological parameters of the plant in side and top views based on a new scale of the plant's side and top views. Specifically, it includes: Binary images based on plant side views side_binary With top view binary map top_binary The segmented plant images are used to calculate the plant height, width, stem diameter, and side-view projected area. The top-view images are used to analyze the plant crown width, maximum spread, and top-view projected area. For length-type parameters, the number of pixels is multiplied by the corresponding scale data. For area-type parameters, the number of pixels is multiplied by the square of the corresponding scale. The specific calculation methods for each parameter will not be elaborated here.
[0037] Example 2 Please see Figure 2 The dual-camera-based incubator plant parameter calculation and analysis system includes the following components: Dual-camera image acquisition module: The side-view camera and top-view camera that come with the incubator are used to acquire side-view and top-view images of the plants in the incubator, respectively. Plant and pot area detection module: Based on a dataset constructed from images of potted plants of multiple types and angles, a YOLOv5 deep learning model is trained to achieve accurate detection of plant and pot areas in side and top view images. Image preprocessing and binary image generation module: The detected plant area is scaled up and its boundaries are restricted, while the culture pot area is restricted only. The target area is then segmented using the set green and yellow pixel thresholds to generate side view binary images and top view binary images containing only the plant. Binary image feature point coordinate extraction module: extracts the ordinates of the leftmost and rightmost points of the outer contour of the side view binary image, and the abscissas of the leftmost and rightmost points of the outer contour of the top view binary image; Dual-camera image new scale calibration module: The reference scale is calculated by acquiring multiple sets of calibration images through the calibration plate, and the new scale of the side view image and the top view image is derived by combining the feature point coordinates of the binary image with the calibration parameters and using the linear scale mapping method. Plant morphology parameter calculation module: Based on the calibrated new scale, the plant pixel information of the side view and top view binary images is converted into the corresponding side view and top view morphological parameters such as plant height, plant width, and crown width.
[0038] Example 3 A computer-readable storage medium storing a computer program, which, when executed by a processor, implements all steps of a method for calculating and analyzing plant parameters in a dual-camera incubator.
[0039] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0040] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
[0041] It should be noted that, in this document, the use of relational terms such as "first" and "second" is merely for distinguishing one entity or operation from another, and does not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0042] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0043] 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 technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0044] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0045] 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.
[0046] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0047] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0048] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A method for calculating and analyzing plant parameters in a dual-camera incubator, characterized in that, include: S100: Collect top view and side view images of the plants in the incubator, respectively; S200: Utilizes deep learning detection algorithms to detect the plant area and the potting area in the side view and top view images; S300: Preprocess the acquired side view and top view images to segment out side view binary images and top view binary images containing only the plant, specifically including: S301: Based on detected plant regions The detected plant area is expanded outwards, with an expansion ratio of 1 / 2. Then the number of pixels that expand outward is ; S302: Based on the number of pixels extended outwards To prevent the expansion from exceeding the image boundaries, the plant area is... Restrictions were applied in the top, bottom, left, and right directions to obtain the treatment area for the new plant. Set up a new plant treatment area The coordinates of the top left point are The coordinates of the lower right point are ; Also includes: S303: For the culture tray area Without performing boundary expansion processing, only processing is performed to restrict the area from exceeding the image boundary, resulting in a new culture basin region. Let the coordinates of the upper left point of the new culture pot treatment area be... The coordinates of the lower right point are ; S304: Based on the new culture tray area New plant treatment area Compare the side view image with the top view image in areas not in the culture pot. and plant treatment area The pixels are assigned a value of 0. The area is divided into green and yellow sections; New plant area The yellow and green pixels are assigned a value of 255 for the culture pot area. The green part is assigned a value of 255, resulting in the preprocessed side view binary image and top view binary image; S400: Calculate the ordinate values of the leftmost and rightmost points in the side view binary image, and the abscissa values of the leftmost and rightmost points in the top view binary image, respectively. S500: Using the linear scaling method, calculate the new scale of the plant's side view image and top view image, specifically including: S501: Place the calibration plate on the side of the incubator opposite the side camera. After the calibration plate is placed, the side camera will capture one calibration image and the top camera will capture one calibration image. Then place the calibration plate on the bottom surface opposite the top camera. After the calibration plate is placed, the top camera will capture one calibration image and the side camera will capture one calibration plate image. S502: Calculate the side-view reference scale based on the calibration image from the side-view camera. side_base_rate Based on the calibration images from the top-view camera, the top-view reference scale is calculated as follows: top_base_rate ; S503: Analyze the position of the calibration board on the side-view camera calibration image. position_ side and the number of pixels between the top-view camera and the calibration board. side_ps Based on the calibration images from the top-view camera, the position of the calibration board in the top-view camera calibration images is analyzed. position_top The number of pixels between the side-view camera and the calibration board top_ps ; S504: Based on the leftmost point of the top-view binary map top_left_point And the rightmost point top_right_point x-coordinate value top_left_x and top_right_x The position of the calibration plate in the calibration image of the side-view camera. position_side Number of pixels between the top-view camera and the calibration board side_ps The new scale of the side view image is calculated. new_side_rate ; S505: Based on the leftmost point of the side-view binary map side_left_point And the rightmost point side_right_point The vertical coordinate value and the horizontal coordinate value side_left_y and side_right_y The position of the calibration plate in the calibration image of the side-view camera. position_top Number of pixels between the top-view camera and the calibration board top_ps To obtain a new scale for the side view image new_top_rate ; S600: Calculate the morphological parameters of the plant in side and top views based on a new scale of the plant's side and top views.
2. The method for calculating and analyzing plant parameters in a culture chamber based on a dual-camera system according to claim 1, characterized in that, Using deep learning detection algorithms, the plant area and the pot area are detected in the side view and top view images, specifically including: S201: Collect various potted plants, and collect plants of different heights for each plant type; S202: Place the collected potted plants in an incubator and capture an image from the top-view camera and a side-view camera respectively to obtain a side view image and a top view image of one side of the plant. Then rotate the plant 90 degrees relative to the side-view camera and capture another top view image and a side view image. Rotate each plant 4 times to obtain 4 side view images and 4 top view images for each plant, thus obtaining the training set for deep learning. S203: Classify and label the side view and top view images, and use rectangles to frame the plant area and the pot area in the image respectively. S204: Divide the labeled image dataset into training, validation and test sets. Input the divided dataset into YOLOv5 model for training to obtain a depth detection model that can detect plant areas and pot areas. S205: Based on the trained deep learning detection model, detect the plant area and the pot area in the side view and top view images.
3. The method for calculating and analyzing plant parameters in a culture chamber based on a dual-camera system according to claim 1, characterized in that, Calculate the ordinate values of the leftmost and rightmost points in the side-view binary image, and the abscissa values of the leftmost and rightmost points in the top-view binary image, specifically including: S401: Based on the side-view binary image, find the set of points representing the outer contour of the image, and calculate the point with the minimum x-coordinate in the set. side_left_point The point with the largest x-coordinate in the set of points is... side_right_point The leftmost point of the side-view binary image can be obtained. side_left_point And the rightmost point side_right_point ordinate value side_left_y and side_right_y .
4. The method for calculating and analyzing plant parameters in a culture chamber based on a dual-camera system according to claim 3, characterized in that, Also includes: S402: Based on the top-view binary image, find the set of points representing the outer contour of the image, and calculate the point with the minimum x-coordinate in the set. top_left_point The point with the largest x-coordinate in the set of points is... top_right_point The leftmost point of the top-view binary graph can be obtained. top_left_point And the rightmost point top_right_point x-coordinate value top_left_x and top_right_x .
5. The method for calculating and analyzing plant parameters in a culture chamber based on a dual-camera system according to claim 1, characterized in that, Based on the new scale of the plant's side and top views, the morphological parameters of the plant in side and top views are calculated, specifically including: Based on the plant images segmented from the side view binary image and the top view binary image, the side view image of the plant is used to calculate the plant height, plant width, stem diameter, and side view projected area, while the top view image of the plant is used to analyze the plant crown width, maximum spread, and top view projected area.
6. A dual-camera-based incubator plant parameter calculation and analysis system, as described in any one of claims 1-5, characterized in that, include: Dual-camera image acquisition module: The side-view camera and top-view camera that come with the incubator are used to acquire side-view and top-view images of the plants in the incubator, respectively. Plant and pot region detection module: Based on a dataset constructed from images of potted plants of multiple types and angles, a YOLOv5 deep learning model is trained. Image preprocessing and binary image generation module: The detected plant area is scaled up and its boundaries are restricted, while the culture pot area is restricted only. The target area is then segmented using the set green and yellow pixel thresholds to generate side view binary images and top view binary images containing only the plant. Binary image feature point coordinate extraction module: extracts the ordinates of the leftmost and rightmost points of the outer contour of the side view binary image, and the abscissas of the leftmost and rightmost points of the outer contour of the top view binary image; Dual-camera image new scale calibration module: The reference scale is calculated by acquiring multiple sets of calibration images through the calibration plate, and the new scale of the side view image and the top view image is derived by combining the feature point coordinates of the binary image with the calibration parameters and using the linear scale mapping method. Plant morphology parameter calculation module: Based on the calibrated new scale, the plant pixel information of the side view and top view binary images is converted into the corresponding side view and top view morphology parameters.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements all the steps of the dual-camera-based plant parameter calculation and analysis method for incubators as described in any one of claims 1-5.
Citation Information
Patent Citations
Method, system and equipment for measuring phenotype of broad-leaved tree seedling and medium
CN118038266A
Ruditapes philippinarum meat yield prediction method based on external dimension proportion
CN120299023A