Fruit quality detection method based on X-Ray image and related equipment

The integration of X-Ray imaging and AI models for fruit quality detection addresses inefficiencies in traditional methods, offering precise internal defect identification and automated sorting to ensure high-quality fruit output.

CN119090858AInactive Publication Date: 2024-12-06SHENZHEN TUDGO NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411265643.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional fruit quality detection methods, including manual inspection and visible light image analysis, struggle with inefficiency and inaccuracy, particularly in detecting internal defects such as rot and insect pests, while existing X-Ray image technology lacks effective methods for feature extraction and accurate quantitative assessment.

Method used

A fruit quality detection method using X-Ray imaging combined with advanced AI models for feature extraction, quantitative assessment, and automated sorting, involving preprocessing, three-dimensional reconstruction, semantic segmentation, and robotic sorting to identify and process fruits with internal abnormalities.

Benefits of technology

The method provides efficient and accurate detection of internal fruit quality, enabling timely identification and processing of defective fruits, reducing the risk of substandard products entering the market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090858A_ABST
    Figure CN119090858A_ABST
Patent Text Reader

Abstract

The invention relates to a fruit quality detection method based on an X-Ray image, and the method comprises the following steps: carrying out the feature extraction of a preprocessed image, and obtaining a feature extraction image; judging whether an abnormal area exists in the fruit X-ray image or not based on the feature extraction image, and if yes, performing fruit decay quantitative evaluation on the abnormal area through an AI model to obtain fruit quality evaluation information; if the fruit quality evaluation information corresponding to the abnormal area is not in a set quality standard range, marking the fruit corresponding to the abnormal area to obtain a marked fruit, and automatically generating early warning information to notify a worker; the marked fruits are sorted out through a mechanical arm controlled by the worker, and the sorted fruits are correspondingly processed through a preset processing strategy; the technical problem that a traditional method is difficult to deal with complex internal structure and quality of fruits is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of food quality detection, and in particular to a fruit quality detection method based on X-Ray images and related equipment. Background Art

[0002] As the global demand for fruit consumption continues to grow, ensuring the quality and safety of fruit has become an important issue in agricultural production and the food supply chain. Traditional fruit quality detection methods mainly rely on manual inspection or analysis methods based on visible light images, but these methods have significant limitations in detection efficiency and accuracy. Manual inspection is easily affected by the subjective judgment of operators, resulting in poor repeatability of detection results; and the visible light image detection method is limited by the visibility of surface features and is difficult to deeply detect defects inside the fruit, such as rot, insect pests or other quality problems.

[0003] Existing X-Ray image technology has been widely used in the field of industrial inspection, especially in metal detection and packaging inspection. It has the characteristics of non-destructiveness and strong penetration, which makes it have broad application prospects in food quality inspection. However, although X-Ray image technology can provide detailed information about the internal structure of fruits, the solutions for how to effectively extract this information and accurately evaluate the quality of fruits in existing research are still imperfect. Existing X-Ray image processing methods often rely on simple threshold segmentation or basic morphological operations, which are difficult to deal with the complex internal structure of fruits and various quality issues.

[0004] Therefore, how to combine X-Ray imaging technology with advanced artificial intelligence (AI) models to develop an efficient and accurate fruit quality detection method has become the focus of current research. Such methods can not only improve detection efficiency, but also achieve quantitative assessment of the degree of internal decay of fruits, thereby providing more valuable quality information. However, existing research still faces many challenges in terms of how to optimize feature extraction, improve the accuracy of quantitative decay assessment, and achieve seamless integration with actual application environments, which requires further research and exploration. Summary of the invention

[0005] The main purpose of the present invention is to provide a fruit quality detection method and related equipment based on X-Ray images, which solves the technical problem that traditional methods are difficult to deal with the complex internal structure and quality of fruits.

[0006] To achieve the above object, the present invention provides a fruit quality detection method based on X-Ray images, comprising the following steps: The fruit in the area to be detected is scanned by a preset X-Ray technology to obtain a fruit X-ray image, and the fruit X-ray image is preprocessed to obtain a preprocessed image; wherein there is at least one fruit in the area to be detected; Performing feature extraction on the preprocessed image to obtain a feature-extracted image; Based on the feature extraction image, it is determined whether there is an abnormal area in the fruit X-ray image. If there is, a quantitative assessment of fruit corruption is performed on the abnormal area through an AI model to obtain fruit quality assessment information; If the fruit quality assessment information corresponding to the abnormal area is not within the set quality standard range, the fruit corresponding to the abnormal area is marked to obtain marked fruit, and an early warning message is automatically generated to notify the staff; The marked fruits are sorted out by the mechanical arm controlled by the staff, and the sorted fruits are processed accordingly using a preset processing strategy.

[0007] Furthermore, the fruits in the inspection area are scanned by a preset X-Ray technology to obtain a fruit X-ray image, including: The fruit in the inspection area is irradiated and scanned at multiple angles by a preset X-Ray technology to obtain X-ray attenuation data; Performing a three-dimensional reconstruction of the interior of the fruit based on the X-ray attenuation data to obtain a voxelized model of the fruit; Performing image enhancement on the fruit voxelized model to obtain an enhanced fruit voxelized model; The fruit interior of the enhanced fruit voxelization model is semantically segmented to obtain a segmented fruit interior tissue image, and the segmented fruit interior tissue image is used as a fruit X-ray image.

[0008] Further, the fruit X-ray image is preprocessed to obtain a preprocessed image, including: Performing adaptive histogram equalization processing on the fruit X-ray image to obtain a high-contrast image; Performing noise reduction processing on the high contrast image by using a preset non-local mean filtering algorithm to obtain a noise-reduced image; Performing multi-scale decomposition on the denoised image to obtain a plurality of sub-band images; wherein the plurality of sub-band images include a low-frequency approximate sub-band image, a horizontal high-frequency sub-band image, a vertical high-frequency sub-band image, a diagonal high-frequency sub-band image, a detail sub-band image and an approximate sub-band image; Extracting texture features from the plurality of sub-band images to obtain a texture feature map; Performing edge detection on the texture feature map to obtain an edge enhanced image; The edge enhanced image is segmented to obtain a preprocessed image.

[0009] Furthermore, based on the feature extraction image, it is determined whether there is an abnormal area in the fruit X-ray image. If there is, a quantitative assessment of fruit corruption is performed on the abnormal area through an AI model to obtain fruit quality assessment information, including: The feature extraction image is decomposed in multiple scales and multiple directions by a preset wavelet transform algorithm, and a wavelet coefficient matrix is ​​obtained accordingly; wherein the wavelet coefficient matrix includes a high-frequency subband coefficient matrix and a low-frequency approximate coefficient matrix; Based on the wavelet coefficient matrix, the abnormal region of the fruit X-ray image is identified to determine whether there is an abnormal region in the fruit; If it exists, the AI ​​model is used to perform probability density calculation on the abnormal area to obtain a corrosion heat map; A quantitative evaluation of fruit decay is performed on the fruit based on the decay heat map to obtain fruit quality evaluation information; wherein the fruit quality evaluation information includes the fruit decay trend and the internal decay degree of the fruit.

