Method for automatically capturing phenotype of lettuce in plant factory
The Realsense device, controlled by a stepper motor, automatically collects lettuce phenotypic images and analyzes them using a deep learning model, solving the problem of inefficient manual inspection of lettuce in plant factories, achieving efficient and accurate pest and disease monitoring and yield prediction, and optimizing resource allocation.
Patent Information
- Application Number
- CN202510632276.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-09-12
AI Technical Summary
In existing plant factories, lettuce pest and disease detection and biomass assessment mainly rely on manual monitoring, which is inefficient and has low accuracy, and cannot meet the needs of modern plant factories for efficient unmanned management.
A stepper motor was used to control the Realsense camera for multimodal image acquisition. The deep learning model was combined to calculate the heartburn area and plant height and crown width in real time. The image files were uploaded to the server via the SSH protocol for processing and analysis.
It realizes the automation of lettuce phenotyping detection, improves detection efficiency, reduces the probability of human error, provides accurate yield prediction and resource optimization, and improves the production efficiency and economic benefits of plant factories.
Smart Images

Figure CN120639791A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent monitoring of lettuce planting in plant factories, and in particular to a method for automatically capturing lettuce phenotypes in plant factories. Background Art
[0002] Nowadays, with the improvement of people's living standards and the enhancement of health awareness, the demand for green vegetables such as lettuce is gradually increasing. However, traditional soil-grown lettuce has high environmental requirements and is easily affected by external factors such as climate and soil, resulting in unstable yield and quality.
[0003] As a new agricultural production method for lettuce cultivation, plant factories are gradually gaining a significant position in modern agriculture due to their unrestricted environmental performance. By artificially controlling environmental conditions such as light, temperature, humidity, and nutrient concentration, plant factories achieve stable production year-round, providing strong support for ensuring the public's food supply and receiving strong government promotion and support.
[0004] In current lettuce plant factories, pest and disease detection and biomass assessment are two key steps. Common methods include visually assessing the percentage of heartburn area and measuring plant height and crown width. However, these methods currently rely primarily on manual monitoring and measurement, which is not only inefficient but also lacks accuracy, making it difficult to meet the needs of modern plant factories for efficient, unmanned management. In addition, manual measurement has limitations in yield analysis, and cannot accurately predict plant growth and final yield in real time.
[0005] Therefore, it is necessary to research and develop intelligent monitoring technology suitable for lettuce factories. Summary of the Invention
[0006] The object of the present invention is to provide a method for capturing lettuce phenotypes in a plant factory, the method comprising the following steps:
[0007] S1. Send signals to the stepper motor through the control software: Control the stepper motor by adjusting the analog PWM wave, controlling the stepper motor to move the Realsense camera forward. The wavelength, duration, and frequency are controlled to precisely control the stepper motor's movement time. The movement speed and shooting interval can be controlled to sample different lettuce plants.
[0008] S2. Description of the collected file types and storage in a designated folder: Use the Realsense camera to capture multimodal files, which can save depth maps, infrared image information, and RGB image information to facilitate subsequent file analysis in the program;
[0009] S3. Stepper motor return control after shooting is completed: After a round of shooting is completed, the program will control the stepper motor to return; during the return process, the photoelectric sensor will be turned on to detect the position of the shooting device. When it reaches the specified position, the program will control the stepper motor to stop;
[0010] S4. Synchronously upload the captured image to a server for processing: upload the image file obtained in step S2 to the server for image storage and processing;
[0011] S5. Model detection: The newly uploaded images are transferred to the deep model in the server. The program will automatically run once every hour. After the burnt area calculation and plant height and crown width prediction model are completed, the output results will be saved as a CSV format file.
[0012] In step S2, the specific operation process is:
[0013] 2.1 Read the configuration file to obtain the file storage location and moving distance;
[0014] 2.2 Determine whether the stepper motor's movement is complete. If not, pause the movement.
[0015] 2.3 Open the depth, infrared, and RGB data streams of the Realsense camera and save them as class objects, and then save them as image data in the specified format (RGB, Z16, I8);
[0016] 2.4 Read the next moving distance and control the stepper motor to move the specified distance;
[0017] 2.5 Start the photoelectric sensor for detection.
[0018] Step S3 specifically includes the following steps:
[0019] 3.1 The motor moves to the initial direction. After the shooting is completed, the stepper motor moves to the initial direction;
[0020] 3.2 During the stepper motor's return process, the photoelectric sensor is detected at a frequency of 50Hz; when the camera is detected, the motor output PWM wave is stopped to stop the stepper motor from moving;
[0021] 3.3 The stepper motor stops moving and ensures that the camera returns to its original position.
[0022] Step S4 specifically includes the following steps:
[0023] 4.1 Read the configuration file to obtain server connection information and file storage location;
[0024] 4.2 Connect to the server via SSH protocol;
[0025] 4.3 Check whether there are any new files in the local folder; if there are no new files, pause the program; if there are new files, proceed to the next step;
[0026] 4.4 Verify whether the size of the newly added file meets expectations. If not, re-read the configuration file and upload it again. If not, proceed to the next step.
[0027] 4.5 Upload the newly added files to the server and record the upload log.
[0028] Step S5 specifically includes the following steps:
[0029] 5.1 The program automatically detects whether there are new files every hour;
[0030] 5.2 Write the file name of the detected new file into the CSV detection queue;
[0031] 5.3 Pass the newly added RGB image into the heartburn detection model for calculation and save the results as a CSV file;
[0032] 5.4 Pass the newly added RGB, depth, and infrared images into the plant height and crown width prediction model for calculation, and save the results as a CSV file.
[0033] The present invention provides a method for automatically capturing lettuce phenotypes in a plant factory. The purpose is to overcome the problem of unmanned operation in existing plant factories and fully automate the heartburn monitoring and crop phenotype measurement that originally relied on manual measurement. Compared with manual working methods, it is more efficient and reduces the error probability and bias problems of manual measurement.
[0034] The present invention provides a method for automatically capturing lettuce phenotypes in a plant factory. Using computer vision technology, it can efficiently calculate a plant's heartburn area, plant height, and crown width. This not only improves detection and evaluation efficiency but also reduces reliance on manual labor, meeting the development needs of modern plant factories. Furthermore, deep learning-based plant growth models and yield prediction technologies can monitor and analyze plant growth in real time, providing accurate yield estimates and optimizing resource allocation, further improving the production efficiency and economic benefits of plant factories. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Specific process description for S2-S3 stepper motor drive control and loop shooting
[0036] Figure 2 Specific process description for the automatic upload of S4 files
[0037] Figure 3 Specific process description for the deep model detection part of the S5 server DETAILED DESCRIPTION
[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments, but the present invention is not limited thereto.
[0039] Example 1:
[0040] like Figure 1-3 As shown, a method for acquiring and processing data during plant growth specifically includes the following steps:
[0041] S1. Send signals to the stepper motor through the control software: Control the stepper motor by adjusting the analog PWM wave, controlling the stepper motor to move the Realsense camera forward. The wavelength, duration, and frequency are controlled to precisely control the stepper motor's movement time. The movement speed and shooting interval can be controlled to sample different lettuce plants.
[0042] S2. Description of the collected file types and storage in a designated folder: Use the Realsense camera to capture multimodal files, which can save depth maps, infrared image information, and RGB image information to facilitate subsequent file analysis in the program;
[0043] 2.1 Read the configuration file to obtain the file storage location and moving distance;
[0044] 2.2 Determine whether the stepper motor's movement is complete. If not, pause the movement.
[0045] 2.3 Open the depth, infrared, and RGB data streams of the Realsense camera and save them as class objects, and then save them as image data in the specified format (RGB, Z16, I8);
[0046] 2.4 Read the next moving distance and control the stepper motor to move the specified distance;
[0047] 2.5 Start the photoelectric sensor for detection.
[0048] S3. Stepper motor return control after shooting is completed: After a round of shooting is completed, the program will control the stepper motor to return; during the return process, the photoelectric sensor will be turned on to detect the position of the shooting device. When it reaches the specified position, the program will control the stepper motor to stop;
[0049] 3.1 The motor moves to the initial direction. After the shooting is completed, the stepper motor moves to the initial direction;
[0050] 3.2 During the stepper motor's return process, the photoelectric sensor is detected at a frequency of 50Hz; when the camera is detected, the motor output PWM wave is stopped to stop the stepper motor from moving;
[0051] 3.3 The stepper motor stops moving and ensures that the camera returns to its original position.
[0052] S4. Synchronously upload the captured image to a server for processing: upload the image file obtained in step S2 to the server for image storage and processing;
[0053] 4.1 Read the configuration file to obtain server connection information and file storage location;
[0054] 4.2 Connect to the server via SSH protocol;
[0055] 4.3 Check whether there are any new files in the local folder; if there are no new files, pause the program; if there are new files, proceed to the next step;
[0056] 4.4 Verify whether the size of the newly added file meets expectations. If not, re-read the configuration file and upload it again. If not, proceed to the next step.
[0057] 4.5 Upload the new files to the server and record the upload log
[0058] S5. Model detection: The newly uploaded images are passed to the deep model in the server. The program will automatically run once every hour. After the burnt area calculation and plant height and crown width prediction model are completed, the output results will be saved as a CSV file.
[0059] 5.1 The program automatically detects whether there are new files every hour;
[0060] 5.2 Write the file name of the detected new file into the CSV detection queue;
[0061] 5.3 Pass the newly added RGB image into the heartburn detection model for calculation and save the results as a CSV file;
[0062] 5.4 Pass the newly added RGB, depth, and infrared images into the plant height and crown width prediction model for calculation, and save the results as a CSV file.
Claims
1. A method for automatically capturing lettuce phenotypes in a plant factory, characterized in that: The steps include: S1. Send signals to the stepper motor through the control software: The stepper motor is controlled by adjusting the simulated PWM wave, controlling the stepper motor to move the Realsense camera forward. The wavelength, duration, and frequency are controlled to precisely control the stepper motor's movement time. The movement speed and shooting interval can be controlled to sample lettuce to meet the requirements of the plant factory's lettuce cultivation environment. S2. Description of the collected file types and storage in a designated folder: Use the Realsense camera to capture multimodal files, which can save depth maps, infrared image information, and RGB image information to facilitate subsequent file analysis in the program; S3, stepper motor return control after shooting is completed: after a round of shooting is completed, the program will control the stepper motor to return; During the return process, the photoelectric sensor will be turned on to detect the position of the camera. When it reaches the specified position, the program will control the stepper motor to stop. S4. Synchronously upload the captured image to a server for processing: upload the image file obtained in step S2 to the server for image storage and processing; S5. Model detection: The newly uploaded images are transferred to the deep model in the server. The program will automatically run once every hour. After the burnt area calculation and plant height and crown width prediction model are completed, the output results will be saved as a CSV format file.
2. The method for automatically capturing lettuce phenotypes in a plant factory according to claim 1, characterized in that: In step S2, the specific operation process is: 2.1 Read the configuration file to obtain the file storage location and moving distance; 2.2 Determine whether the stepper motor's movement is complete. If not, pause the movement. 2.3 Open the depth, infrared, and RGB data streams of the Realsense camera and save them as class objects, and then save them as image data in the specified format (RGB, Z16, I8); 2.4 Read the next moving distance and control the stepper motor to move the specified distance; 2.5 Start the photoelectric sensor for detection.
3. The method for automatically capturing lettuce phenotypes in a plant factory according to claim 1, wherein: The step S3 specifically includes the following steps: 3.1 The motor moves to the initial direction. After the shooting is completed, the stepper motor moves to the initial direction; 3.2 During the stepper motor's return process, the photoelectric sensor is detected at a frequency of 50Hz; when the camera is detected, the motor output PWM wave is stopped to stop the stepper motor from moving; 3.3 The stepper motor stops moving and ensures that the camera returns to its original position.
4. The method for automatically capturing lettuce phenotypes in a plant factory according to claim 1, wherein: The step S4 specifically includes the following steps: 4.1 Read the configuration file to obtain server connection information and file storage location; 4.2 Connect to the server via SSH protocol; 4.3 Check whether there are any new files in the local folder; if there are no new files, pause the program; if there are new files, proceed to the next step; 4.4 Verify whether the size of the newly added file meets expectations. If not, re-read the configuration file and upload it again. If not, proceed to the next step. 4.5 Upload the newly added files to the server and record the upload log.
5. The method for automatically capturing lettuce phenotypes in a plant factory according to claim 1, wherein: The step S5 specifically includes the following steps: 5.1 The program automatically detects whether there are new files every hour; 5.2 Write the file name of the detected new file into the CSV detection queue; 5.3 Pass the newly added RGB image into the heartburn detection model for calculation and save the results as a CSV file; 5.4 Pass the newly added RGB, depth, and infrared images into the plant height and crown width prediction model for calculation, and save the results as a CSV file.