Iron stick yam intelligent system and method based on image recognition

Through multimodal data fusion and precise registration technology, the problems of single data dimensions and rough defect identification in the existing iron stick yam detection system are solved, and high-precision quality evaluation and adaptability are achieved to adapt to different environmental changes.

CN120388226AActive Publication Date: 2025-07-29HENAN HUAZHIMEI AGRI TECH CO LTD

Patent Information

Application Number
CN202510472579.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-07-29
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

The existing iron stick yam quality detection system relies on a single sensor and cannot obtain multi-dimensional features such as sugar, texture, and morphology simultaneously. It lacks the ability to accurately identify complex defects. The evaluation results are one-sided and cannot adapt to changes in different environments.

Method used

Multimodal data acquisition and registration technology is adopted, combined with ring polarization light sources, near-infrared imaging and ToF three-dimensional point clouds, a spatial mapping relationship is generated. Through high-precision segmentation and defect evaluation, a comprehensive feature vector is constructed, the quality determination threshold is dynamically adjusted, and a closed-loop feedback system is formed.

Benefits of technology

The multi-dimensional correlation between sugar distribution, texture characteristics and three-dimensional morphology is achieved, and the defects of complex morphology are accurately identified, which improves the comprehensiveness, accuracy and adaptability of quality assessment, and reduces the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120388226A_ABST
    Figure CN120388226A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of iron stick yam image recognition detection, and discloses an iron stick yam intelligent system and method based on image recognition, and the method comprises the steps: dynamically adjusting the polarization direction to generate a polarization suppression image, and generating a space mapping relation; based on the polarization suppression image, segmenting the main body area of the iron stick yam, filling and optimizing the hole edge, generating a high-precision contour mask, further extracting the texture difference between wrinkles and cracks, generating a direction sensitive characteristic pattern, and evaluating morphological defects; constructing a comprehensive feature vector, training a Gaussian mixture model to generate reference distribution, calculating a quality deviation index, and judging a risk level; constructing a double-branch feature vector, outputting a preliminary comprehensive quality score through a complementary aggregation model, introducing a planting density-curvature physical model, obtaining a final quality score, dynamically adjusting a quality judgment threshold, dividing quality grades, and triggering a response strategy according to confidence grade to form a closed loop; and comprehensiveness and accuracy of Chinese yam quality evaluation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition and detection of iron stick yams, and more specifically, the present invention relates to an intelligent system and method for iron stick yams based on image recognition. Background Art

[0002] With the increasing demand for agricultural intelligence, the quality assessment of iron stick yams is gradually transitioning from traditional manual detection to automated systems. However, existing detection systems mostly rely on a single sensor or fixed parameters. For example, sugar content is detected through near-infrared spectroscopy or the morphology is analyzed by three-dimensional imaging, but it is impossible to perform multi-dimensional correlation of sugar distribution, texture features, and three-dimensional morphology, and there is a lack of precise recognition ability for complex defects (such as cracks and bends).

[0003] Existing iron stick yam quality detection systems have various defects, resulting in limited evaluation accuracy and adaptability. First, traditional methods rely on single-sensor data (such as near-infrared or three-dimensional imaging), and it is impossible to synchronously obtain multi-dimensional features such as sugar content, texture, and morphology, resulting in poor data correlation and difficulty in comprehensively characterizing the quality of yams. Second, the contour segmentation technology is rough, and the recognition accuracy of defects on complex surfaces such as wrinkles and bends is low, and it is easy to miss small cracks. In addition, the evaluation model lacks the ability of dynamic adjustment. Fixed threshold classification cannot adapt to different production areas or environmental changes, and does not combine real-time environmental parameters to optimize the classification boundary. At the same time, the system lacks a closed-loop feedback mechanism. The light source parameters (such as polarization angle) rely on manual settings and cannot be adaptively optimized according to the imaging effect, and the long-term operating performance is prone to degradation. These problems together lead to one-sided evaluation results and lagging responses, and cannot meet the requirements of efficient and precise intelligent detection. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art and to achieve the above object, the present invention provides the following technical solutions: An intelligent system and method for iron stick yams based on image recognition, including:

[0005] Multimodal data acquisition and registration unit: Deploy a circularly polarized light source and a rotating polarizer to dynamically adjust the polarization direction to generate a polarization suppression image; synchronously collect the near-infrared sugar distribution map and the ToF three-dimensional point cloud data, and establish a unified coordinate system; then register the three-dimensional point cloud and the two-dimensional image to generate a spatial mapping relationship;

[0006] High-precision segmentation and defect evaluation unit: Based on the polarization suppression image, segment the main area of the iron stick yam, fill the holes through morphological closing operations, and optimize the hole edges by combining the contour smoothness constraint function to generate a high-precision contour mask; based on the spatial mapping relationship, extract the texture differences between wrinkles and cracks to generate a direction-sensitive feature map and evaluate the morphological defects;

[0007] Fusion and Evaluation Unit: Integrate the direction-sensitive feature map and the near-infrared sugar distribution map, and combine the weighing data to construct a comprehensive feature vector. Based on the comprehensive feature vector, train a Gaussian mixture model to generate a benchmark distribution, and then calculate the quality deviation index. Combine the evaluation results of morphological defects to determine the risk level and generate an individual health record for the iron stick yam;

[0008] Quality Scoring and Grade Classification Unit: According to the individual health record, construct a dual-branch feature vector through 3D point cloud data and texture feature vectors, and then output a preliminary comprehensive quality score through a complementary aggregation model. Introduce a physical model of planting density - curvature to deduct points for the excessive curvature index to obtain the final quality score; According to the final quality score, dynamically adjust the quality determination threshold, classify the quality grade, and trigger a response strategy according to the confidence level classification;

[0009] Closed-loop Feedback Unit: Collect the results of manual re-inspection and iteratively update the benchmark distribution of the Gaussian mixture model; And count the polarization suppression images, and adjust the light source wavelength and polarizer angle through Bayesian optimization to improve the imaging quality and form a closed loop.

[0010] Furthermore, the generation method of the spatial mapping relationship includes:

[0011] Based on a circularly polarized light source, generate circularly polarized light through a linear polarizer, and dynamically adjust the polarization direction by rotating the angle of the linear polarizer. Use the polarization suppression algorithm to select the optimal suppression angle to generate a polarization suppression image;

[0012] Use a near-infrared camera to collect the sugar distribution map that penetrates the epidermis of the iron stick yam, and generate a heat map through the spectral absorption effect to obtain the near-infrared sugar distribution map;

[0013] Use a ToF camera to scan the surface of the iron stick yam to generate 3D point cloud data including XYZ coordinates and reflection intensity;

[0014] Synchronously calibrate the parameters of the polarization camera, near-infrared camera and ToF camera through a calibration board to establish a unified coordinate system; Then superimpose the near-infrared sugar distribution map into the polarization suppression image by pixel points as the complete two-dimensional image of the iron stick yam;

[0015] Furthermore, use the ICP algorithm to register the 3D point cloud data with the 2D image, and match through feature point matching technology to generate a spatial mapping relationship in which the sugar value, polarization suppression feature and 3D coordinate of each pixel point correspond one by one.

[0016] Furthermore, the generation method of the high-precision contour mask includes:

[0017] Based on the polarization suppression image, extract the image histogram of the polarization suppression image, count the peak distribution of the image histogram, and identify and divide three threshold intervals;

[0018] Divide the polarization suppression image into a background region, a main body region of Chinese yam, and a noise region according to the threshold interval;

[0019] Furthermore, eliminate the noise region and the background region, retain the main body region of Chinese yam, and screen out the largest connected region within the main body region of Chinese yam as the initial segmentation image through connected component analysis;

[0020] According to the initial segmentation image, set the hole area threshold, and use an elliptical-shaped structural kernel through morphological closing operation to fill the holes in the initial segmentation image with an area larger than the hole area threshold;

[0021] Furthermore, through a segmentation model trained based on historical annotation data, perform pixel-level optimization on the edge region of the filled hole after the closing operation to generate a preliminary repaired segmentation image of the main body of Chinese yam;

[0022] According to the preliminary repaired segmentation image of the main body of Chinese yam, along the contour path of the iron stick yam, calculate the tangent direction angle of each vertex point by point, and fix the arc length step between adjacent two points as the reference unit for calculating the direction change;

[0023] Set a fixed starting point of the contour path, and retrieve all pixel points along the contour path from the fixed starting point through the contour tracking algorithm to mark all vertices;

[0024] According to all vertices, adjust the position of each vertex point by point along the contour path starting from the fixed starting point, including:

[0025] At each vertex, take the absolute difference between the tangent direction angle of the vertex and the tangent direction angle of the previous vertex as the direction angle change rate, and calculate the ratio of the direction angle change rate to the arc length step between adjacent vertices as the curvature value of the vertex;

