Gastrodia elata Disease Monitoring Method and System Based on Image Recognition
Through image recognition technology, four-way images of Gastrodia elata stems are taken and analyzed to generate disease index, which solves the problem of slow manual detection speed, achieves fast and accurate disease monitoring, and improves the efficiency and accuracy of Gastrodia elata disease detection.
Patent Information
- Application Number
- CN202510623222.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-05-15
AI Technical Summary
In the prior art, Gastrodia elata disease detection relies on manual inspection, which is slow and prone to miss diseased plants, making it difficult to efficiently monitor mold infection and pest aberrations.
Using an image recognition method, by taking four-way image data of Gastrodia elata stems, blackening and correlation analysis were performed, hue, saturation, and brightness data were generated, and the number of mold pixels and 3D models were set to generate, center offset and area values were analyzed, and Gastrodia elata disease index was comprehensively generated to determine the disease level.
It realizes fast and accurate monitoring of Gastrodia elata disease, saves manpower, can identify the degree of disease in the early stage, and improves detection efficiency and accuracy.
Smart Images

Figure CN120126014B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Gastrodia elata disease monitoring, and specifically to a Gastrodia elata disease monitoring method and system based on image recognition. Background Art
[0002] Gastrodia elata is an important traditional Chinese medicine with extensive medicinal value, mainly used to treat symptoms such as headache, dizziness, and insomnia. However, Gastrodia elata is vulnerable to various diseases during growth, seriously affecting its yield and quality. Common Gastrodia elata diseases include white rot, black rot, and rust. White rot is caused by fungi, mainly manifested as the roots and stems of Gastrodia elata rotting, resulting in the withering and even death of the plants. Black rot is also caused by fungi, mainly attacking the stems and leaves of Gastrodia elata, causing black lesions and affecting photosynthesis. Rust is caused by rust fungi, mainly invading the plants through stomata, forming rust-colored spots, leading to leaf shedding, and in severe cases, the death of the whole plant. Gastrodia elata is also vulnerable to insect pests, resulting in deformed growth of its stems.
[0003] Generally, when planting Gastrodia elata, it is necessary to manually inspect whether Gastrodia elata is invaded by molds, and manually inspect whether the shape of Gastrodia elata is distorted and whether it is invaded by insect pests. Manual visual inspection not only has a slow detection speed but also easily misses diseased plants.
[0004] The above information disclosed in the background art section is only used to enhance the understanding of the background of the present disclosure, so it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0005] The purpose of the present invention is to provide a Gastrodia elata disease monitoring method and system based on image recognition to solve the problems raised in the above background art.
[0006] To achieve the above purpose, the present invention provides the following technical solutions:
[0007] A Gastrodia elata disease monitoring method based on image recognition, the specific steps include:
[0008] S1. Collect four-direction image data of the Gastrodia elata stems of each Gastrodia elata in the planting area, perform blackening processing on the background of the four-direction image data through OpenCV, perform correlation analysis on the processed image data, and generate hue, saturation, and lightness data corresponding to each Gastrodia elata;
[0009] S2. Set hue range thresholds, saturation range thresholds, and lightness range thresholds, and compare them with the hue, saturation, and lightness data corresponding to each Gastrodia elata respectively to generate a mask, perform correlation analysis on the mask to generate the number of mold pixel points, and perform correlation analysis on the number of mold pixel points to generate a Gastrodia elata colony prediction index corresponding to each Gastrodia elata;
[0010] S3. Establish a 3D model of Gastrodia elata within the planting area. After placing the 3D model of Gastrodia elata in a three-dimensional coordinate system, perform an equidistant horizontal segmentation process on the 3D model of Gastrodia elata, collect the central coordinates and cross-sectional area values of each Gastrodia elata on the segmentation plane where the 3D model of Gastrodia elata is located, process the central coordinates to generate the mean central offset and the variance of the central offset, and process the cross-sectional area values to generate the mean area and the variance of the area offset of each Gastrodia elata;
[0011] S4. Conduct a correlation analysis on the mean central offset, the variance of the central offset, the mean area, and the variance of the area offset of each Gastrodia elata to generate the Gastrodia elata distortion prediction index of each Gastrodia elata. Conduct a correlation analysis on the Gastrodia elata distortion prediction index and the Gastrodia elata colony prediction index to generate the Gastrodia elata disease index, and output the Gastrodia elata disease level according to the Gastrodia elata disease index.
[0012] Further, select Gastrodia elata with an exposed stem length greater than 10 cm for numbering. The number of Gastrodia elata is G plants. Use i as the index of the Gastrodia elata stem, and the value range of i is a positive integer from 1 to G.
[0013] Further, the pixel points of the image data are 1920*1080, and the RGB channel values of the black pixel points are (0, 0, 0). The image data is , where j is used to index the image perspective. When j = 1, it is used to represent the front view image; when j = 2, j = 3, it is used to represent the side view image; when j = 4, it is used to represent the rear view image; R, G, and B are respectively used to represent the red value, the green value, and the blue value, and the value range is 0 - 255; use M as the index of the pixel point row of the image data, and use N as the index of the pixel point column of the image data; conduct a correlation analysis on the image data to generate hue , saturation , lightness , and the formulas are as follows:
[0014]
[0015] where is the two-parameter arctangent function, is the maximum value of R, G, and B of the corresponding pixel point, is the minimum value of R, G, and B of the corresponding pixel point, hue is used to reflect the color type of the pixel point, saturation is used to reflect the purity of the pixel point, lightness is used to reflect the brightness of the color of the pixel point. When , .
[0016] Further, the hue range threshold is , the saturation range threshold is , the lightness range threshold is , create a mask , and the formula is:
[0017] Mask is used to reflect whether the values of pixel points are all within the hue range threshold, saturation range threshold, and lightness range threshold. If so, record it as 1, otherwise record it as 0;
[0018] Perform a correlation analysis on the mask to generate the number of mold pixel points , and the formula is:
[0019]
[0020] The number of mold pixel points is used to reflect the predicted number of Gastrodia elata colony pixel points in the photographed image of the i-th Gastrodia elata stem;
[0021] Perform a correlation analysis on the number of mold pixel points to generate the Gastrodia elata colony prediction index , and the formula is:
[0022] The Gastrodia elata colony prediction index is used to reflect the colony abnormality degree index of the i-th Gastrodia elata stem.
[0023] Furthermore, in the S3, the three-dimensional coordinate system includes the X, Y, and Z axes, where the Z axis is perpendicular to the planting ground, and the planting ground is used as the XOY plane. Multiple equally spaced planes parallel to the XOY plane are used as dividing planes, and the distance between the dividing planes is 1 cm. The Gastrodia elata 3D model is segmented through the dividing planes to obtain the central coordinates and the cross-sectional area value of the dividing plane where each Gastrodia elata 3D model is located. The dividing planes are numbered sequentially from bottom to top, and the superscript h is used to index the dividing plane numbers, with the value range being positive integers between, and a correlation analysis is performed on the central coordinates to generate the mean central offset and the central offset variance , and a correlation analysis is performed on the cross-sectional area value to generate the mean area and the area offset variance , and the formula is:
[0024] Among them, the mean central offset is used to reflect the degree of skew of the i-th Gastrodia elata stem, and the central offset variance Index for reflecting the local bending degree of the stem of the i-th Gastrodia elata plant, area mean For reflecting the average thickness uniformity of the stem of the i-th Gastrodia elata plant, area offset variance For reflecting the degree of deformity of the local thickness change of the stem of the i-th Gastrodia elata plant.
[0025] Furthermore, for the mean center offset of each Gastrodia elata plant 、center offset variance 、area mean and area offset variance Perform correlation analysis to generate the Gastrodia elata deformity prediction index for each Gastrodia elata plant , and the formula based on is:
[0026]
[0027] Gastrodia elata deformity prediction index For reflecting the degree of deformity of the Gastrodia elata stem, is the maximum value of the mean center offset within G Gastrodia elata plants.
[0028] Furthermore, perform correlation analysis on the Gastrodia elata deformity prediction index and the Gastrodia elata colony prediction index to generate the Gastrodia elata disease index , and the formula based on is:
[0029]
[0030] Gastrodia elata disease index For reflecting the degree of disease of the corresponding Gastrodia elata.
[0031] Furthermore, compare the Gastrodia elata disease index with the disease threshold and output the Gastrodia elata disease level. When , output the corresponding Gastrodia elata disease level as level two, with a deeper degree of disease infection, and targeted observation and determination of the state of Gastrodia elata are required; when , output the corresponding Gastrodia elata disease level as level one, and the growth of Gastrodia elata is normal, and no targeted observation is required.
[0032] The present invention also provides a Gastrodia elata disease monitoring system based on image recognition for performing the Gastrodia elata disease monitoring method based on image recognition, including:
[0033] Numbering module, for numbering G Gastrodia elata plants in the planting area;
[0034] The image acquisition module is used to take four-directional pictures of each Gastrodia elata plant, collect the image data of the Gastrodia elata stem, remove non-target Gastrodia elata pixel points through OpenCV and perform blackening processing, conduct correlation analysis on the image data, and generate the hue, saturation, and lightness of the pixel points of the image data;
[0035] The Gastrodia elata colony prediction module is used to set the hue range threshold, saturation range threshold, and lightness range threshold, compare the hue with the hue range threshold, the saturation with the saturation range threshold, and the lightness with the lightness range threshold, generate a mask, conduct correlation analysis on the mask, generate the number of mold pixel points, and conduct correlation analysis on the number of mold pixel points to generate the Gastrodia elata colony prediction index;
[0036] The model generation module is used to establish a 3D model of Gastrodia elata in the planting area. After placing the 3D model of Gastrodia elata in a three-dimensional coordinate system, perform equidistant horizontal segmentation processing on the 3D model of Gastrodia elata, collect the central coordinates and cross-sectional area values of the segmentation planes where each 3D model of Gastrodia elata is located, process the central coordinates to generate the central offset mean and central offset variance, and process the cross-sectional area values to generate the area mean and area offset variance of each Gastrodia elata plant;
[0037] The model analysis module is used to conduct correlation analysis on the central offset mean, central offset variance, area mean, and area offset variance of each Gastrodia elata plant to generate the Gastrodia elata distortion prediction index of each Gastrodia elata plant;
[0038] The comprehensive analysis module is used to conduct correlation analysis on the Gastrodia elata distortion prediction index and the Gastrodia elata colony prediction index to generate the Gastrodia elata disease index, compare the Gastrodia elata disease index with the disease threshold, and output the Gastrodia elata disease level.
[0039] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0040] The present invention takes four-directional image data of Gastrodia elata, processes the image data, compares it with the color characteristics of the mold colony, generates the Gastrodia elata colony prediction index for reflecting the abnormal degree index of the colony on the Gastrodia elata stem. At the same time, it also collects the model data of Gastrodia elata, generates a 3D model, analyzes the growth shape of Gastrodia elata, generates the Gastrodia elata distortion prediction index for reflecting the distortion degree of the Gastrodia elata stem, and combines the analysis of the Gastrodia elata distortion prediction index and the Gastrodia elata colony prediction index to generate the Gastrodia elata disease index for reflecting the degree of damage of the corresponding Gastrodia elata by diseases, thereby helping to judge the Gastrodia elata disease level and saving a large amount of manpower. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a schematic diagram of the overall method flow of the present invention;
[0042] Figure 2 It is a schematic diagram of the overall system flow of the present invention. Specific embodiments
[0043] To make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to specific embodiments.
[0044] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the present invention should have the ordinary meanings understood by those with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar terms used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "comprising" or "including" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. Words such as "connected" or "linked" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Upper", "lower", "left", "right", etc. are only used to represent relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.
[0045] Embodiment:
[0046] Please refer to Figure 1 , the present invention provides a technical solution:
[0047] A method for monitoring Gastrodia elata diseases based on image recognition, the specific steps include:
[0048] Step 1, collect four-direction image data of the Gastrodia elata stems of each Gastrodia elata plant in the planting area, perform blackening processing on the background of the four-direction image data through OpenCV, perform correlation analysis on the processed image data, and generate hue, saturation and lightness data corresponding to each Gastrodia elata plant; wherein the four-direction image data includes front-view images, rear-view images and side-view image data on both sides.
[0049] In this embodiment, the Gastrodia elata plants monitored by image recognition are plants approaching the mature stage. At this stage, the exposed stems of Gastrodia elata are on the soil surface, and the morphological characteristics of the exposed stems can be monitored to judge the disease level of Gastrodia elata. The Gastrodia elata is a plant with an exposed stem length greater than 10 cm. The qualified Gastrodia elata plants are numbered. The number of qualified Gastrodia elata plants is G plants. In this embodiment, i is used as the index for Gastrodia elata, and the value range of i is a positive integer from 1 to G.
[0050] In order to capture and input image data of Gastrodia elata from all angles, each plant of Gastrodia elata is photographed in four directions to collect image data of the Gastrodia elata stem. The non-target Gastrodia elata pixel points are removed and blackened through OpenCV software. The RGB channel values of the black pixel points are (0, 0, 0), which is convenient for subsequent calculations. Correlation analysis is performed on the image data to generate the hue, saturation, and brightness of the pixel points of the image data.
[0051] The pixel points of the pixel image data captured by the drone are 1920*1080, and the image data is , where j is used for indexing the image perspective. When j = 1, it is used to represent the front view image; when j = 2, j = 3, it is used to represent the side view image; when j = 4, it is used to represent the rear view image; R, G, and B are respectively used to represent the red value, green value, and blue value, and the value range is 0 - 255; M is used as the index of the pixel row of the image data, and N is used as the index of the pixel column of the image data. The maximum value of M is 1920, and the maximum value of N is 1080; in order to analyze the bacterial community characteristics in the image data, the image data is subjected to correlation analysis to generate the hue , saturation , and brightness , and the formula is as follows:
[0052]
[0053] are respectively the red, green, and blue channel values of the pixel point at the M*N position in the image data of the jth image perspective of the ith plant of Gastrodia elata. Among them is the two-parameter arctangent function, is the maximum value among the R, G, and B of the corresponding pixel point, is the minimum value among the R, G, and B of the corresponding pixel point. The hue is used to reflect the color type of the pixel point, the saturation is used to reflect the purity of the pixel point, and the brightness is used to reflect the brightness of the color of the pixel point. When , , through comprehensive analysis of the color type, purity, and brightness of the pixel point, the bacterial community image in the image data is further extracted. In the above formula, when the red component in the corresponding pixel point is the largest, Z takes the value of 0; when the green component in the corresponding pixel point is the largest, Z takes the value of 120; when the blue component in the corresponding pixel point is the largest, Z takes the value of 240. When , the hue .
[0054] Step 2: Set the hue range threshold, saturation range threshold, and lightness range threshold, and compare them with the hue, saturation, and lightness data corresponding to each Gastrodia elata plant respectively to generate a mask. Then perform a correlation analysis on the mask to generate the number of mold pixel points, and perform a correlation analysis on the number of mold pixel points to generate the Gastrodia elata colony prediction index corresponding to each Gastrodia elata plant;
[0055] The hue range threshold, saturation range threshold, and lightness range threshold are measured through experiments. First, select samples with different degrees of Gastrodia elata infection (such as no mold, mild, moderate, and severe infections), observe the samples under natural light or using uniform white light illumination to ensure the true representation of colors, observe the mold color, especially its surface hue, saturation, and lightness, record the color characteristics of the mold in each sample, use a color wheel to identify the mold color, and record it as an angular range, which is set as the hue range threshold range Estimate the vividness of the mold color, classify it from light to dark (in the range of 1 to 255, 50 is lower saturation, and 255 is high saturation), and this value range is the saturation range threshold Observe the brightness of the mold and record it as a value between 50 and 255, and this value is the lightness range threshold range 。
[0056] Create a mask The formula is as follows:
[0057] The mask is used to reflect whether the values of the pixel points are all within the hue range threshold, saturation range threshold, and lightness range threshold. If so, record it as 1, otherwise record it as 0;
[0058] Perform a correlation analysis on the mask to generate the number of mold pixel points The formula is as follows:
[0059]
[0060] The number of mold pixel points is used to reflect the predicted number of Gastrodia elata colony pixel points in the photographed image of the i-th Gastrodia elata stem;
[0061] Perform a correlation analysis on the number of mold pixel points to generate the Gastrodia elata colony prediction index The formula is as follows:
[0062] The number of mold pixel points The more, the greater the value of the Gastrodia elata colony prediction index and the Gastrodia elata colony prediction index Used to reflect the degree of mildew infection of the i-th Gastrodia elata, the larger the value, the higher the degree of mildew infection of the Gastrodia elata stem.
[0063] Step 3: Establish a 3D model of Gastrodia elata in the planting area. After placing the 3D model of Gastrodia elata in a three-dimensional coordinate system, perform an equidistant horizontal segmentation process on the 3D model of Gastrodia elata. Collect the central coordinates and cross-sectional area values of each plant of Gastrodia elata on the segmentation plane where the 3D model of Gastrodia elata is located. Process the central coordinates to generate the mean central offset and the variance of central offset. Process the cross-sectional area values to generate the mean area and the variance of area offset of each plant of Gastrodia elata;
[0064] Scan the data point cloud of Gastrodia elata in the planting area. Select Pix4Dmapper as the data processing software and use image stitching and lidar data to generate a high-density point cloud. The "point cloud density" provided by the software is set to "high" to ensure that the number of point clouds per square meter reaches more than 1000. Generate a 3D mesh from the point cloud and select the "Delaunay triangulation" algorithm to ensure the smoothness and accuracy of the mesh.
[0065] The three-dimensional coordinate system includes the X, Y, and Z axes, where the Z axis is perpendicular to the planting ground. The planting ground is used as the XOY plane, and multiple equidistant planes parallel to the XOY plane are used as segmentation planes. The distance between the segmentation planes is 1 cm. Perform a segmentation process on the 3D model of Gastrodia elata through the segmentation planes to obtain the central coordinates of each plant of Gastrodia elata on the segmentation plane where the 3D model is located and the cross-sectional area value , number the segmentation planes sequentially from bottom to top, and use the superscript h to index the segmentation plane numbers, with the value range a positive integer between. Since the heights of different Gastrodia elata plants are different, the number of cutting planes is also different. The value used to reflect the number of cutting planes. Perform a correlation analysis on the central coordinates to generate the mean central offset and the variance of central offset . Perform a correlation analysis on the cross-sectional area values to generate the mean area and the variance of area offset . The formula is as follows:
[0066] where, and are the abscissa and ordinate of the center point of the intersection surface of the lowest cutting plane and the 3D model of Gastrodia elata. The mean central offset reflects the degree of skewness of the i-th Gastrodia elata stem by calculating the offset degree of the center point. The variance of central offset is used to reflect the local bending degree index of the i-th Gastrodia elata stem. The larger the value, the higher the bending degree. The mean area Used to reflect the average thickness uniformity of the stem of the i-th Gastrodia elata Blume. The larger the value, the thicker it is, the area deviation variance Used to reflect the degree of deformity of the local thickness change of the stem of the i-th Gastrodia elata Blume. The larger the value, the higher the degree of bending and deformity;
[0067] Among them, 9 points of coordinates on the cutting surface edge of Gastrodia elata Blume are set. Since the cross-sectional area of Gastrodia elata Blume on the cutting surface is calculated, the Z-axis data can be ignored, and only the X-axis and Y-axis coordinates are used, which are respectively 、 、 、 、……、 . The cross-sectional area Area is calculated by the following formula:
[0068] The center point of the cutting surface of Gastrodia elata Blume is calculated by the following formula :
[0069]
[0070] 、 、 、 、……、 Are 9 randomly selected and evenly distributed point coordinates on the cutting surface edge of Gastrodia elata Blume. They are arranged separately and can be arranged as 、 、 、…、 And 、 、 、…、 . And use 、 、 、 To index the above 9 point coordinates. Among them, the value of k is a positive integer from 1 to 8. The subscripts k and k + 1 are both used to number and index the 9 point coordinates. For example, when k = 1, 、 、 、 Respectively represent 、 、 、 . When k = 2, 、 、 、 Respectively represent 、 、 、 , the center point of the cut surface of Gastrodia elata is the approximate center point of the contour of the cut part of Gastrodia elata after each cut surface is cut. Analyzing multiple center points can evaluate the bending degree of Gastrodia elata.
[0071] Step 4: Conduct a correlation analysis on the mean center offset, center offset variance, area mean, and area offset variance of each Gastrodia elata plant to generate the Gastrodia elata distortion prediction index for each plant. Conduct a correlation analysis on the Gastrodia elata distortion prediction index and the Gastrodia elata colony prediction index to generate the Gastrodia elata disease index, and output the Gastrodia elata disease level according to the Gastrodia elata disease index.
[0072] The mean center offset of each Gastrodia elata plant , center offset variance , area mean and area offset variance are subjected to a correlation analysis to generate the Gastrodia elata distortion prediction index for each Gastrodia elata plant , and the formula is as follows:
[0073]
[0074] The Gastrodia elata distortion prediction index is used to reflect the distortion degree of the Gastrodia elata stem. is the maximum value of the mean center offset within G Gastrodia elata plants. For Gastrodia elata, its stem is generally straight up. When infested by pests, it will cause the stem to grow abnormally. Therefore, the degree of damage to Gastrodia elata by pests can be analyzed through its appearance. The 0.5 in is used to reduce the influence of variance on the result. A large center offset variance means a large growth difference between plants, which may lead to distortion. is used to normalize the offset and more intuitively reflect its influence on distortion. When the mean center offset is small, it indicates that the plant growth is closer to the healthy state. Conversely, it may imply a distortion risk. Therefore, it is directly included in the formula to reflect its direct influence. The logarithmic form of the area offset variance plays a role in smoothing the influence. The larger the value of the area offset variance , the greater the deviation of the area size of the contour of the cut part of Gastrodia elata, and the higher the distortion degree. Since the actual change in the area size of the contour of the cut part of Gastrodia elata stem is small, a logarithmic function is used to limit the contribution index of the area offset variance , center offset variance , area offset variance and the Gastrodia elata distortion prediction index are all in a positive correlation relationship. The larger the value, the larger the Gastrodia elata distortion prediction index , area mean As a basic parameter to adjust the numerical ratio.
[0075] For the Gastrodia elata distortion prediction index and the Gastrodia elata colony prediction index Perform a correlation analysis to generate the Gastrodia elata disease index , and the formula is:
[0076]
[0077] Gastrodia elata disease index Used to reflect the degree of disease of the corresponding Gastrodia elata, that is, the degree affected by the mold colony and pests. The larger the value, the higher the degree of disease.
[0078] The Gastrodia elata disease index is a comprehensive index that reflects the overall degree of disease infection of Gastrodia elata plants. This index combines the shape distortion of Gastrodia elata and the depth of mold colony infection to comprehensively measure the health status of the plants. The larger the value of the Gastrodia elata disease index, the more serious the impact of the disease on the plants. At a higher level of the Gastrodia elata disease index, obvious distortions may exist in the stems of Gastrodia elata, or the mold may reproduce more densely on the surface or inside of Gastrodia elata. This situation usually indicates that the health and normal growth of the plants have been greatly disturbed.
[0079] The distortion prediction index represents the physical distortion of Gastrodia elata plants, such as bending or uneven growth. This kind of distortion is usually one of the manifestations of disease infestation. Therefore, as the degree of distortion increases, the disease index increases. This monotonicity reflects the impact of the physical abnormality of the plants on their overall health. The colony prediction index represents the degree of mold infection of Gastrodia elata. The presence and proliferation of mold directly affect the health of the plants and are one of the important factors affecting the disease. Through the exponential function, the higher the degree of mold infection, the faster the index increases, which reflects the disease risk brought by mold infection.
[0080] Adopt Reflects the sensitivity to mold infection. As increases, the exponential part shows rapid growth, ensuring that even a slight change in mold infection can significantly affect the disease index. In biological monitoring, this sensitivity helps in early identification and intervention. By multiplying the distortion and the colony index, it shows that both jointly affect the disease index. The multiplicative combination not only ensures that both have an impact but also amplifies the effect of their combined action because the actual disease impact is usually the result of the superposition of multiple factors.
[0081] In the form of, ensure that in the absence of mold infection, even if is 0, and the exponential part is still greater than 1, enabling the distortion exponential part to still reflect the most basic disease risk, avoiding the situation where the index is zero when there is no colony infection, and ensuring the stability and continuity of the disease index in various situations. The coefficient 20 is used to amplify the impact of colony infection. From the perspective of exponential growth, if slightly increases, then will cause the exponential term to expand rapidly, increasing the sensitivity to the severity of the disease. Especially in the case where mold infection is relatively common, it can highlight the potential high risk of the disease. The disease threshold is 25.4. By selecting multiple slightly diseased Gastrodia elata plants, calculating their Gastrodia elata disease indices, taking the average value and reducing the numerical size, the judgment standard is thus improved and used as the disease threshold , set to 25.4, to output the Gastrodia elata disease grade. When , the Gastrodia elata disease index is compared with the disease threshold , and the corresponding Gastrodia elata disease grade is output as level two, with a relatively deep degree of disease infection, and targeted observation is required to determine the state of Gastrodia elata; when , the corresponding Gastrodia elata disease grade is output as level one, and the growth of Gastrodia elata is normal, and no targeted observation is required. Referring to Figure 2 , the present invention also provides a Gastrodia elata disease monitoring system based on image recognition for implementing the Gastrodia elata disease monitoring method based on image recognition, including:
[0082] A numbering module for numbering G Gastrodia elata plants in the planting area;
[0083] An image acquisition module for taking four-way pictures of each Gastrodia elata plant, acquiring image data of the Gastrodia elata stem, removing non-target Gastrodia elata pixel points through OpenCV and performing blackening processing, performing correlation analysis on the image data, and generating the hue, saturation, and lightness of the image data pixel points;
[0084] A Gastrodia elata colony prediction module for setting the hue range threshold, saturation range threshold, and lightness range threshold, comparing the hue with the hue range threshold, the saturation with the saturation range threshold, and the lightness with the lightness range threshold, generating a mask, performing correlation analysis on the mask, generating the number of mold pixel points, and performing correlation analysis on the number of mold pixel points to generate a Gastrodia elata colony prediction index;
[0085] A model generation module, which is used to establish a 3D model of Gastrodia elata in the planting area. After placing the 3D model of Gastrodia elata in a three-dimensional coordinate system, perform an equidistant horizontal segmentation process on the 3D model of Gastrodia elata, collect the central coordinates and cross-sectional area values of each segmentation plane where the 3D model of Gastrodia elata is located, process the central coordinates to generate the mean central offset and the variance of the central offset, and process the cross-sectional area values to generate the mean area and the variance of the area offset of each Gastrodia elata plant;
[0086] A model analysis module, which is used to perform a correlation analysis on the mean central offset, the variance of the central offset, the mean area, and the variance of the area offset of each Gastrodia elata plant to generate a Gastrodia elata distortion prediction index for each Gastrodia elata plant;
[0087] A comprehensive analysis module, which is used to perform a correlation analysis on the Gastrodia elata distortion prediction index and the Gastrodia elata colony prediction index to generate a Gastrodia elata disease index, compare the Gastrodia elata disease index with a disease threshold, and output the Gastrodia elata disease level.
[0088] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain a formula that is closest to the actual situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0089] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0090] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units. They can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0091] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application.
Claims
1. A Gastrodia elata disease monitoring method based on image recognition, characterized in that The specific steps include: S1. Collect the four-direction image data of the Gastrodia elata stems of each Gastrodia elata plant in the planting area. Use OpenCV to blacken the background of the four-direction image data, perform correlation analysis on the processed image data, and generate the hue, saturation, and lightness data corresponding to each Gastrodia elata plant; S2. Set the hue range threshold, saturation range threshold, and lightness range threshold, and compare them with the hue, saturation, and lightness data corresponding to each Gastrodia elata plant respectively to generate a mask. Perform correlation analysis on the mask to generate the number of mold pixel points, and perform correlation analysis on the number of mold pixel points to generate the Gastrodia elata colony prediction index corresponding to each Gastrodia elata plant; S3. Establish a 3D model of Gastrodia elata in the planting area. After placing the 3D model of Gastrodia elata in a three-dimensional coordinate system, perform equidistant horizontal segmentation processing on the 3D model of Gastrodia elata, collect the central coordinates and cross-sectional area values of each Gastrodia elata plant on the segmentation plane where the 3D model of Gastrodia elata is located, process the central coordinates to generate the central offset mean and central offset variance, and process the cross-sectional area values to generate the area mean and area offset variance of each Gastrodia elata plant; S4. Perform correlation analysis on the central offset mean, central offset variance, area mean, and area offset variance of each Gastrodia elata plant to generate the Gastrodia elata distortion prediction index corresponding to each Gastrodia elata plant. Perform correlation analysis on the Gastrodia elata distortion prediction index and the Gastrodia elata colony prediction index to generate the Gastrodia elata disease index, and output the Gastrodia elata disease level according to the Gastrodia elata disease index; Select Gastrodia elata with an exposed stem length greater than 10 cm for numbering. The number of Gastrodia elata plants is G. Use i as the index of the Gastrodia elata stem, and the value range of i is a positive integer from 1 to G; Mean of the central offset of each Gastrodia elata Blume plant , Variance of the central offset , Mean of the area and Variance of the area offset are analyzed for correlation to generate the Gastrodia elata Blume distortion prediction index for each Gastrodia elata Blume plant, and the formula used is: Gastrodia elata Aberration Prediction Index Used to reflect the degree of aberration of Gastrodia elata stems, which is the maximum value of the mean central offset in G Gastrodia elata plants ; To perform a correlation analysis on the Gastrodia elata aberration prediction index and the Gastrodia elata colony prediction index to generate the Gastrodia elata disease index , the formula used is as follows: Gastrodia elata disease index Used to reflect the degree of disease of the corresponding Gastrodia elata.
2. The method for monitoring Gastrodia elata diseases based on image recognition according to claim 1, wherein: The pixel points of the image data are 1920*1080, and the RGB channel values of the black pixel points are (0, 0, 0). The image data is , where j is used to index the image view. When j = 1, it is used to represent the front view image; when j = 2 or j = 3, it is used to represent the side view image; when j = 4, it is used to represent the rear view image; R, G, and B are used to represent the red value, green value, and blue value respectively, and the value range is 0 - 255; M is used as the index of the pixel row of the image data, and N is used as the index of the pixel column of the image data; perform correlation analysis on the image data to generate hue , saturation and lightness , and the formula is as follows: where is the two-parameter arctangent function, is the maximum value among R, G, and B of the corresponding pixel point, is the minimum value among R, G, and B of the corresponding pixel point, and the hue is used to reflect the color type of the pixel point, and the saturation is used to reflect the purity of the pixel point, and the lightness is used to reflect the brightness of the color of the pixel point. When then .
3. The method for monitoring Gastrodia elata diseases based on image recognition according to claim 2, characterized in that: The hue range threshold range is , the saturation range threshold is , the lightness range threshold is , create a mask , and the formula is: Mask Used to reflect whether the values of pixel points are all within the hue range threshold, saturation range threshold, and lightness range threshold. If so, record it as 1; otherwise, record it as 0. Perform a correlation analysis on the mask to generate the number of mold pixel points , and the formula is as follows: The number of mold pixels It is used to reflect the predicted number of Gastrodia elata colony pixels in the photographed image of the i-th Gastrodia elata stem; Perform a correlation analysis on the number of mold pixels to generate a Gastrodia elata colony prediction index , and the formula is as follows: Gastrodia elata Colony Prediction Index An index used to reflect the degree of colony abnormality of the i-th Gastrodia elata stem.
4. The method for monitoring Gastrodia elata diseases based on image recognition according to claim 1, characterized in that: In S3, the three-dimensional coordinate system includes the X, Y, and Z axes, where the Z axis is perpendicular to the planting ground, and the planting ground serves as the XOY plane. Multiple equally spaced planes parallel to the XOY plane are used as dividing planes, with a spacing of 1 cm between the dividing planes. The Gastrodia elata 3D model is segmented by the dividing planes to obtain the central coordinates of each Gastrodia elata 3D model on the dividing plane and the cross-sectional area value . The dividing planes are numbered sequentially from bottom to top, and the superscript h is used to index the dividing plane numbers, with the value range being positive integers between, and the correlation analysis is performed on the central coordinates to generate the mean central offset and the variance of the central offset . The correlation analysis is performed on the cross-sectional area value to generate the mean area and the variance of the area offset . The formula used is: Among them, the mean of the central offset is used to reflect the degree of skewness of the i-th Gastrodia elata stem, and the variance of the central offset is used to reflect the local bending degree index of the i-th Gastrodia elata stem, and the mean of the area is used to reflect the average thickness uniformity of the i-th Gastrodia elata stem, and the variance of the area offset is used to reflect the degree of deformity of the local thickness change of the i-th Gastrodia elata stem.
5. The method for monitoring Gastrodia elata diseases based on image recognition according to claim 1, wherein: Compare the Gastrodia elata disease index with the disease threshold to output the Gastrodia elata disease level. When , output the corresponding Gastrodia elata disease level as level two, indicating a relatively deep degree of disease infection, and targeted observation and determination of the Gastrodia elata status are required; when , output the corresponding Gastrodia elata disease level as level one, indicating that the Gastrodia elata grows normally and no targeted observation is needed.
6. A Gastrodia elata disease monitoring system based on image recognition, which is used to execute the Gastrodia elata disease monitoring method based on image recognition described in claim 1, and is characterized in that Including: A numbering module for numbering the G Gastrodia elata plants in the planting area; An image acquisition module for taking four-directional photos of each Gastrodia elata plant, collecting the image data of the Gastrodia elata stem, removing non-target Gastrodia elata pixel points and blackening them through OpenCV, and performing correlation analysis on the image data to generate the hue, saturation, and lightness of the image data pixel points; A Gastrodia elata colony prediction module for setting the hue range threshold, saturation range threshold, and lightness range threshold, comparing the hue with the hue range threshold, the saturation with the saturation range threshold, and the lightness with the lightness range threshold to generate a mask, performing correlation analysis on the mask to generate the number of mold pixel points, and performing correlation analysis on the number of mold pixel points to generate the Gastrodia elata colony prediction index; A model generation module for establishing a 3D model of Gastrodia elata in the planting area. After placing the 3D model of Gastrodia elata in a three-dimensional coordinate system, perform equidistant horizontal segmentation processing on the 3D model of Gastrodia elata, collect the central coordinates and cross-sectional area values of each 3D model of Gastrodia elata on the segmentation plane, process the central coordinates to generate the central offset mean and central offset variance, and process the cross-sectional area values to generate the area mean and area offset variance of each Gastrodia elata plant; A model analysis module for performing correlation analysis on the central offset mean, central offset variance, area mean, and area offset variance of each Gastrodia elata plant to generate the Gastrodia elata distortion prediction index corresponding to each Gastrodia elata plant; A comprehensive analysis module is used to perform a correlation analysis on the Gastrodia elata distortion prediction index and the Gastrodia elata colony prediction index, generate a Gastrodia elata disease index, compare the Gastrodia elata disease index with a disease threshold, and output the Gastrodia elata disease level.
Citation Information
Patent Citations
Automatic detection system for quality of traditional Chinese medicine
CN102435713A
Bacterial colony recognition and feature extraction method
CN116958260A