[0010] Furthermore, the fruits corresponding to the abnormal area are marked to obtain marked fruits, and early warning information is automatically generated, including: Taking pictures of the fruit corresponding to the abnormal area to obtain a fruit picture; Performing vector transformation on the captured fruit image to obtain a transformation vector; Inputting the conversion vector into a preset support vector machine to control an optical marking system to mark the fruit, and using the marked fruit as a marked fruit; The conversion vector is input into a preset support vector machine to control the intelligent early warning system, and early warning information is automatically generated to notify the staff.

[0011] Furthermore, the marked fruits are sorted out by a mechanical arm controlled by the staff, and a preset processing strategy is used to perform corresponding processing on the sorted fruits, including: Capturing images of the marked fruit to obtain marked fruit images; Using a preset YOLOv5 target detection algorithm, the marked fruit is located based on the marked fruit image to obtain spatial coordinate information of the marked fruit; Acquire a designated area, and obtain a sorting path based on the designated area and the spatial coordinate information; The staff controls the preset robot arm based on the sorting path to sort the marked fruits to the designated area; wherein the designated area is an area where the marked fruits are placed; Scanning the marked fruit in the designated area by using a preset near-infrared spectroscopy technology to obtain fruit spectrum data; wherein there is at least one marked fruit; Performing dimension reduction processing on the fruit spectrum data to obtain a dimension reduction feature vector; Performing cluster analysis on the dimension reduction feature vectors to obtain the corruption type of the marked fruit; wherein the corruption type includes internal browning, mildew, insect damage, nutrient deficiency corruption, tissue damage caused by cold damage, texture deterioration caused by overripeness, local corruption caused by mechanical damage, and infection by pathogenic microorganisms; Mapping and matching the corruption type with the processing strategy in the database to obtain a corresponding mapping and matching strategy; The marked fruits are processed accordingly based on the corresponding mapping matching strategy.

[0012] Further, based on the sorting path, a preset robot arm is controlled to sort the marked fruit to the designated area, including: Performing cubic spline interpolation processing on the sorting path to obtain a smooth trajectory curve; Using a preset inverse kinematics algorithm, based on the trajectory curve, the angle sequence of each joint in the robotic arm is calculated to obtain the joint motion trajectory; By using an adaptive fuzzy PID control algorithm, command conversion is performed based on the joint motion trajectory to generate real-time control commands for each joint of the robotic arm; The robot arm is controlled based on the real-time control instruction through dynamic torque compensation technology to sort the marked fruits to the designated area.

[0013] The present invention also provides a fruit quality detection device based on X-Ray images, comprising: A scanning module, used for scanning the fruits in the area to be detected by using a preset X-Ray technology to obtain a fruit X-ray image, and preprocessing the fruit X-ray image to obtain a preprocessed image; wherein there is at least one fruit in the area to be detected; An extraction module, used for performing feature extraction on the preprocessed image to obtain a feature-extracted image; An evaluation module is used to determine whether there is an abnormal area in the fruit X-ray image based on the feature extraction image, and if so, to perform a quantitative evaluation of fruit corruption on the abnormal area through an AI model to obtain fruit quality evaluation information; A marking module is used to mark the fruit corresponding to the abnormal area if the fruit quality assessment information corresponding to the abnormal area is not within the set quality standard range, obtain marked fruit, and automatically generate early warning information to notify staff; The sorting module is used to sort out the marked fruits through the mechanical arm controlled by the staff, and adopt a preset processing strategy to perform corresponding processing on the sorted fruits.

[0014] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0015] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.

[0016] The fruit quality detection method based on X-Ray images provided by the present invention comprises the following steps: scanning fruits in a detection area by a preset X-Ray technology to obtain a fruit X-ray image, and preprocessing the fruit X-ray image to obtain a preprocessed image; extracting features from the preprocessed image to obtain a feature extraction image; judging whether there is an abnormal area in the fruit X-ray image based on the feature extraction image, and if so, performing a quantitative assessment of fruit corruption in the abnormal area by an AI model to obtain fruit quality assessment information; if the fruit quality assessment information corresponding to the abnormal area is not within a set quality standard range, marking the fruit corresponding to the abnormal area to obtain marked fruit, and automatically generating early warning information to notify a staff member; sorting out the marked fruit by a mechanical arm controlled by the staff member, and performing corresponding processing on the sorted fruit by adopting a preset processing strategy; through the above technical solution, the technical problem that the traditional method is difficult to cope with the complex internal structure and quality of the fruit is solved, and compared with the traditional appearance detection, it is more efficient and accurate, can effectively identify the corruption, damage or other quality problems inside the fruit, improve the reliability of detection, and ensure that the problematic fruit can be discovered and processed in time, thereby reducing the risk of defective products entering the market. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the steps of a fruit quality detection method based on X-Ray images in one embodiment of the present invention; Figure 2 It is a structural block diagram of a fruit quality detection device based on X-Ray images in one embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0018] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0020] like Figure 1 As shown, Figure 1 It is a schematic diagram of the steps of a fruit quality detection method based on X-Ray images in one embodiment of the present invention; In one embodiment of the present invention, a fruit quality detection method based on X-Ray images is provided, comprising the following steps: Step S1, scanning the fruits in the area to be detected by a preset X-Ray technology to obtain a fruit X-ray image, and preprocessing the fruit X-ray image to obtain a preprocessed image; wherein there is at least one fruit in the area to be detected.

[0021] Specifically, in this step, the fruits in the inspection area are scanned by the preset X-Ray technology. First, a set of X-Ray equipment specially used for fruit inspection needs to be configured. This equipment can penetrate the skin of the fruit by emitting high-energy X-rays to obtain image information of its internal structure. During the scanning process, the fruits in the inspection area will be irradiated by X-rays. The rays will produce different attenuations due to the different densities of the flesh, the core, and the possible decayed areas in the process of passing through the fruit, and finally form a detailed X-Ray image. Next, these X-Ray images will be transmitted to an image processing system for preprocessing. The preprocessing process includes operations such as removing noise, enhancing image contrast, and standardizing image size to ensure that subsequent feature extraction can be performed under a unified standard. The purpose of preprocessing is to optimize the image quality, make the internal details of the fruit clearer, and facilitate subsequent analysis and processing. For example, assuming that an apple shows obvious density changes in the X-Ray image, the preprocessing operation will highlight these changes, so that the potential decayed areas can be more accurately identified in the next step of feature extraction. Specifically, preprocessing may apply techniques such as median filtering and histogram equalization to reduce noise and unevenness in the image. For example, if the X-Ray image has a certain amount of granular noise due to unsatisfactory imaging conditions, then median filtering can effectively remove the noise and make the image smoother while retaining important structural information inside the fruit. Similarly, histogram equalization can make the differences between different density areas inside the fruit more significant by stretching the contrast of the image, making it easier to identify abnormal areas. Through these steps, the final preprocessed image will become the basis for the next step of feature extraction. Such processing not only improves the readability of the image, but also enhances the accuracy of the AI ​​model in identifying abnormal areas inside the fruit.

[0022] Step S2, performing feature extraction on the preprocessed image to obtain a feature extracted image.

