An image recognition-based intelligent system and method for iron stick yam

By using multimodal data acquisition and registration technology, combined with annular polarization light source and near-infrared imaging, spatial mapping relationships are generated, solving the problems of single data dimension and rough defect identification in existing iron yam detection systems, and realizing high-precision quality assessment and adaptive capabilities.

CN120388226BActive Publication Date: 2026-01-06HENAN HUAZHIMEI AGRI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing quality inspection system for iron yam relies on a single sensor, which cannot simultaneously acquire multi-dimensional features such as sugar content, texture, and morphology. It lacks the ability to accurately identify complex defects, and the evaluation results are one-sided and have a delayed response, which cannot meet the needs of efficient and accurate intelligent inspection.

Method used

By employing multimodal data acquisition and registration technology, combined with annular polarization light source, near-infrared imaging, and ToF 3D point cloud, spatial mapping relationships are generated. Through high-precision segmentation and defect assessment, a comprehensive feature vector is constructed, and the quality judgment threshold is dynamically adjusted to form a closed-loop feedback system.

Benefits of technology

It achieves multi-dimensional correlation between sugar distribution, texture features and three-dimensional morphology, accurately identifies defects, 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 CN120388226B_ABST
    Figure CN120388226B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of image recognition and detection of iron stick yam, and discloses an intelligent system and method for iron stick yam based on image recognition, which comprises: generating a polarization suppression image by dynamically adjusting the polarization direction to generate a spatial mapping relationship; 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, and then extracting the texture difference of wrinkles and cracks to generate a direction-sensitive feature map and evaluate the morphological defects; constructing a comprehensive feature vector, training a Gaussian mixture model to generate a benchmark distribution, calculating a quality deviation index, and determining a risk level; constructing a double-branch feature vector, outputting a preliminary comprehensive quality score through a complementary aggregation model, introducing a planting density-bending degree physical model to obtain a final quality score, dynamically adjusting the quality judgment threshold, dividing the quality level, and triggering the response strategy according to the confidence level classification to form a closed loop; and improving the comprehensiveness and accuracy of yam quality evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition and detection technology for Chinese yam, and more specifically, to an intelligent system and method for Chinese yam based on image recognition. Background Technology

[0002] With the increasing demand for intelligent agriculture, the quality assessment of iron yam is gradually transitioning from traditional manual inspection to automated systems. However, existing inspection systems mostly rely on single sensors or fixed parameters, such as detecting sugar content through near-infrared spectroscopy or analyzing morphology through three-dimensional imaging, but they cannot correlate sugar distribution, texture features, and three-dimensional morphology in multiple dimensions, and lack the ability to accurately identify complex defects (such as cracks and bends).

[0003] Existing quality inspection systems for Chinese yam (also known as iron stick yam) suffer from several shortcomings, limiting their accuracy and adaptability. First, traditional methods rely on single-sensor data (such as near-infrared or 3D imaging), failing to simultaneously acquire multi-dimensional features like sugar content, texture, and morphology. This results in poor data correlation and an inability to comprehensively characterize yam quality. Second, the contour segmentation technology is crude, offering low accuracy in identifying defects on complex surfaces like wrinkles and bends, easily missing minute cracks. Furthermore, the evaluation model lacks dynamic adjustment capabilities; fixed threshold classification cannot adapt to changes in different production areas or environments, and it fails to optimize classification boundaries based on real-time environmental parameters. Additionally, the system lacks a closed-loop feedback mechanism; light source parameters (such as polarization angle) rely on manual settings and cannot adaptively optimize based on imaging results, leading to long-term performance degradation. These issues collectively result in biased and delayed evaluation results, failing to meet the demands for efficient and accurate intelligent inspection. Summary of the Invention

[0004] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: an intelligent system and method for Chinese yam based on image recognition, comprising:

[0005] Multimodal data acquisition and registration unit: Deploys a ring-polarized light source and a rotating polarizer to dynamically adjust the polarization direction and generate a polarization-suppressed image; Simultaneously acquires near-infrared sugar distribution maps and ToF 3D point cloud data to establish a unified coordinate system; Then, registers the 3D point cloud with the 2D image to generate a spatial mapping relationship;

[0006] High-precision segmentation and defect assessment unit: Based on polarization-suppressed images, the main body region of Chinese yam is segmented, and holes are filled through morphological closing operations. The hole edges are optimized by combining contour smoothness constraint functions to generate a high-precision contour mask. Based on spatial mapping relationships, the texture differences between wrinkles and cracks are extracted to generate orientation-sensitive feature maps and assess morphological defects.

[0007] Fusion and evaluation unit: Integrates the orientation-sensitive feature map and the near-infrared sugar distribution map, and combines them with weighing data to construct a comprehensive feature vector. Based on the comprehensive feature vector, a Gaussian mixture model is trained to generate a baseline distribution, and then the quality deviation index is calculated. Combined with the evaluation results of morphological defects, the risk level is determined, and an individual health record of iron yam is generated.

[0008] Quality scoring and grading unit: Based on individual health records, a dual-branch feature vector is constructed using 3D point cloud data and texture feature vectors. Then, a preliminary comprehensive quality score is output through a complementary aggregation model. A planting density-bending physical model is introduced to deduct points for exceeding the bending index, resulting in the final quality score. Based on the final quality score, the quality judgment threshold is dynamically adjusted to classify quality levels, and a response strategy is triggered according to the confidence level.

[0009] Closed-loop feedback unit: collects manual re-inspection results, iteratively updates the Gaussian mixture model baseline distribution, and statistically analyzes polarization suppression images. It also optimizes the light source wavelength and polarizer angle through Bayesian optimization to improve imaging quality and form a closed loop.

[0010] Furthermore, the method for generating the spatial mapping relationship includes:

[0011] Based on a ring polarized light source, circularly polarized light is generated by a linear polarizer, and the polarization direction is dynamically adjusted by rotating the angle of the linear polarizer. The optimal suppression angle is selected by a polarization suppression algorithm to generate a polarization suppressed image.

[0012] Near-infrared cameras were used to capture sugar distribution maps penetrating the skin of Chinese yam, and thermal maps were generated through spectral absorption effects to obtain near-infrared sugar distribution maps.

[0013] The surface of the Chinese yam was scanned using a ToF camera to generate three-dimensional point cloud data containing XYZ coordinates and reflection intensity.

[0014] The parameters of the polarization camera, near-infrared camera and ToF camera are simultaneously calibrated by calibration board to establish a unified coordinate system; then the near-infrared sugar distribution map is superimposed into the polarization-suppressed image by pixel to form a complete two-dimensional image of the iron yam.

[0015] Then, the ICP algorithm is used to register the three-dimensional point cloud data with the two-dimensional image. The feature point matching technology is used to generate a spatial mapping relationship between the sugar value, polarization suppression feature and three-dimensional coordinates of each pixel.

[0016] Furthermore, the high-precision contour mask is generated in the following ways:

[0017] Based on the polarization-suppressed image, the image histogram of the polarization-suppressed image is extracted, the peak distribution of the image histogram is statistically analyzed, and three threshold intervals are identified and divided.

[0018] Based on the threshold range, the polarization-suppressed image is divided into a background region, a yam main body region, and a noise region;

[0019] Then, noise and background areas are removed, the main yam area is retained, and the largest connected region in the main yam area is selected as the initial segmentation image through connected component analysis.