[0026] Set the curvature threshold, and regard all vertices with curvature values greater than or equal to the curvature threshold as large curvature turning points;

[0027] At each vertex, perform an offset within a range of plus and minus one pixel of the pixel points before and after along the contour path to generate multiple contour paths after vertex offset;

[0028] For each offset contour path, calculate the smoothness score of each contour path through the contour smoothness constraint function formula, and select the contour path with the minimum smoothness score as the optimal path of the vertex;

[0029] Repeat the process of offsetting the position of each vertex and selecting the optimal path of each vertex. During the repetition process, keep the large curvature turning points unchanged, and at the same time smooth the small fluctuations;

[0030] Until the smoothness score of the contour path reaches a preset threshold or the smoothness score no longer changes in b iterations, the final smooth boundary contour is obtained, and then the smooth boundary contour is converted into a binary mask as the final high-precision contour mask.

[0031] Further, the method for evaluating morphological defects includes:

[0032] Based on the high-precision contour mask, the surface of the iron stick yam is divided into c equally angled regions along the circumferential direction;

[0033] The gradient direction and gradient intensity of each pixel point in the high-precision contour mask are calculated through an edge detection algorithm;

[0034] Within each equally angled region, the gradient direction is divided into d direction intervals. Then, according to the gradient intensity of each pixel point, the pixel points are assigned to the corresponding direction intervals, and the sum of the gradient intensities within each direction interval is statistically calculated. The direction interval with the highest sum of gradient intensities within the equally angled region is used as the main direction interval of the equally angled region;

[0035] The sum of the gradient intensities of each direction interval of all equally angled regions is concatenated in sequence to form a direction feature vector;

[0036] Compare the actual angle difference between the main direction intervals of adjacent equally angled regions. If the actual angle difference between the main direction intervals within two adjacent equally angled regions is less than or equal to the preset direction difference threshold, it is determined as a natural fold;

[0037] If the actual angle difference between the main direction intervals within two adjacent equally angled regions is greater than the direction difference threshold, and the ratio of the sum of the gradient intensities between two adjacent equally angled regions is greater than or equal to the intensity ratio threshold, it is determined as a crack defect;

[0038] The equally angled regions determined as natural fold / crack defects are marked as a binary mask and superimposed with the direction feature vector according to the channel intensity to generate a direction-sensitive feature map;

[0039] Extract the actual path length of the central axis of the iron stick yam in the high-precision contour mask, as well as the straight-line distance between the head and tail points of the iron stick yam;

[0040] If the ratio of the actual path length to the straight-line distance is greater than the preset bending threshold, it is determined as abnormal bending; if the ratio of the actual path length to the straight-line distance is less than or equal to the bending threshold, it is determined as normal bending;

[0041] Based on the spatial mapping relationship, the central axis is fitted through 3D point cloud data, discretely sampled at a fixed step along the axis, and the local curvature of each path segment is calculated. All the local curvatures are integrated into a comprehensive bending index;

[0042] Extract the sum of the gradient intensities of all crack defect regions from the direction-sensitive feature map to obtain the total intensity of the crack defects;

[0043] Perform a weighted sum of the comprehensive bending index and the total intensity of the crack defects to obtain a comprehensive defect score; if the comprehensive defect score is greater than a preset comprehensive defect threshold, it is determined as a high-risk defect; if the comprehensive defect score is less than or equal to the comprehensive defect threshold, it is determined as a low-risk defect.

[0044] Further, the generation method of the reference distribution includes:

[0045] Take the direction-sensitive feature map as the texture feature of the surface of the iron stick yam;

[0046] Obtain the sugar distribution data of the iron stick yam through the near-infrared sugar distribution map, and calculate the sugar value of each pixel point;

[0047] Obtain the weighing data of the iron stick yam, and take the ratio of the weight of the iron stick yam to the three-dimensional point cloud volume as the density value of the iron stick yam;

[0048] Flatten the pixel values of the direction-sensitive feature map into a one-dimensional vector, and perform L2 norm normalization to generate a normalized texture feature vector; scale the pixel values of the near-infrared sugar distribution map to the interval [0, 1], and calculate the mean and standard deviation of the sugar values as additional features to generate a sugar feature vector;

[0049] Calculate the ratio of the density value to the reference density value of the standard iron stick yam as the normalized density feature;

[0050] Horizontally concatenate the normalized texture feature vector and density feature, as well as the sugar feature vector and the comprehensive bending index level to form a high-dimensional feature vector, and then perform a weighted sum of the sub-features of the high-dimensional feature vector to construct a comprehensive feature vector;

[0051] Collect historical high-quality iron stick yam samples, extract the comprehensive feature vectors of the samples, and form a training set;

[0052] Use the EM algorithm to train a Gaussian mixture model, and set e Gaussian components;

[0053] Input the training set into the Gaussian mixture model, and iteratively optimize the parameters through the EM algorithm to make the model fit the data distribution, and output the Gaussian mixture distribution as the reference distribution of the iron stick yam.

[0054] Further, the generation method of the individual health record includes:

[0055] Extract the real-time comprehensive feature vector of the current iron stick yam according to the reference distribution of the high-quality samples of the iron stick yam;

[0056] Calculate the absolute difference between each dimension value in the real-time comprehensive feature vector of the current iron stick yam and the mean value of the corresponding dimension in the benchmark distribution respectively, and then obtain the quality deviation index of the current iron stick yam through weighted summation;

[0057] Set a deviation index threshold. If the quality deviation index is greater than the deviation index threshold, it is determined that the current iron stick yam has a high health risk;

[0058] If the quality deviation index is less than or equal to the deviation index threshold, it is determined that the current iron stick yam has a low health risk;

[0059] If the current iron stick yam meets the high health risk or high-risk defects, it is determined that the iron stick yam is at a high-risk level;

[0060] If the current iron stick yam meets the low health risk and low-risk defects, it is determined that the iron stick yam is at a low-risk level;

[0061] Integrate the real-time comprehensive feature vector, deviation index, comprehensive bending index, crack defects, position coordinates of crack defects, and the corresponding risk level of the iron stick yam to generate an individual health record.

[0062] Furthermore, the method for obtaining the final quality score includes:

[0063] According to the individual health record of the iron stick yam, for the iron stick yam at the low-risk level, downsample and normalize the coordinate of the three-dimensional point cloud data of the iron stick yam;

[0064] Extract the local geometric features and global morphological features from the three-dimensional point cloud data through point cloud network technology; and then horizontally splice them into a morphological feature vector;

[0065] Horizontally splice the morphological feature vector and the normalized texture feature vector into a double-branch feature vector;

[0066] Take the double-branch feature vector as the input, use the complementary feature aggregation model to generate a coordinate attention map, aggregate the feature vector, and then convert the aggregated feature vector into a preliminary comprehensive quality score through the fully connected layer of the complementary feature aggregation model;

[0067] Through the physical relationship model of the planting density and bending degree of the iron stick yam, obtain the theoretical bending index of the iron stick yam. If the actual comprehensive bending index is greater than the theoretical bending index, it is determined that the preliminary comprehensive quality score needs to be deducted according to the preset deduction value;

[0068] If the actual comprehensive bending index is less than or equal to the theoretical bending index, it is determined that no deduction is required, and the deduction value is recorded as 0;

[0069] Take the difference between the preliminary comprehensive quality score and the deduction value as the final quality score.

[0070] Furthermore, the method of triggering the response strategy according to the confidence level grading includes:

[0071] Set an initial quality determination threshold based on the final quality score;

[0072] Collect the real-time environmental parameters of the current production area of the iron stick yam, and normalize the real-time environmental parameters into environmental impact factors through the environmental parameter function;

[0073] Modify the initial quality determination threshold through the environmental impact factor to obtain a dynamic quality determination threshold;

[0074] Based on the final quality score and the dynamic quality determination threshold of the iron stick yam, divide the basic quality grades through a pre-trained global model, and output the quality grade of the iron stick yam and the corresponding grade confidence level;

[0075] Among them, the basic quality grades include first grade, second grade and third grade;

[0076] Set a threshold interval for the grade confidence level. If the grade confidence level of the iron stick yam is greater than the maximum value of the threshold interval for the grade confidence level, directly determine the quality grade of the iron stick yam without re-inspection;

[0077] If the grade confidence level is less than or equal to the maximum value of the threshold interval for the grade confidence level and greater than or equal to the minimum value of the confidence level interval, it is determined as low confidence. For the iron stick yam with low confidence, it is pushed to the auxiliary re-inspection queue and combined with manual judgment to confirm the grade;

[0078] If the grade confidence level is less than the minimum value of the threshold interval for the grade confidence level, it is determined that the quality is abnormal, and manual sampling inspection is synchronously triggered.

[0079] Furthermore, the method of forming a closed loop includes:

[0080] Take the iron stick yam after manual re-inspection and confirmation of the grade as sample data, extract the morphological features and texture features of the sample, merge the new sample with the historical data, and re-train the Gaussian mixture model through the EM algorithm; count the current polarization suppression image, and adjust the light source wavelength and polarizer angle through Bayesian optimization according to the suppression effect of the polarization suppression image; form a closed-loop system with data-driven, environment-adaptive, and hardware co-optimization.

[0081] Furthermore, an intelligent method for iron stick yam based on image recognition is characterized by including:

[0082] S1: Deploy a circularly polarized light source and a rotating polarizer, dynamically adjust the polarization direction to generate a polarization suppression image; synchronously collect the near-infrared sugar distribution map and the ToF three-dimensional point cloud data, and establish a unified coordinate system; then register the three-dimensional point cloud and the two-dimensional image to generate a spatial mapping relationship;

[0083] S2: Based on the polarization-suppressed image, segment the main area of the iron stick yam, fill the holes through morphological closing operation, optimize the hole edges by combining with the contour smoothness constraint function, and generate a high-precision contour mask; based on the spatial mapping relationship, extract the texture differences between wrinkles and cracks, generate a direction-sensitive feature map, and evaluate the morphological defects;

[0084] S3: Integrate the direction-sensitive feature map and the near-infrared sugar distribution map, and combine with the weighing data to construct a comprehensive feature vector. Based on the comprehensive feature vector, train a Gaussian mixture model to generate a benchmark distribution, then calculate the quality deviation index, and combine with the evaluation results of morphological defects to determine the risk level and generate an individual health record of the iron stick yam;

[0085] S4: According to the individual health record, construct a two-branch feature vector through three-dimensional point cloud data and texture feature vectors, and then output a preliminary comprehensive quality score through a complementary aggregation model. Introduce a planting density-curvature physical model to deduct points for the excessive bending index to obtain the final quality score; according to the final quality score, dynamically adjust the quality judgment threshold, divide the quality grades, and trigger response strategies according to the confidence level classification;

[0086] S5: Collect the results of manual re-inspection, and iteratively update the benchmark distribution of the Gaussian mixture model; and count the polarization-suppressed images, adjust the light source wavelength and polarizer angle through Bayesian optimization to improve the imaging quality and form a closed loop.

[0087] The technical effects and advantages of an intelligent system and method for iron stick yam based on image recognition:

[0088] Aiming at the core problems in traditional yam quality assessment, such as single data dimension, rough defect recognition, and one-sided evaluation, through multi-modal data fusion and precise registration, combined with circularly polarized light source, near-infrared imaging and ToF three-dimensional point cloud technology, the three-dimensional correlation of sugar distribution, texture features and three-dimensional morphology is realized, and the spatial mapping relationship is generated through the ICP algorithm, solving the problem of single data dimension in traditional methods and providing a high-fidelity data basis for subsequent analysis;

[0089] Secondly, by using curvature-constrained contour smoothing and direction-sensitive feature map analysis technology, accurately identify natural wrinkles and crack defects, quantify the comprehensive bending index and crack strength, and significantly improve the contour extraction accuracy and defect recognition accuracy of yams with complex morphology;

[0090] Thirdly, by fusing multi-dimensional features such as texture, sugar, density and curvature to construct a high-dimensional feature vector, and generating a benchmark distribution based on the Gaussian mixture model (GMM), dynamically calculate the quality deviation index, breaking through the limitations of single-feature evaluation and making the results closer to the actual quality standards;

[0091] In addition, a physical model of planting density - curvature and a dynamic threshold adjustment mechanism for environmental parameters are introduced. By combining real-time environmental impact factors to optimize the classification boundary, the quality differences under different production areas and growth conditions can be effectively adapted to.

[0092] Finally, the GMM model is iteratively updated through manual rechecking, and the light source parameters are adjusted using Bayesian optimization to form a "data - model - hardware" closed-loop feedback system. This improves the comprehensiveness, accuracy, and long-term reliability of the yam quality assessment, enhances the robustness and adaptive ability of the system during long-term operation, and reduces the need for manual intervention. Description of the Drawings

[0093] Figure 1 Schematic diagram of an intelligent system for iron stick yams based on image recognition according to the present invention;

[0094] Figure 2 Schematic diagram of the process for generating a high-precision contour mask in an intelligent system for iron stick yams based on image recognition according to the present invention;

[0095] Figure 3 Schematic diagram of an intelligent method for iron stick yams based on image recognition according to the present invention. Detailed Embodiments

[0096] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0097] Embodiment 1

[0098] Please refer to Figure 1 and Figure 2 As shown, an intelligent system and method for iron stick yams based on image recognition in this embodiment includes:

[0099] Multimodal data acquisition and registration unit: Deploy a circularly polarized light source and a rotating polarizer to dynamically adjust the polarization direction to generate a polarization suppression image; synchronously collect the near-infrared sugar distribution map and the ToF three-dimensional point cloud data, establish a unified coordinate system; and then register the three-dimensional point cloud and the two-dimensional image to generate a spatial mapping relationship.

[0100] High-precision segmentation and defect assessment unit: Based on the polarization-suppressed image, segment the main area of the iron stick yam, fill the holes through morphological closing operation, optimize the hole edges by combining the contour smoothness constraint function, and generate a high-precision contour mask; Based on the spatial mapping relationship, extract the texture differences of wrinkles and cracks, generate a direction-sensitive feature map, and evaluate the morphological defects;

[0101] Fusion and assessment unit: Integrate the direction-sensitive feature map and the near-infrared sugar distribution map, and combine with the weighing data to construct a comprehensive feature vector. Based on the comprehensive feature vector, train a Gaussian mixture model to generate a benchmark distribution, then calculate the quality deviation index, and combine with the evaluation results of morphological defects to determine the risk level and generate an individual health record of the iron stick yam;

[0102] Quality scoring and grading unit: According to the individual health record, construct a two-branch feature vector through 3D point cloud data and texture feature vectors, and then output a preliminary comprehensive quality score through a complementary aggregation model. Introduce a physical model of planting density - curvature to deduct points for the excessive curvature index to obtain the final quality score; According to the final quality score, dynamically adjust the quality determination threshold, divide the quality grades, and trigger a response strategy according to the confidence level classification;

[0103] Closed-loop feedback unit: Collect the results of manual re-inspection, and iteratively update the benchmark distribution of the Gaussian mixture model; And count the polarization-suppressed images, adjust the light source wavelength and polarizer angle through Bayesian optimization to improve the imaging quality and form a closed loop;

[0104] Specifically, an annularly arranged LED array is used as an annular polarized light source (such as a wavelength of 450 - 959 nm) to eliminate the interference of water stain reflection, and the light source angle forms a 45° angle with the normal of the iron stick yam surface to ensure uniform illumination. A rotatable linear polarizer (driven by a stepper motor) is installed in front of the camera. Based on the annular polarized light source, circularly polarized light is generated through the linear polarizer, and the polarization direction is dynamically adjusted by rotating the angle of the linear polarizer (such as stepping 5° from 0° to 90°) to eliminate the specular reflection (water stain) on the surface of the iron stick yam. The polarization suppression algorithm (such as Stokes parameter calculation) is used to select the optimal suppression angle to generate a polarization-suppressed image;

[0105] It should be noted that the surface of freshly picked iron stick yams is often attached with wet soil, and water stains will form strong specular reflections (especially under LED light sources), resulting in overexposed images or blurred textures;

[0106] The surface of the iron stick yam is irradiated at a 45° angle by an annularly arranged LED array, reducing the hard reflection of direct light on the epidermis while providing uniform illumination;

[0107] Combined with the dynamic suppression of reflection by rotating a polarizer, the generated polarization suppression image can clearly display the true texture of the iron stick yam (such as longitudinal wrinkles and transverse cracks), avoiding misjudgment caused by environmental interference;

[0108] The sugar in the iron stick yam is mainly distributed in the subcutaneous tissue, and ordinary visible light cannot penetrate the epidermis to obtain the distribution information of sugar; traditional length measurement can only obtain the "straight-line distance between the head and the tail", but the actual bending shape (such as snake-shaped bending) requires the calculation of the true length and curvature through three-dimensional point cloud;

[0109] Use a near-infrared camera (such as a wavelength of 850±50nm) to collect the sugar distribution map that penetrates the epidermis of the iron stick yam, and generate a heat map through the spectral absorption effect (the sugar absorption peak is located at 1000-1200nm) to quantify the sugar gradient distribution at a depth of 3mm under the skin, obtaining a near-infrared sugar distribution map;

[0110] Use a ToF camera (940nm laser pulse) to scan the surface of the iron stick yam with an accuracy of 0.nm to generate three-dimensional point cloud data including XYZ coordinates and reflection intensity, and the sampling frequency is synchronized with the polarization image (such as 25 frames per second);