[0023] Specifically, in this step, feature extraction is performed on the preprocessed image, aiming to identify and extract important information related to the quality of the fruit from the preprocessed image. To achieve this goal, the system first uses a series of image processing algorithms to analyze the preprocessed image in order to identify feature areas that may represent abnormalities inside the fruit. These algorithms may include edge detection, texture analysis, morphological operations, etc., through which key features in the fruit X-ray image can be extracted. Specifically, the feature extraction process may include detecting the edges of density changes inside the fruit to identify areas where there may be rot or damage. For example, the use of the Canny edge detection algorithm can help identify areas with large density changes in the image, which usually correspond to abnormalities inside the fruit, such as signs of rot or insect infestation. After edge detection, texture analysis technology can also be used to further analyze the surface structural features of these areas to determine whether they are different from the typical structure of healthy fruit. In addition, in order to ensure the accuracy of feature extraction, the system may combine morphological operations, such as expansion, corrosion, etc., to optimize the detection results. For example, after detecting possible abnormal areas, the edges of these areas can be further expanded using expansion operations to ensure that even minor abnormalities are not ignored. Conversely, if the detected area contains too much noise or irrelevant features, the erosion operation can help reduce these unnecessary parts, thereby focusing more accurately on the areas that really need attention. Once these steps are completed, the system will generate a feature extraction image that retains all the key features related to fruit quality assessment. These features will be further input into subsequent AI models to evaluate the quality of the fruit. For example, if a large low-density area is identified in the feature extraction image, this may indicate that the fruit has begun to rot, and the system will perform a detailed quantitative assessment of the rot in this area in the next step. In this way, the feature extraction image provides a key foundation for the entire fruit quality inspection process, making the subsequent evaluation process more accurate and reliable.

[0024] Step S3, based on the feature extraction image, determine whether there is an abnormal area in the fruit X-ray image. If so, perform a quantitative assessment of fruit corruption on the abnormal area through an AI model to obtain fruit quality assessment information.

[0025] Specifically, in this step, based on the feature extraction image, the system will conduct an in-depth analysis of the fruit X-ray image to determine whether there are abnormal areas. The key to this process is to use the information obtained from the feature extraction image to determine whether there are abnormal areas related to rot, pests or other quality problems inside the fruit by analyzing this information. To this end, the system usually uses a series of image analysis algorithms that can identify parts of the image with abnormal density or texture, which are usually associated with fruit quality problems. After the system identifies possible abnormal areas, these areas will be further transmitted to the AI ​​model for a more accurate quantitative assessment of decay. The AI ​​model is built based on a large amount of historical data and learning results, and can identify and quantify the degree of decay inside the fruit. For example, the AI ​​model can analyze the size, shape, density change and other characteristics of the abnormal area to determine whether the area is a rotten area and the degree of decay. In this process, the AI ​​model may apply deep learning algorithms such as convolutional neural networks (CNNs), which can process complex image data and make accurate judgments. In this way, the system can not only determine whether there are abnormal areas in the fruit, but also generate specific fruit quality assessment information based on the analysis results of the AI ​​model. For example, if the AI ​​model determines that an abnormal area shows obvious signs of decay and the degree of decay reaches a certain threshold, the system will mark the area and generate corresponding quality assessment information. This information will include the overall quality evaluation of the fruit, such as whether it is qualified, the degree of decay, and whether it needs further processing or discarding. For example, suppose that when the system analyzes an X-ray image of an apple, it finds an area with a density significantly lower than the surrounding flesh. After further evaluation, the AI ​​model determines that there is severe decay in the area and the degree of decay exceeds the set quality standards. At this point, the system will generate corresponding quality assessment information, indicating that the apple is rotten and does not meet sales standards and needs to be removed from the production line. Through this series of steps, the entire system can achieve an accurate assessment of the quality of the fruit to ensure that the products that finally enter the market meet strict quality requirements.

[0026] Step S4: if the fruit quality assessment information corresponding to the abnormal area is not within the set quality standard range, the fruit corresponding to the abnormal area is marked to obtain marked fruit, and an early warning message is automatically generated to notify the staff.

[0027] Specifically, in this step, after the system uses the AI ​​model to conduct a quantitative decay assessment on the abnormal area of ​​the fruit, if the fruit quality assessment information corresponding to the area is not within the set quality standard range, the system will immediately mark the fruit corresponding to the abnormal area to obtain marked fruit. This process first involves the comparison of quality assessment information, that is, comparing the assessment results generated by the AI ​​model with the pre-set quality standards. If the assessment information shows that the degree of decay, insect pests or other quality problems of the fruit exceed the allowable range, the system will determine that the fruit is unqualified.

[0028] Next, the system automatically marks the fruit. The marking process may be implemented in a variety of ways, such as generating a marking code in the system, or physically marking the fruit with a robotic arm in actual operation. The purpose of this marking is to quickly identify these unqualified fruits during the subsequent sorting and processing process to ensure that they do not enter the market circulation. For example, if one orange in a batch is detected to have a serious rotten area, the system will mark it so that it can be identified and removed from the subsequent processing process. At the same time, the system will automatically generate an early warning message to notify the staff to take further action. This early warning message usually contains detailed information about the marked fruit, including its specific location, quality assessment results, and treatment measures to be taken. The early warning message may be communicated to the staff in a variety of ways, such as through an interface display in the control system, or sent to the relevant personnel's device via SMS or email. For example, suppose the system finds a severely rotten apple in a batch of apples, and the assessment information shows that the degree of rot is far beyond the allowable range of the quality standard. At this time, the system will automatically mark the apple as unqualified and generate an early warning message to notify the staff responsible for sorting. After receiving the early warning information, the staff can use a robotic arm or other tools to remove the apple from the production line and further process it according to the predetermined processing strategy. In this way, the entire system can ensure that unqualified fruits are marked and processed in a timely manner, thereby effectively maintaining product quality.

[0029] Step S5, sorting out the marked fruits by the mechanical arm controlled by the staff, and using a preset processing strategy to perform corresponding processing on the sorted fruits.

[0030] Specifically, in this step, the system has completed the identification of the marked fruits, and then the marked fruits are sorted out by the robotic arm controlled by the staff to ensure that these fruits that do not meet the quality standards will not continue to remain in the production line. First, the operation of the robotic arm is controlled by the staff, and the staff can view the specific location and related information of the marked fruits in real time through the system interface or console. The robotic arm is equipped with a precise positioning system, which can accurately find and grab these marked fruits according to the marking information provided by the system. The sorting process is usually highly automated, and the robotic arm can quickly and effectively perform the sorting task according to the predetermined program to separate the marked fruits from the normal fruit flow. Once the robotic arm sorts out the marked fruits, the system will then process these fruits accordingly according to the preset processing strategy. The processing strategy may include destruction, processing, or further inspection. The system usually automatically selects the appropriate processing method based on the quality assessment results of the fruit and the production specifications of the enterprise. For example, for fruits that are severely rotten or affected by pests, the system may instruct the staff to destroy them directly. For fruits that are slightly damaged but still have value, the system may arrange them to enter specific processing links, such as making jams or juices, to reduce waste. For example, if several bananas in a batch are detected to be severely moldy, the system will first identify and mark these bananas through the AI ​​model. Next, the staff will control the robotic arm to sort out these marked bananas from the production line. According to the company's quality control strategy, these moldy bananas may be sent to a special processing area, where the robotic arm will place them in a destruction device, or compost them according to the company's environmental protection strategy. After processing, the system will update the processing record to ensure that these unqualified products will not enter the market circulation. Through the above steps, the system not only realizes the accurate sorting and processing of unqualified fruits, but also reduces the possibility of manual intervention through highly automated processes, thereby improving the efficiency of the production line and the reliability of product quality control.