[0020] Based on the initial segmented image, a hole area threshold is set, and elliptical structure kernels are used through morphological closing operations to fill holes in the initial segmented image whose area is greater than the hole area threshold.

[0021] Then, by using a segmentation model trained on historical labeled data, pixel-level optimization is performed on the edge region that fills the holes after the closing operation, generating a preliminary repaired segmented image of the yam body;

[0022] Based on the preliminarily restored segmented image of the yam body, the tangent direction angle of each vertex is calculated point by point along the contour path of the iron yam, and the arc length step between two adjacent points is fixed as the reference unit for calculating the change in direction.

[0023] Set a fixed starting point for the contour path, and use a contour tracking algorithm to retrieve all pixels along the contour path from the fixed starting point, and mark all vertices.

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

[0025] 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 rate of change of the direction angle, and the ratio of the rate of change of the direction angle to the arc length step between adjacent vertices is calculated as the curvature value of the vertex.

[0026] Set a curvature threshold and use all vertices with curvature values ​​greater than or equal to the curvature threshold as large curvature inflection points;

[0027] At each vertex, offset within a range of plus or minus one pixel along the contour path to generate multiple contour paths after vertex offset.

[0028] For each offset contour path, the smoothness score of each contour path is calculated using the contour smoothness constraint function formula, and the contour path with the smallest smoothness score is selected as the optimal path for the vertex.

[0029] The process of repeatedly offsetting the position of each vertex and selecting the optimal path for each vertex is repeated. During the repetition, large curvature inflection points remain unchanged, while small fluctuations are smoothed out.

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

[0031] Furthermore, the methods for assessing morphological defects include:

[0032] Based on a high-precision contour mask, the surface of the iron yam is divided into c equal-angle regions along the circumference.

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

[0034] Within each equiangular region, the gradient direction is divided into d directional intervals. Then, based on the gradient intensity of each pixel, the pixel is assigned to the corresponding directional interval, and the total gradient intensity within each directional interval is calculated. The directional interval with the highest total gradient intensity within the equiangular region is taken as the main directional interval of the equiangular region.

[0035] The sums of gradient intensities in all directional intervals of all regions with equal angles are sequentially concatenated to form a directional feature vector.

[0036] Compare the actual angle difference of the main direction intervals of adjacent equal angle regions. If the actual angle difference of the main direction intervals of two adjacent equal angle intervals is less than or equal to the preset direction difference threshold, it is determined to be a natural wrinkle.

[0037] If the actual angular difference between the main direction intervals of 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, then it is determined to be a crack defect.

[0038] The isoangular regions identified as natural wrinkles / cracks are marked as binary masks and superimposed with the directional feature vectors according to the channel intensity to generate a directional sensitive feature map.

[0039] 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 first and last points of the Chinese 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 to be an abnormal bend; 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 to be a normal bend.

[0041] Based on spatial mapping relationships, the central axis is fitted by 3D point cloud data, and discrete sampling is performed along the axis with a fixed step size. The local curvature of each path segment is calculated, and all local curvatures are integrated into a comprehensive curvature index.

[0042] The total intensity of the crack defect is obtained by extracting the sum of the gradient intensities of all crack defect regions from the orientation-sensitive feature map.

[0043] The comprehensive bending index and the total strength of the crack defect are weighted and summed to obtain the comprehensive defect score. If the comprehensive defect score is greater than the preset comprehensive defect threshold, it is judged as a high-risk defect; if the comprehensive defect score is less than or equal to the comprehensive defect threshold, it is judged as a low-risk defect.

[0044] Furthermore, the benchmark distribution is generated in the following ways:

[0045] The orientation-sensitive feature map is used as the texture feature of the surface of the iron yam;

[0046] Sugar distribution data of Chinese yam was obtained by near-infrared sugar distribution map, and the sugar value of each pixel was calculated.

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

[0048] The pixel values ​​of the orientation-sensitive feature map are flattened into a one-dimensional vector and normalized using the L2 norm to generate a normalized texture feature vector; the pixel values ​​of the near-infrared sugar distribution map are scaled to the [0, 1] interval, and the mean and standard deviation of the sugar values ​​are calculated as additional features to generate a sugar feature vector.

[0049] The density value is calculated by comparing it with the reference density value of standard iron yam, and this ratio is used as the normalized density characteristic.

[0050] The normalized texture feature vector and density feature, as well as the sugar feature vector and the comprehensive curvature index are horizontally concatenated to form a high-dimensional feature vector. Then, the sub-features of the high-dimensional feature vector are weighted and summed to construct the comprehensive feature vector.

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

[0052] The Gaussian mixture model is trained using the EM algorithm, with e Gaussian components.

[0053] The training set is input into the Gaussian mixture model, and the parameters are iteratively optimized through the EM algorithm to make the model fit the data distribution and output a Gaussian mixture distribution as the benchmark distribution of iron yam.

[0054] Furthermore, the methods for generating the individual health record include:

[0055] Based on the benchmark distribution of high-quality samples of Chinese yam, extract the current real-time comprehensive feature vector of Chinese yam;

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

[0057] A deviation index threshold is set. If the quality deviation index is greater than the deviation index threshold, the current iron yam is judged to have a high health risk.

[0058] If the quality deviation index is less than or equal to the deviation index threshold, the current iron yam is judged to be of low health risk.

[0059] If the current iron yam meets the criteria of high health risk or high-risk defect, then the iron yam is judged to be of high risk level;

[0060] If the current iron yam meets the requirements of low health risk and low risk defect, then the iron yam is judged to be of low risk level.

[0061] By integrating real-time comprehensive feature vectors, deviation index, comprehensive bending index, crack defects, location coordinates of crack defects, and corresponding risk levels of iron yam, an individual health record is generated.

[0062] Furthermore, the final quality score is obtained in the following ways:

[0063] Based on the individual health records of Chinese yam, for Chinese yam with low risk level, the three-dimensional point cloud data of Chinese yam is downsampled and the coordinates are normalized.

[0064] Local geometric features and global morphological features are extracted from 3D point cloud data using point cloud network technology; then horizontally stitched together to form a morphological feature vector.

[0065] The morphological feature vector and the normalized texture feature vector are horizontally concatenated to form a bi-branch feature vector;

[0066] The bi-branch feature vector is used as input, and a coordinate attention map is generated using a complementary feature aggregation model. The feature vector is then aggregated and transformed into a preliminary comprehensive quality score through the fully connected layer of the complementary feature aggregation model.

[0067] By using the physical relationship model between planting density and curvature of Chinese yam, the theoretical curvature index of Chinese yam is obtained. If the actual comprehensive curvature index is greater than the theoretical curvature 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 points need to be deducted, and the deduction value is recorded as 0.

[0069] The difference between the preliminary overall quality score and the deduction value is taken as the final quality score.

[0070] Furthermore, the method of triggering the response strategy based on confidence level includes:

[0071] Based on the final quality score, set an initial quality judgment threshold;

[0072] Real-time environmental parameters of the current production area of ​​iron yam are collected, and the real-time environmental parameters are normalized into environmental impact factors through environmental parameter functions;

[0073] The initial quality assessment threshold is corrected by environmental impact factors to obtain a dynamic quality assessment threshold.

