A method for rapid identification of defects on the surface of agricultural products
Patent Information
- Application Number
- CN202610734241.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-26
- Publication Date
- 2026-08-18
AI Technical Summary
虽然该类技术能够在一定程度上反映农产品的内部状态,但现有方案大多仍将表面检测与内部检测作为相对独立的过程,缺少围绕表皮损伤区域对内部检测区域进行定向约束、分级提取及关联分析的技术机制,导致表皮缺陷信息与内部果肉状态信息之间难建立稳定、有效的对应关系
在上述技术方案中,本发明提供的一种农产品表皮缺陷的快速识别方法,通过协同获取待测农产品的多视角可见光彩色图像和与表皮擦伤区域相对应的可见光/近红外光谱数据,建立表皮缺陷信息与内部果肉状态信息之间的对应关系,并基于表皮擦伤区域的位置、几何参数、深度参数及综合延伸方向,对内部检测区域进行定向采集、重点提取和传播关联建模,生成损伤传播风险参数,再结合风险驱动的增强融合、内外一致性判定、整体利用信息与局部利用信息评估及局部优先保留分析,对待测农产品的质量状态、综合分级结果和利用方式进行协同判定,从而提高表皮缺陷检测和内部果肉状态识别的准确性,提高综合分级的合理性,并提升农产品的利用率。
Smart Images