[0031] In a specific embodiment, the fruits in the inspection area are scanned by a preset X-Ray technology to obtain a fruit X-ray image, including: The fruit in the inspection area is irradiated and scanned at multiple angles by a preset X-Ray technology to obtain X-ray attenuation data; Performing a three-dimensional reconstruction of the interior of the fruit based on the X-ray attenuation data to obtain a voxelized model of the fruit; Performing image enhancement on the fruit voxelized model to obtain an enhanced fruit voxelized model; The fruit interior of the enhanced fruit voxelization model is semantically segmented to obtain a segmented fruit interior tissue image, and the segmented fruit interior tissue image is used as a fruit X-ray image.

[0032] Specifically, in this process, the fruits in the inspection area are scanned by the preset X-Ray technology, aiming to obtain high-precision fruit X-ray images for further quality inspection. First, the system will irradiate and scan the fruits in the inspection area at multiple angles through the preset X-Ray technology to obtain detailed information inside the fruit. The multi-angle nature of X-Ray irradiation is very critical because it can capture comprehensive data on the internal structure of the fruit, especially the parts that cannot be observed at the traditional single angle. Through this multi-angle irradiation and scanning, the system can obtain X-ray attenuation data inside the fruit, which is an accurate reflection of the absorption and scattering characteristics of the various parts of the fruit to X-ray. Next, based on the X-ray attenuation data, the system will perform a three-dimensional reconstruction of the interior of the fruit to obtain a voxelized model of the fruit. This process is similar to CT scanning imaging technology in medicine. By algorithmically processing X-ray attenuation data at multiple angles, the system can reconstruct a three-dimensional model of the internal structure of the fruit. The generation of voxelized models is a key step in 3D reconstruction. Voxels represent a small volume element in the internal space of the fruit. Each voxel contains the X-ray attenuation information of the position, thus describing the density distribution inside the fruit. This model can not only present the external outline of the fruit, but also reflect its internal structural characteristics in detail, such as flesh, seeds, cavities, and possible abnormal areas. After generating the preliminary voxelized model, the system will perform image enhancement on the model to obtain an enhanced fruit voxelized model. The purpose of image enhancement is to improve the visibility of key information in the model, making subsequent analysis more accurate and efficient. Enhancement techniques may include contrast adjustment, edge sharpening, denoising, etc. These processes can highlight the details of the internal structure of the fruit and make the different tissues in the model more clearly identifiable. For example, edge sharpening can help highlight possible cracks or damaged areas inside the fruit, while contrast adjustment can make the density difference more obvious, thereby helping to distinguish healthy tissue from possible diseased tissue. After image enhancement, the system will perform semantic segmentation on the fruit inside the enhanced fruit voxelized model to obtain a segmented fruit internal tissue image. Semantic segmentation is the process of classifying different areas in an image according to their characteristics. In this step, the system uses deep learning algorithms, such as convolutional neural networks (CNNs), to analyze the enhanced voxelized model and semantically segment the different tissue regions inside the fruit. This segmentation process can clearly separate the different structures inside the fruit, such as the peel, pulp, seeds, etc., and identify possible abnormal areas, such as rot, insect infestation or other diseased areas. Through semantic segmentation, the system is able to assign a label to each voxel, which indicates the tissue type or health status to which the voxel belongs, thereby forming a segmented image of the internal tissue of the fruit.Finally, the segmented fruit internal tissue image is used as a fruit X-ray image, which is the final output of the whole process. This X-ray image is no longer a simple two-dimensional plane map, but based on the results of voxelization model and semantic segmentation, it presents the detailed structure of the fruit and its health status. This image will be used as the basic data for subsequent quality inspection for further analysis and processing. For example, when inspecting apples, the final generated fruit X-ray image may show whether there are wormholes, rot or other quality problems inside the apples. Based on this information, the system can further perform operations such as quality assessment, marking and sorting. Through this series of steps, the system can realize the reconstruction and analysis of the internal structure of fruits from X-Ray scanning to high-precision, providing strong technical support for fruit quality inspection. This technology not only improves the accuracy and reliability of detection, but also lays the foundation for large-scale automated detection, ensuring that the final product quality meets market requirements.

[0033] In a specific embodiment, the fruit X-ray image is preprocessed to obtain a preprocessed image, including: Performing adaptive histogram equalization processing on the fruit X-ray image to obtain a high-contrast image; Performing noise reduction processing on the high contrast image by using a preset non-local mean filtering algorithm to obtain a noise-reduced image; Performing multi-scale decomposition on the denoised image to obtain a plurality of sub-band images; wherein the plurality of sub-band images include a low-frequency approximate sub-band image, a horizontal high-frequency sub-band image, a vertical high-frequency sub-band image, a diagonal high-frequency sub-band image, a detail sub-band image and an approximate sub-band image; Extracting texture features from the plurality of sub-band images to obtain a texture feature map; Performing edge detection on the texture feature map to obtain an edge enhanced image; The edge enhanced image is segmented to obtain a preprocessed image.

[0034] Specifically, in this process, the system pre-processes the fruit X-ray image so as to obtain clearer and more accurate image data in the subsequent analysis and processing process. First, the system performs adaptive histogram equalization on the fruit X-ray image to obtain a high-contrast image. Adaptive histogram equalization is a commonly used image enhancement technology that improves the overall contrast by adjusting the brightness distribution of the image so that the brightness range of each part of the image is more uniform. This process is particularly suitable for X-ray images because X-ray images often have low contrast, making some details difficult to identify. Through adaptive histogram equalization, the bright and dark areas in the image are pulled apart, making the internal structure of the fruit more prominent, thereby obtaining a high-contrast image. Next, the high-contrast image is subjected to denoising by a preset non-local mean filtering algorithm to obtain a denoised image. The non-local mean filtering algorithm is a denoising technology based on the principle of pixel similarity in an image, and its characteristic is that it can effectively retain the edge and detail information of the image instead of simply blurring it. X-ray images usually contain a certain degree of noise, which may come from interference from the X-ray device itself or the external environment. Through non-local mean filtering, the system can eliminate these noises while maintaining the integrity of the fine structure inside the fruit, which is very critical for subsequent accurate analysis and identification. Subsequently, the system performs multi-scale decomposition on the denoised image to obtain multiple sub-band images. This step is to decompose the image into sub-bands of different frequencies and directions so as to conduct a more in-depth analysis of the features of different scales in the image. Specifically, the multiple sub-band images include low-frequency approximate sub-band images, horizontal high-frequency sub-band images, vertical high-frequency sub-band images, diagonal high-frequency sub-band images, detail sub-band images and approximate sub-band images. The low-frequency approximate sub-band image mainly contains the overall structural information of the fruit, while the high-frequency sub-band image captures the edge and detail information inside the fruit. Through this decomposition, the system can analyze the image from multiple scales to ensure that both the macroscopic structure can be captured and the microscopic details can be identified. Next, the system performs texture feature extraction on the multiple sub-band images obtained to obtain a texture feature map. Texture feature extraction is a key step that can extract the texture information reflecting the internal organizational details of the fruit in the image. These texture features may reflect the health status of the internal tissues of the fruit, such as whether there are abnormal tissue changes, rot or lesions. By analyzing the texture features, the system can further improve the accuracy of judging the internal quality of the fruit. After that, the system performs edge detection on the texture feature map to obtain an edge-enhanced image. The purpose of edge detection is to identify and highlight the boundaries of various tissues inside the fruit in the image. This step usually uses methods such as gradient or Laplace operators to detect edges in the image, thereby generating an edge-enhanced image.The edge-enhanced image can more clearly show the boundaries of the various tissues inside the fruit, making the boundaries of different tissues more obvious, which is very important for subsequent accurate segmentation. Finally, the system segments the edge-enhanced image to obtain a preprocessed image. Segmentation is to separate different areas in the image. In this case, the system will segment the different tissues inside the fruit into independent areas based on the boundary information in the edge-enhanced image, thereby generating a preprocessed image. This preprocessed image contains the internal structural information of the fruit that has been enhanced and segmented, laying the foundation for subsequent analysis and quality inspection. For example, if some apples with rotten tissue inside are detected in the X-ray images of a batch of apples, through this series of preprocessing steps, the system can generate a clear preprocessed image showing the specific location and size of the rotten area, thereby helping to identify fruits that do not meet the standards and ultimately improving the quality control level of the product.