[0074] The pre-trained global model classifies the basic quality levels of iron yam based on the final quality score and dynamic quality judgment threshold, and outputs the quality level of iron yam and the corresponding level confidence.

[0075] The basic quality levels include Level 1, Level 2, and Level 3;

[0076] Set a confidence level threshold range. If the confidence level of the iron yam is greater than the maximum value of the confidence level threshold range, the quality level of the iron yam is directly determined without re-inspection.

[0077] If the confidence level is less than or equal to the maximum value of the confidence level threshold range and greater than or equal to the minimum value of the confidence level range, it is judged as low confidence. For iron yam with low confidence, it is pushed to the auxiliary re-inspection queue and the level is confirmed by manual judgment.

[0078] If the confidence level is less than the minimum value of the confidence level threshold range, it is judged as a quality anomaly, and manual sampling inspection is triggered simultaneously.

[0079] Furthermore, the methods for forming a closed loop include:

[0080] Using manually re-inspected and confirmed iron yam as sample data, the morphological and texture features of the samples are extracted. The new samples are merged with historical data, and the Gaussian mixture model is retrained using the EM algorithm. The current polarization suppression image is statistically analyzed, and the wavelength of the light source and the angle of the polarizer are adjusted through Bayesian optimization based on the suppression effect of the polarization suppression image. This forms a closed-loop system that is data-driven, environmentally adaptive, and hardware-coordinated.

[0081] Furthermore, a smart method for Chinese yam based on image recognition is characterized by comprising:

[0082] S1: Deploy a ring-polarized light source and a rotating polarizer to dynamically adjust the polarization direction and generate a polarization-suppressed image; simultaneously acquire near-infrared sugar distribution maps and ToF 3D point cloud data to establish a unified coordinate system; then register the 3D point cloud and the 2D image to generate a spatial mapping relationship.

[0083] S2: Based on polarization-suppressed images, segment the main body region of Chinese yam, fill holes through morphological closing operations, optimize hole edges by combining contour smoothness constraint functions, and generate a high-precision contour mask; based on spatial mapping relationships, extract texture differences between wrinkles and cracks, generate orientation-sensitive feature maps, and evaluate morphological defects.

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

[0085] S4: Based on individual health records, a dual-branch feature vector is constructed using 3D point cloud data and texture feature vectors. Then, a preliminary comprehensive quality score is output through a complementary aggregation model. A planting density-bending physical model is introduced to deduct points for exceeding the bending index, resulting in a final quality score. Based on the final quality score, the quality judgment threshold is dynamically adjusted to classify quality levels, and a response strategy is triggered according to the confidence level.

[0086] S5: Collect manual re-inspection results, iteratively update the Gaussian mixture model baseline distribution; and statistically analyze the polarization suppression image, using Bayesian optimization to adjust the light source wavelength and polarizer angle to improve imaging quality and form a closed loop.

[0087] This invention discloses an intelligent system and method for Chinese yam based on image recognition. The technical effects and advantages of this intelligent system and method for Chinese yam based on image recognition are as follows:

[0088] This invention addresses the core problems in traditional yam quality assessment, such as limited data dimensions, coarse defect identification, and biased evaluation. By combining multimodal data fusion and precise registration with annular polarized light source, near-infrared imaging, and ToF 3D point cloud technology, it achieves a 3D correlation between sugar distribution, texture features, and 3D morphology. Furthermore, it generates spatial mapping relationships through the ICP algorithm, solving the problem of limited data dimensions in traditional methods and providing a high-fidelity data foundation for subsequent analysis.

[0089] Secondly, by employing curvature-constrained contour smoothing and direction-sensitive feature map analysis techniques, natural folds and crack defects are accurately identified, and the comprehensive bending index and crack intensity are quantified, significantly improving the contour extraction accuracy and defect identification accuracy of complex-shaped yams.

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

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

[0092] Finally, the GMM model was updated iteratively through manual re-inspection, and the light source parameters were optimized and adjusted using Bayesian methods to form a closed-loop feedback system of "data-model-hardware". This improved the comprehensiveness, accuracy and long-term reliability of yam quality assessment, as well as the robustness and adaptability of the system in long-term operation, and reduced the need for manual intervention. Attached Figure Description

[0093] Figure 1 This is a schematic diagram of an intelligent system for Chinese yam based on image recognition according to the present invention;

[0094] Figure 2 This is a schematic diagram illustrating the high-precision contour mask generation process in an image recognition-based intelligent system for Chinese yam according to the present invention.

[0095] Figure 3 This is a schematic diagram of an intelligent method for treating Chinese yam based on image recognition according to the present invention. Detailed Implementation

[0096] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0097] Example 1

[0098] Please see Figure 1 and Figure 2 As shown in this embodiment, an intelligent system and method for Chinese yam based on image recognition includes:

[0099] Multimodal data acquisition and registration unit: Deploys a ring-polarized light source and a rotating polarizer to dynamically adjust the polarization direction and generate a polarization-suppressed image; Simultaneously acquires near-infrared sugar distribution maps and ToF 3D point cloud data to establish a unified coordinate system; Then, registers the 3D point cloud with the 2D image to generate a spatial mapping relationship;

[0100] High-precision segmentation and defect assessment unit: Based on polarization-suppressed images, the main body region of Chinese yam is segmented, and holes are filled through morphological closing operations. The hole edges are optimized by combining contour smoothness constraint functions to generate a high-precision contour mask. Based on spatial mapping relationships, the texture differences between wrinkles and cracks are extracted to generate orientation-sensitive feature maps and assess morphological defects.

[0101] Fusion and evaluation unit: Integrates the orientation-sensitive feature map and the near-infrared sugar distribution map, and combines them with weighing data to construct a comprehensive feature vector. Based on the comprehensive feature vector, a Gaussian mixture model is trained to generate a baseline distribution, and then the quality deviation index is calculated. Combined with the evaluation results of morphological defects, the risk level is determined, and an individual health record of iron yam is generated.

[0102] Quality scoring and grading unit: Based on individual health records, a dual-branch feature vector is constructed using 3D point cloud data and texture feature vectors. Then, a preliminary comprehensive quality score is output through a complementary aggregation model. A planting density-bending physical model is introduced to deduct points for exceeding the bending index, resulting in the final quality score. Based on the final quality score, the quality judgment threshold is dynamically adjusted to classify quality levels, and a response strategy is triggered according to the confidence level.

[0103] Closed-loop feedback unit: collects manual review results, iteratively updates the Gaussian mixture model baseline distribution; and statistically analyzes the polarization suppression image, using Bayesian optimization to adjust the light source wavelength and polarizer angle to improve imaging quality and form a closed loop;

[0104] Specifically, a ring-shaped LED array is used as a ring-polarized light source (e.g., wavelength 450-959nm) to eliminate water stain reflection interference. The light source angle is at a 45° angle to the normal of the iron yam surface to ensure uniform illumination. A rotatable linear polarizer (driven by a stepper motor) is installed at the front of the camera. Based on the ring-polarized light source, circularly polarized light is generated through the linear polarizer. The polarization direction is dynamically adjusted by rotating the angle of the linear polarizer (e.g., 0°-90° in 5° increments) to eliminate specular reflection (water stains) on the iron yam surface. The optimal suppression angle is selected using a polarization suppression algorithm (e.g., Stokes parameter calculation) to generate a polarization-suppressed image.