[0111] Use near-infrared light with a wavelength of 850±50nm to penetrate the epidermis to a depth of 3nm, and generate a sugar heat map through the light absorption characteristics of sugar (the absorption peak is at 1000-1200nm) to quantify the sugar gradient distribution under the skin;

[0112] Then capture the XYZ three-dimensional coordinates and reflection intensity of all points on the surface of the yam with an accuracy of 0.1mm to construct a high-precision three-dimensional point cloud model, which can be used for subsequent calculation of morphological parameters such as curvature and actual length;

[0113] If only the polarization image, sugar heat map and three-dimensional point cloud are independently collected, it is impossible to determine whether the sugar value, texture feature and three-dimensional coordinates of a certain pixel point correspond to the same physical position during subsequent analysis;

[0114] Synchronously calibrate the internal and external parameters of the polarization camera, near-infrared camera and ToF camera through a calibration board (black and white checkerboard + infrared marker points) (such as camera focal length, lens distortion, pose relationship between the camera and the point cloud coordinate system), and establish a unified coordinate system (ensure that all data share the same coordinate system (accuracy ±0.2mm)); then superimpose the near-infrared sugar distribution map into the polarization suppression image by pixel points as the complete two-dimensional image of the iron stick yam;

[0115] Furthermore, use the ICP (Iterative Closest Point) algorithm to register the three-dimensional point cloud data with the two-dimensional image, and generate a spatial mapping relationship in which the sugar value, polarization suppression feature and three-dimensional coordinates of each pixel point correspond one-to-one through feature point matching technology (ORB feature) matching (such as the corner points of the natural texture on the surface of the iron stick yam);

[0116] It should be noted that after the iron stick yam is picked, there may be a large amount of soil, water stains, and complex texture features such as natural growth wrinkles and cracks on its surface. At the same time, it is difficult to directly obtain internal or three-dimensional morphological information such as the sugar distribution and morphological bending degree of the yam epidermis through a single sensor. At this time, if only relying on traditional visual detection methods, it will face serious environmental interference (water stain reflection will cover the true texture of the yam, and soil occlusion will cause image area loss or noise interference), insufficient information dimension (ordinary images cannot penetrate the epidermis to detect sugar, nor can they accurately obtain three-dimensional morphology (such as bending degree, length, etc.)), and poor data correlation (if different sensor data are independently collected (such as separately collecting images and three-dimensional point clouds), it is impossible to accurately correspond to the sugar, texture, and morphological features of the same area during subsequent analysis);

[0117] Therefore, through this multi-modal data collaborative acquisition and spatial registration, a precise and complete multi-dimensional feature database of yam is constructed, providing reliable input for subsequent defect assessment and quality grading;

[0118] For example, if an abnormal sugar content is detected at a certain pixel point (the heat map shows a low value), its three-dimensional coordinates can be directly associated to locate the specific growth position, and combined with morphological data (such as whether there are cracks or bends in this area) to comprehensively judge the quality problem;

[0119] Based on the polarization suppression image, extract the image histogram of the polarization suppression image, statistically analyze the peak distribution of the image histogram, and identify and divide it into three threshold intervals (it should be noted that this is based on histogram analysis to automatically divide three threshold regions, rather than manually setting), which respectively correspond to the background region (low gray value, such as soil or dark part), the main body region of the yam (medium gray value, corresponding to the epidermis texture of the yam), and the noise region (high gray value or abnormal value, such as residual reflection or sensor noise);

[0120] According to the threshold intervals, divide the polarization suppression image into the background region, the main body region of the yam, and the noise region;

[0121] Furthermore, eliminate the noise region (because the noise region is usually an isolated region with an area less than 500 pixels² or a high gray abnormal value) and the background region (the background region has a low gray value and is excluded from the segmentation result), retain the main body region of the yam, and screen out the largest connected region within the main body region of the yam through connected component analysis as the initial segmentation image (that is, the main body region of the yam after separating the noise and the background);

[0122] It should be noted that dividing the threshold intervals through the peak distribution of the histogram aims to dynamically adapt to the gray value changes on the surface of the yam caused by soil, wrinkles, etc., rather than a fixed threshold; for the unique longitudinal wrinkles and epidermis texture of the iron stick yam, the threshold interval design can take into account the surface complexity and background interference (such as the low gray value in the soil-covered area);

[0123] The surface of yam is often covered with moist soil, which causes local loss (holes) in the main area of the segmented image, affecting the accuracy of subsequent feature extraction.

[0124] Therefore, according to the initial segmentation image, a hole area threshold (such as 1000 pixels2) is set, and the holes in the initial segmentation image with an elliptical structure kernel (radius 3 pixels) are filled with an elliptical structure kernel (radius 3 pixels) through morphological closing operation. This is the expansion-erosion operation. The expansion-erosion operation bridges the broken area along the natural texture direction of the yam skin.

[0125] Then, using a segmentation model trained on historically labeled data (such as the U-Net architecture), pixel-level optimization is performed on the edge areas of the holes filled after the closing operation to correct edge deviations that may be introduced by morphological operations, ensuring that the restored contour is consistent with the actual boundary of the yam. At the same time, the constraint algorithm of the U-Net architecture segmentation model prevents the background area from mistakenly entering the main area due to excessive expansion of the morphological operation, thus generating a preliminary repaired segmentation image of the yam body.

[0126] It should be noted that pixel-level optimization is a fine-tuning operation for each pixel in an image, aiming to improve image quality or meet specific needs. Its core is to achieve the goal through pixel-by-pixel modification (such as color, brightness, position, etc.), that is, to repair edge deviations that may be introduced by morphological operations and make the edges of filled holes smooth;

[0127] By setting a hole area threshold (e.g., 1000 pixels²), defects caused by large clumps of soil are repaired first, while preventing interference with the normal segmentation of small particles. A deep learning model (pre-trained segmentation model) is then used to correct edges and address the "staircase effect" (e.g., jagged edges) that may be introduced by morphological operations.

[0128] Morphological closing solves the hole filling problem, but leaves rough edges or localized dilation errors. The segmentation model U-Net optimization fixes the edge deviations from the closing operation, but cannot completely eliminate all jagged edges (such as micro-texture discontinuities). Therefore, the initially repaired yam segmentation image still needs to be further optimized through contour smoothness constraint optimization to improve boundary smoothness.

[0129] Based on the initially repaired segmented image of the yam body, the tangent direction angle of each vertex (i.e., the forward direction of the contour at that point) is calculated point by point along the contour path of the iron stick yam. The arc length step between two adjacent points is fixed (e.g., 2 pixels) as the reference unit for calculating the direction change.

[0130] Set a fixed starting point for the contour path (such as the first pixel in the upper left corner), use the contour tracing algorithm to retrieve all pixels along the contour path from the fixed starting point, and mark all vertices;

[0131] That is, scan the image in order from top to bottom and from left to right to find the first non-background image, such as the first pixel in the upper left corner, and then search the 3×3 neighborhood of adjacent pixels in the counterclockwise direction. Determine the next moving direction according to the current direction (such as 4-connectivity or 8-connectivity). When the path direction changes significantly (such as the included angle of the direction vectors exceeds the threshold), this point is marked as a vertex. For example, if the change in the direction angle of three adjacent points (A-1→A→A+1) exceeds the preset value (such as 60°), then A is a vertex;

[0132] According to all the vertices, starting from a fixed starting point, adjust the position of each vertex point by point along the contour path, including:

[0133] At each vertex, take the absolute difference between the tangent direction angle of the vertex and the tangent direction angle of the previous vertex as the direction angle change rate, and calculate the ratio of the direction angle change rate to the arc length step between adjacent vertices as the curvature value of the vertex;

[0134] Set a curvature threshold (which can be set according to the natural bending amplitude of the surface of the iron stick yam, such as 0.3 radians / pixel), and regard all vertices with curvature values greater than or equal to the curvature threshold as large curvature turning points;

[0135] At each vertex, offset in the positive and negative one-pixel range of the pixels before and after along the contour path (that is, at each vertex, by adjusting the position within the range of ±1 pixel, multiple possible adjustment directions are obtained), and generate multiple contour paths after vertex offset;

[0136] It should be noted that the multiple contour paths generated here are generated after the offset of one vertex. Because the positions within the range of ±1 pixel of each vertex are equivalent to taking the vertex as the center point, and there are eight offsettable positions around it. The possible offset directions are to the right, to the left, down, up, to the upper left, to the lower left, to the upper right, and to the lower right. One vertex can offset eight paths;

[0137] For each offset contour path, calculate the smoothness score of each contour path through the contour smoothness constraint function formula, and select the contour path with the smallest smoothness score as the optimal path of the vertex;