[0035] In a specific embodiment, it is determined whether there is an abnormal area in the fruit X-ray image based on the feature extraction image. If there is, a quantitative assessment of fruit corruption is performed on the abnormal area through an AI model to obtain fruit quality assessment information, including: The feature extraction image is decomposed in multiple scales and multiple directions by a preset wavelet transform algorithm, and a wavelet coefficient matrix is ​​obtained accordingly; wherein the wavelet coefficient matrix includes a high-frequency subband coefficient matrix and a low-frequency approximate coefficient matrix; Based on the wavelet coefficient matrix, the abnormal region of the fruit X-ray image is identified to determine whether there is an abnormal region in the fruit; If it exists, the AI ​​model is used to perform probability density calculation on the abnormal area to obtain a corrosion heat map; A quantitative evaluation of fruit decay is performed on the fruit based on the decay heat map to obtain fruit quality evaluation information; wherein the fruit quality evaluation information includes the fruit decay trend and the internal decay degree of the fruit.

[0036] Specifically, in the implementation of this process, the system first determines whether there is an abnormal area in the fruit X-ray image based on the feature extraction image, which is a key step in fruit quality assessment. If an abnormal area is detected, the system will further perform a quantitative assessment of fruit corruption in the abnormal area through an AI model to obtain fruit quality assessment information. This process includes multiple steps, each of which is intended to accurately identify and quantify the internal corruption of the fruit. First, the system performs multi-scale and multi-directional decomposition on the feature extraction image through a preset wavelet transform algorithm, and obtains a corresponding wavelet coefficient matrix. Wavelet transform is a very effective image processing technology that can decompose image signals into different frequency components while retaining spatial information. In this step, the system performs a wavelet transform on the feature extraction image to generate a wavelet coefficient matrix, which includes a high-frequency subband coefficient matrix and a low-frequency approximation coefficient matrix. The high-frequency subband coefficient matrix mainly captures the details and edge information in the image, while the low-frequency approximation coefficient matrix represents the overall structure of the image. Through this multi-scale and multi-directional decomposition method, the system can more carefully analyze the texture features and structural information in the fruit X-ray image, providing a basis for subsequent abnormal area identification. Next, based on the wavelet coefficient matrix, the system identifies abnormal areas in the fruit X-ray image to determine whether there are abnormal areas in the fruit. The core of this step is to analyze the feature changes in the wavelet coefficient matrix, especially the abnormal signals in the high-frequency sub-band. Generally speaking, the healthy tissue inside the fruit appears as a uniform texture and structure in the X-ray image, while the decayed or diseased area will show abnormal coefficient changes in the high-frequency sub-band. By identifying these abnormal signals, the system can accurately determine whether there are abnormal areas inside the fruit, such as rot, disease or other structural abnormalities. If the system identifies an abnormal area, it will further perform a probability density calculation on the abnormal area through the AI ​​model to obtain a decay heat map. The decay heat map is a visualization tool that can intuitively display the degree of decay in different areas inside the fruit. Based on the abnormal signals in the wavelet coefficient matrix, the AI ​​model generates a heat map representing the degree of decay through complex probability density calculations. In this heat map, the darker the color, the higher the degree of decay, while the lighter the color, the lower the degree of decay. Through the decay heat map, the system can clearly show the distribution of decay inside the fruit. Based on the decay heat map, the system then performs a quantitative decay assessment on the fruit, and finally obtains fruit quality assessment information. This assessment process involves a comprehensive analysis of the size, location and decay degree of the decay area, thereby obtaining a quantitative assessment result. Fruit quality assessment information usually includes two important aspects: fruit decay trend and internal decay degree of the fruit.The spoilage trend reflects the direction and speed of the internal spoilage of the fruit, such as whether the spoilage is spreading and whether there are signs of accelerated spoilage; while the internal spoilage degree is a quantitative indicator, usually expressed as a percentage or numerical form, showing the overall spoilage ratio of the fruit or the degree of spoilage in a specific area. For example, if the system detects a large abnormal area in the X-ray image of an apple, and the spoilage heat map shows that the degree of spoilage in this area is high and widely distributed, then the system may conclude that the apple is seriously spoiled in the evaluation and recommend that it be removed from the supply chain. This AI-based quantitative spoilage assessment can greatly improve the efficiency and accuracy of fruit quality control and ensure that consumers obtain high-quality fruit products. Through this series of steps, the system can not only effectively identify abnormal areas inside the fruit, but also conduct quantitative analysis of these abnormal areas, thereby providing accurate fruit quality assessment information. This method is particularly suitable for large-scale fruit inspection scenarios, such as in the quality control process of agricultural product processing plants or supermarkets, where the automated system can quickly identify and remove spoiled fruits, thereby improving overall product quality and reducing losses. Ultimately, this system provides strong technical support for quality management in the fruit supply chain, ensuring the health and satisfaction of consumers.

[0037] In a specific embodiment, the fruits corresponding to the abnormal area are marked to obtain marked fruits, and warning information is automatically generated, including: Taking pictures of the fruit corresponding to the abnormal area to obtain a fruit picture; Performing vector transformation on the captured fruit image to obtain a transformation vector; Inputting the conversion vector into a preset support vector machine to control an optical marking system to mark the fruit, and using the marked fruit as a marked fruit; The conversion vector is input into a preset support vector machine to control the intelligent early warning system, and early warning information is automatically generated to notify the staff.