[0105] It should be noted that freshly picked iron yam often has damp soil on its surface, and the water stains will create strong specular reflection (especially under LED light source), resulting in overexposed images or blurred textures.

[0106] The surface of the iron yam is illuminated at a 45° angle by a ring-shaped LED array, which provides uniform lighting while reducing the hard reflection of direct light on the skin.

[0107] Combined with the dynamic suppression of reflection by rotating polarizers, the generated polarization-suppressed image can clearly show the real texture of iron yam (such as longitudinal wrinkles and transverse cracks), avoiding misjudgment caused by environmental interference;

[0108] The sugar content of iron yam is mainly distributed in the subcutaneous tissue. Ordinary visible light cannot penetrate the epidermis to obtain information on the distribution of sugar. Traditional length measurement can only obtain the "straight-line distance between the beginning and end", but the actual curvature (such as a serpentine curve) needs to be calculated using three-dimensional point computing to obtain the true length and curvature.

[0109] Near-infrared cameras (e.g., wavelength 850±50nm) are used to collect sugar distribution maps penetrating the skin of Chinese yam. A thermal map is generated through spectral absorption effects (sugar absorption peaks are located at 1000-1200nm) to quantify the sugar gradient distribution at a depth of 3mm under the skin, thus obtaining a near-infrared sugar distribution map.

[0110] The surface of the Chinese yam was scanned with a ToF camera (940nm laser pulse) at a precision of 0.nm to generate three-dimensional point cloud data containing XYZ coordinates and reflection intensity. The sampling frequency was synchronized with the polarization image (e.g., 25 frames per second).

[0111] Using near-infrared light with a wavelength of 850±50nm, penetrating the epidermis to a depth of 3nm, a sugar thermogram is generated based on the absorption characteristics of sugar to light (absorption peak at 1000-1200nm), quantifying the subcutaneous sugar gradient distribution.

[0112] Then, the XYZ three-dimensional coordinates and reflection intensity of all points on the yam surface are captured 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 polarization images, sugar heat maps and 3D point clouds are collected independently, it is impossible to determine whether the sugar content, texture features and 3D coordinates of a certain pixel point correspond to the same physical location during subsequent analysis.

[0114] The intrinsic and extrinsic parameters (such as camera focal length, lens distortion, and pose relationship between the camera and the point cloud coordinate system) of the polarization camera, near-infrared camera, and ToF camera are simultaneously calibrated using a calibration board (black and white checkerboard + infrared markers) to establish a unified coordinate system (ensuring that all data share the same coordinate system (accuracy ±0.2mm)). Then, the near-infrared sugar distribution map is superimposed on the polarization-suppressed image pixel by pixel to form a complete two-dimensional image of the Chinese yam.

[0115] Then, the ICP (Iterative Closest Point) algorithm is used to register the 3D point cloud data with the 2D image. The feature point matching technology (ORB feature) is used to match (such as the corner points of the natural texture on the surface of the iron yam) to generate a spatial mapping relationship between the sugar value, polarization suppression feature and 3D coordinates of each pixel.

[0116] It should be noted that after the iron yam is harvested, its surface may have a lot of mud, water stains, and complex texture features such as naturally grown wrinkles and cracks. At the same time, the internal or three-dimensional morphological information such as the sugar distribution and curvature of the yam skin is difficult to obtain directly through a single sensor. In this case, if only traditional visual detection methods are relied upon, there will be serious environmental interference (the reflection of water stains will cover the true texture of the yam, and the obstruction of mud will lead to missing image areas or noise interference), insufficient information dimensions (ordinary images cannot penetrate the skin to detect sugar content, nor can they accurately obtain three-dimensional morphology (such as curvature, length, etc.)), and poor data correlation (if data from different sensors are collected independently (such as separately collecting images and three-dimensional point clouds), it is impossible to accurately correspond the sugar content, texture and morphological features of the same area in subsequent analysis).

[0117] Therefore, through this multimodal data collaborative acquisition and spatial registration, an accurate and complete multidimensional feature database of yam can be constructed, providing reliable input for subsequent defect assessment and quality grading;

[0118] For example, if an abnormal sugar content is detected in a certain pixel (low value is shown in the heat map), its three-dimensional coordinates can be directly associated to locate the specific growth location, and the quality problem can be comprehensively judged by combining morphological data (such as whether there are cracks or bends in the area).

[0119] Based on the polarization-suppressed image, the image histogram of the polarization-suppressed image is extracted, the peak distribution of the image histogram is statistically analyzed, and three threshold intervals are identified and divided (it should be noted that this is based on histogram analysis, and the three threshold regions are automatically divided, rather than being manually set), which correspond to the background region (low gray value, such as soil or dark areas), the yam body region (medium gray value, corresponding to the yam skin texture), and the noise region (high gray value or outlier, such as residual reflection or sensor noise).

[0120] Based on the threshold range, the polarization-suppressed image is divided into a background region, a yam main body region, and a noise region;

[0121] Then, noise regions (because noise regions are usually isolated regions with an area of ​​less than 500 pixels² or high grayscale outliers) and background regions (background regions are low grayscale values ​​and are excluded from the segmentation results) are removed, and the main yam region is retained. The largest connected region in the main yam region is selected as the initial segmentation image (that is, the main yam region after the noise and background are segmented) through connected component analysis.

[0122] It should be noted that the threshold range is divided by the peak distribution of the histogram, which aims to dynamically adapt to the grayscale changes on the yam surface caused by soil, wrinkles, etc., rather than a fixed threshold. For the unique longitudinal wrinkles and skin texture of iron yam, the threshold range design can take into account both surface complexity and background interference (such as the low grayscale value in soil-covered areas).

[0123] The surface of yams is often covered with damp soil, which causes local missing parts (holes) in the main area of ​​the segmented image, affecting the accuracy of subsequent feature extraction.

[0124] Therefore, based on the initial segmented image, a hole area threshold (e.g., 1000 pixels) is set, and an elliptical kernel (radius 3 pixels) is used to fill holes in the initial segmented image with an area greater than the hole area threshold through morphological closing operation. This is called dilation-erosion operation, which bridges the fractured areas along the natural texture of the yam skin.

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

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

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

[0128] Morphological closing operations solve the problem of filling holes, but leave behind rough edges or local expansion deviations. The segmentation model U-Net optimizes and repairs the edge deviations of the closing operation, but cannot completely eliminate all jagged edges (such as micro-texture discontinuities). Therefore, the preliminarily repaired yam body segmentation image still needs to be further optimized by contour smoothness constraint to improve the boundary smoothness.

[0129] Based on the preliminarily 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 yam, and the arc length step between two adjacent points (e.g., 2 pixels) is fixed as the reference unit for calculating the change in direction.

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

[0131] That is, the image is scanned sequentially from top to bottom and from left to right to find the first non-background image, such as the first pixel in the top left corner. Then, the 3×3 neighborhood of the adjacent pixels is searched in a counterclockwise direction. The next movement direction is determined according to the current direction (such as 4-connected or 8-connected). When the path direction changes significantly (such as the angle between the direction vectors exceeds a threshold), the 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 pre-set limit (such as 60°), then A is a vertex.