[0138] The contour smoothness constraint function formula is: where N is the total number of vertexes of the contour path, S represents the smoothness score, j represents the vertex index, θ j represents the tangent direction angle of vertex j, and Δs j represents the arc length step between adjacent vertices (a fixed pixel, such as fixed at 2 pixels);

[0139] It should be noted that the optimal path mentioned here is for a single vertex. From the eight offset paths corresponding to a vertex, the contour path with the minimum smoothness score is selected as the optimal path for this vertex;

[0140] Repeat the process of offsetting the position of each vertex and selecting the optimal path for each vertex. During the repetition process, keep the large curvature turning points unchanged while smoothing the small fluctuations;

[0141] Until the smoothness score of the contour path reaches the preset threshold or the smoothness score no longer changes in b iterations, the final smooth boundary contour is obtained. Then, convert the smooth boundary contour into a binary mask as the final high-precision contour mask (that is, set the pixels inside the smooth boundary contour to 1 and the background to 0, and at this time a binary mask is obtained, which can be used as the high-precision contour mask);

[0142] Among them, set the threshold of the direction angle change rate. If the direction angle change rate between adjacent vertices is less than the direction angle change rate threshold, it is determined that there are small fluctuations in the area between the vertex and the adjacent vertex. For the areas determined to have small fluctuations, force the selection of the path with the minimum smoothness score as the method of smoothing;

[0143] Based on the high-precision contour mask, divide the surface of the iron stick yam along the circumferential direction into c equal-angle regions, so that each equal-angle region covers a local area of the yam surface;

[0144] Calculate the gradient direction (texture orientation) and gradient intensity (texture clarity) of each pixel point in the high-precision contour mask through the edge detection algorithm;

[0145] Within each equal-angle region, divide the gradient direction into d direction intervals. Then, according to the gradient intensity of each pixel point, allocate the pixel points to the corresponding direction intervals, and count the total gradient intensity within each direction interval. And take the direction interval with the highest total gradient intensity within the equal-angle region as the main direction interval of the equal-angle region;

[0146] Concatenate the total gradient intensity of each direction interval of all equal-angle regions in order to form a direction feature vector (a c×d-dimensional vector);

[0147] Compare the actual angle differences of the main direction intervals of adjacent equal-angle regions. If the actual angle differences of the main direction intervals within two adjacent equal-angle intervals are less than or equal to the preset direction difference threshold (which can be set according to the maximum angle change allowed by natural textures and can be obtained based on the morphology of naturally grown iron stick yams), it is determined as a natural fold;

[0148] For example, if the main direction interval of an equal - angle region is 0° - 30° and the adjacent equal - angle region is 60° - 90°, then the angle difference is 30°, which needs to be compared with the direction difference threshold (such as 30°);

[0149] If the actual angle difference between the main direction intervals in two adjacent equal - angle regions is greater than the direction difference threshold, and the ratio of the total gradient intensity between the two adjacent equal - angle regions is greater than or equal to the intensity ratio threshold (which can be set according to the experience of industry experts), then it is determined as a crack defect;

[0150] Exemplarily, assume an adjacent region:

[0151] Region A: The main direction is 0° - 30° and the total intensity is 100;

[0152] Region B: The main direction is 60° - 90° and the total intensity is 200;

[0153] Determination: The direction difference is 30°. If the threshold is 30°, then it is determined as a wrinkle;

[0154] If the threshold is 20°, then it is determined as a crack, and check the intensity ratio (200 / 100 = 2 times). If the intensity ratio threshold is 2 times, then the final determination is a crack;

[0155] Mark the equal - angle regions determined as natural wrinkles / crack defects as binary masks, and superpose them with the direction feature vectors according to the channel intensity to generate a direction - sensitive feature map (a multi - channel feature map);

[0156] Extract the actual path length of the central axis of the Chinese yam in the high - precision contour mask, as well as the straight - line distance between the head and tail points of the Chinese yam;

[0157] If the ratio of the actual path length to the straight - line distance is greater than the preset bending threshold (this bending threshold can be set according to the shape of naturally grown Chinese yams), then it is determined as abnormal bending; if the ratio of the actual path length to the straight - line distance is less than or equal to the bending threshold, then it is determined as normal bending;

[0158] Fit the central axis through the three - dimensional point cloud data, discretely sample along the axis at a fixed step size (such as 2, 4, 5), calculate the local curvature (i.e., the degree of bending) of each path segment, and integrate all the local curvatures into a comprehensive bending index to reflect the overall morphological distortion degree (the higher the index, the more severe the bending);

[0159] Extract the total gradient intensity of all crack defect regions from the direction - sensitive feature map to obtain the total intensity of crack defects (i.e., the sum value of the total gradient intensity of all crack defect regions);

[0160] Perform a weighted sum of the comprehensive bending index and the total intensity of crack defects to obtain the comprehensive defect score;

[0161] If the comprehensive defect score is greater than the preset comprehensive defect threshold, it is determined as a high-risk defect; if the comprehensive defect score is less than or equal to the comprehensive defect threshold, it is determined as a low-risk defect.

[0162] Take the direction-sensitive feature map as the texture feature of the surface of the iron stick yam.

[0163] Obtain the sugar distribution data of the iron stick yam through the near-infrared sugar distribution map, and calculate the sugar value of each pixel point.

[0164] Obtain the weighing data of the iron stick yam, and take the ratio of the weight of the iron stick yam to the volume of the three-dimensional point cloud as the density value of the iron stick yam.

[0165] Flatten the pixel values of the direction-sensitive feature map into a one-dimensional vector, and perform L2 norm normalization to generate a normalized texture feature vector; scale the pixel values of the near-infrared sugar distribution map to the interval [0, 1], and calculate the mean and standard deviation of the sugar values as additional features (reflecting the distribution characteristics) to generate a sugar feature vector.

[0166] Calculate the ratio of the density value to the reference density value of the standard iron stick yam as the normalized density feature.

[0167] Horizontally concatenate the normalized texture feature vector and density feature, as well as the sugar feature vector and the comprehensive bending index to form a high-dimensional feature vector, and then perform weighted summation on each sub-feature of the high-dimensional feature vector (i.e., preset a weight respectively, such as texture 0.3, sugar 0.3, density 0.2, comprehensive bending index 0.2) to construct a comprehensive feature vector.

[0168] Collect historical high-quality iron stick yam samples (the number of samples is preferably ≥ 1000 cases, high-quality samples without defects, with qualified sugar content (such as the mean within a reasonable range), and normal morphology (bending index ≤ 70)), extract the comprehensive feature vectors of the samples to form a training set.

[0169] Use the EM algorithm to train the Gaussian mixture model, set e (such as 10) Gaussian components to capture the diversity of data distribution, and each Gaussian component consists of a mean, a covariance matrix, and a weight.

[0170] Input the training set into the Gaussian mixture model, and iteratively optimize the parameters through the EM algorithm to make the model fit the data distribution, and output the Gaussian mixture distribution as the benchmark distribution of high-quality samples of the iron stick yam.

[0171] Extract the real-time comprehensive feature vector of the current iron stick yam according to the benchmark distribution of high-quality samples of the iron stick yam.

[0172] Calculate the absolute difference between each dimension value in the real-time comprehensive feature vector of the current iron stick yam and the mean value of the corresponding dimension in the reference distribution, and then obtain the quality deviation index of the current iron stick yam through weighted summation;

[0173] The formula for calculating the quality deviation index is: where ZS represents the quality deviation index, U represents the number of dimensions, w v represents the weight coefficient of the v-th dimension value, x v represents the v-th dimension value of the real-time comprehensive feature vector, and μ v represents the mean value of the corresponding dimension in the reference distribution;

[0174] where w v can be dynamically adjusted according to the collection season (for example, increase the sugar weight to 0.5 during the rainy season. Since sugar is easily lost during the rainy season, stricter monitoring is required);

[0175] Set the deviation index threshold (which can be set according to historical data statistics, such as setting based on the statistics of the reference distribution. An example is to calculate the mean and standard deviation of the deviation index of the reference distribution, and then take the sum of the mean of the deviation index and 1.5 times the standard deviation as the deviation index threshold). If the quality deviation index is greater than the deviation index threshold, it is determined that the current iron stick yam has a high health risk;

[0176] If the quality deviation index is less than or equal to the deviation index threshold, it is determined that the current iron stick yam has a low health risk;

[0177] If the current iron stick yam meets the high health risk or high-risk defects, it is determined that the iron stick yam is at a high-risk level;

[0178] If the current iron stick yam meets the low health risk and low-risk defects, it is determined that the iron stick yam is at a low-risk level;

[0179] Integrate the real-time comprehensive feature vector, deviation index, comprehensive bending index, crack defects, position coordinates of crack defects, and the corresponding risk level of the iron stick yam to generate an individual health record;