[0038] Specifically, in this process, the system aims to mark the fruits corresponding to the abnormal areas and automatically generate early warning information so as to provide timely feedback and decision support in fruit quality control. First, in order to effectively mark the abnormal areas, the system needs to capture the fruits corresponding to these areas to obtain fruit images. The purpose of this step is to capture the appearance and morphological characteristics of the fruits containing the abnormal areas so that subsequent processing and marking can be accurately targeted at these areas. Next, the system performs vector conversion on the fruit images to obtain conversion vectors. This conversion process involves converting two-dimensional image data into a numerical form suitable for machine learning model processing, usually by feature extraction technology, converting the key features of the image (such as color, shape, texture, etc.) into a high-dimensional vector. The conversion vector not only retains the key information in the fruit image, but also compresses and simplifies the expression form of the data, making subsequent calculations and processing more efficient. After completing the vector conversion, the system inputs the conversion vector into a preset support vector machine to control the optical marking system to mark the fruit. Support vector machine (SVM) is a powerful classifier that can classify and make decisions based on input data. Here, the support vector machine is used to control the work of the optical marking system. When the support vector machine receives the conversion vector, based on the trained model and the set threshold conditions, the system will identify the abnormal areas of the fruit and mark these areas by controlling the optical marking system. The optical marking system usually includes a laser or inkjet nozzle, which can perform precise marking operations on the surface of the fruit to obtain the marked fruit, that is, the marked fruit. In this way, the system can quickly and efficiently identify and mark the fruits with abnormal areas, so that these fruits can be given priority attention or eliminated in the subsequent manual inspection or automated processing. At the same time, the system also inputs the conversion vector into the preset support vector machine, controls the intelligent early warning system, and automatically generates early warning information to notify the staff. The generation of the early warning information is based on the analysis results of the conversion vector by the support vector machine. If the support vector machine identifies that there are abnormal areas in the fruit, the system will automatically trigger the early warning mechanism and generate a detailed early warning information. The early warning information usually includes the identification of the fruit, the specific location and size of the abnormal area, the possible degree of corruption or lesions, and the recommended treatment measures. This information will be automatically sent to the terminal devices of the quality control staff, such as computers, tablets or mobile phones, to ensure that they can receive it in time and take corresponding treatment measures according to the early warning information. For example, if the system identifies abnormal areas inside some oranges during X-ray inspection of a batch of oranges and captures the appearance of these oranges through fruit photography, the system will perform vector conversion and use support vector machines to analyze these oranges.If the analysis results show that these oranges do have abnormal areas, the system will mark the specific abnormal area locations on the surface of these oranges through the optical marking system, and they will become marked fruits. At the same time, the system will generate early warning information to notify the staff to conduct further inspections on these marked fruits or directly remove them from the supply chain. In this way, the quality control team can quickly and efficiently identify and deal with potential quality problems, prevent unqualified fruits from entering the market, and ensure product quality. This series of operations greatly improves the automation and accuracy of fruit quality detection and control. Through the organic combination of image capture, vector conversion, support vector machine analysis and optical marking, the system can quickly mark and isolate problematic fruits and generate detailed early warning information, providing timely and accurate technical support for quality control and management. This method is not only applicable to the fruit industry, but can also be extended to other agricultural products and food processing fields that require efficient quality control, making important contributions to improving the overall food safety and quality management level.

[0039] In a specific embodiment, the marked fruits are sorted out by a mechanical arm controlled by the staff, and a preset processing strategy is used to perform corresponding processing on the sorted fruits, including: Capturing images of the marked fruit to obtain marked fruit images; Using a preset YOLOv5 target detection algorithm, the marked fruit is located based on the marked fruit image to obtain spatial coordinate information of the marked fruit; Acquire a designated area, and obtain a sorting path based on the designated area and the spatial coordinate information; The staff controls the preset robot arm based on the sorting path to sort the marked fruits to the designated area; wherein the designated area is an area where the marked fruits are placed; Scanning the marked fruit in the designated area by using a preset near-infrared spectroscopy technology to obtain fruit spectrum data; wherein there is at least one marked fruit; Performing dimension reduction processing on the fruit spectrum data to obtain a dimension reduction feature vector; Performing cluster analysis on the dimension reduction feature vectors to obtain the corruption type of the marked fruit; wherein the corruption type includes internal browning, mildew, insect damage, nutrient deficiency corruption, tissue damage caused by cold damage, texture deterioration caused by overripeness, local corruption caused by mechanical damage, and infection by pathogenic microorganisms; Mapping and matching the corruption type with the processing strategy in the database to obtain a corresponding mapping and matching strategy; The marked fruits are processed accordingly based on the corresponding mapping matching strategy.

[0040] Specifically, in this solution, the system uses a robotic arm controlled by a staff member to sort out the marked fruits through a series of steps, and performs corresponding processing on the sorted fruits according to a preset processing strategy. First, the system collects images of the marked fruits to obtain marked fruit images. The purpose of this step is to capture the appearance information of the marked fruits to ensure that these fruits can be accurately identified and located in subsequent operations. The collected marked fruit images are the basic data for subsequent steps and can provide detailed visual information for further processing of the system. Next, the system locates the marked fruits based on the marked fruit images through a preset YOLOv5 target detection algorithm to obtain the spatial coordinate information of the marked fruits. YOLOv5 is an advanced real-time target detection algorithm that can quickly and accurately identify and locate target objects in images. In this step, the YOLOv5 algorithm is used to locate the specific position of the marked fruits and generate corresponding spatial coordinate information. Through this process, the system can determine the position of each marked fruit in the image to ensure that the robotic arm can accurately operate and process these fruits. After obtaining the spatial coordinate information of the marked fruits, the system obtains a designated area and obtains a sorting path based on the designated area and the spatial coordinate information. The designated area is an area dedicated to placing marked fruits, usually located at the end of the sorting line or an independent sorting area. The sorting path is determined by the current position of the marked fruit and its predetermined placement position, and is calculated by the optimization path planning algorithm. This process ensures that the robot arm can sort the fruit to the designated area in the optimal path during operation, thereby improving efficiency and accuracy. Subsequently, the staff controls the preset robot arm based on the sorting path to sort the marked fruit to the designated area. In this step, the staff controls the movement of the robot arm according to the sorting path generated by the system through the operation interface or control device. The robot arm will accurately grab the marked fruit and place it in the designated area according to the instructions. The accuracy and speed of this process depend on the accuracy of the robot arm's control system and the path planning algorithm. Once the marked fruit is sorted to the designated area, the system scans the marked fruit in the designated area through the preset near-infrared spectroscopy technology to obtain the fruit spectral data. Near-infrared spectroscopy is a non-invasive detection method that can analyze the chemical composition and structural characteristics of the fruit through the light reflection characteristics of the fruit surface. Through this scanning technology, the system can obtain detailed spectral data of each marked fruit, which reflects the internal state of the fruit, such as moisture content, sugar content, acidity, etc. Then, the system performs dimensionality reduction processing on the fruit spectral data to obtain a reduced-dimensional feature vector. Dimensionality reduction processing is an important step in data preprocessing, which aims to reduce the dimension of the data and extract the most representative features to simplify the calculation process.In this step, the system uses principal component analysis (PCA) or other dimensionality reduction algorithms to convert high-dimensional spectral data into a low-dimensional feature vector, thereby retaining the key information of the fruit spectral data and reducing redundancy. The reduced dimensionality feature vector is clustered to obtain the corruption type of the marked fruit. In this step, the system uses a cluster analysis algorithm, such as K-means clustering or hierarchical clustering, to analyze the reduced dimensionality feature vector and classify fruits with similar characteristics into the same corruption type. Corruption types include a variety of different situations, such as internal browning, mildew, insect damage, nutrient deficiency corruption, tissue damage caused by cold damage, texture deterioration caused by overripeness, local corruption caused by mechanical damage, and infection by pathogenic microorganisms. Through cluster analysis, the system can identify the specific corruption of the marked fruit, providing a basis for subsequent processing. Then, the system maps and matches the corruption type with the processing strategy in the database to obtain the corresponding mapping matching strategy. The processing strategy in the database is the preset operating specifications and processing methods according to different corruption types. By matching the detected corruption type with the strategy in the database, the system can automatically select the most appropriate processing method. For example, for moldy fruits, the system may choose high-temperature sterilization or chemical treatment; for fruits damaged by insect pests, it may choose physical isolation or direct disposal. Finally, the marked fruits are treated accordingly based on the corresponding mapping matching strategy. The specific implementation of the treatment method may include mechanical equipment operation on the automated assembly line, such as cleaning, sorting, drying or packaging, and may also involve manual processing or special chemical treatment. The degree of automation and precision of the entire process ensures the efficiency and accuracy of fruit quality control, while also minimizing human intervention and improving production efficiency and quality safety.