[0132] Based on all 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, the absolute difference between the tangent direction angle of the vertex and the tangent direction angle of the previous vertex is taken as the rate of change of the direction angle, and the ratio of the rate of change of the direction angle to the arc length step between adjacent vertices is calculated as the curvature value of the vertex.

[0134] Set a curvature threshold (which can be set according to the natural curvature of the iron yam skin, such as 0.3 radians / pixel), and take all vertices with curvature values ​​greater than or equal to the curvature threshold as large curvature inflection points.

[0135] At each vertex, offset within a range of ±1 pixel along the front and rear pixels of the contour path (i.e., by adjusting the position of ±1 pixel at each vertex, multiple possible adjustment directions are obtained), generating multiple contour paths after vertex offset;

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

[0137] For each offset contour path, the smoothness score of each contour path is calculated using the contour smoothness constraint function formula, and the contour path with the smallest smoothness score is selected as the optimal path for the vertex.

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

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

[0140] The process of repeatedly offsetting the position of each vertex and selecting the optimal path for each vertex is repeated. During the repetition, large curvature inflection points remain unchanged, while small fluctuations are smoothed out.

[0141] The process continues until the smoothness score of the contour path reaches a preset threshold or the smoothness score no longer changes in b iterations, resulting in the final smooth boundary contour. The smooth boundary contour is then converted into a binary mask, which serves as the final high-precision contour mask (i.e., the pixels inside the smooth boundary contour are set to 1 and the background is set to 0, thus obtaining a binary mask, which can be used as a high-precision contour mask).

[0142] Among them, a threshold for the rate of change of the direction angle is set. If the rate of change of the direction angle of adjacent vertices is less than the threshold, it is determined that there is a small fluctuation in the region between the vertex and the adjacent vertex. For the region determined to have a small fluctuation, the path that minimizes the smoothness score is forcibly selected as the smoothing method.

[0143] Based on a high-precision contour mask, the surface of the iron yam is divided into c equal-angle regions along the circumference, so that each equal-angle region covers a local area of ​​the yam surface.

[0144] The gradient direction (texture direction) and gradient intensity (texture sharpness) of each pixel in the high-precision contour mask are calculated using an edge detection algorithm.

[0145] Within each equiangular region, the gradient direction is divided into d directional intervals. Then, based on the gradient intensity of each pixel, the pixel is assigned to the corresponding directional interval, and the total gradient intensity within each directional interval is calculated. The directional interval with the highest total gradient intensity within the equiangular region is taken as the main directional interval of the equiangular region.

[0146] The sum of gradient intensities in all directional intervals of all regions with equal angles is concatenated in order to form a directional feature vector (c×d dimensional vector);

[0147] Compare the actual angle difference of the main direction intervals of adjacent equal angle regions. If the actual angle difference of the main direction intervals of two adjacent equal angle intervals is less than or equal to the preset direction difference threshold (which can be set according to the maximum angle change allowed by natural texture, and the maximum angle change can be obtained according to the shape of naturally grown iron yam), then it is determined to be a natural wrinkle.

[0148] For example, if the main direction range of an equal-angle region is 0°-30° and the adjacent equal-angle regions are 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 angular difference between the main direction intervals of 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 (which can be set according to the experience of industry experts), then it is determined to be a crack defect.

[0150] For example, suppose there is a neighboring region:

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

[0152] Region B: Main direction is 60°-90°, total intensity is 200;

[0153] Judgment: If the directional difference is 30°, and the threshold is 30°, then it is judged as a wrinkle;

[0154] If the threshold is 20°, it is determined to be a crack, and the strength ratio (200 / 100 = 2 times) is checked. If the strength ratio is 2 times the threshold, it is finally determined to be a crack.

[0155] The isoangular regions identified as natural wrinkles / cracks are marked as binary masks and superimposed with the directional feature vectors according to channel intensity to generate a directional 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 first and last 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 naturally generated shape of the iron yam), it is judged as an abnormal bend; if the ratio of the actual path length to the straight-line distance is less than or equal to the bending threshold, it is judged as a normal bend.

[0158] The central axis is fitted by fitting 3D point cloud data, and the data is sampled discretely along the axis at fixed step sizes (such as 2, 4, 5). The local curvature (i.e. the degree of bending) of each path segment is calculated, and all local curvatures are integrated into a comprehensive bending index to reflect the degree of distortion of the overall shape (the higher the index, the more severe the bending).

[0159] The total intensity of the crack defect is obtained by extracting the sum of the gradient intensities of all crack defect regions from the orientation-sensitive feature map (i.e., the sum of the gradient intensities of all crack defect regions).

[0160] The comprehensive defect score is obtained by weighted summing of the comprehensive bending index and the total strength of the crack defect.

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

[0162] The orientation-sensitive feature map is used as the texture feature of the surface of the iron yam;

[0163] Sugar distribution data of Chinese yam was obtained by near-infrared sugar distribution map, and the sugar value of each pixel was calculated.

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

[0165] The pixel values ​​of the orientation-sensitive feature map are flattened into a one-dimensional vector and normalized using the L2 norm to generate a normalized texture feature vector; the pixel values ​​of the near-infrared sugar distribution map are scaled to the [0, 1] interval, and the mean and standard deviation of the sugar values ​​are calculated as additional features (reflecting distribution characteristics) to generate a sugar feature vector.

[0166] The density value is calculated by comparing it with the reference density value of standard iron yam, and this ratio is used as the normalized density characteristic.

[0167] The normalized texture feature vector and density feature vector, along with the sugar feature vector and the comprehensive curvature index, are horizontally concatenated to form a high-dimensional feature vector. Then, the sub-features of the high-dimensional feature vector are weighted and summed (i.e., each is given a weight, such as 0.3 for texture, 0.3 for sugar, 0.2 for density, and 0.2 for comprehensive curvature index) to construct the comprehensive feature vector.

[0168] Collect high-quality samples of iron yam from history (preferably ≥1000 samples, with no defects, sugar content meeting standards (e.g., mean within a reasonable range), and normal shape (bending index ≤70)). Extract the comprehensive feature vector of the samples to form a training set.

[0169] The Gaussian mixture model is trained using the EM algorithm, with e (e.g., 10) Gaussian components set to capture the diversity of data distribution. Each Gaussian component consists of the mean, covariance matrix, and weights.

[0170] The training set is input into the Gaussian mixture model, and the parameters are iteratively optimized through the EM algorithm to make the model fit the data distribution and output the Gaussian mixture distribution as a high-quality sample benchmark distribution for iron yam.

[0171] Based on the benchmark distribution of high-quality samples of Chinese yam, extract the current real-time comprehensive feature vector of Chinese yam;

[0172] Calculate the absolute difference between the value of each dimension in the current real-time comprehensive feature vector of iron yam and the mean of the corresponding dimension in the benchmark distribution, and then obtain the quality deviation index of the current iron yam by 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, and w v x represents the weight coefficient of the v-th dimension value. v μ represents the value of the v-th dimension of the real-time comprehensive feature vector. v This represents the mean of the corresponding dimension in the baseline distribution;

[0174] Among them, w v The weight can be dynamically adjusted according to the collection season (e.g., increase the sugar weight to 0.5 during the rainy season, as sugar is easily lost during the rainy season and requires stricter monitoring).