[0180] According to the individual health record of the iron stick yam, for the iron stick yam at a high-risk level, mark it. For the marked high-risk iron stick yam, it can be removed immediately upon identification, or it can be transferred to the manual re-inspection step. The specific processing method can be adjusted according to requirements;

[0181] For the iron stick yam at a low-risk level, perform downsampling and coordinate normalization on the three-dimensional point cloud data of the iron stick yam;

[0182] Extract local geometric features (such as normal vectors, curvatures) and global morphological features (such as total length, curvature integral, bending index) from 3D point cloud data through point cloud network technologies (such as PointNet++ or PointCNN); and then horizontally splice them into a morphological feature vector;

[0183] Horizontally splice the morphological feature vector and the normalized texture feature vector into a two-branch feature vector (e.g., assuming the morphological feature is 128-dimensional and the texture feature is 64-dimensional, then the total dimension is 192-dimensional);

[0184] Take the two-branch feature vector as the input, use the complementary feature aggregation model to generate a coordinate attention map, obtain the aggregated feature vector by dynamically weighting the features of the morphological bending region and the texture abnormal region, and then convert the aggregated feature vector into a preliminary comprehensive quality score (0 - 100 points) through the fully connected layer of the complementary feature aggregation model;

[0185] Through the physical relationship model between the planting density and the bending degree of iron stick yam, obtain the theoretical bending index of iron stick yam. If the actual comprehensive bending index is greater than the theoretical bending index, it is determined that the preliminary comprehensive quality score needs to be deducted according to the preset deduction value (such as 10 - 20 points, used to correct the preliminary comprehensive quality score);

[0186] If the actual comprehensive bending index is less than or equal to the theoretical bending index, it is determined that no deduction is required, and the deduction value is recorded as 0;

[0187] The formula of the physical relationship model between planting density and bending degree is: B 理论 = k × D -α + β;

[0188] Among them, B 理论 is the theoretical bending index of iron stick yam, k is the proportionality coefficient, reflecting the strength of the basic relationship between planting density and bending degree. When D = 1, B 理论 = k + β, k can be obtained by fitting historical experimental data (such as linear regression or non-linear fitting), D represents the planting density, referring to the number of iron stick yams planted per unit area (such as per square meter) or the reciprocal of the planting spacing. When the planting density is larger (the D value is higher), the growth space of iron stick yam is smaller, and theoretically the bending degree is lower, which is calculated through planting records or field measurements (such as plant spacing, row spacing), α represents the exponential coefficient, controlling the influence rate of planting density on bending degree. If α > 0, then D -αIt decreases as it gets larger, indicating that an increase in planting density will reduce the curvature. The larger the value of α, the more significant the impact of planting density on the curvature. Through fitting historical data (such as by the least squares method or machine learning model), β represents the intercept term, indicating the theoretical minimum curvature when the planting density D→∞ (i.e., infinitely dense). Even when the planting density is extremely high, the yam may still have a minimum curvature due to other factors (such as soil texture, moisture), and it is fitted with k and α through historical data;

[0189] Exemplarily, the theoretical bending index calculated by the physical relationship model between planting density and curvature is 38.7. If the real-time curvature is 45, a deduction of points is triggered (45>38.7), and 10 points (g = 10) need to be deducted from the final quality score;

[0190] Take the difference between the preliminary comprehensive quality score and the deduction value as the final quality score;

[0191] Based on the final quality score, set an initial quality determination threshold (which can be set based on historical data across production areas by industry experts according to experience, or a fixed threshold can be obtained through machine learning training based on historical data across production areas);

[0192] Collect the real-time environmental parameters (such as soil humidity, temperature, precipitation, sunlight) of the current production area of the iron stick yam, and normalize the real-time environmental parameters into environmental impact factors through the environmental parameter function;

[0193] The environmental parameter function can be designed as a linear combination. For example: Among them, qz1, qz2,... are the weights of each environmental parameter (which can be determined through historical data correlation analysis); for extreme parameters (such as soil humidity exceeding the critical value), use an exponential or Sigmoid function to amplify the impact;

[0194] Through the environmental impact factor, if the environmental parameter is not conducive to the growth of the iron stick yam (such as high humidity leading to easy decay), then reduce the tolerance threshold. If the environmental parameter is favorable (such as suitable temperature), then the threshold can be appropriately relaxed (but excessive adjustment needs to be avoided);

[0195] Modify the initial quality determination threshold through the environmental impact factor to obtain a dynamic quality determination threshold;

[0196] The modification method is: dynamic threshold = global threshold × (1 + Δ×f(environmental parameter)), where Δ is the adjustment coefficient, which controls the sensitivity of the environmental parameter to the threshold adjustment. Usually, it is a decimal (such as 0.1~0.3) to avoid drastic fluctuations in the threshold. Δ can be determined through historical data experiments and optimized through cross-validation to ensure the stability of the adjusted score;

[0197] Based on the final quality score of the iron stick yam and the dynamic quality determination threshold, a pre-trained global model (a simple classification model trained based on historical data across production areas, such as data of ≥10,000 iron stick yam samples) divides the basic quality grades (such as A / B / C grades), outputs the quality grade of the iron stick yam, and the corresponding grade confidence level (such as the confidence level that a certain sample is grade A is 85%);

[0198] Among them, the basic quality grades include first grade, second grade, and third grade;

[0199] Set the grade confidence threshold interval. If the grade confidence of the iron stick yam is greater than the maximum value of the grade confidence threshold interval, directly determine the quality grade of the iron stick yam without re-inspection (Example: If the comprehensive score corresponds to grade A and the confidence level > 90%, directly determine it as grade A without re-inspection);

[0200] If the grade confidence is less than or equal to the maximum value of the grade confidence threshold interval and greater than or equal to the minimum value of the grade confidence interval, it is determined as low confidence. For the iron stick yam with low confidence, it is pushed to the auxiliary re-inspection queue and the grade is confirmed in combination with manual judgment;

[0201] If the grade confidence is less than the minimum value of the grade confidence threshold interval, it is determined that the quality is abnormal and manual re-inspection is triggered synchronously;

[0202] It should be noted that the significance of the basic grade division is as follows: first / second / third grade: it can provide a grading standard for market circulation (such as grade A for high-end markets and grade C for processing raw materials); dynamic threshold adaptation: ensure fair grading of yams from different production areas due to environmental differences (such as higher allowable curvature in dry northern regions);

[0203] Taking the iron stick yam after manual re-inspection confirmation of the grade as sample data, extracting the morphological and texture features of the sample, merging the new sample with the historical data, and re-training the Gaussian mixture model through the EM algorithm to optimize the classification boundary to cover the distribution characteristics of high-quality samples, ensuring that the benchmark distribution matches the characteristics of actual high-quality samples; statistically analyzing the current polarization suppression image, and adjusting the light source wavelength and polarizer angle through Bayesian optimization according to the suppression effect of the polarization suppression image to improve the image quality and segmentation accuracy; forming a closed-loop system of data-driven, environment-adaptive, and hardware co-optimization, enabling the model to dynamically adapt to environmental changes (such as humidity and light fluctuations) during continuous iteration, reducing the misdetection rate, improving the detection robustness, and realizing full-link self-learning and performance evolution from data to hardware.

[0204] Embodiment 2

[0205] Please refer to Figure 2 As shown, for the parts not described in detail in this embodiment, refer to the description content of Embodiment 1. Provide an intelligent method for iron stick yam based on image recognition, including:

[0206] S1: Deploy a circularly polarized light source and a rotating polarizer to dynamically adjust the polarization direction to generate a polarization suppression image; synchronously collect the near-infrared sugar distribution map and the ToF three-dimensional point cloud data, and establish a unified coordinate system; then register the three-dimensional point cloud and the two-dimensional image to generate a spatial mapping relationship;

[0207] S2: Based on the polarization suppression image, segment the main area of the iron stick yam, fill the holes through morphological closing operation, and optimize the hole edges by combining the contour smoothness constraint function to generate a high-precision contour mask; based on the spatial mapping relationship, extract the texture differences of wrinkles and cracks to generate a direction-sensitive feature map and evaluate the morphological defects;

[0208] S3: Integrate the direction-sensitive feature map and the near-infrared sugar distribution map, and combine the weighing data to construct a comprehensive feature vector. Based on the comprehensive feature vector, train a Gaussian mixture model to generate a reference distribution, and then calculate the quality deviation index. Combine the evaluation results of morphological defects to determine the risk level and generate an individual health record for the iron stick yam;

[0209] S4: According to the individual health record, construct a double-branch feature vector through the three-dimensional point cloud data and the texture feature vector, and then output a preliminary comprehensive quality score through a complementary aggregation model. Introduce a physical model of planting density - curvature to deduct points for the excessive curvature index to obtain the final quality score; according to the final quality score, dynamically adjust the quality determination threshold, divide the quality levels, and trigger a response strategy according to the confidence level classification;