[0041] For example, in a fruit packaging plant, the system detected that some of a batch of apples were moldy and damaged by insect pests. After image acquisition and YOLOv5 target detection of these apples, the system obtained the spatial coordinate information of these apples and planned the sorting path. The staff controlled the robotic arm to sort these apples to the designated area according to the path. Subsequently, the system scanned these apples using near-infrared spectroscopy technology and confirmed the types of mold and insect damage through cluster analysis. The system selected the appropriate treatment method through the mapping matching strategy, chemically treated the moldy apples, and isolated the apples damaged by insect pests. The entire process realizes fully automated management from detection, sorting to processing, ensuring the quality and safety of the fruit.

[0042] In a specific embodiment, controlling a preset robot arm based on the sorting path to sort the marked fruit to the designated area includes: Performing cubic spline interpolation processing on the sorting path to obtain a smooth trajectory curve; Using a preset inverse kinematics algorithm, based on the trajectory curve, the angle sequence of each joint in the robotic arm is calculated to obtain the joint motion trajectory; By using an adaptive fuzzy PID control algorithm, command conversion is performed based on the joint motion trajectory to generate real-time control commands for each joint of the robotic arm; The robot arm is controlled based on the real-time control instruction through dynamic torque compensation technology to sort the marked fruits to the designated area.

[0043] Specifically, in this scheme, the system aims to accurately control the preset robot arm based on the sorting path to sort the marked fruit to the designated area. This process involves a variety of advanced algorithms and technologies to ensure the efficiency and accuracy of the robot arm when performing tasks. First, the sorting path is processed by cubic spline interpolation to obtain a smooth trajectory curve. Cubic spline interpolation is a mathematical method used to create a smooth curve through a series of data points. This method is particularly important in path planning because the motion trajectory of the robot arm needs to be smooth and continuous to avoid sudden stops or excessive vibrations during the movement, which may cause damage to the fruit or sorting failure. Through cubic spline interpolation, the system generates a smooth trajectory curve, which represents the ideal motion path of the robot arm in space. Next, the system uses a preset inverse kinematics algorithm to calculate the angle sequence of each joint in the robot arm based on the trajectory curve to obtain the joint motion trajectory. The inverse kinematics algorithm is a mathematical method used to calculate the required angles of each joint of the robot arm. Given the target position and posture of the end of the robot arm, the inverse kinematics algorithm can calculate the angles of each joint required to achieve this goal. The key to this step is to convert the trajectory curve into specific robot arm motion instructions, because the movement of the robot arm is achieved by the angle change of each joint. Through this calculation process, the system obtains the motion trajectory of each joint of the robot arm, which will guide the robot arm how to move accurately to follow the predetermined trajectory curve, so as to reach the specified area smoothly. After obtaining the joint motion trajectory, the system uses the adaptive fuzzy PID control algorithm to convert the instructions based on the joint motion trajectory and generate real-time control instructions for each joint of the robot arm. The adaptive fuzzy PID control algorithm combines the advantages of traditional PID control and fuzzy logic control, and can automatically adjust the control parameters during the control process to cope with the uncertainty and nonlinear factors in the system. PID control is a classic control algorithm that adjusts the output of the system through three links: proportional, integral and differential. Fuzzy logic control handles the uncertainty in the system through fuzzy rules. The adaptive fuzzy PID control algorithm combining these two methods can adjust the control instructions of each joint in real time during the movement of the robot arm to ensure the accuracy and stability of the robot arm movement. Through this algorithm, the system converts the joint motion trajectory into specific control instructions, which will be sent to the controller of the robot arm. Finally, the system uses dynamic torque compensation technology to control the robot arm based on the real-time control instructions to sort the marked fruits to the designated area. Dynamic torque compensation technology is an advanced technology for robot arm control. It monitors the motion state of the robot arm in real time, calculates and compensates for the torque changes caused by factors such as inertia and gravity during the movement of the robot arm. Torque refers to the rotational force acting on the joints of the robot arm. When the robot arm moves quickly or the load changes, these torques will change significantly, which may cause instability or deviation in the movement of the robot arm.Through dynamic torque compensation technology, the system can adjust the motion torque of the robotic arm in real time, ensuring that the robotic arm moves stably according to the predetermined trajectory curve and accurately places the marked fruits in the designated area.

[0044] For example, suppose that in an automated fruit sorting line, the system detects a batch of marked fruits that require special treatment. These fruits need to be accurately sorted from the line to a designated area by the robot arm. The system first performs cubic spline interpolation on the sorting path of these marked fruits to generate a smooth trajectory curve. This curve represents the ideal path that the robot arm needs to follow during the sorting process. Then, the system uses the inverse kinematics algorithm to calculate the angle sequence of each joint of the robot arm and determine how the robot arm adjusts its joints to follow this trajectory curve. Then, the system converts these angle sequences into real-time control instructions through the adaptive fuzzy PID control algorithm and sends them to the control system of the robot arm. Finally, the system adjusts the torque of the robot arm through dynamic torque compensation technology to ensure that the robot arm moves smoothly and accurately during the sorting process and places the marked fruits in the designated area. The automation and precise control of the entire process make fruit sorting efficient and reliable, reduce the risk of manual intervention and fruit damage, and improve overall production efficiency and quality control.

[0045] The above describes the fruit quality detection method based on X-Ray images in the embodiment of the present invention. The following describes the fruit quality detection device based on X-Ray images in the embodiment of the present invention. Figure 2 In one embodiment of the present invention, a fruit quality detection device based on X-Ray images includes: The scanning module 21 is used to scan the fruits in the area to be detected by using a preset X-Ray technology to obtain a fruit X-ray image, and pre-process the fruit X-ray image to obtain a pre-processed image; wherein there is at least one fruit in the area to be detected; An extraction module 22, used for performing feature extraction on the preprocessed image to obtain a feature extracted image; An evaluation module 23 is used to determine whether there is an abnormal area in the fruit X-ray image based on the feature extraction image. If there is, a quantitative evaluation of fruit corruption is performed on the abnormal area through an AI model to obtain fruit quality evaluation information; The marking module 24 is used to mark the fruit corresponding to the abnormal area if the fruit quality assessment information corresponding to the abnormal area is not within the set quality standard range, obtain marked fruit, and automatically generate warning information to notify the staff; The sorting module 25 is used to sort out the marked fruits through the mechanical arm controlled by the staff, and adopt a preset processing strategy to perform corresponding processing on the sorted fruits.

[0046] In this embodiment, for the specific implementation of each unit in the above system embodiment, please refer to the above method embodiment, which will not be repeated here.