[0175] Set a deviation index threshold (which can be set based on historical data statistics, such as based on the statistics of the baseline distribution. For example, calculate the mean and standard deviation of the deviation index of the baseline distribution, and then take the sum of the mean 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 yam has a high health risk.

[0176] If the quality deviation index is less than or equal to the deviation index threshold, the current iron yam is judged to be of low health risk.

[0177] If the current iron yam meets the criteria of high health risk or high-risk defect, then the iron yam is judged to be of high risk level;

[0178] If the current iron yam meets the requirements of low health risk and low risk defect, then the iron yam is judged to be of low risk level.

[0179] By integrating real-time comprehensive feature vectors, deviation index, comprehensive bending index, crack defects, location coordinates of crack defects, and corresponding risk levels of iron yam, an individual health record is generated.

[0180] Based on the individual health records of Chinese yam, high-risk Chinese yam are marked. Marked high-risk Chinese yam can be removed upon identification or transferred to the manual re-inspection step. The specific handling method can be adjusted according to requirements.

[0181] For low-risk iron yam, the three-dimensional point cloud data of iron yam is downsampled and the coordinates are normalized.

[0182] Local geometric features (such as normal vectors and curvature) and global morphological features (such as total length, curvature integral, and bending index) in 3D point cloud data are extracted using point cloud network technology (such as PointNet++ or PointCNN); then, they are horizontally stitched together to form a morphological feature vector.

[0183] The morphological feature vector and the normalized texture feature vector are horizontally concatenated to form 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] Using the bi-branch feature vector as input, a coordinate attention map is generated using a complementary feature aggregation model. By dynamically weighting the features of the morphological curvature region and the texture anomaly region, an aggregated feature vector is obtained. Then, the aggregated feature vector is transformed into a preliminary comprehensive quality score (0-100 points) through the fully connected layer of the complementary feature aggregation model.