[0210] S5: Collect the results of manual re-inspection, and iteratively update the reference distribution of the Gaussian mixture model; and count the polarization suppression images, and adjust the light source wavelength and polarizer angle through Bayesian optimization to improve the imaging quality and form a closed loop.

[0211] Example 3

[0212] This embodiment publicly provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the operation mode of the above-provided intelligent method for iron stick yam based on image recognition.

[0213] Since the electronic device introduced in this embodiment is the electronic device adopted in implementing an intelligent method for Chinese yam based on image recognition in the embodiments of the present application, based on the intelligent method for Chinese yam based on image recognition introduced in the embodiments of the present application, those skilled in the art can understand the specific implementation manners and various variations of the electronic device in this embodiment. Therefore, the specific implementation of how this electronic device implements the method in the embodiments of the present application will not be described in detail here. As long as those skilled in the art implement the electronic device adopted in an intelligent method for Chinese yam based on image recognition in the embodiments of the present application, it falls within the scope of protection of the present application.

[0214] The above formulas are all dimensionless and only take their numerical values for calculation. The formulas are obtained by collecting a large amount of data for software simulation to get a formula that is closest to the actual situation. The preset parameters and threshold selection in the formulas are set by those skilled in the art according to the actual situation.

[0215] The above is only the preferred implementation manner of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for ordinary technical users in this technical field, several improvements and refinements made without departing from the principle of the present invention should also be regarded as within the protection scope of the present invention.

Claims

1. An intelligent system for iron stick yam based on image recognition, characterized in that, Including: Multimodal data acquisition and registration unit: Deploy a circularly polarized light source and a rotating polarizer to dynamically adjust the polarization direction to generate a polarization suppression image; Simultaneously acquire the near-infrared sugar distribution map and the ToF three-dimensional point cloud data, and establish a unified coordinate system; furthermore, register the three-dimensional point cloud and the two-dimensional image to generate a spatial mapping relationship; High-precision segmentation and defect evaluation unit: Based on the polarization suppression image, segment the main area of the iron stick yam, and fill the holes through morphological closing operation. Combine the contour smoothness constraint function to optimize the hole edges and generate a high-precision contour mask; Based on the spatial mapping relationship, extract the texture differences of wrinkles and cracks to generate a direction-sensitive feature map and evaluate the morphological defects; Fusion and evaluation unit: Integrate the direction-sensitive feature map and the near-infrared sugar distribution map, and combine the weighing data to construct a comprehensive feature vector. Based on the comprehensive feature vector, train a Gaussian mixture model to generate a reference distribution, and then calculate the quality deviation index. Combine the evaluation results of morphological defects to determine the risk level and generate an individual health record of the iron stick yam; Quality scoring and grading unit: According to the individual health record, construct a double-branch feature vector through the three-dimensional point cloud data and the texture feature vector, and then output a preliminary comprehensive quality score through a complementary aggregation model. Introduce a physical model of planting density - curvature to deduct points for the excessive curvature index to obtain the final quality score; According to the final quality score, dynamically adjust the quality determination threshold, divide the quality grades, and trigger a response strategy according to the confidence level classification; Closed-loop feedback unit: Collect the results of manual re-inspection, and iteratively update the reference distribution of the Gaussian mixture model; and count the polarization suppression images, and adjust the light source wavelength and polarizer angle through Bayesian optimization to improve the imaging quality and form a closed loop.

2. The intelligent system for iron stick yam based on image recognition according to claim 1, characterized in that, The generation method of the spatial mapping relationship includes: Based on the circularly polarized light source, generate circularly polarized light through a linear polarizer, and dynamically adjust the polarization direction by rotating the angle of the linear polarizer. Use the polarization suppression algorithm to select the optimal suppression angle to generate a polarization suppression image; Use a near-infrared camera to collect the sugar distribution map that penetrates the epidermis of the iron stick yam, and generate a heat map through the spectral absorption effect to obtain the near-infrared sugar distribution map; Use a ToF camera to scan the surface of the iron stick yam to generate three-dimensional point cloud data including XYZ three-dimensional coordinates and reflection intensity; Synchronously calibrate the parameters of the polarization camera, near-infrared camera and ToF camera through a calibration plate to establish a unified coordinate system; furthermore, superimpose the near-infrared sugar distribution map into the polarization suppression image by pixel points as the complete two-dimensional image of the iron stick yam; Furthermore, use the ICP algorithm to register the three-dimensional point cloud data and the two-dimensional image, and generate a spatial mapping relationship in which the sugar value, polarization suppression feature and three-dimensional coordinates of each pixel point are in one-to-one correspondence through feature point matching technology.

3. The intelligent system for iron stick yam based on image recognition according to claim 2, characterized in that, The generation method of the high-precision contour mask includes: Based on the polarization suppression image, extract the image histogram of the polarization suppression image, count the peak distribution of the image histogram, and identify and divide three threshold intervals; According to the threshold intervals, divide the polarization suppression image into a background area, a yam main area and a noise area; Furthermore, the noise regions and background regions are removed, the main body region of the yam is retained, and the largest connected region within the main body region of the yam is selected as the initial segmentation image through connected component analysis; Based on the initial segmentation image, a hole area threshold is set, and a morphological closing operation is performed using an elliptical structural kernel to fill the holes in the initial segmentation image with an area larger than the hole area threshold; Furthermore, through a segmentation model trained based on historical annotation data, pixel-level optimization is performed on the edge region of the holes filled after the closing operation to generate a preliminarily repaired segmentation image of the main body of the yam; According to the preliminarily repaired segmentation image of the main body of the yam, along the contour path of the iron stick yam, the tangent direction angle of each vertex is calculated point by point, and the arc length step between adjacent two points is fixed as the reference unit for calculating the direction change; A fixed starting point of the contour path is set, and all pixel points are retrieved along the contour path from the fixed starting point through a contour tracking algorithm, and all vertices are marked; According to all vertices, starting from the fixed starting point, the position of each vertex is adjusted point by point along the contour path, including: At each vertex, the absolute difference between the tangent direction angle of the vertex and the tangent direction angle of the previous vertex is taken as the direction angle change rate, and the ratio of the direction angle change rate to the arc length step between adjacent vertices is calculated as the curvature value of the vertex; A curvature threshold is set, and all vertices with curvature values greater than or equal to the curvature threshold are used as large curvature turning points; At each vertex, offset is performed within the range of plus or minus one pixel of the front and rear pixel points along the contour path to generate multiple contour paths after vertex offset; For each offset contour path, the smoothness score of each contour path is calculated through the contour smoothness constraint function formula, and the contour path with the minimum smoothness score is selected as the optimal path of the vertex; Repeat the process of offsetting the position of each vertex and selecting the optimal path of each vertex. During the repetition process, the large curvature turning points remain unchanged, and at the same time, small fluctuations are smoothed; Until the smoothness score of the contour path reaches a preset threshold or the smoothness score no longer changes in b iterations, the final smooth boundary contour is obtained, and then the smooth boundary contour is converted into a binary mask as the final high-precision contour mask.

4. The intelligent system for iron stick yam based on image recognition according to claim 3, wherein The methods for evaluating morphological defects include: Based on the high-precision contour mask, the surface of the iron stick yam is divided into c equal-angle regions along the circumferential direction; The gradient direction and gradient intensity of each pixel point in the high-precision contour mask are calculated through an edge detection algorithm; Within each equal-angle region, the gradient direction is divided into d direction intervals. Then, according to the gradient intensity of each pixel point, the pixel points are assigned to the corresponding direction intervals, and the sum of the gradient intensities in each direction interval is statistically calculated. The direction interval with the highest sum of the gradient intensities within the equal-angle region is used as the main direction interval of the equal-angle region; The sum of the gradient intensities of each direction interval of all equal-angle regions is spliced in sequence to form a direction feature vector; Compare the actual angle differences between the main direction intervals of adjacent equal-angle regions. If the actual angle difference between the main direction intervals within two adjacent equal-angle intervals is less than or equal to the preset direction difference threshold, it is determined as a natural fold; If the actual angular difference between the main direction intervals in two adjacent equal - angle regions is greater than the direction difference threshold, and the ratio of the sum of the gradient intensities between two adjacent equal - angle regions is greater than or equal to the intensity ratio threshold, it is determined as a crack defect; Mark the equal - angle regions determined as natural fold / crack defects as a binary mask, and superimpose them with the direction feature vector according to the channel intensity to generate a direction - sensitive feature map; Extract the actual path length of the central axis of the iron stick yam in the high - precision contour mask, as well as the straight - line distance between the two end points of the iron stick yam; If the ratio of the actual path length to the straight - line distance is greater than the preset bending threshold, it is determined as abnormal bending; if the ratio of the actual path length to the straight - line distance is less than or equal to the bending threshold, it is determined as normal bending; Based on the spatial mapping relationship, fit the central axis through the three - dimensional point cloud data, discretely sample along the axis at a fixed step size, calculate the local curvature of each path segment, and integrate all the local curvatures into a comprehensive bending index; Extract the sum of the gradient intensities of all crack defect regions from the direction - sensitive feature map to obtain the total intensity of the crack defects; Perform a weighted sum of the comprehensive bending index and the total intensity of the crack defects to obtain a comprehensive defect score; if the comprehensive defect score is greater than the preset comprehensive defect threshold, it is determined as a high - risk defect; if the comprehensive defect score is less than or equal to the comprehensive defect threshold, it is determined as a low - risk defect.