[0047] Reference Figure 3 The present invention also provides a computer device in an embodiment, wherein the internal structure of the computer device can be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0048] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0049] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0050] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0051] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0052] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A fruit quality detection method based on X-Ray images, characterized in that, The following steps are involved: Scanning the fruit in the area to be inspected using a preset X-Ray technology to obtain a fruit X-ray image, and preprocessing the fruit X-ray image to obtain a preprocessed image; wherein there is at least one fruit in the area to be inspected; Performing feature extraction on the preprocessed image to obtain a feature-extracted image; Determine whether there is an abnormal area in the fruit X-ray image based on the feature extraction image, and if so, perform a quantitative assessment of fruit corruption on the abnormal area using an AI model to obtain fruit quality assessment information; If the fruit quality assessment information corresponding to the abnormal area is not within the set quality standard range, the fruit corresponding to the abnormal area is marked to obtain marked fruit, and an early warning message is automatically generated to notify the staff; The marked fruits are sorted out by the robotic arm controlled by the staff, and the sorted fruits are processed accordingly using a preset processing strategy.

2. The fruit quality detection method based on X-Ray images according to claim 1, wherein The fruit in the inspection area is scanned using the preset X-Ray technology to obtain an X-ray image of the fruit, including: The fruit in the inspection area is irradiated and scanned at multiple angles using a preset X-ray technology to obtain X-ray attenuation data; Performing a three-dimensional reconstruction of the interior of the fruit based on the X-ray attenuation data to obtain a voxelized model of the fruit; performing image enhancement on the fruit voxelized model to obtain an enhanced fruit voxelized model; Semantic segmentation is performed on the interior of the fruit of the enhanced fruit voxelization model to obtain a segmented fruit internal tissue image, and the segmented fruit internal tissue image is used as a fruit X-ray image.

3. The fruit quality detection method based on X-Ray images according to claim 1, wherein Preprocessing the fruit X-ray image to obtain a preprocessed image includes: Performing adaptive histogram equalization processing on the fruit X-ray image to obtain a high-contrast image; performing noise reduction processing on the high-contrast image using a preset non-local mean filtering algorithm to obtain a noise-reduced image; Performing multi-scale decomposition on the denoised image to obtain a plurality of sub-band images; wherein the plurality of sub-band images include a low-frequency approximate sub-band image, a horizontal high-frequency sub-band image, a vertical high-frequency sub-band image, a diagonal high-frequency sub-band image, a detail sub-band image, and an approximate sub-band image; Extracting texture features from the plurality of sub-band images to obtain a texture feature map; Performing edge detection on the texture feature map to obtain an edge-enhanced image; The edge-enhanced image is segmented to obtain a preprocessed image.

4. The fruit quality detection method based on X-Ray images according to claim 1, wherein Based on the feature extraction image, it is determined whether there is an abnormal area in the fruit X-ray image. If so, a quantitative assessment of fruit corruption is performed on the abnormal area using an AI model to obtain fruit quality assessment information, including: Performing multi-scale and multi-directional decomposition on the feature extraction image using a preset wavelet transform algorithm to obtain a corresponding wavelet coefficient matrix; wherein the wavelet coefficient matrix includes a high-frequency subband coefficient matrix and a low-frequency approximation coefficient matrix; Performing abnormal area recognition on the fruit X-ray image based on the wavelet coefficient matrix to determine whether the fruit has abnormal areas; If it exists, the AI ​​model is used to calculate the probability density of the abnormal area to obtain a corrosion heat map; A quantitative evaluation of fruit decay is performed on the fruit based on the decay heat map to obtain fruit quality evaluation information; wherein the fruit quality evaluation information includes the fruit decay trend and the internal decay degree of the fruit.

5. The fruit quality detection method based on X-Ray images according to claim 1, wherein Marking the fruits corresponding to the abnormal area to obtain marked fruits and automatically generating early warning information, including: Capturing the fruit corresponding to the abnormal area to obtain a captured image of the fruit; Performing vector conversion on the captured fruit image to obtain a conversion vector; Inputting the conversion vector into a preset support vector machine to control an optical marking system to mark the fruit, and using the marked fruit as the marked fruit; The conversion vector is input into a preset support vector machine to control the intelligent early warning system, and early warning information is automatically generated to notify staff.

6. The fruit quality detection method based on X-Ray images according to claim 1, wherein The marked fruits are sorted out by a robotic arm controlled by the staff, and the sorted fruits are processed accordingly using a preset processing strategy, including: performing image acquisition on the marked fruit to obtain a marked fruit image; Using a preset YOLOv5 target detection algorithm, the marked fruit is located based on the marked fruit image to obtain spatial coordinate information of the marked fruit; Acquire a designated area, and obtain a sorting path based on the designated area and the spatial coordinate information; The staff controls a preset robotic arm based on the sorting path to sort the marked fruits to the designated area; wherein the designated area is an area where the marked fruits are placed; Scanning the marked fruit in a designated area using a preset near-infrared spectroscopy technology to obtain fruit spectral data; wherein there is at least one marked fruit; Performing dimensionality reduction processing on the fruit spectral data to obtain a dimensionality reduction feature vector; Performing cluster analysis on the dimensionally reduced feature vectors to obtain the decay type of the marked fruit; wherein the decay type includes internal browning, mildew, insect damage, nutrient deficiency decay, tissue damage caused by chilling injury, texture deterioration caused by overripeness, local decay caused by mechanical damage, and infection by pathogenic microorganisms; Mapping and matching the corruption type with the processing strategy in the database to obtain a corresponding mapping and matching strategy; The marked fruits are processed accordingly based on the corresponding mapping matching strategy.

7. The fruit quality detection method based on X-Ray images according to claim 6, wherein Controlling a preset robotic arm based on the sorting path to sort the marked fruits to the designated area includes: Performing cubic spline interpolation processing on the sorting path to obtain a smooth trajectory curve; Using a preset inverse kinematics algorithm, based on the trajectory curve, the angle sequence of each joint in the robotic arm is calculated to obtain the joint motion trajectory; The adaptive fuzzy PID control algorithm is used to convert commands based on the joint motion trajectory to generate real-time control commands for each joint of the robotic arm; The robot arm is controlled based on the real-time control instruction through dynamic torque compensation technology to sort the marked fruits to the designated area.

8. A fruit quality detection device based on X-Ray images, characterized in that: include: a scanning module configured to scan the fruit in the area to be inspected using a preset X-ray technology to obtain a fruit X-ray image, and pre-process the fruit X-ray image to obtain a pre-processed image; wherein, at least one fruit exists in the area to be inspected; An extraction module, configured to perform feature extraction on the preprocessed image to obtain a feature-extracted image; An evaluation module is configured to determine whether there is an abnormal area in the fruit X-ray image based on the feature extraction image, and if so, to perform a quantitative assessment of fruit deterioration on the abnormal area using an AI model to obtain fruit quality assessment information; a marking module, configured to mark the fruit corresponding to the abnormal area if the fruit quality assessment information corresponding to the abnormal area is not within the set quality standard range, obtain marked fruit, and automatically generate an early warning message to notify staff; The sorting module is used to sort out the marked fruits through the mechanical arm controlled by the staff, and adopt a preset processing strategy to perform corresponding processing on the sorted fruits.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Image recognition method of fruit and vegetable production and impurity removal all-in-one machine based on video monitoring

    CN120388282A