Figure CN122591682A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural product screening technology, specifically to a rapid identification method for defects in the skin of agricultural products. Background Technology
[0002] In the post-harvest sorting, grading, and utilization of agricultural products, the detection of surface defects is a crucial step affecting appearance evaluation, quality control, and subsequent circulation. Most existing technologies for detecting surface defects in agricultural products utilize visible light image acquisition to identify surface defects such as scratches, cracks, dents, and discoloration. These methods offer advantages such as fast acquisition speed, low cost, and ease of online deployment, and can meet the needs of agricultural product surface quality inspection to a certain extent.
[0003] However, relying solely on visible light images for surface defect detection typically only provides information on the color, texture, and morphology of the agricultural product's surface, failing to reflect the internal pulp condition corresponding to the defective area. For agricultural products with minor surface damage but already showing signs of browning, softening, or localized damage to the internal tissue, detection methods based solely on surface images are prone to misjudgment or missed detection, thus affecting the accuracy of grading results. Especially in the case of agricultural products with surface abrasions, there is often a complex correlation between the degree of external damage and the abnormal state of the internal pulp; relying solely on surface defect results makes it difficult to accurately evaluate the true quality and subsequent utilization value of the agricultural product.
[0004] To compensate for the limitations of visible light image detection, some existing technologies have incorporated near-infrared spectroscopy or visible / near-infrared spectroscopy to acquire internal quality or anomaly information of agricultural products. While these technologies can reflect the internal state of agricultural products to some extent, most existing solutions still treat surface and internal detection as relatively independent processes. They lack technical mechanisms for directional constraint, hierarchical extraction, and correlation analysis of the internal detection area around the epidermal damage area, making it difficult to establish a stable and effective correspondence between epidermal defect information and internal fruit pulp condition information. Furthermore, existing technologies typically lack modeling methods for the trend of epidermal damage extending to internal fruit pulp anomalies, making it difficult to generate a comprehensive judgment result that can characterize the degree of correlation and propagation risk between surface and internal damage.
[0005] Furthermore, in the actual sorting and utilization of agricultural products, existing technologies mostly focus on outputting surface defect categories or internal anomaly categories, lacking refined decision support for the comprehensive grading of agricultural products and subsequent utilization methods. Especially when the overall product still has utilization value but there are high-risk areas in some parts, or when the overall quality is average but some parts still have preservation value, existing solutions usually struggle to balance the relationship between the overall utilization level and the local utilization level. Therefore, they cannot effectively support the determination of differentiated utilization paths such as fresh sales, graded sales, processing, or rejection, thus affecting the utilization rate of agricultural products. Summary of the Invention
[0006] The purpose of this invention is to provide a rapid method for identifying defects in the skin of agricultural products, thereby overcoming the aforementioned shortcomings in the prior art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A rapid identification method for defects on the surface of agricultural products includes the following steps: S1, during the movement of the agricultural product to be tested along the transport path, the posture of the agricultural product to be tested is adjusted, and during the posture adjustment process, surface images from multiple angles are acquired to obtain multi-view visible light color images characterizing the external state of the agricultural product to be tested. S2. When the agricultural product to be tested enters the spectral detection position, the corresponding spectral detection area and internal damage prediction parameters are determined based on the position of the epidermal abrasion area in the multi-view visible light color image and the geometric and depth parameters of the epidermal abrasion area. Then, the acquisition position, acquisition range, acquisition density, or acquisition method of the spectral detection area is adjusted according to the internal damage prediction parameters to acquire the light signal reflected, transmitted, or scattered by the agricultural product to be tested, obtain visible light / near-infrared spectral data, and establish the correspondence between the visible light / near-infrared spectral data and the multi-view visible light color image in terms of spatial region and detection object. S3. Extract epidermal defect features from multi-view visible light color images and determine candidate epidermal defect regions based on these features; then extract internal pulp state features from visible / near-infrared spectral data and perform region-weighted extraction of internal pulp state features using candidate epidermal defect regions; perform feature-level fusion of epidermal defect features and internal pulp state features to obtain fused features; generate damage propagation risk parameters based on the geometric parameters, depth parameters, and internal pulp state features of the epidermal abrasion area; and perform directional enhancement and zoning correction on the fused features based on the damage propagation risk parameters to obtain enhanced fused features. S4. Input the enhanced fusion features, overall damage propagation risk parameters, and local damage propagation risk parameters into the multi-task output model to obtain the skin defect detection results and internal pulp state detection results of the agricultural product to be tested; generate the internal and external consistency judgment results based on the skin defect detection results and internal pulp state detection results, and combine the enhanced fusion features, overall damage propagation risk parameters, local damage propagation risk parameters, and internal and external consistency judgment results to generate the comprehensive grading results and utilization method judgment results of the agricultural product to be tested.
[0008] Beneficial effects In the above technical solution, the present invention provides a rapid identification method for agricultural product skin defects. This method collaboratively acquires multi-view visible light color images of the agricultural product under test and visible light / near-infrared spectral data corresponding to the skin abrasion area. It establishes a correspondence between skin defect information and internal pulp state information. Based on the location, geometric parameters, depth parameters, and comprehensive extension direction of the skin abrasion area, it performs targeted acquisition, key extraction, and propagation correlation modeling of the internal detection area, generating damage propagation risk parameters. Then, combined with risk-driven enhanced fusion, internal and external consistency judgment, overall utilization information and local utilization information evaluation, and local priority retention analysis, it collaboratively determines the quality status, comprehensive grading results, and utilization method of the agricultural product under test. This improves the accuracy of skin defect detection and internal pulp state identification, enhances the rationality of comprehensive grading, and increases the utilization rate of agricultural products.
[0009] It should be understood that the foregoing general description and the following detailed description are exemplary and illustrative only, and are not intended to limit this disclosure.
[0010] This application provides an overview of various implementations or examples of the technology described in this disclosure, and is not a full disclosure of the entire scope or all features of the disclosed technology. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0012] Figure 1 This is a schematic diagram of a rapid identification method for agricultural product surface defects provided in an embodiment of the present invention. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0014] Reference Figure 1As shown, the present invention provides a method for rapid identification of defects on the surface of agricultural products, which includes the following steps: S1, during the process of the agricultural product to be tested moving along the conveying path, the posture of the agricultural product to be tested is adjusted, and during the posture adjustment process, multiple angle images of the surface are collected to obtain a multi-view visible light color image characterizing the external state of the agricultural product to be tested.
[0015] S1 includes the following sub-steps: S11, transport the agricultural product to be tested to the image acquisition station, and use the attitude adjustment mechanism to limit and support the agricultural product and correct its attitude so that the agricultural product to be tested remains relatively stable during the transportation process; S12. Drive the agricultural product to be tested to rotate around its own axis at any angle through the rotary drive mechanism, so that different areas of the surface of the agricultural product to be tested face the image acquisition module in sequence. S13. During the rotation of the agricultural product to be tested, based on the rotation angle, conveying displacement or acquisition rhythm of the agricultural product to be tested, the image acquisition module is triggered to acquire epidermal images from multiple angles. S14. Perform viewpoint marking and object association on the collected epidermal images from multiple angles, and establish the correspondence between epidermal images from each angle and the same agricultural product to be tested. S15. Based on the coverage of the skin area of the agricultural product under test in the skin images from various angles, generate a multi-view visible light color image dataset of the agricultural product under test. S16. Based on the multi-view visible light color image dataset, determine the collected and uncollected areas of the surface of the agricultural product to be tested, and collect surface images at corresponding angles for the uncollected areas. S17. Determine the suspected skin defect area based on the multi-view visible light color image; when the image corresponding to the suspected skin defect area has incomplete display of the defect area, the defect area is at the edge of the image, or the defect area is occluded, control the agricultural product to be tested to continue rotating according to the spatial position and boundary direction of the suspected skin defect area, and re-collect the suspected skin defect area. S18. When the suspected epidermal defect area enters the size calibration area, the size of the suspected epidermal defect area is calibrated based on the calibration reference unit set at the image acquisition station, and the conversion relationship between the image size and the actual size of the suspected epidermal defect area is established. S18 includes the following steps: S181, the attitude adjustment mechanism adjusts the attitude of the agricultural product to be tested so that the suspected skin defect area enters the size calibration area and the calibration reference unit and the suspected skin defect area are located in the same acquisition field of view. The calibration image obtained based on the same acquisition field of view includes the calibration reference unit and the suspected skin defect area. S182. Identify the calibration reference unit in the calibration image and extract the reference features of the calibration reference unit; based on the relative positional relationship between the suspected epidermal defect area and each reference feature, select the target reference feature corresponding to the suspected epidermal defect area, and determine the pixel distance corresponding to the boundary contour, feature point spacing, scale spacing or grid spacing based on the target reference feature, and obtain the pixel size corresponding to the calibration reference unit. S183. Calculate the basic pixel scale of the acquisition field of view where the calibration reference unit is located based on the actual size of the calibration reference unit and the pixel size corresponding to the calibration reference unit; perform local mapping or local correction on the basic pixel scale based on the curvature information, local tilt direction, acquisition angle or local projection relationship of the local surface where the suspected epidermal defect area is located, and establish a local size conversion relationship with the suspected epidermal defect area. S184. Based on multi-view visible light color images, depth information, or three-dimensional reconstruction results, obtain the curvature information and local tilt direction of the local surface where the suspected epidermal defect area is located; and correct the local size conversion relationship based on the curvature information and local tilt direction. S185. Identify suspected epidermal defect areas in the calibration image, extract the boundary contours of the suspected epidermal defect areas, determine the main extension direction, boundary contour points or circumscribed boundaries of the suspected epidermal defect areas based on the boundary contours, and calculate the corresponding pixel length, pixel width, pixel area or pixel opening size to obtain the pixel size corresponding to the suspected epidermal defect areas. S186. Based on the compensated local size conversion relationship, the pixel size of the suspected skin defect area is converted into the actual size to obtain the geometric parameters of the suspected skin defect area. Based on the geometric parameters of the suspected skin defect area, the attitude adjustment mechanism is controlled to adjust the attitude of the agricultural product to be tested so that the suspected skin defect area enters the depth acquisition area.
[0016] S19. When the suspected epidermal defect area enters the depth acquisition area, acquire the depth information and surface height difference information corresponding to the suspected epidermal defect area, and obtain multiple angle images of the suspected epidermal defect area; constrain the depth information, surface height difference information and multiple angle images to the local surface area corresponding to the suspected epidermal defect area, perform local three-dimensional reconstruction of the suspected epidermal defect area, and then extract the depth parameters of the epidermal abrasion based on the local three-dimensional reconstruction results.
[0017] S19 includes the following sub-steps: S191, Identify suspected epidermal defect areas based on multi-view visible light color images, and match and associate image areas corresponding to the same suspected epidermal defect area under different views based on region index identifiers; combine image acquisition viewpoint, pose information and size calibration results to establish a mapping relationship between the image coordinate system and the local coordinate system of the surface of the agricultural product to be tested, and determine the fused local surface coordinate position of the suspected epidermal defect area on the surface of the agricultural product to be tested based on the mapping results corresponding to multiple viewpoint images; determine the fused main extension direction of the suspected epidermal defect area based on the boundary contour information of the suspected epidermal defect area under different views; S192. Based on the fusion local surface coordinates of the suspected epidermal defect area on the surface of the agricultural product to be tested, the fusion main extension direction, and the target acquisition position and target acquisition direction corresponding to the depth acquisition area, calculate the rotation angle, flip angle, deflection direction, or displacement of the agricultural product to be tested, and generate an attitude adjustment path or rotation control command to make the target orientation of the suspected epidermal defect area enter the depth acquisition area. S193. According to the attitude adjustment path or rotation control command, control the attitude adjustment mechanism to drive the agricultural product to be tested to rotate, flip, deflect or shift, so that the suspected skin defect area enters the deep collection area. S194. When a suspected skin defect area enters the depth acquisition area, the attitude adjustment mechanism is controlled to stop adjusting the attitude of the agricultural product to be tested, or the rotation speed, flipping amplitude, or deflection amplitude of the attitude adjustment mechanism is reduced, so that the target orientation of the suspected skin defect area is kept within the depth acquisition area; and the attitude of the agricultural product to be tested is slightly corrected according to the area position feedback information output by the depth acquisition module, and depth acquisition is performed.
[0018] Specifically, in this invention, step S1 is used to acquire multiple angle images of the surface of the agricultural product to be tested, obtaining multi-view visible light color images characterizing the external state of the agricultural product. As the agricultural product moves along the conveying path, it is sequentially conveyed to the image acquisition station by the conveying mechanism. A posture adjustment mechanism located at the image acquisition station provides limiting support and posture correction for the agricultural product, ensuring relative stability during movement and allowing different surface areas to sequentially enter the image acquisition range. The image acquisition module then completes the acquisition of surface images from multiple angles.
[0019] In step S11, the agricultural product to be tested is transported to the image acquisition station. The conveying mechanism can be a conveyor belt, roller conveyor, or chain conveyor; the image acquisition station can be set as a closed or semi-closed detection space to reduce the impact of ambient light changes on image acquisition. The attitude adjustment mechanism may include one or more of the following: a flexible limiting support component, a rolling guide component, a differential rotation component, or a pneumatic actuation component. The limiting support component is used to support and limit the agricultural product to be tested, reducing lateral offset and swaying during transport; the rolling guide component, differential rotation component, or pneumatic actuation component is used to change the orientation and attitude of the agricultural product to be tested, so that different surface areas are gradually exposed to the image acquisition field of view. Attitude correction can be achieved through multiple sets of relatively arranged rollers or guide wheels, or through intermittent actuation or flipping via actuation components. To accommodate different types and sizes of agricultural products, the limiting support component can be set as an elastic support structure or a structure with adjustable spacing.
[0020] In step S12, a rotary drive mechanism located at the image acquisition station drives the agricultural product to rotate around its own axis, allowing different areas of the skin to sequentially enter the field of view of the image acquisition module. The rotary drive mechanism can employ any of the following: a friction wheel drive structure, a roller differential drive structure, a clamping rotary structure, or a toggle rotary structure. Preferably, opposing drive rollers contact the agricultural product, and the speed difference between the different drive rollers drives the product to rotate smoothly. A high-friction material layer can be applied to the surface of the drive rollers to improve drive stability and reduce slippage. The rotation angle and speed are adjusted by the control unit, and the trigger frequency of the image acquisition module is matched to the rotational motion, ensuring that adjacent image acquisitions correspond to different skin areas. The rotation method can be either small-angle step control or continuous rotation control, depending on the detection scenario.
[0021] In step S13, the image acquisition module acquires skin images from multiple angles according to predetermined trigger conditions. The trigger conditions can be set based on one or more of the rotation angle of the agricultural product under test, the conveying displacement, or the acquisition cycle. An angle detection unit, a displacement detection unit, or a cycle control unit can output corresponding trigger signals to ensure that the skin images from multiple angles remain distinguishable in both temporal sequence and spatial location. The image acquisition module can employ synchronous or sequential triggering. To reduce redundant acquisition and image redundancy, image acquisition can be performed only when the agricultural product under test enters a new acquisition angle range.
[0022] In step S14, the acquired epidermal images from multiple angles are labeled with viewpoints and associated with objects, ensuring that epidermal images obtained from different angles correspond to the same agricultural product under test. Viewpoint labeling can be set based on camera position, rotation angle, transport displacement, acquisition sequence, or image number. Object association can be implemented by combining the position information of the agricultural product under test in the transport path, the timing information of its entry into the image acquisition station, rotation status information, and image acquisition trigger information. Object numbers can be generated according to the order in which the agricultural products under test enter the image acquisition station, and the object numbers and angle numbers are written together into the image index information, thus forming a multi-view image set for a single agricultural product under test. If necessary, auxiliary verification can be performed by combining outer contour size, color distribution, surface texture distribution, or local feature positions to improve the accuracy of object association.
[0023] In step S15, the coverage of the skin region of the agricultural product under test is analyzed based on the skin images acquired from different angles, and a multi-view visible light color image dataset of the agricultural product under test is generated. The acquired areas and under-covered areas can be analyzed by combining the viewpoint information, rotation angle information, distribution of the visible skin region in the images, and regional overlap between different images. Multiple skin images corresponding to the same agricultural product under test can be categorized according to object number and sorted according to angle number, acquisition order, or triggering order to form a multi-view image sequence for a single agricultural product under test. Furthermore, the images can be subjected to integrity checks and validity screening, removing blurry images, duplicate images, severely occluded images, or invalid images to obtain a valid multi-view visible light color image dataset.
[0024] In step S16, the coverage of the surface area of the agricultural product under test is analyzed based on the multi-view visible light color image dataset. This identifies the acquired and unacquired areas, and supplements the acquisition of surface images at corresponding angles for the unacquired areas. By combining angle information, image sequence information, the rotation status of the agricultural product under test, and the distribution of the visible surface area in each image, the covered surface areas in images from different angles are merged, and areas that have not yet entered the acquisition field of view or are insufficiently covered are identified. After identifying the unacquired areas, the attitude adjustment mechanism and rotation drive mechanism are controlled to continue rotating the agricultural product under test, gradually bringing the surface corresponding to the unacquired areas into the field of view of the image acquisition module. Supplementary acquisition is performed when the target acquisition angle is reached. The supplementary acquired images continue to be classified and managed using the original object number and viewpoint identification method. After supplementary acquisition, the image coverage is checked again; if the unacquired areas are covered, the supplementary acquired images are included in the multi-view visible light color image dataset; if there are still areas with insufficient acquisition, supplementary acquisition continues until the main observation area of the agricultural product's surface is effectively covered.
[0025] In step S17, defects are screened on the surface of the agricultural product under test based on multi-view visible light color images to identify suspected surface defect areas. Suspected surface defect areas can be identified by areas of abnormal color, abrupt texture changes, discontinuous brightness, abnormal contours, or irregular shapes. By comparing and analyzing the surface areas in images from different angles, areas that may contain abrasions, dents, cracks, blemishes, or localized damage can be preliminarily located, and these areas will be the focus of subsequent fine-grained data acquisition and defect feature extraction.
[0026] The identification of suspected epidermal defect areas can be accomplished by the image analysis unit. This unit processes color components, texture distribution, edge variations, and local morphology in multi-view visible light color images, and outputs the location range, boundary contour, and region number of the suspected epidermal defect area based on the extracted abnormal features. To improve identification accuracy, the appearance of the same area in adjacent images from multiple perspectives can be combined for cross-validation of suspected epidermal defect areas. When a region exhibits surface abnormalities from different perspectives, it can be further confirmed as a key area to be re-collected.
[0027] After initially identifying suspected epidermal defect areas, the display in the corresponding images is checked. If the defect area is incompletely displayed, located at the image edge, or obscured, it indicates that the current image cannot fully reflect the true shape of the defect area, and re-image acquisition of that area is necessary. Incomplete display can manifest as only a portion of the defect outline appearing in the current image; being at the image edge can manifest as the defect area intersecting with the image boundary; and obscuration can manifest as the defect outline being obscured by local undulations in the agricultural product being tested, adjacent surface areas, or support contact areas.
[0028] Re-acquisition can be controlled by combining the spatial location and boundary orientation of the suspected skin defect area. The spatial location can be determined based on the position of the suspected skin defect area in multi-view images, the current rotation angle of the agricultural product under test, and object association information; the boundary orientation can be extracted based on the extension direction of the boundary contour of the suspected skin defect area, the direction of the main boundary, or the direction of the long axis. Based on this information, the control unit can generate an adjustment command to continue rotation, controlling the rotation drive mechanism to drive the agricultural product under test to rotate further, so that the suspected skin defect area gradually moves from the edge of the image to the center of the image, or exposes the occluded part to the image acquisition field of view.
[0029] In one embodiment, the preferred angle range for re-acquisition can be determined based on the boundary orientation of the suspected epidermal defect area. When the boundary contour extends significantly in a certain direction, the agricultural product to be tested can be adjusted to a position that allows the extension direction to be more fully unfolded in the image acquisition plane, so as to fully acquire the length, width, and edge morphology of the defect area. When the defect area is partially obstructed, the agricultural product to be tested can be rotated to another acquisition angle according to the obstruction direction and spatial position, so that the originally obstructed part enters the image acquisition field of view. During the re-acquisition process, the image acquisition module acquires supplementary images according to the new angle position and associates the supplementary images with the original object number, viewpoint number, or region number.
[0030] After supplementary image acquisition, the display integrity of suspected epidermal defect areas can be reassessed. If the supplementary image can fully display the boundary of the defect area, and the defect area is not located at the edge of the image and is not obstructed, the supplementary image will be used as a valid image for subsequent extraction of geometric parameters, depth parameters, or defect morphology features. If there are still insufficient displays, angle adjustment and re-acquisition will continue until an image that meets the requirements for subsequent analysis is obtained.
[0031] By using a targeted re-acquisition method around the suspected epidermal defect area, the image of the defect area can be presented more completely, reducing the loss of defect information caused by image edge truncation, local occlusion or poor viewing angle, and improving the accuracy of contour extraction, size measurement and subsequent defect judgment of the abrasion area.
[0032] In step S18, once a suspected skin defect area enters the size calibration area, the calibration reference unit located at the image acquisition station is used to calibrate the size of the suspected skin defect area, establishing a conversion relationship between the image size and the actual size of the suspected skin defect area. The purpose of size calibration is to convert the pixel scale in the image into the actual size scale on the skin of the agricultural product to be tested, thereby providing a quantitative basis for the subsequent extraction of geometric parameters such as the length, width, area, and opening size of the suspected skin defect area, and providing a reference for the positioning of the subsequent depth acquisition area.
[0033] Size calibration is performed around the suspected epidermal defect area. To improve the accuracy of size conversion, the suspected epidermal defect area and the calibration reference unit are placed in the same acquisition field of view, and the calibration reference information and defect area information are acquired simultaneously in the same calibration image. This ensures that the pixel scale corresponding to the calibration reference unit is consistent with the imaging state of the local surface where the suspected epidermal defect area is located, thereby reducing errors caused by differences in acquisition angle, local surface undulations, and image projection differences.
[0034] In step S181, the attitude adjustment mechanism adjusts the attitude of the agricultural product under test, bringing the suspected skin defect area into the size calibration area and placing the calibration reference unit and the suspected skin defect area within the same acquisition field of view. The size calibration area can be set near the image acquisition station or partially overlap with the fine image acquisition area. The calibration reference unit is fixedly set at a predetermined position at the image acquisition station and maintains a relatively fixed positional relationship with the image acquisition module to ensure the stability of the size calibration results. During attitude adjustment, based on the spatial position, boundary orientation, and current angle information of the suspected skin defect area in multi-view images, the rotation drive mechanism is controlled to continue rotating the agricultural product under test, gradually bringing the suspected skin defect area into the size calibration area. Once the suspected skin defect area enters the size calibration area, the image acquisition module acquires a calibration image containing the calibration reference unit and the suspected skin defect area, thus completing the size conversion under the same viewing angle and imaging conditions.
[0035] In step S182, calibration reference units are identified in the calibration image, and their reference features are extracted. The calibration reference units can be any of the following: calibration blocks with known geometric dimensions, rulers, grid plates, checkerboard patterns, feature point arrays, or reference photographs with regular boundaries. Reference features may include boundary contours, feature points, scale lines, grid lines, grid intersections, or fixed spacing between adjacent marks. After identifying the calibration reference units, based on the relative positional relationship between the suspected epidermal defect area and each reference feature, target reference features closer to the suspected epidermal defect area are selected. The pixel distances corresponding to the boundary contours, feature point spacing, scale spacing, or grid spacing are determined based on the target reference features, thus obtaining the pixel dimensions corresponding to the calibration reference units. Using a target reference feature selection method oriented towards the defect area can reduce local scale deviations caused by distant references.
[0036] In S183, the basic pixel scale of the acquisition field of view where the calibration reference unit is located is calculated based on the actual size of the calibration reference unit and the pixel size corresponding to the calibration reference unit. The basic pixel scale can be understood as the actual length corresponding to a unit pixel in the current acquisition field of view, or the pixel value corresponding to a unit actual length. After obtaining the basic pixel scale, the imaging state of the local surface where the suspected epidermal defect area is located is combined to perform local mapping on the basic pixel scale and establish a local size conversion relationship with the suspected epidermal defect area.
[0037] In step S184, by combining multi-view visible light color images, depth information, or 3D reconstruction results, the curvature information and local tilt direction of the local surface where the suspected skin defect area is located are obtained, and the local size conversion relationship is corrected based on the curvature information and local tilt direction. Curvature information characterizes the degree of curvature of the local skin surface, and local tilt direction characterizes the tilt state of the suspected skin defect area relative to the acquisition field of view. Since the skin of agricultural products is usually curved, the local surface where the suspected skin defect area is located is often not strictly parallel to the image acquisition plane. Therefore, using only the uniform pixel scale of the entire image can easily lead to size conversion errors. After correcting the local size conversion relationship using local curved surface information, the size conversion can better fit the true geometric state of the surface where the suspected skin defect area is located. In one embodiment, the local surface curvature can be calculated based on the geometric relationship between multi-view images; alternatively, the height variation distribution of the local surface can be directly obtained based on the depth acquisition results or local 3D reconstruction results, and then the local curvature and tilt direction can be determined accordingly.
[0038] In step S185, suspected epidermal defect regions are identified in the calibration image, and their boundary contours are extracted. These boundary contours can be determined by color variations, abrupt texture changes, brightness anomalies, edge information, or morphological segmentation results. After extracting the boundary contours, the main extension direction, boundary contour points, or circumscribed boundary of the suspected epidermal defect region are determined based on these contours. Furthermore, the corresponding pixel length, pixel width, pixel area, or pixel aperture size is calculated to obtain the pixel dimensions corresponding to the suspected epidermal defect region. Thus, the morphological features of the suspected epidermal defect region can not only be identified but also converted into quantifiable size parameters.
[0039] In step S186, based on the corrected local size conversion relationship, the pixel size of the suspected skin defect area is converted into its actual size, obtaining the geometric parameters of the suspected skin defect area. Geometric parameters may include one or more of length, width, area, and opening size. After obtaining the geometric parameters, the attitude adjustment mechanism is controlled according to these parameters to further adjust the attitude of the agricultural product under test, ensuring the suspected skin defect area enters the depth acquisition area. Specifically, the area to be prioritized for coverage during depth acquisition can be determined based on the scale and distribution characteristics of the defect area reflected by the geometric parameters. For example, when the suspected skin defect area is elongated, the main extension direction can be made more suitable for entering the depth acquisition field of view; when the suspected skin defect area is large or has a wide opening, the coverage area of the depth acquisition area can be appropriately expanded. Thus, the size calibration results are not only used to form the skin geometric parameters but also serve to accurately locate the subsequent depth acquisition area.
[0040] In S19, depth acquisition preparation and attitude control are performed around the suspected epidermal defect area to ensure that the suspected epidermal defect area enters the depth acquisition area in a position and direction suitable for depth detection, and remains relatively stable after entering, so as to obtain the depth information, surface height difference information or perform local three-dimensional reconstruction of the defect area.
[0041] In step S191, suspected epidermal defect areas are identified based on multi-view visible light color images. Image regions corresponding to the same suspected epidermal defect area from different viewpoints are matched and associated based on region index identifiers. Combining the image acquisition viewpoint, the current pose information of the agricultural product under test, and the size calibration results, a mapping relationship is established between the image coordinate system and the local coordinate system of the agricultural product surface. The fused local surface coordinate position of the suspected epidermal defect area on the agricultural product surface is determined based on the mapping results corresponding to images from multiple viewpoints. Simultaneously, based on the boundary contour information of the suspected epidermal defect area from different viewpoints, the boundary extension direction, the principal axis direction, or the long side direction is extracted to determine the fused main extension direction of the suspected epidermal defect area. In this way, the spatial location and main extension direction of the defect area on the surface of the agricultural product under test can be determined simultaneously before depth acquisition.
[0042] In step S192, based on the fused local surface coordinates, the fused main extension direction, and the target acquisition position and direction corresponding to the depth acquisition area, the required attitude change amount for the agricultural product to enter the depth acquisition area is calculated. The attitude change amount may include one or more of rotation angle, flip angle, deflection direction, or displacement. Based on these parameters, an attitude adjustment path or rotation control command is generated to orient the suspected epidermal defect area into the depth acquisition area. In one embodiment, the attitude adjustment path can employ a continuous adjustment method or a segmented adjustment method to adapt to different detection accuracy and conveying cycle requirements.
[0043] In S193, based on the attitude adjustment path or rotation control command, the attitude adjustment mechanism drives the agricultural product under test to rotate, flip, deflect, or shift, so that the suspected skin defect area gradually approaches and eventually enters the depth acquisition area. During the control process, the drive output can be continuously adjusted according to the current position and attitude of the agricultural product under test, so that when the suspected skin defect area enters the depth acquisition area, it is as consistent as possible with the target acquisition position and target acquisition direction, thereby reducing offset, tilt, or local occlusion in the depth acquisition field of view.
[0044] In step S194, once the suspected skin defect area enters the depth acquisition area, the attitude adjustment mechanism stops making large-scale attitude adjustments, or reduces the rotation speed, flipping amplitude, or deflection amplitude, keeping the target orientation of the suspected skin defect area within the depth acquisition area. In some embodiments, the current attitude of the agricultural product under test can be slightly corrected based on the area position feedback information output by the depth acquisition module, keeping the suspected skin defect area near the predetermined acquisition position and improving the stability of the depth acquisition process. After completing attitude maintenance and fine-tuning, the depth acquisition module can further acquire the depth information and surface height difference information corresponding to the defect area, or perform local three-dimensional reconstruction by combining images from different angles, thereby more accurately reflecting the true morphological features of the suspected skin defect area.
[0045] In a preferred embodiment of the present invention, S2, when the agricultural product to be tested enters the spectral detection position, the corresponding spectral detection area and internal damage prediction parameters are determined according to the position of the epidermal abrasion area in the multi-view visible light color image and the geometric and depth parameters of the epidermal abrasion area; then, the acquisition position, acquisition range, acquisition density or acquisition method of the spectral detection area are adjusted according to the internal damage prediction parameters, and the light signal after reflection, transmission or scattering by the agricultural product to be tested is acquired to obtain visible light / near-infrared spectral data, and the correspondence between the visible light / near-infrared spectral data and the multi-view visible light color image in terms of spatial region and detection object is established.
[0046] S2 includes the following sub-steps: S21, Determine the spectral detection area corresponding to the epidermal abrasion area based on the position of the epidermal abrasion area in the multi-view visible light color image; S22. Generate epidermal damage level parameters based on the geometric and depth parameters of the epidermal abrasion area; generate internal damage prediction parameters based on the epidermal damage level parameters; and adjust the acquisition location, acquisition range, acquisition density, or acquisition method of the spectral detection area based on the internal damage prediction parameters. S23. When the agricultural product to be tested enters the spectral detection position, the spectral acquisition module is controlled to perform the first light signal acquisition on the spectral detection area according to the internal damage prediction parameters. Then, the target sub-region is determined according to the first light signal acquisition result, and the spectral acquisition module is controlled to perform the second local densified acquisition on the target sub-region according to the internal damage prediction result corresponding to the target sub-region. S24. Convert the collected light signal into visible light / near infrared spectral data of the agricultural product to be tested, and correct the internal damage prediction parameters based on the visible light / near infrared spectral data; S25. Assign a region index identifier to the epidermal abrasion area and map the region index identifier to the spectral detection area to establish a region correspondence between visible light / near-infrared spectral data and multi-view visible light color image; S26. Based on the location information, attitude information and regional index identifier of the agricultural product to be tested in the transportation path, the visible light / near infrared spectral data and multi-view visible light color images are uniformly correlated.
[0047] Specifically, in step S21, the spectral detection area corresponding to the epidermal abrasion area is determined based on its position in the multi-view visible light color image. The position of the epidermal abrasion area can be derived from the results of previous multi-view image processing. After object association, viewpoint marking, and defect area identification, the position range, boundary contour, center position, and angle information of the epidermal abrasion area in different viewpoint images can be obtained. Combined with the correspondence between multi-view images, the relative position of the epidermal abrasion area on the surface of the agricultural product to be tested is determined. Based on this positional information, the target detection range corresponding to the epidermal abrasion area can be determined in the detection coordinates corresponding to the spectral detection position, and this target detection range is taken as the spectral detection area. To improve the accuracy of area correspondence, the position, rotation angle, and object number of the agricultural product to be tested in the transport path can also be used for synchronous verification, so that the spectral detection area and the epidermal abrasion area are consistent at the same detection object and the same area level.
[0048] In step S22, epidermal damage level parameters are generated based on the geometric and depth parameters of the epidermal abrasion area, and further, internal damage prediction parameters are generated. Geometric parameters may include one or more of length, width, area, and opening size; depth parameters may include one or more of maximum depth, average depth, depth variation gradient, or local indentation degree. Combining and analyzing the geometric and depth parameters yields epidermal damage level parameters characterizing the strength and morphology of local epidermal damage. Based on these epidermal damage level parameters, internal damage prediction parameters characterizing the probability and potential degree of internal anomalies are generated. According to the internal damage prediction parameters, the sampling location, sampling range, sampling density, or sampling method of the spectral detection area can be adjusted to make the spectral detection more closely approximate areas where abnormalities may exist inside the tested agricultural product.
[0049] In step S23, once the agricultural product to be tested enters the spectral detection location, the spectral acquisition module is controlled to perform the first optical signal acquisition of the spectral detection area based on the internal damage prediction parameters, obtaining the overall spectral response information of the detection area. Then, based on the results of the first optical signal acquisition, the target sub-region is determined, and combined with the corresponding internal damage prediction results, a second, more detailed local acquisition is performed on the target sub-region. The first acquisition is used for overall screening, and the second acquisition is used for detailed detection of local high-risk areas. The target sub-region can be determined based on the abnormal response intensity, abnormal distribution range, or abnormal concentration degree in the first acquisition results. For target sub-regions with high internal damage prediction results, the range of the second acquisition can be narrowed and the sampling density increased. For abnormal areas expanding along a certain direction, sampling points can be added along that direction to improve the ability to characterize the continuous distribution of internal anomalies.
[0050] In step S24, the light signal acquired by the spectral acquisition module is converted into visible / near-infrared spectral data of the agricultural product to be tested, and the internal damage prediction parameters are corrected based on the visible / near-infrared spectral data. The light signal can originate from the first light signal acquisition and the second localized acquisition, and is usually output in the form of light intensity distribution, wavelength response sequence, or multi-band sampled values. To obtain the visible / near-infrared spectral data, the original light signal can be denoised, background corrected, baseline corrected, band separated, spectral reconstructed, and normalized. After the conversion is completed, the internal damage prediction parameters can be increased, decreased, or refined based on the spectral response characteristics in the spectral data that reflect browning, softening, changes in water content, changes in maturity, or tissue damage, so that the internal damage prediction results further transition from predictions based on epidermal damage information to corrected results that combine actual internal responses.
[0051] In step S25, a region index identifier is assigned to the epidermal abrasion area, and this identifier is mapped to the spectral detection area, establishing a regional correspondence between visible / near-infrared spectral data and multi-view visible color images. After identification, localization, and boundary extraction in the multi-view visible color images, the corresponding region location, boundary contour, center location, and object number are obtained for each epidermal abrasion area, and a unique region index identifier is assigned accordingly. The region index identifier can be a hierarchical code formed by combining numerical numbers, character numbers, or object numbers with region serial numbers. After the region index identifier assignment is completed, the region index identifier can be mapped to the corresponding spectral detection area and local sampling position by combining the local surface coordinates of the epidermal abrasion area on the surface of the agricultural product to be tested, the location range of the spectral detection area, the location of the target sub-region, and the attitude and position information of the agricultural product to be tested in the transport path. This ensures that the visible / near-infrared spectral data at different sampling points can be linked to the corresponding abrasion area in the epidermal image.
[0052] In step S26, visible / near-infrared spectral data and multi-view visible color images are uniformly correlated based on the location, attitude, and region index of the agricultural product under test in the transport path. Location information characterizes the current position of the agricultural product under test in the transport path and its movement between different detection stations. Attitude information characterizes the rotation, flipping, deflection, or current orientation of the agricultural product under test during the detection process. Region index identifies the corresponding region number of the epidermal abrasion area in both the image and spectral dimensions. Combining these three types of information, it is possible to determine which agricultural product under test, which epidermal abrasion area, and which set of multi-view epidermal images correspond to a particular set of visible / near-infrared spectral data, forming a unified data structure at the object, region, and temporal layers. Based on this unified data structure, subsequent steps can simultaneously access external defect information from the epidermal image and internal state information from the spectral data for the same agricultural product under test and the same epidermal abrasion area, providing a consistent data foundation for extracting internal pulp state features, correlating and fusing epidermal defect features with internal pulp state features, and analyzing damage propagation risk.
[0053] In another preferred embodiment of the present invention, S3, the epidermal defect features are extracted from the multi-view visible light color image, and candidate epidermal defect regions are determined based on the epidermal defect features; then, the internal pulp state features are extracted based on the visible light / near-infrared spectral data, and the internal pulp state features are extracted using the candidate epidermal defect regions with regional weighting; the epidermal defect features and internal pulp state features are fused at the feature level to obtain fused features; damage propagation risk parameters are generated based on the geometric parameters, depth parameters of the epidermal abrasion area and the internal pulp state features; and the fused features are enhanced directionally and corrected by partitioning based on the damage propagation risk parameters to obtain enhanced fused features.
[0054] S3 includes the following sub-steps: S31, extracting epidermal defect features from multi-view visible light color images, including the location features, color features, texture features, geometric parameters, and depth parameters of the epidermal abrasion area; determining the epidermal defect area based on the epidermal defect features, and using the epidermal defect area as the epidermal candidate defect area; S32. Based on the geometric parameters, depth parameters, and the comprehensive extension direction of the suspected epidermal defect area, generate a damage characterization quantity that represents the local damage morphology and degree of damage to the epidermis. Then, generate an epidermal damage level parameter based on the damage characterization quantity. Next, use the epidermal damage level parameter to classify the internal detection area corresponding to the suspected epidermal defect area, and adjust the extraction range, extraction density, extraction direction, or regional weight of the internal pulp state characteristics accordingly. S33. Based on the graded processing results of the internal detection area and the extraction range, extraction density, extraction direction or regional weight of the internal pulp state characteristics, the visible light / near infrared spectral data are partitioned, directionally sampled or weighted; firstly, the maturity parameters and pulp firmness parameters are extracted from the corresponding internal detection area, and then the pulp browning degree parameters and internal damage degree parameters are extracted along the comprehensive extension direction of the suspected epidermal defect area for the high-grade internal detection area to form the internal pulp state characteristics; S34. Based on the comprehensive extension direction of the candidate epidermal defect area, epidermal damage level parameters, and suspected epidermal defect area, construct key enhancement areas and spread sensitive areas corresponding to the epidermal abrasion area in the internal detection area; perform regional weighted enhancement on the internal pulp state characteristics within the key enhancement areas and spread sensitive areas to obtain the local internal pulp state characteristics corresponding to the epidermal abrasion area. S35. Based on the local surface coordinates of the candidate epidermal defect area on the surface of the agricultural product to be tested, the comprehensive extension direction of the suspected epidermal defect area, and the location distribution of the local internal pulp state characteristics, a local propagation coordinate system is established; under the local propagation coordinate system, key enhancement areas, propagation sensitive areas, and propagation corridor areas are constructed, and propagation direction sensitive weights and regional coupling weights are generated; based on the propagation direction sensitive weights and regional coupling weights, propagation constraint fusion is performed on epidermal side features and internal side features.
[0055] S35 includes the following sub-steps: S351. Based on the local surface coordinates of the candidate epidermal defect area on the surface of the agricultural product to be tested, the comprehensive extension direction of the suspected epidermal defect area, and the positional distribution of the local internal pulp state features corresponding to the epidermal abrasion area, a local propagation coordinate system is established with the epidermal abrasion area as the center and the comprehensive extension direction of the suspected epidermal defect area as the main axis. The epidermal side features and internal side features are mapped to the local propagation coordinate system to complete the spatial alignment of the epidermal side features and internal side features. S352. Based on the comprehensive extension direction of the candidate epidermal defect area, the key enhancement area, the propagation sensitive area, and the suspected epidermal defect area, construct the key enhancement area, the propagation sensitive area, and the damage propagation area along the comprehensive extension direction in the local propagation coordinate system, and establish the regional correspondence between epidermal side features and internal side features. S353. Based on the comprehensive extension direction of the suspected epidermal defect area, the distribution direction of the internal features within the propagation sensitive area, and the feature changes within the damage propagation area along the comprehensive extension direction, generate propagation direction sensitivity weights and regional coupling weights to form directional association constraints and regional association constraints between epidermal side features and internal side features. S354. First, perform a first-layer weighted combination processing on the basic features of the epidermis and the basic state features of the interior to obtain the basic fusion result; then, perform a second-layer propagation constraint fusion processing on the damage features of the epidermis, the propagation sensitive area, and the damage sensitive features of the interior side within the damage propagation area along the comprehensive extension direction to obtain the propagation fusion result; finally, perform feedback correction processing on the basic fusion result and the propagation fusion result according to the propagation direction sensitivity weight and the region coupling weight.
[0056] S36. Generate epidermal propagation information based on the geometric parameters, depth parameters, and overall extension direction of the epidermal abrasion area; generate internal propagation information based on the local internal pulp state characteristics and fusion characteristics; then, based on the correspondence between epidermal propagation information and internal propagation information in terms of spatial location, directional distribution, and damage degree, establish a propagation correlation between epidermal damage and internal pulp state; and generate damage propagation risk parameters based on the propagation correlation. S36 includes the following sub-steps: S361, receiving the geometric parameters, depth parameters and comprehensive extension direction of the epidermal abrasion area through the epidermal propagation analysis module, and combining the geometric parameters, depth parameters and comprehensive extension direction to generate epidermal propagation information characterizing the trend, directional continuity and degree of epidermal damage expansion. S362. Receive local internal pulp state characteristics and fusion characteristics through the internal propagation analysis module, and analyze the distribution direction, degree of abnormality and spatial expansion of internal anomalies in the local internal region to generate internal propagation information. S363. Using the path prediction module, with the comprehensive extension direction as the main axis and the damage propagation area along the comprehensive extension direction as the constraint area, and combining the abnormal distribution results of epidermal propagation information and internal propagation information, predict the local propagation path of epidermal damage to the abnormal area of internal pulp. S364. By comparing the correspondence between epidermal propagation information and internal propagation information in terms of spatial location, directional distribution, damage degree, and local propagation path through the propagation coupling analysis module, a propagation correlation relationship is established, and a propagation coupling coefficient is further generated. S365. Analyze the continuity of the feature distribution along the comprehensive extension direction using the continuity analysis module to determine directional continuity; and analyze the continuity of changes in damage degree or abnormality degree along the local propagation path to determine degree continuity. S366. The risk assessment module receives the propagation correlation, propagation coupling coefficient, directional continuity, and degree continuity, and processes them comprehensively to generate overall damage propagation risk parameters and local damage propagation risk parameters corresponding to the propagation sensitive areas.
[0057] S37. Based on the damage propagation risk parameters, enhance the directional continuity and zonal correction of the local internal pulp state characteristics and fusion characteristics.
[0058] Specifically, step S3, after acquiring multi-view visible light color images and visible / near-infrared spectral data, jointly analyzes the information on surface defects and internal pulp condition of the agricultural product under test, forming a fusion result that simultaneously reflects the surface damage state and the internal abnormal state, and further generates damage propagation risk parameters. This process establishes a stable correspondence between external surface damage and internal pulp condition, providing a foundation for subsequent comprehensive grading and utilization determination.
[0059] In step S31, epidermal defect features are extracted from multi-view visible light color images. These features include location, color, texture, geometric parameters, and depth parameters of the abrasion area. Location features characterize the distribution of the abrasion area on the surface of the agricultural product being tested; color features characterize the color difference between the abrasion area and the normal epidermis; texture features characterize the continuity and roughness of the surface texture of the abrasion area; geometric parameters characterize the length, width, area, or opening size of the abrasion area; and depth parameters characterize the degree of indentation or local height difference of the abrasion area on the epidermal surface. These features can be obtained by the image analysis unit through color component extraction, texture operator analysis, edge detection, region segmentation, contour extraction, and depth information association. Based on these features, epidermal defect areas can be further identified and used as candidate epidermal defect areas. These candidate defect areas can correspond to either a single abrasion area or a composite abnormal area formed by adjacent abrasion areas, and are used for subsequent correlation with internal detection areas.
[0060] In S32, a damage characterization quantity is generated based on geometric parameters, depth parameters, and the comprehensive extension direction of the suspected epidermal defect area. This quantity represents the morphology and severity of local epidermal damage, and an epidermal damage grade parameter is generated accordingly. The comprehensive extension direction characterizes the main extension direction of the suspected epidermal defect area on the epidermis, while the geometric and depth parameters together reflect the extent, morphology, and intensity of the abrasion. The geometric parameters, depth parameters, and comprehensive extension direction can be combined and processed by the damage characterization analysis unit to form a damage characterization quantity, which is then used to output the epidermal damage grade parameter. The epidermal damage grade parameter can be used to distinguish between mild, moderate, and severe damage, or a continuously varying parameter can be used to reflect the strength of the damage. After generating the epidermal damage grade parameter, the internal detection area corresponding to the suspected epidermal defect area can be graded based on this parameter, and the extraction range, extraction density, extraction direction, or regional weight of the internal pulp state characteristics can be adjusted accordingly. In this way, the internal detection process no longer uses the same processing method for all areas, but rather differentiates the extraction of high-risk and low-risk areas based on the degree of epidermal damage.
[0061] In S33, based on the graded processing results of the internal detection area and the extraction range, extraction density, extraction direction, or regional weight of the internal pulp state characteristics, the visible / near-infrared spectral data are partitioned, sampled directionally, or weighted. The internal detection area can be composed of the preceding spectral detection area, the target sub-region, and the local area corresponding to the candidate epidermal defect area. First, maturity parameters and pulp firmness parameters are extracted from the corresponding internal detection area. Then, for the high-grade internal detection area, pulp browning degree parameters and internal damage degree parameters are extracted along the comprehensive extension direction of the suspected epidermal defect area to form the internal pulp state characteristics. Maturity parameters and pulp firmness parameters reflect the overall pulp state, while pulp browning degree parameters and internal damage degree parameters better characterize local internal abnormalities. By using this "basic first, then key" extraction method, the internal pulp state characteristics can include both overall quality information and local abnormality information corresponding to epidermal damage.
[0062] In S34, based on the candidate epidermal defect region, epidermal damage level parameters, and the comprehensive extension direction of the suspected epidermal defect region, key enhancement regions and propagation-sensitive regions corresponding to the epidermal abrasion region are constructed within the internal detection region. Key enhancement regions characterize internal areas directly corresponding to the spatial location of the epidermal abrasion region and requiring focused analysis, while propagation-sensitive regions characterize areas where internal abnormalities are more likely to spread or accumulate. After construction, the internal pulp state characteristics within the key enhancement regions and propagation-sensitive regions are enhanced using region-weighted augmentation to obtain local internal pulp state characteristics corresponding to the epidermal abrasion region. Region-weighted augmentation can be performed by the region enhancement unit based on the epidermal damage level parameters and spatial location relationships, giving higher weights to locations closer to the abrasion region and more likely to experience internal abnormalities, thereby improving the ability of local internal pulp state characteristics to represent the true internal damage state.
[0063] In S35, a local propagation coordinate system is established based on the local surface coordinates of candidate epidermal defect areas on the surface of the agricultural product under test, the comprehensive extension direction of suspected epidermal defect areas, and the location distribution of local internal pulp state characteristics. The local propagation coordinate system centers on the epidermal abrasion area and uses the comprehensive extension direction of the suspected epidermal defect area as the main axis to unify the spatial representation of epidermal and internal features. Subsequently, under the local propagation coordinate system, key enhancement areas, propagation-sensitive areas, and damage propagation areas along the comprehensive extension direction are constructed, and propagation direction sensitivity weights and region coupling weights are generated. In the process of constructing the local propagation coordinate system, the local surface coordinates of the candidate skin defect area on the surface of the agricultural product to be tested are used as the positioning basis. The comprehensive extension direction of the suspected skin defect area is used as the main axis direction, and the local propagation coordinate system is established in combination with the positional distribution of the local internal pulp state characteristics. Under the local propagation coordinate system, a key enhancement area directly corresponding to the skin abrasion area is constructed based on the projection range of the candidate skin defect area. A propagation sensitive area is constructed based on the abnormal distribution intensity of the local internal pulp state characteristics. The damage propagation area along the comprehensive extension direction is constructed based on the comprehensive extension direction as the main axis and the band-shaped connection range between the candidate skin defect area and the propagation sensitive area. The main distribution direction of the internal features within the propagation sensitive area is further extracted, and the propagation direction sensitive weight is generated based on the consistency between the distribution direction and the comprehensive extension direction of the suspected skin defect area. At the same time, the regional coupling weight is generated based on the spatial distance, projection overlap, adjacency, or connectivity between the candidate skin defect area and the key enhancement area, the propagation sensitive area, and the damage propagation area along the comprehensive extension direction. The propagation direction-sensitive weight reflects the consistency between the direction of internal abnormality distribution and the direction of epidermal abrasion extension, while the region coupling weight reflects the correspondence strength between candidate defect regions on the epidermis and local abnormal regions on the internal side. Based on the propagation direction-sensitive weight and the region coupling weight, propagation constraints are fused between epidermal and internal features. The resulting fused features not only reflect the epidermal damage information and the internal pulp state information themselves, but also reflect the spatial correspondence, directional correspondence, and local propagation relationship between the two.
[0064] Further, in step S351, based on the local surface coordinates of the candidate epidermal defect region on the surface of the agricultural product to be tested, the comprehensive extension direction of the suspected epidermal defect region, and the positional distribution of the local internal pulp state features corresponding to the epidermal abrasion region, a local propagation coordinate system is established with the epidermal abrasion region as the center and the comprehensive extension direction of the suspected epidermal defect region as the main axis. Epidermal side features and internal side features are then mapped to this local propagation coordinate system, completing the spatial alignment of the epidermal side features and internal side features. When establishing the local propagation coordinate system, the center position of the candidate epidermal defect region can be used as the origin of the local propagation coordinates, the comprehensive extension direction of the suspected epidermal defect region can be used as the main axis direction, and the direction perpendicular to the main axis direction can be used as the auxiliary axis direction. Combined with the distribution of the local internal pulp state features on the surface of the agricultural product to be tested, the epidermal side features and internal side features are uniformly transformed into the same local propagation coordinate framework. This allows the epidermal abrasion region and its corresponding internal abnormal region to be compared and fused within the same local spatial range, providing a foundation for subsequent region division, weight generation, and propagation constraint fusion.
[0065] In step S352, based on the comprehensive extension direction of the candidate epidermal defect area, the key enhancement area, the propagation sensitive area, and the suspected epidermal defect area, the key enhancement area, the propagation sensitive area, and the damage propagation area along the comprehensive extension direction are constructed in the local propagation coordinate system, and the regional correspondence between epidermal side features and internal side features is established. The key enhancement area can be determined based on the projection range of the candidate epidermal defect area in the local propagation coordinate system, so that it covers the internal area directly corresponding to the epidermal abrasion area; the propagation sensitive area can be determined based on the abnormal distribution intensity, abnormal concentration degree, or abnormal change amplitude of the local internal pulp state characteristics in the local propagation coordinate system; the damage propagation area along the comprehensive extension direction can be established along the comprehensive extension direction of the suspected epidermal defect area, and limited according to the band-like connection range between the candidate epidermal defect area and the propagation sensitive area. After the region construction is completed, the regional correspondence between epidermal side features and internal side features can be established based on the projection correspondence, adjacency relationship, or connectivity relationship between the candidate epidermal defect area and each internal area in the local propagation coordinate system. This allows the subsequent fusion process to consider not only whether surface defects and internal anomalies exist simultaneously, but also their corresponding positional relationships in the local propagation space.
[0066] In step S353, based on the comprehensive extension direction of the suspected epidermal defect region, the distribution direction of the internal features within the propagation-sensitive region, and the feature changes within the damage propagation region along the comprehensive extension direction, propagation direction sensitivity weights and region coupling weights are generated, forming directional and regional association constraints between epidermal and internal features. The propagation direction sensitivity weights can be obtained by extracting the main distribution direction of the internal features within the propagation-sensitive region and comparing the consistency between this distribution direction and the comprehensive extension direction of the suspected epidermal defect region; when the consistency between the two directions is high, the propagation direction sensitivity weights increase, and when the deviation between the two directions is large, the propagation direction sensitivity weights decrease. The region coupling weights can be generated based on the spatial distance, projection overlap, adjacency, or connectivity between the candidate epidermal defect region and the key enhancement region, the propagation-sensitive region, and the damage propagation region along the comprehensive extension direction; when the candidate epidermal defect region corresponds more closely to the internal abnormal region, the region coupling weights increase, and when the spatial correspondence between the two is weak, the region coupling weights decrease. If necessary, the propagation direction sensitive weights and regional coupling weights can be modified based on the continuity of characteristic changes within the damage propagation area along the integrated extension direction, thereby improving the ability of both types of weights to represent local propagation relationships. This ensures that the subsequent fusion process is constrained not only by spatial location but also by the abnormal propagation direction and the continuity of local propagation.
[0067] In step S354, the basic features on the epidermis and the basic state features on the interior are first subjected to a first-layer weighted combination processing to obtain the basic fusion result. Then, the damage features on the epidermis and the damage-sensitive features on the interior side within the damage propagation area along the comprehensive extension direction are subjected to a second-layer propagation constraint fusion processing to obtain the propagation fusion result. Finally, the basic fusion result and the propagation fusion result are corrected based on the propagation direction sensitivity weight and the regional coupling weight. The formation of the basic fusion result can focus on the combination of position features, color features, texture features and maturity parameters, and flesh firmness parameters. The formation of the propagation fusion result can focus on the combination of epidermal abrasion geometric parameters, depth parameters and flesh browning degree parameters, and internal damage degree parameters. During the feedback correction process, the propagation direction sensitivity weight can be applied to the fusion component consistent with the comprehensive extension direction, so that the feature component with high directional consistency obtains a higher degree of retention and suppresses the fusion component with large directional deviation. The regional coupling weight can be applied to the fusion components corresponding to the key enhancement area, the propagation-sensitive area, and the damage propagation area along the comprehensive extension direction, so that the fusion component with stronger regional correspondence obtains higher weight and the fusion component with weaker regional correspondence is weakened. After feedback correction, a fused feature can be obtained that simultaneously considers basic quality information, local damage information, and propagation direction information. This hierarchical fusion and feedback correction method ensures that the fusion result reflects not only the epidermal defects and the internal fruit pulp state themselves, but also the spatial and directional propagation relationships of epidermal damage extending abnormally inward, thereby improving the accuracy of subsequent damage propagation risk modeling and comprehensive judgment.
[0068] In S36, epidermal propagation information is generated based on the geometric parameters, depth parameters, and overall extension direction of the epidermal abrasion area. Internal propagation information is generated based on the local internal pulp state characteristics and fusion features. Then, based on the correspondence between epidermal and internal propagation information in terms of spatial location, directional distribution, and damage severity, a propagation correlation between epidermal damage and internal pulp state is established, and damage propagation risk parameters are generated based on this correlation. Epidermal propagation information characterizes the expansion trend of epidermal damage in terms of morphology, direction, and severity, while internal propagation information characterizes the distribution direction, severity, and spatial expansion of internal abnormalities in local areas. The propagation correlation describes the degree of correspondence and propagation trend of epidermal damage extending into internal abnormalities.
[0069] Furthermore, in S361, the epidermal propagation analysis module analyzes the boundary contour of the epidermal abrasion area, extracting length, width, area, opening size, or circumscribed boundary size to form expansion scale information characterizing the extent of epidermal damage. Based on the depth information, surface height difference information, or local 3D reconstruction results corresponding to the epidermal abrasion area, it extracts maximum depth, average depth, depth change gradient, or local indentation degree to form depth damage information characterizing the degree of epidermal damage invasion. Based on the principal axis direction, long side direction, or contour extension direction of the boundary contour of the epidermal abrasion area, it determines the comprehensive extension direction to form directional information characterizing the main expansion direction of epidermal damage. Finally, it performs joint analysis of expansion scale information, depth damage information, and directional information to generate epidermal propagation information characterizing the expansion trend, directionality, and degree of damage of the epidermal damage.
[0070] In S362, the internal propagation analysis module extracts abnormality intensity information representing the degree of internal abnormality based on parameters such as the degree of browning of the flesh, the degree of internal damage, the maturity, and the firmness of the flesh in the local internal flesh condition characteristics. Based on the spatial distribution pattern, banded distribution trend, or main axis direction of the abnormal features in the local internal region, it extracts distribution direction information representing the main extension direction of the internal abnormality. Based on the diffusion range, aggregation range, or distribution boundary of the abnormal features in the local internal region, it extracts spatial expansion information representing the spatial expansion state of the internal abnormality. Finally, the abnormality intensity information, distribution direction information, and spatial expansion information are jointly analyzed to generate internal propagation information representing the distribution direction, degree of abnormality, and spatial expansion of the internal abnormality.
[0071] In S363, the path prediction module determines the comprehensive extension direction of the suspected epidermal defect area as the main axis direction of the local propagation path, and determines the damage propagation area along the comprehensive extension direction as the candidate constraint area of the local propagation path; it determines the starting position, initial direction and initial intensity of epidermal damage propagation based on epidermal propagation information, and determines the internal abnormal target area based on the abnormal distribution direction, abnormal intensity distribution and spatial expansion in the internal propagation information; under the constraints of the main axis direction and candidate constraint area, a local propagation path is generated from the epidermal damage area to the internal pulp abnormal area.
[0072] In S364, the propagation coupling analysis module compares the correspondence between epidermal and internal propagation information in terms of spatial location, directional distribution, damage degree, and local propagation path, and establishes propagation correlation based on this, further generating a propagation coupling coefficient. The propagation coupling coefficient is used to characterize the matching strength between epidermal damage and internal pulp abnormalities.
[0073] The propagation coupling coefficient can be generated by combining spatial correspondence, directional correspondence, damage severity correspondence, and path consistency. Spatial correspondence can be determined by the distance, projection overlap, or adjacency relationship between the epidermal abrasion area and the internal abnormal area in the local propagation coordinate system; directional correspondence can be determined by the consistency between the comprehensive extension direction in the epidermal propagation information and the abnormal distribution direction in the internal propagation information; damage severity correspondence can be determined by the matching relationship between the damage intensity in the epidermal propagation information and the abnormal intensity in the internal propagation information; and path consistency can be determined by the consistency between the local propagation path and the actual distribution path of the internal abnormality. The propagation coupling analysis module can combine these multiple correspondences to obtain the propagation coupling coefficient.
[0074] In one implementation, the propagation coupling coefficient increases when the epidermal lesion area and the internal abnormal area are spatially closer, directionally more consistent, have a more matching degree of damage, and are more continuous in their local propagation paths; conversely, the propagation coupling coefficient decreases when any of these correspondences weaken. By utilizing the propagation coupling coefficient, the correspondence between epidermal lesions and internal abnormalities can be transformed from a qualitative judgment into a quantifiable matching parameter, making subsequent risk assessments more targeted.
[0075] In S365, the continuity analysis module analyzes the continuity of feature distribution along the overall extension direction to determine directional continuity; and analyzes the continuity of damage or abnormality degree changes along the local propagation path to determine degree continuity. Directional continuity reflects whether the extension direction from the epidermal abrasion area to the internal abnormal area remains consistent, while degree continuity reflects whether the change process from epidermal damage to internal abnormality presents a continuous transition. Directional continuity can be determined based on the degree of deviation between the overall extension direction and the main distribution direction of internal features within the propagation-sensitive area; degree continuity can be determined based on the gradient, smoothness, or segmented transition relationship of the abnormality degree change at different sampling points along the local propagation path.
[0076] In one embodiment, if the internal abnormalities extend continuously along the overall direction, the directional continuity is high; if the distribution direction of the abnormalities shows significant deflection or dispersion, the directional continuity is low. If the degree of abnormality along the local propagation path changes continuously from mild to severe or from weak to strong, the degree continuity is high; if the degree of abnormality shows abrupt changes, breaks, or discrete distribution, the degree continuity is low. By introducing directional continuity and degree continuity, the coherence and propagation trend of the epidermal lesion extending into the internal abnormalities can be further characterized.
[0077] In S366, the risk assessment module receives propagation correlation, propagation coupling coefficient, directional continuity, and degree continuity, and processes them comprehensively to generate overall damage propagation risk parameters and local damage propagation risk parameters corresponding to propagation-sensitive areas. In this way, the damage propagation risk parameters can characterize both the overall propagation risk and the propagation risk of local high-risk areas.
[0078] The risk assessment module first normalizes the propagation correlation, propagation coupling coefficient, directional continuity, and degree continuity, and then performs combined analysis based on the differences in the effects of different parameters in the whole fruit layer and local layers. The propagation correlation is mainly used to characterize whether there is a propagation link between epidermal damage and internal abnormalities; the propagation coupling coefficient is mainly used to characterize the matching strength between the two; directional continuity is mainly used to characterize the stability of the propagation direction; and degree continuity is mainly used to characterize the degree of continuity of the abnormal change process.
[0079] In one implementation, the basic propagation risk level can be determined first based on the propagation correlation and propagation coupling coefficient, and then enhanced or modified based on directional continuity and degree continuity. When the propagation correlation is strong, the propagation coupling coefficient is high, and both directional and degree continuity are good, the overall damage propagation risk parameter increases; when the propagation correlation is weak or the continuity is poor, the overall damage propagation risk parameter decreases. For propagation-sensitive areas, corresponding local damage propagation risk parameters can be further generated based on the intensity of local internal anomalies, the continuity of local propagation paths, and the degree of regional coupling within that area. In this way, the overall damage propagation risk parameter and the local damage propagation risk parameter can respectively reflect the propagation risk status at the overall and local levels.
[0080] In S37, based on damage propagation risk parameters, the directional continuity of local internal pulp state characteristics and fusion characteristics are enhanced and zonal corrections are performed. Directional continuity enhancement is used to highlight internal abnormal characteristics consistent with the overall extension direction, while zonal correction is used to differentiate the characteristics of key enhancement areas, propagation-sensitive areas, and other areas based on overall damage propagation risk parameters and local damage propagation risk parameters.
[0081] Directional continuity enhancement can be achieved based on the consistency between the overall extension direction and the distribution direction of internal abnormal features. For local internal pulp state features consistent with the overall extension direction, their influence in the subsequent fusion process can be increased; for feature components that deviate significantly from the overall extension direction, their influence can be reduced. This allows internal abnormal information that better aligns with the direction of epidermal damage propagation to occupy a higher proportion in the enhanced fusion features.
[0082] The partitioning correction can differentiate between key enhancement regions, propagation-sensitive regions, and other regions based on overall and local damage propagation risk parameters. For feature components in propagation-sensitive regions with higher corresponding local damage propagation risk parameters, their weights or retention rates can be increased. For feature components in key enhancement regions that have a stronger spatial correspondence with epidermal abrasion areas, their contribution to the fusion result can be enhanced. For feature components in other regions that have a weaker correlation with epidermal abrasion areas and lower propagation risk, their weights can be appropriately suppressed to reduce the interference of irrelevant regional features on the final fusion result.
[0083] In one embodiment, the directional continuity of local internal fruit pulp state features can be enhanced first, and then the fusion features can be corrected by partitioning. Alternatively, the results of directional continuity enhancement and partitioning correction can be fed back to the fusion unit to readjust the basic fusion results and the propagation fusion results. The enhanced fusion features obtained after directional continuity enhancement and partitioning correction can more accurately reflect the correlation between epidermal defects and internal fruit pulp state, providing a basis for the generation of subsequent epidermal defect detection results, internal fruit pulp state detection results, internal-external consistency judgment results, and comprehensive grading results.
[0084] In another preferred embodiment of the present invention, S4, the enhanced fusion features, overall damage propagation risk parameters, and local damage propagation risk parameters are input into the multi-task output model to obtain the skin defect detection results and internal pulp state detection results of the agricultural product to be tested; based on the skin defect detection results and internal pulp state detection results, an internal and external consistency judgment result is generated, and combined with the enhanced fusion features, overall damage propagation risk parameters, local damage propagation risk parameters, and internal and external consistency judgment results, a comprehensive grading result and utilization method judgment result of the agricultural product to be tested are generated.
[0085] S4 includes the following sub-steps: S41, receiving enhanced fusion features, overall damage propagation risk parameters and local damage propagation risk parameters through the multi-task output module, and outputting the epidermal defect detection results and internal pulp state detection results; S42. Receive the skin defect detection results and internal pulp status detection results through the consistency judgment module, and combine them with the local damage propagation risk parameters to generate internal and external consistency level parameters and internal and external consistency judgment results. S43. By utilizing the value assessment module to receive the skin defect detection results, internal pulp status detection results, overall damage propagation risk parameters, local damage propagation risk parameters, and internal and external consistency level parameters, the utilization value parameters, utilization path adaptation parameters, local priority preservation information, and local priority preservation area map are generated. S43 includes the following sub-steps: S431, receiving the skin defect detection results, internal pulp status detection results, overall damage propagation risk parameters, local damage propagation risk parameters, and internal and external consistency level parameters by utilizing the value assessment module; S432. The overall utilization analysis unit comprehensively processes the results of skin defect detection, internal pulp condition detection, and overall damage propagation risk parameters to generate overall utilization information that characterizes the overall usability of the agricultural product under test. S433. The local utilization analysis unit comprehensively processes the detection results of the internal pulp state, local damage propagation risk parameters, and internal and external consistency level parameters corresponding to the propagation sensitive area to generate local utilization information that characterizes the local availability of the agricultural product to be tested. S434. Based on the local utilization information, the local region determination unit divides the sensitive area into sub-regions and determines the local priority retention area, local processing and utilization area, and local elimination area, generating local priority retention information and local priority retention area map. S435. Based on the matching relationship between overall utilization information, local utilization information, local priority preservation information and local priority preservation area map, the coordination analysis unit analyzes and resolves the conflict relationship between overall utilization degree and local utilization degree, and generates utilization coordination parameters. S436. Based on the local priority retention information and the local priority retention area map, the benefit assessment unit generates local retention benefit parameters that characterize the degree of improvement of the overall utilization value by local retention. S437. The utilization value generation unit comprehensively processes the overall utilization information, local utilization information, local priority retention information, local priority retention area map, utilization coordination parameters and local retention benefit parameters to generate utilization value parameters and utilization path adaptation parameters.
[0086] S44. Receive enhanced fusion features, internal and external consistency judgment results, utilization value parameters, utilization path adaptation parameters, local priority retention information and local priority retention area map through the collaborative decision-making module, and generate comprehensive hierarchical results and utilization method judgment results.
[0087] Specifically, in another preferred embodiment of the present invention, step S4 is used to perform epidermal defect status detection, internal pulp status detection, internal and external consistency determination, utilization value assessment, and comprehensive grading and utilization method collaborative decision-making on the agricultural product to be tested after obtaining enhanced fusion features, overall damage propagation risk parameters, and local damage propagation risk parameters. Through this process, the external defect information, internal anomaly information, and damage propagation risk information obtained in the preceding steps can be further transformed into output results oriented towards quality status determination and utilization path determination, thereby providing a basis for the refined sorting and differentiated utilization of the agricultural product to be tested.
[0088] In S41, the multi-task output module receives enhanced fusion features, overall damage propagation risk parameters, and local damage propagation risk parameters. Based on the epidermal defect task and the internal pulp state task, the enhanced fusion features are divided into shared features, epidermal-specific features, and internal-specific features. Simultaneously, task allocation processing is performed on the overall damage propagation risk parameters and local damage propagation risk parameters. Shared features support both epidermal defect identification and internal pulp state identification. Epidermal-specific features highlight the color, texture, geometry, and depth characteristics of epidermal abrasion areas. Internal-specific features highlight internal pulp state parameters and local abnormal features. After task allocation, the corresponding features and risk parameters are input into the epidermal defect output branch and the internal pulp state output branch, respectively, outputting the epidermal defect detection results and the internal pulp state detection results. The epidermal defect detection results reflect the defect level, defect area, defect depth, or defect severity of the epidermal abrasion area. The internal pulp state detection results reflect the degree of pulp browning, pulp firmness, maturity level, and internal damage degree.
[0089] In S42, the consistency determination module receives the detection results of epidermal defects and the internal pulp state, and extracts the grade information, degree information, and regional location information for both the epidermal and internal sides. The grade information characterizes the strength of the epidermal defect or internal abnormality, the degree information characterizes the extent of damage or abnormality, and the regional location information characterizes the spatial distribution of the epidermal defect area and the internal abnormal area. Based on this information, a regional consistency comparison is first performed according to the correspondence between the epidermal defect area and the internal abnormal area. Then, based on the regional consistency comparison results, a weighted comparison is performed on the matching relationship between the epidermal side and the internal side in terms of damage grade and abnormality degree. Furthermore, the consistency comparison results within the propagation-sensitive area can be weighted according to the local damage propagation risk parameter, giving higher attention to consistency determinations related to high-risk areas. After these processes, internal and external consistency grade parameters and internal and external consistency determination results are generated, used to characterize the degree of consistency between epidermal defects and internal abnormalities and their overall matching status.
[0090] In S43, the value assessment module receives results from epidermal defect detection, internal pulp condition detection, overall damage propagation risk parameters, local damage propagation risk parameters, and internal / external consistency level parameters. This allows for a joint assessment of the overall and local availability of the tested agricultural product, further generating utilization value parameters and utilization path adaptation parameters. This introduces value evaluation results for subsequent utilization beyond quality assessment, providing more targeted input for comprehensive grading and utilization method determination.
[0091] In step S43, a joint assessment is conducted on the overall and local availability of the agricultural product under test, further generating parameter results characterizing its utilization value and suitability for utilization pathways. The purpose of this step is to avoid simply classifying the agricultural product under test based on a single quality grade or damage result, but rather to simultaneously consider the utilization status of the whole fruit layer, the status of local high-risk areas, and local priority retention value, thereby providing a more practical basis for determining subsequent utilization methods.
[0092] In S431, the value assessment module receives the results of epidermal defect detection, internal pulp condition detection, overall damage propagation risk parameters, local damage propagation risk parameters, and internal / external consistency level parameters. After receiving these inputs, they can be categorized into whole-fruit layer analysis information, local layer analysis information, and consistency evaluation information for subsequent use by different analysis units.
[0093] In S432, the overall utilization analysis unit comprehensively processes the results of epidermal defect detection, internal pulp condition detection, and overall damage propagation risk parameters to generate overall utilization information characterizing the overall usability of the tested agricultural product. Overall utilization analysis can extract epidermal defect level, epidermal defect area, epidermal defect depth, internal anomaly level, maturity level, pulp firmness level, and overall damage propagation risk level, and based on this, determine whether the tested agricultural product is more suitable for fresh sale, graded sale, processing, low-value utilization, or rejection.
[0094] In S433, the local utilization analysis unit comprehensively processes the detection results of the internal pulp state, local damage propagation risk parameters, and internal-external consistency level parameters corresponding to the propagation-sensitive area to generate local utilization information characterizing the local usability of the agricultural product under test. Local utilization analysis focuses on the degree of local browning, local hardness changes, local abnormal expansion, and local risk level within the propagation-sensitive area. It also combines the internal-external consistency level parameters to determine the correspondence between this local area and the epidermal abrasion area, reflecting whether the local area still has value for preservation or is more suitable for processing, local removal, or other treatment paths.
[0095] In S434, the local region determination unit divides the propagation-sensitive area into sub-regions based on local utilization information, and determines the local priority retention area, local processing and utilization area, and local elimination area, generating local priority retention information and a local priority retention area map. The sub-region division can adopt grid division, strip division, or segmented division along the direction of abnormal distribution to more finely distinguish the utilization status of different local areas.
[0096] In S435, the coordination analysis unit analyzes and resolves conflicts between overall and local utilization levels based on the matching relationships between overall utilization information, local utilization information, local priority preservation information, and local priority preservation area maps, generating utilization coordination parameters. Conflicts may include situations where the overall system is suitable for fresh sales but has large high-risk areas, the overall system is suitable for processing but has priority preservation areas, or the overall utilization is average but the overall value increases after local preservation. After coordination analysis, the overall utilization path and local processing strategies can be kept consistent, avoiding deviations in utilization methods caused by relying solely on overall or local results.
[0097] In S436, the benefit assessment unit generates local retention benefit parameters based on local priority retention information and a local priority retention area map, representing the degree to which local retention enhances the overall utilization value. These local retention benefit parameters reflect the degree to which the overall utilization value of the agricultural product under test can be enhanced after retaining the priority retention area, thus transforming local retention from a static state judgment into a value enhancement judgment.
[0098] In S437, the utilization value generation unit comprehensively processes overall utilization information, local utilization information, local priority retention information, local priority retention area maps, utilization coordination parameters, and local retention benefit parameters to generate utilization value parameters and utilization path adaptation parameters. The utilization value parameters characterize the comprehensive utilization value of the tested agricultural product under combined overall and local conditions, while the utilization path adaptation parameters characterize the degree of adaptability of the tested agricultural product to different utilization paths such as fresh sales, graded sales, processing utilization, or low-value utilization. Thus, subsequent comprehensive grading and collaborative determination of utilization methods can not only refer to the quality status and consistency determination results but also incorporate more detailed utilization value analysis results.
[0099] In S44, the collaborative decision-making module receives enhanced fusion features, internal and external consistency judgment results, utilization value parameters, utilization path adaptation parameters, local priority retention information, and local priority retention area maps. Based on the enhanced fusion features and internal and external consistency judgment results, the quality status of the agricultural product to be tested is determined. Based on the utilization value parameters and utilization path adaptation parameters, the overall utilization path of the agricultural product to be tested is determined. Based on the local priority retention information and local priority retention area maps, the local retention, local processing and utilization, or local elimination strategy for the agricultural product to be tested is determined. Then, based on the correspondence between quality status, overall utilization path, and local processing strategies, the quality grade and utilization path of the agricultural product to be tested are collaboratively judged, generating a comprehensive grading result and a utilization method judgment result. Therefore, the agricultural product to be tested not only receives a quality grade judgment but also a utilization path judgment that matches its quality status and local utilization value.
[0100] The foregoing has only described certain exemplary embodiments of the invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of the claims of this invention.
Claims
1. A rapid identification method for defects in the skin of agricultural products, characterized in that, It includes the following steps: S1. During the process of the agricultural product to be tested moving along the transport path, the attitude of the agricultural product to be tested is adjusted, and multiple skin images are collected from multiple angles during the attitude adjustment process to obtain multi-view visible light color images that characterize the external state of the agricultural product to be tested. S2. When the agricultural product to be tested enters the spectral detection position, the corresponding spectral detection area and internal damage prediction parameters are determined based on the position of the epidermal abrasion area in the multi-view visible light color image and the geometric and depth parameters of the epidermal abrasion area. Then, the acquisition position, acquisition range, acquisition density, or acquisition method of the spectral detection area is adjusted according to the internal damage prediction parameters to acquire the light signal reflected, transmitted, or scattered by the agricultural product to be tested, obtain visible light / near-infrared spectral data, and establish the correspondence between the visible light / near-infrared spectral data and the multi-view visible light color image in terms of spatial region and detection object. S3. Extract epidermal defect features from multi-view visible light color images and determine candidate epidermal defect regions based on these features; then extract internal pulp state features from visible / near-infrared spectral data and perform region-weighted extraction of internal pulp state features using candidate epidermal defect regions; perform feature-level fusion of epidermal defect features and internal pulp state features; and finally generate damage propagation risk parameters based on the geometric parameters, depth parameters, and internal pulp state features of the epidermal abrasion area. Based on the damage propagation risk parameters, the fusion features are directionally enhanced and partitioned to obtain enhanced fusion features; S4. Input the enhanced fusion features, overall damage propagation risk parameters, and local damage propagation risk parameters into the multi-task output model to obtain the skin defect detection results and internal pulp state detection results of the agricultural product to be tested; generate the internal and external consistency judgment results based on the skin defect detection results and internal pulp state detection results, and combine the enhanced fusion features, overall damage propagation risk parameters, local damage propagation risk parameters, and internal and external consistency judgment results to generate the comprehensive grading results and utilization method judgment results of the agricultural product to be tested.
2. The method for rapid identification of defects in the skin of agricultural products according to claim 1, characterized in that, S1 includes the following steps: S11, transporting the agricultural product to be tested to the image acquisition station, and using the attitude adjustment mechanism to limit and support the agricultural product and correct its attitude, so that the agricultural product to be tested remains relatively stable during the transport process; S12. Drive the agricultural product to be tested to rotate around its own axis at any angle through the rotary drive mechanism, so that different areas of the surface of the agricultural product to be tested face the image acquisition module in sequence. S13. During the rotation of the agricultural product to be tested, based on the rotation angle, conveying displacement or acquisition rhythm of the agricultural product to be tested, the image acquisition module is triggered to acquire epidermal images from multiple angles. S14. Perform viewpoint marking and object association on the collected epidermal images from multiple angles, and establish the correspondence between epidermal images from each angle and the same agricultural product to be tested. S15. Based on the coverage of the skin area of the agricultural product under test in the skin images from various angles, generate a multi-view visible light color image dataset of the agricultural product under test. S16. Based on the multi-view visible light color image dataset, determine the collected and uncollected areas of the surface of the agricultural product to be tested, and collect surface images at corresponding angles for the uncollected areas. S17. Determine the suspected skin defect area based on the multi-view visible light color image; when the image corresponding to the suspected skin defect area has incomplete display of the defect area, the defect area is at the edge of the image, or the defect area is occluded, control the agricultural product to be tested to continue rotating according to the spatial position and boundary direction of the suspected skin defect area, and re-collect the suspected skin defect area. S18. When the suspected epidermal defect area enters the size calibration area, the size of the suspected epidermal defect area is calibrated based on the calibration reference unit set at the image acquisition station, and the conversion relationship between the image size and the actual size of the suspected epidermal defect area is established. S19. When the suspected epidermal defect area enters the depth acquisition area, acquire the depth information and surface height difference information corresponding to the suspected epidermal defect area, and obtain multiple angle images of the suspected epidermal defect area; constrain the depth information, surface height difference information and multiple angle images to the local surface area corresponding to the suspected epidermal defect area, perform local three-dimensional reconstruction of the suspected epidermal defect area, and then extract the depth parameters of the epidermal abrasion based on the local three-dimensional reconstruction results.
3. The method for rapid identification of defects in the skin of agricultural products according to claim 2, characterized in that, S18 includes the following steps: S181, the control posture adjustment mechanism adjusts the posture of the agricultural product to be tested, so that the suspected skin defect area enters the size calibration area, and the calibration reference unit and the suspected skin defect area are located in the same acquisition field of view. The calibration image obtained based on the same acquisition field of view includes the calibration reference unit and the suspected skin defect area. S182. Identify the calibration reference unit in the calibration image and extract the reference features of the calibration reference unit; based on the relative positional relationship between the suspected epidermal defect area and each reference feature, select the target reference feature corresponding to the suspected epidermal defect area, and determine the pixel distance corresponding to the boundary contour, feature point spacing, scale spacing or grid spacing based on the target reference feature, and obtain the pixel size corresponding to the calibration reference unit. S183. Calculate the basic pixel scale of the acquisition field of view where the calibration reference unit is located based on the actual size of the calibration reference unit and the pixel size corresponding to the calibration reference unit; perform local mapping or local correction on the basic pixel scale based on the curvature information, local tilt direction, acquisition angle or local projection relationship of the local surface where the suspected epidermal defect area is located, and establish a local size conversion relationship with the suspected epidermal defect area. S184. Based on multi-view visible light color images, depth information, or three-dimensional reconstruction results, obtain the curvature information and local tilt direction of the local surface where the suspected epidermal defect area is located; and correct the local size conversion relationship based on the curvature information and local tilt direction. S185. Identify suspected epidermal defect areas in the calibration image, extract the boundary contours of the suspected epidermal defect areas, determine the main extension direction, boundary contour points or circumscribed boundaries of the suspected epidermal defect areas based on the boundary contours, and calculate the corresponding pixel length, pixel width, pixel area or pixel opening size to obtain the pixel size corresponding to the suspected epidermal defect areas. S186. Based on the compensated local size conversion relationship, the pixel size of the suspected skin defect area is converted into the actual size to obtain the geometric parameters of the suspected skin defect area. Based on the geometric parameters of the suspected skin defect area, the attitude adjustment mechanism is controlled to adjust the attitude of the agricultural product to be tested so that the suspected skin defect area enters the depth acquisition area.
4. A method for rapid identification of defects in the skin of agricultural products according to claim 2 or 3, characterized in that, S19 includes the following sub-steps: S191, Identify suspected epidermal defect areas based on multi-view visible light color images, and match and associate image areas corresponding to the same suspected epidermal defect area under different views based on region index identifiers; combine image acquisition viewpoint, pose information and size calibration results to establish a mapping relationship between the image coordinate system and the local coordinate system of the surface of the agricultural product to be tested, and determine the fused local surface coordinate position of the suspected epidermal defect area on the surface of the agricultural product to be tested based on the mapping results corresponding to multiple viewpoint images; determine the fused main extension direction of the suspected epidermal defect area based on the boundary contour information of the suspected epidermal defect area under different views; S192. Based on the fusion local surface coordinates of the suspected epidermal defect area on the surface of the agricultural product to be tested, the fusion main extension direction, and the target acquisition position and target acquisition direction corresponding to the depth acquisition area, calculate the rotation angle, flip angle, deflection direction, or displacement of the agricultural product to be tested, and generate an attitude adjustment path or rotation control command to make the target orientation of the suspected epidermal defect area enter the depth acquisition area. S193. According to the attitude adjustment path or rotation control command, control the attitude adjustment mechanism to drive the agricultural product to be tested to rotate, flip, deflect or shift, so that the suspected skin defect area enters the deep collection area. S194. When the suspected skin defect area enters the deep collection area, the attitude adjustment mechanism is controlled to stop adjusting the attitude of the agricultural product to be tested, or the rotation speed, flipping amplitude or deflection amplitude of the attitude adjustment mechanism is reduced so that the target orientation of the suspected skin defect area is kept within the deep collection area. Based on the regional location feedback information output by the depth acquisition module, the posture of the agricultural product under test is slightly corrected, and depth acquisition is performed.
5. The method for rapid identification of surface defects in agricultural products according to claim 1, characterized in that, S2 includes the following sub-steps: S21, Determine the spectral detection area corresponding to the epidermal abrasion area based on the position of the epidermal abrasion area in the multi-view visible light color image; S22. Generate epidermal damage level parameters based on the geometric and depth parameters of the epidermal abrasion area; generate internal damage prediction parameters based on the epidermal damage level parameters; and adjust the acquisition location, acquisition range, acquisition density, or acquisition method of the spectral detection area based on the internal damage prediction parameters. S23. When the agricultural product to be tested enters the spectral detection position, the spectral acquisition module is controlled to perform the first light signal acquisition on the spectral detection area according to the internal damage prediction parameters. Then, the target sub-region is determined according to the first light signal acquisition result, and the spectral acquisition module is controlled to perform the second local densified acquisition on the target sub-region according to the internal damage prediction result corresponding to the target sub-region. S24. Convert the collected light signal into visible light / near infrared spectral data of the agricultural product to be tested, and correct the internal damage prediction parameters based on the visible light / near infrared spectral data; S25. Assign a region index identifier to the epidermal abrasion area and map the region index identifier to the spectral detection area to establish a region correspondence between visible light / near-infrared spectral data and multi-view visible light color image; S26. Based on the location information, attitude information and regional index identifier of the agricultural product to be tested in the transportation path, the visible light / near infrared spectral data and multi-view visible light color images are uniformly correlated.
6. The method for rapid identification of defects in the skin of agricultural products according to claim 1, characterized in that, S3 includes the following sub-steps: S31, extract epidermal defect features from multi-view visible light color images, including the location features, color features, texture features, geometric parameters, and depth parameters of the epidermal abrasion area; determine the epidermal defect area based on the epidermal defect features, and use the epidermal defect area as the epidermal candidate defect area; S32. Based on the geometric parameters, depth parameters, and the comprehensive extension direction of the suspected epidermal defect area, generate a damage characterization quantity that represents the local damage morphology and degree of damage to the epidermis. Then, generate an epidermal damage level parameter based on the damage characterization quantity. Next, use the epidermal damage level parameter to classify the internal detection area corresponding to the suspected epidermal defect area, and adjust the extraction range, extraction density, extraction direction, or regional weight of the internal pulp state characteristics accordingly. S33. Based on the graded processing results of the internal detection area and the extraction range, extraction density, extraction direction or regional weight of the internal pulp state characteristics, the visible light / near infrared spectral data are partitioned, directionally sampled or weighted; firstly, the maturity parameters and pulp firmness parameters are extracted from the corresponding internal detection area, and then the pulp browning degree parameters and internal damage degree parameters are extracted along the comprehensive extension direction of the suspected epidermal defect area for the high-grade internal detection area to form the internal pulp state characteristics; S34. Based on the comprehensive extension direction of the candidate epidermal defect area, epidermal damage level parameters, and suspected epidermal defect area, construct key enhancement areas and spread sensitive areas corresponding to the epidermal abrasion area in the internal detection area; perform regional weighted enhancement on the internal pulp state characteristics within the key enhancement areas and spread sensitive areas to obtain the local internal pulp state characteristics corresponding to the epidermal abrasion area. S35. Based on the local surface coordinates of the candidate epidermal defect area on the surface of the agricultural product to be tested, the comprehensive extension direction of the suspected epidermal defect area, and the location distribution of the local internal pulp state characteristics, establish a local propagation coordinate system; under the local propagation coordinate system, construct key enhancement areas, propagation sensitive areas, and propagation corridor areas, and generate propagation direction sensitive weights and regional coupling weights. Based on propagation direction sensitive weights and region coupling weights, propagation constraint fusion is performed on epidermal side features and internal side features; S36. Generate epidermal propagation information based on the geometric parameters, depth parameters, and overall extension direction of the epidermal abrasion area; generate internal propagation information based on the local internal pulp state characteristics and fusion characteristics; then, based on the correspondence between epidermal propagation information and internal propagation information in terms of spatial location, directional distribution, and damage degree, establish a propagation correlation between epidermal damage and internal pulp state; and generate damage propagation risk parameters based on the propagation correlation. S37. Based on the damage propagation risk parameters, enhance the directional continuity and zonal correction of the local internal pulp state characteristics and fusion characteristics.
7. A method for rapid identification of defects in the skin of agricultural products according to claim 6, characterized in that, S35 includes the following sub-steps: S351. Based on the local surface coordinates of the candidate epidermal defect area on the surface of the agricultural product to be tested, the comprehensive extension direction of the suspected epidermal defect area, and the positional distribution of the local internal pulp state features corresponding to the epidermal abrasion area, a local propagation coordinate system is established with the epidermal abrasion area as the center and the comprehensive extension direction of the suspected epidermal defect area as the main axis. The epidermal side features and internal side features are mapped to the local propagation coordinate system to complete the spatial alignment of the epidermal side features and internal side features. S352. Based on the comprehensive extension direction of the candidate epidermal defect area, the key enhancement area, the propagation sensitive area, and the suspected epidermal defect area, construct the key enhancement area, the propagation sensitive area, and the damage propagation area along the comprehensive extension direction in the local propagation coordinate system, and establish the regional correspondence between epidermal side features and internal side features. S353. Based on the comprehensive extension direction of the suspected epidermal defect area, the distribution direction of the internal features within the propagation sensitive area, and the feature changes within the damage propagation area along the comprehensive extension direction, generate propagation direction sensitivity weights and regional coupling weights to form directional association constraints and regional association constraints between epidermal side features and internal side features. S354. First, perform a first-layer weighted combination processing on the basic features of the epidermis and the basic state features of the interior to obtain the basic fusion result; then, perform a second-layer propagation constraint fusion processing on the damage features of the epidermis, the propagation sensitive area, and the damage sensitive features of the interior side within the damage propagation area along the comprehensive extension direction to obtain the propagation fusion result; finally, perform feedback correction processing on the basic fusion result and the propagation fusion result according to the propagation direction sensitivity weight and the region coupling weight.
8. The method for rapid identification of defects in the skin of agricultural products according to claim 6, characterized in that, S36 includes the following sub-steps: S361, receiving the geometric parameters, depth parameters and comprehensive extension direction of the epidermal abrasion area through the epidermal propagation analysis module, and combining the geometric parameters, depth parameters and comprehensive extension direction to generate epidermal propagation information characterizing the trend, directional continuity and degree of epidermal damage expansion; S362. Receive local internal pulp state characteristics and fusion characteristics through the internal propagation analysis module, and analyze the distribution direction, degree of abnormality and spatial expansion of internal anomalies in the local internal region to generate internal propagation information. S363. By using the path prediction module to comprehensively extend the direction as the main axis and the damage propagation area along the comprehensive extension direction as the constraint area, and combining the abnormal distribution results of epidermal propagation information and internal propagation information, the local propagation path of epidermal damage to the abnormal area of internal pulp is predicted. S364. By comparing the correspondence between epidermal propagation information and internal propagation information in terms of spatial location, directional distribution, damage degree, and local propagation path through the propagation coupling analysis module, a propagation correlation relationship is established, and a propagation coupling coefficient is further generated. S365. Analyze the continuity of the feature distribution along the comprehensive extension direction using the continuity analysis module to determine directional continuity; and analyze the continuity of changes in damage degree or abnormality degree along the local propagation path to determine degree continuity. S366. The risk assessment module receives the propagation correlation, propagation coupling coefficient, directional continuity, and degree continuity, and processes them comprehensively to generate overall damage propagation risk parameters and local damage propagation risk parameters corresponding to the propagation sensitive areas.
9. The rapid identification method for agricultural product skin defects according to claim 1, which integrates features, overall damage propagation risk parameters and local damage propagation risk parameters, and outputs skin defect detection results and internal pulp state detection results; S42. Receive the skin defect detection results and internal pulp status detection results through the consistency judgment module, and combine them with the local damage propagation risk parameters to generate internal and external consistency level parameters and internal and external consistency judgment results. S43. By utilizing the value assessment module to receive the skin defect detection results, internal pulp status detection results, overall damage propagation risk parameters, local damage propagation risk parameters, and internal and external consistency level parameters, the utilization value parameters, utilization path adaptation parameters, local priority preservation information, and local priority preservation area map are generated. S44. Receive enhanced fusion features, internal and external consistency judgment results, utilization value parameters, utilization path adaptation parameters, local priority retention information and local priority retention area map through the collaborative decision-making module, and generate comprehensive hierarchical results and utilization method judgment results.
10. A method for rapid identification of defects in the skin of agricultural products according to claim 9, characterized in that, S43 includes the following sub-steps: S431, receiving the skin defect detection results, internal pulp state detection results, overall damage propagation risk parameters, local damage propagation risk parameters, and internal and external consistency level parameters by utilizing the value assessment module. S432. The overall utilization analysis unit comprehensively processes the results of skin defect detection, internal pulp condition detection, and overall damage propagation risk parameters to generate overall utilization information that characterizes the overall usability of the agricultural product under test. S433. The local utilization analysis unit comprehensively processes the detection results of the internal pulp state, local damage propagation risk parameters, and internal and external consistency level parameters corresponding to the propagation sensitive area to generate local utilization information that characterizes the local availability of the agricultural product to be tested. S434. Based on the local utilization information, the local region determination unit divides the sensitive area into sub-regions and determines the local priority retention area, local processing and utilization area, and local elimination area, generating local priority retention information and local priority retention area map. S435. Based on the matching relationship between overall utilization information, local utilization information, local priority preservation information and local priority preservation area map, the coordination analysis unit analyzes and resolves the conflict relationship between overall utilization degree and local utilization degree, and generates utilization coordination parameters. S436. Based on the local priority retention information and the local priority retention area map, the benefit assessment unit generates local retention benefit parameters that characterize the degree of improvement of the overall utilization value by local retention. S437. The utilization value generation unit comprehensively processes the overall utilization information, local utilization information, local priority retention information, local priority retention area map, utilization coordination parameters and local retention benefit parameters to generate utilization value parameters and utilization path adaptation parameters.