5. The intelligent system for iron stick yam based on image recognition according to claim 4, wherein The generation method of the reference distribution includes: Take the direction - sensitive feature map as the texture feature of the iron stick yam surface; Obtain the sugar distribution data of the iron stick yam through the near - infrared sugar distribution map, and calculate the sugar value of each pixel point; Obtain the weighing data of the iron stick yam, and take the ratio of the iron stick yam weight to the three - dimensional point cloud volume as the density value of the iron stick yam; Flatten the pixel values of the direction - sensitive feature map into a one - dimensional vector, and perform L2 - norm normalization to generate a normalized texture feature vector; scale the pixel values of the near - infrared sugar distribution map to the interval [0, 1], and calculate the mean and standard deviation of the sugar values as additional features to generate a sugar feature vector; Calculate the ratio of the density value to the reference density value of the standard iron stick yam as the normalized density feature; Horizontally splice the normalized texture feature vector and density feature, as well as the sugar feature vector and the comprehensive bending index to form a high - dimensional feature vector, and then perform a weighted sum of each sub - feature of the high - dimensional feature vector to construct a comprehensive feature vector; Collect historical high - quality iron stick yam samples, extract the comprehensive feature vectors of the samples to form a training set; Use the EM algorithm to train a Gaussian mixture model, and set e Gaussian components; Input the training set into the Gaussian mixture model, and iteratively optimize the parameters through the EM algorithm to make the model fit the data distribution, and output the Gaussian mixture distribution as the reference distribution of the iron stick yam.

6. The intelligent system for iron stick yam based on image recognition according to claim 5, wherein The generation method of the individual health record includes: According to the reference distribution of the high - quality samples of the iron stick yam, extract the real - time comprehensive feature vector of the current iron stick yam; Calculate the absolute difference between each dimension value in the real - time comprehensive feature vector of the current iron stick yam and the corresponding dimension mean in the reference distribution, and then obtain the quality deviation index of the current iron stick yam through weighted summation; Set the deviation index threshold. If the quality deviation index is greater than the deviation index threshold, it is determined that the current Chinese yam has a high health risk; If the quality deviation index is less than or equal to the deviation index threshold, it is determined that the current Chinese yam has a low health risk; If the current Chinese yam meets the high health risk or high-risk defect, it is determined that the Chinese yam is at a high-risk level; If the current Chinese yam meets the low health risk and low-risk defect, it is determined that the Chinese yam is at a low-risk level; Integrate the real-time comprehensive feature vector, deviation index, comprehensive bending index, crack defect, position coordinates of the crack defect, and the corresponding risk level of the Chinese yam to generate an individual health record.

7. The intelligent system for iron stick yam based on image recognition according to claim 6, characterized in that, The method for obtaining the final quality score includes: According to the individual health record of the Chinese yam, for Chinese yams at the low-risk level, downsample and normalize the coordinate of the three-dimensional point cloud data of the Chinese yam; Extract the local geometric features and global morphological features from the three-dimensional point cloud data through point cloud network technology; and then horizontally splice them into a morphological feature vector; Horizontally stitch the morphological feature vector and the normalized texture feature vector into a double-branch feature vector; Take the double-branch feature vector as the input, use the complementary feature aggregation model to generate a coordinate attention map, aggregate the feature vector, and then convert the aggregated feature vector into a preliminary comprehensive quality score through the fully connected layer of the complementary feature aggregation model; Through the physical relationship model between the planting density and the bending degree of the Chinese yam, obtain the theoretical bending index of the Chinese yam. If the actual comprehensive bending index is greater than the theoretical bending index, it is determined that the preliminary comprehensive quality score needs to be deducted according to the preset deduction value; If the actual comprehensive bending index is less than or equal to the theoretical bending index, it is determined that no deduction is required, and the deduction value is recorded as 0; Take the difference between the preliminary comprehensive quality score and the deduction value as the final quality score.

8. An intelligent system for iron stick yam based on image recognition according to claim 7, characterized in that, The method for triggering the response strategy according to the confidence level classification includes: Based on the final quality score, set an initial quality determination threshold; Collect the real-time environmental parameters of the current production area of the Chinese yam, and normalize the real-time environmental parameters into environmental impact factors through the environmental parameter function; Modify the initial quality determination threshold through the environmental impact factor to obtain a dynamic quality determination threshold; Through the pre-trained global model, according to the final quality score and the dynamic quality determination threshold of the Chinese yam, divide the basic quality level, and output the quality level of the Chinese yam and the corresponding level confidence; Among them, the basic quality levels include first grade, second grade and third grade; Set the confidence threshold interval of the level. If the level confidence of the Chinese yam is greater than the maximum value of the confidence threshold interval of the level, directly determine the quality level of the Chinese yam without re-inspection; If the level confidence is less than or equal to the maximum value of the confidence threshold interval of the level and greater than or equal to the minimum value of the confidence interval of the level, it is determined as low confidence. For Chinese yams with low confidence, push them to the auxiliary re-inspection queue and combine with manual judgment to confirm the level; If the level confidence is less than the minimum value of the confidence threshold interval of the level, it is determined as quality abnormality, and manual spot-check is triggered synchronously.

9. The intelligent system for iron stick yam based on image recognition according to claim 8, characterized in that, The method for forming a closed loop includes: Take the iron stick yam after manual re-inspection and confirmation of the grade as sample data, extract the morphological and texture features of the sample, merge the new sample with the historical data, and retrain the Gaussian mixture model through the EM algorithm; count the current polarization suppression image, and adjust the light source wavelength and polarizer angle through Bayesian optimization according to the suppression effect of the polarization suppression image; form a closed-loop system with data-driven, environment-adaptive, and hardware co-optimization.

10. An intelligent method for iron stick yam based on image recognition, which is implemented based on the intelligent system for iron stick yam based on image recognition described in any one of claims 1 to 9, and is characterized in that, Including: S1: Deploy a circularly polarized light source and a rotating polarizer to dynamically adjust the polarization direction to generate a polarization suppression image; Synchronously collect the near-infrared sugar distribution map and the ToF three-dimensional point cloud data, establish a unified coordinate system; and then register the three-dimensional point cloud and the two-dimensional image to generate a spatial mapping relationship; S2: Based on the polarization suppression image, segment the main area of the iron stick yam, fill the holes through morphological closing operation, and optimize the hole edges by combining the contour smoothness constraint function to generate a high-precision contour mask; based on the spatial mapping relationship, extract the texture differences of wrinkles and cracks to generate a direction-sensitive feature map and evaluate the morphological defects; S3: Integrate the direction-sensitive feature map and the near-infrared sugar distribution map, and combine the weighing data to construct a comprehensive feature vector. Train the Gaussian mixture model based on the comprehensive feature vector to generate a reference distribution, and then calculate the quality deviation index. Combine the evaluation results of morphological defects to determine the risk level and generate an individual health record of the iron stick yam; S4: According to the individual health record, construct a double-branch feature vector through the three-dimensional point cloud data and the texture feature vector, and then output a preliminary comprehensive quality score through a complementary aggregation model. Introduce a planting density-curvature physical model to deduct points for the excessive bending index to obtain the final quality score; according to the final quality score, dynamically adjust the quality judgment threshold, divide the quality grades, and trigger a response strategy according to the confidence level classification; S5: Collect the results of manual re-inspection, iteratively update the reference distribution of the Gaussian mixture model; and count the polarization suppression image, adjust the light source wavelength and polarizer angle through Bayesian optimization to improve the imaging quality and form a closed loop.

Citation Information

Patent Citations

  • Automatic plant phenotype acquisition method and device and electronic equipment

    CN118285225A

  • Persimmon quality detection method and system based on machine vision

    CN119810100A

  • Imaging method of spatial structure quality spectrum division of fruits

    GB202103713D0

Cited By

  • Infrared thermal imaging building facade defect intelligent diagnosis method based on multi-modal fusion

    CN120635610A

  • Film lamination defect detection method and system based on image processing

    CN120876486A

  • Film attachment defect detection method and system based on image processing

    CN120876486B

  • Intelligent control method and system for medicinal material winnowing machine

    CN120920368A

  • Intelligent control method and system of medicine winnowing machine

    CN120920368B