[0185] By using the physical relationship model between planting density and curvature of Chinese yam, the theoretical curvature index of Chinese yam is obtained. If the actual comprehensive curvature index is greater than the theoretical curvature index, it is determined that the preliminary comprehensive quality score needs to be deducted according to the preset deduction value (such as 10 to 20 points, which is 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 points need to be deducted, and the deduction value is recorded as 0.

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

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

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

[0190] The difference between the preliminary overall quality score and the deduction value is taken as the final quality score;

[0191] Based on the final quality score, set an initial quality judgment threshold (which can be set by industry experts based on experience and cross-regional historical data, or a fixed threshold can be obtained by machine learning training based on cross-regional historical data).

[0192] Real-time environmental parameters (such as soil moisture, temperature, precipitation, and light) of the current production area of ​​iron yam are collected, and the real-time environmental parameters are normalized into environmental impact factors through environmental parameter functions.

[0193] Environmental parameter functions can be designed as linear combinations, for example: Where qz1, qz2, ... are the weights of each environmental parameter (which can be determined through correlation analysis of historical data); for extreme parameters (such as soil moisture exceeding the critical value), the influence is amplified using an exponential or sigmoid function;

[0194] By considering environmental factors, if environmental parameters are unfavorable to the growth of iron yam (such as high humidity leading to easy rotting), the tolerance threshold should be lowered; if environmental parameters are favorable (such as suitable temperature), the threshold can be appropriately relaxed (but excessive adjustment should be avoided).

[0195] The initial quality assessment threshold is corrected by environmental impact factors to obtain a dynamic quality assessment threshold.

[0196] The correction method is as follows: 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. It is usually a decimal (such as 0.1 to 0.3) to avoid drastic fluctuations in the threshold. Δ can be determined through experiments with historical data and optimized through cross-validation to ensure the stability of the score after adjustment.

[0197] The pre-trained global model (a simple classification model trained based on historical data across production areas (such as data from ≥10,000 samples of Chinese yam)) divides the basic quality grades (such as A / B / C grades) according to the final quality score and dynamic quality judgment threshold of Chinese yam, and outputs the quality grade of Chinese yam and the corresponding grade confidence (such as the confidence of a sample being grade A is 85%).

[0198] The basic quality levels include Level 1, Level 2, and Level 3;

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

[0200] If the confidence level is less than or equal to the maximum value of the confidence level threshold range and greater than or equal to the minimum value of the confidence level range, it is judged as low confidence. For iron yam with low confidence, it is pushed to the auxiliary re-inspection queue and the level is confirmed by manual judgment.

[0201] If the confidence level is less than the minimum value of the confidence level threshold range, it is judged as a quality anomaly, and manual re-inspection is triggered simultaneously.

[0202] It should be noted that the significance of the basic grading is as follows: Grade 1 / 2 / 3: can provide grading standards for market circulation (e.g., Grade A is used for the high-end market, and Grade C is used for processing raw materials); dynamic threshold adaptation: ensures that yams from different production areas are graded fairly due to environmental differences (e.g., higher curvature is allowed in dry northern regions).

[0203] Using manually re-inspected and confirmed iron yam as sample data, morphological and texture features of the samples are extracted. New samples are merged with historical data, and the Gaussian mixture model is retrained using the EM algorithm to optimize the classification boundary to cover the distribution features of high-quality samples, ensuring that the baseline distribution matches the features of actual high-quality samples. The current polarization suppression image is statistically analyzed, and based on the suppression effect of the polarization suppression image, the wavelength of the light source and the angle of the polarizer are adjusted through Bayesian optimization to improve image quality and segmentation accuracy. A closed-loop system of data-driven, environment-adaptive, and hardware-coordinated optimization is formed, enabling the model to dynamically adapt to environmental changes (such as humidity and light fluctuations) during continuous iteration, reducing the false detection rate, improving detection robustness, and achieving end-to-end self-learning and performance evolution from data to hardware.

[0204] Example 2

[0205] Please see Figure 2 As shown, parts not described in detail in this embodiment are described in Embodiment 1. This embodiment provides an intelligent method for studying Chinese yam based on image recognition, including:

[0206] S1: Deploy a ring-polarized light source and a rotating polarizer to dynamically adjust the polarization direction and generate a polarization-suppressed image; simultaneously acquire near-infrared sugar distribution maps and ToF 3D point cloud data to establish a unified coordinate system; then register the 3D point cloud and the 2D image to generate a spatial mapping relationship.

[0207] S2: Based on polarization-suppressed images, segment the main body region of Chinese yam, fill holes through morphological closing operations, optimize hole edges by combining contour smoothness constraint functions, and generate a high-precision contour mask; based on spatial mapping relationships, extract texture differences between wrinkles and cracks, generate orientation-sensitive feature maps, and evaluate morphological defects.

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

[0209] S4: Based on individual health records, a dual-branch feature vector is constructed using 3D point cloud data and texture feature vectors. Then, a preliminary comprehensive quality score is output through a complementary aggregation model. A planting density-bending physical model is introduced to deduct points for exceeding the bending index, resulting in a final quality score. Based on the final quality score, the quality judgment threshold is dynamically adjusted to classify quality levels, and a response strategy is triggered according to the confidence level.

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

[0211] Example 3

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

[0213] Since the electronic device described in this embodiment is used to implement the intelligent method for Chinese yam based on image recognition in the embodiments of this application, those skilled in the art can understand the specific implementation and various variations of the electronic device in this embodiment based on the intelligent method for Chinese yam based on image recognition described in the embodiments of this application. Therefore, how the electronic device implements the method in the embodiments of this application will not be described in detail here. Any electronic device used by those skilled in the art to implement the intelligent method for Chinese yam based on image recognition in the embodiments of this application falls within the scope of protection of this application.

[0214] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.

[0215] The above description is merely a preferred embodiment of the present invention, and the scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for users of ordinary technical skills, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. An image recognition-based intelligent system for Dioscorea panthaica Prain et Buckl, characterized in that, include: Multimodal data acquisition and registration unit: Deploys a ring-shaped polarization light source and a rotating polarizer to dynamically adjust the polarization direction and generate a polarization-suppressed image; Near-infrared sugar distribution maps and ToF 3D point cloud data are acquired simultaneously to establish a unified coordinate system; then, the 3D point cloud and the 2D image are registered to generate a spatial mapping relationship. High-precision segmentation and defect assessment unit: Based on polarization-suppressed images, the main body region of Chinese yam is segmented, and holes are filled through morphological closing operations. The hole edges are optimized by combining contour smoothness constraint functions to generate a high-precision contour mask. Based on spatial mapping relationships, the texture differences between wrinkles and cracks are extracted to generate orientation-sensitive feature maps and assess morphological defects. Fusion and evaluation unit: Integrates the orientation-sensitive feature map and the near-infrared sugar distribution map, and combines them with weighing data to construct a comprehensive feature vector. Based on the comprehensive feature vector, a Gaussian mixture model is trained to generate a baseline distribution, and then the quality deviation index is calculated. Combined with the evaluation results of morphological defects, the risk level is determined, and an individual health record of iron yam is generated. The benchmark distribution is generated in the following ways: The orientation-sensitive feature map is used as the texture feature of the surface of the iron yam; Sugar distribution data of Chinese yam was obtained by near-infrared sugar distribution map, and the sugar value of each pixel was calculated. Obtain the weighing data of Chinese yam, and take the ratio of the weight of Chinese yam to the volume of three-dimensional point cloud as the density value of Chinese yam; The pixel values ​​of the orientation-sensitive feature map are flattened into a one-dimensional vector and normalized using the L2 norm to generate a normalized texture feature vector; the pixel values ​​of the near-infrared sugar distribution map are scaled to the [0,1] interval, and the mean and standard deviation of the sugar values ​​are calculated as additional features to generate a sugar feature vector. The density value is calculated by comparing it with the reference density value of standard iron yam, and this ratio is used as the normalized density characteristic. The normalized texture feature vector and density feature, as well as the sugar feature vector and the comprehensive curvature index are horizontally concatenated to form a high-dimensional feature vector. Then, the sub-features of the high-dimensional feature vector are weighted and summed to construct the comprehensive feature vector. Collect historical high-quality iron yam samples, extract the comprehensive feature vectors of the samples, and construct a training set; The Gaussian mixture model is trained using the EM algorithm, with e Gaussian components. The training set is input into the Gaussian mixture model, and the parameters are iteratively optimized through the EM algorithm to make the model fit the data distribution and output the Gaussian mixture distribution as the benchmark distribution of iron yam. The methods for generating the individual health record include: Based on the benchmark distribution of high-quality samples of Chinese yam, extract the current real-time comprehensive feature vector of Chinese yam; Calculate the absolute difference between the value of each dimension in the current real-time comprehensive feature vector of iron yam and the mean of the corresponding dimension in the benchmark distribution, and then obtain the quality deviation index of the current iron yam by weighted summation; A deviation index threshold is set. If the quality deviation index is greater than the deviation index threshold, the current iron yam is judged to have a high health risk. If the quality deviation index is less than or equal to the deviation index threshold, the current iron yam is judged to be of low health risk. If the current iron yam meets the criteria of high health risk or high-risk defect, then the iron yam is judged to be of high risk level; If the current iron stick yam meets the health low risk and low risk defects, the iron stick yam is determined to be low risk level; Integrating the real-time comprehensive feature vector of iron stick yam, deviation index, comprehensive bending index, crack defect, position coordinates of crack defect, and corresponding risk level, an individual health record is generated; Quality score and grade division unit: according to the individual health record, a double branch feature vector is constructed through three-dimensional point cloud data and texture feature vector, and a preliminary comprehensive quality score is output through a complementary aggregation model. A planting density-bending degree physical model is introduced to deduct points for the bending index exceeding the standard, and the final quality score is obtained. According to the final quality score, the quality judgment threshold is dynamically adjusted, the quality grade is divided, and the response strategy is triggered according to the confidence level classification; Closed loop feedback unit: collect artificial review results, and iteratively update the Gaussian mixture model baseline distribution; and count the polarization suppression image, adjust the light source wavelength and polarization plate angle through Bayesian optimization to improve the imaging quality, and form a closed loop.

2. The image recognition-based intelligent system for iron stick yam according to claim 1, characterized in that, The generation mode of the spatial mapping relationship includes: Based on the annular polarized light source, circularly polarized light is generated through a linear polarizer, and the polarization direction is dynamically adjusted by rotating the linear polarizer angle. The best suppression angle is selected by using the polarization suppression algorithm to generate the polarization suppression image; The near-infrared camera is used to collect the sugar distribution map penetrating the epidermis of the iron stick yam, and the thermal map is generated through the spectral absorption feature effect to obtain the near-infrared sugar distribution map; The ToF camera is used to scan the surface of the iron stick yam to generate three-dimensional point cloud data containing XYZ three-dimensional coordinates and reflection intensity; The parameters of the polarization camera, the near-infrared camera and the ToF camera are calibrated synchronously through the calibration plate to establish a unified coordinate system; then the near-infrared sugar distribution map is superimposed into the polarization suppression image according to the pixel points as the complete two-dimensional image of the iron stick yam; Then the ICP algorithm is used to register the three-dimensional point cloud data and the two-dimensional image, and the spatial mapping relationship of the sugar value, the polarization suppression feature and the three-dimensional coordinates of each pixel point is matched and generated through the feature point matching technology.

3. The image recognition-based intelligent system for iron stick yam according to claim 2, characterized in that, The generation mode of the high-precision contour mask includes: Based on the polarization suppression image, the image histogram of the polarization suppression image is extracted, the peak distribution of the image histogram is counted, and three threshold intervals are identified and divided; According to the threshold interval, the polarization suppression image is divided into background area, yam main body area and noise area; Then the noise area and the background area are removed, and the yam main body area is retained, and the largest connected area in the yam main body area is selected as the initial segmentation image through connected component analysis; According to the initial segmentation image, set the hole area threshold, and use an elliptical structure kernel through morphological closing operation to fill the holes in the initial segmentation image with an area greater than the hole area threshold; Then, through the segmentation model trained based on historical annotation data, the edge region of the filled holes after the closing operation is optimized at the pixel level to generate the preliminary repaired yam main body segmentation image; According to the preliminary repaired yam main body segmentation image, the tangent direction angle of each vertex is calculated along the contour path of the iron stick yam, and the arc length step between adjacent two points is fixed as the reference unit for calculating the direction change; Setting a fixed starting point of the contour path, retrieving all pixel points along the contour path from the fixed starting point by a contour tracking algorithm, and marking all vertices obtained; According to all vertices, adjusting the position of each vertex point by point along the contour path from the fixed starting point, including: At each vertex, taking 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 calculating the ratio of the direction angle change rate to the arc length step between adjacent vertices as the curvature value of the vertex; Setting a curvature threshold, and taking all vertices with a curvature value greater than or equal to the curvature threshold as large-curvature turning points; At each vertex, offsetting within a range of one positive and one negative pixel of the front and back pixel points along the contour path to generate multiple contour paths after the vertices are offset; For each offset contour path, calculating the smoothness score of each contour path by a contour smoothness constraint function formula, and selecting the contour path with the smallest smoothness score as the optimal path of the vertex; Repeating the process of offsetting the position of each vertex and selecting the optimal path of each vertex, and in the repeating process, keeping the large-curvature turning points unchanged while smoothing the small-amplitude fluctuations; Until the smoothness score of the contour path reaches a preset threshold or the smoothness score no longer changes in b iterations, a 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 image recognition-based intelligent system for iron stick yam according to claim 3, characterized in that, The way of evaluating the morphological defects includes: 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 by an edge detection algorithm; In each equal-angle region, the gradient direction is divided into d direction intervals, and then according to the gradient intensity of each pixel point, the pixel point is assigned to the corresponding direction interval, the gradient intensity sum in each direction interval is counted, and the direction interval with the highest gradient intensity sum in the equal-angle region is taken as the main direction interval of the equal-angle region; The gradient intensity sums of all direction intervals of all equal-angle regions are spliced into a direction feature vector in order; The actual angle difference of the main direction intervals of adjacent equal-angle regions is compared, and if the actual angle difference of the main direction intervals in adjacent two equal-angle regions is less than or equal to a preset direction difference threshold, it is determined as a natural wrinkle; If the actual angle difference of the main direction intervals in adjacent two equal-angle regions is greater than the direction difference threshold, and the ratio of the gradient intensity sums between the adjacent two equal-angle regions is greater than or equal to an intensity ratio threshold, it is determined as a crack defect; The equal-angle regions determined as natural wrinkles / crack defects are marked as binary masks, and are superimposed with the direction feature vector according to the channel intensity to generate a direction-sensitive feature map; The actual path length of the central axis of the iron stick yam in the high-precision contour mask and the straight-line distance between the first and last points of the iron stick yam are extracted; If the ratio of the actual path length to the straight-line distance is greater than a preset bending threshold, it is determined as an 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 a normal bending. Based on the spatial mapping relationship, the central axis is fitted through the three-dimensional point cloud data, the axis is discretely sampled at a fixed step, the local curvature of each path is calculated, and all the local curvatures are integrated into a comprehensive bending index; The total intensity of the crack defect is obtained by extracting the gradient intensity sum of all crack defect regions from the direction-sensitive feature map; The comprehensive defect score is obtained by weighted sum of the comprehensive bending index and the total intensity of the crack defect; 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 image recognition-based intelligent system for iron stick yam according to claim 4, characterized in that, The final quality score is obtained in the following manner: According to the individual health record of the iron stick yam, the three-dimensional point cloud data of the iron stick yam is down-sampled and coordinate normalized for the iron stick yam of low risk grade; Local geometric features and global morphological features in the three-dimensional point cloud data are extracted through point cloud network technology; and then the morphological feature vectors are horizontally spliced; The morphological feature vectors and the normalized texture feature vectors are horizontally spliced into double-branch feature vectors; The double-branch feature vectors are used as input to generate a coordinate attention map using a complementary feature aggregation model, aggregate the feature vectors, and then convert the aggregated feature vectors into a preliminary comprehensive quality score through the fully connected layer of the complementary feature aggregation model; The theoretical bending index of the iron stick yam is obtained through the planting density and bending degree physical relationship model 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; If the actual comprehensive bending index is less than or equal to the theoretical bending index, it is determined that no deduction is needed, and the deduction value is 0; The difference between the preliminary comprehensive quality score and the deduction value is taken as the final quality score.

6. The image recognition-based intelligent system for iron stick yam according to claim 5, characterized in that, The manner of triggering the response strategy according to the confidence level classification includes: Based on the final quality score, an initial quality determination threshold is set; Real-time environmental parameters of the current producing area of the iron stick yam are collected, and the real-time environmental parameters are normalized into environmental influence factors through an environmental parameter function; The initial quality determination threshold is corrected through the environmental influence factors to obtain a dynamic quality determination threshold; The final quality score of the iron stick yam and the dynamic quality determination threshold are used to divide the basic quality grade through a pre-trained global model, and the quality grade of the iron stick yam and the corresponding grade confidence are output; The basic quality grade includes first grade, second grade and third grade; A grade confidence threshold interval is set; if the grade confidence of the iron stick yam is greater than the maximum value of the grade confidence threshold interval, the quality grade of the iron stick yam is directly determined without re-inspection; 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, and the iron stick yam with low confidence is pushed to an auxiliary re-inspection queue for grade confirmation by artificial judgment; If the grade confidence is less than the minimum value of the grade confidence threshold interval, it is determined as quality abnormality, and artificial sampling is triggered synchronously.

7. The image recognition-based intelligent system for iron stick yam according to claim 6, characterized in that, The manner of forming a closed loop includes: The artificial re-inspection confirmed grade of the iron stick yam is taken as sample data, the morphological features and texture features of the sample are extracted, the new sample is combined with the historical data, and the Gaussian mixture model is retrained through the EM algorithm; the current polarization suppression image is counted, the suppression effect of the polarization suppression image is obtained, the wavelength of the light source and the angle of the polarizing plate are adjusted through the Bayesian optimization; a closed-loop system of data-driven, environment-adaptive and hardware-collaborative optimization is formed.

8. An image recognition-based intelligent Dioscorea panthaica method, which is implemented based on an image recognition-based intelligent Dioscorea panthaica system according to any one of claims 1 to 7. It comprises: S1: deploying a ring-shaped polarized light source and a rotating polarizing plate, dynamically adjusting the polarization direction to generate a polarization suppression image; Synchronous acquisition of near-infrared sugar distribution map and ToF three-dimensional point cloud data, establishment of a unified coordinate system; then registration of three-dimensional point cloud and two-dimensional image, generation of spatial mapping relationship; S2: based on the polarization suppression image, segmenting the main body area of the iron stick yam, filling the holes through morphological closing operation, optimizing the hole edge combined with the contour smoothness constraint function to generate a high-precision contour mask; based on the spatial mapping relationship, extracting the texture difference of wrinkles and cracks to generate a direction-sensitive feature map and evaluate the morphological defects; S3: integrating the direction-sensitive feature map and the near-infrared sugar distribution map, and combining with the weighing data to construct a comprehensive feature vector, training a Gaussian mixture model based on the comprehensive feature vector to generate a reference distribution, and then calculating a quality deviation index, and combining the evaluation result of the 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, constructing a double-branch feature vector through three-dimensional point cloud data and texture feature vector, and then outputting a preliminary comprehensive quality score through a complementary aggregation model, introducing a planting density-bending degree physical model to deduct points for the bending index exceeding the standard, and obtaining the final quality score; according to the final quality score, dynamically adjusting the quality judgment threshold to divide the quality grade, and triggering the response strategy according to the confidence level classification; S5: collecting the artificial re-inspection results, iteratively updating the Gaussian mixture model reference distribution; and counting the polarization suppression image, adjusting the wavelength of the light source and the angle of the polarizing plate through the Bayesian optimization to improve the imaging quality, forming 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