Image preprocessing method, image recognition method and sorting device
By employing dual-energy X-ray imaging and image preprocessing methods, the challenge of identifying cartilage and bone in meat inspection was solved, thereby improving the accuracy and reliability of meat inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING HONEST TECHNOLOGY CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-06-19
AI Technical Summary
In meat quality testing, existing technologies struggle to accurately identify cartilage and bone foreign objects in deboned meat, resulting in low detection rates and high false alarm rates, which negatively impacts the quality of meat products.
Dual-energy X-ray imaging technology was used to acquire low-energy and high-energy images. Image preprocessing methods such as noise reduction, fitting, difference and pyramid enhancement were used to enhance the gray-scale difference between meat tissue and foreign body tissue. The fitting parameters were used to construct the target image to highlight the foreign body features.
It improves the accuracy of meat testing, reduces missed and false detections of cartilage and small-sized hard bones, and enhances the reliability of meat quality testing and sorting.
Smart Images

Figure CN122243785A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, specifically to an image preprocessing method, an image recognition method, and a sorting device. Background Technology
[0002] In meat quality inspection, the inspection of deboned meat is particularly important. Accurate identification of meat tissue and soft or hard bone foreign objects is crucial to remove any bone-containing meat and ensure product quality. However, because foreign matter is difficult to distinguish from meat tissue in images, subsequent meat inspection suffers from low detection rates and high false alarm rates for bones, especially cartilage. This results in the presence of small hard bones or cartilage in deboned meat, leading to poor meat quality inspection accuracy and ultimately, substandard product quality. Summary of the Invention
[0003] To overcome the problems existing in related technologies, an exemplary embodiment of this disclosure provides an image preprocessing method in a first aspect for preprocessing meat images. The image preprocessing method includes: acquiring a low-energy image and a high-energy image of the meat; performing noise reduction processing on the low-energy image to determine a low-energy processed image; performing noise reduction processing on the high-energy image to determine a high-energy processed image; fitting the low-energy processed image to determine a fitted image, wherein the fitting of the low-energy processed image is based on fitting parameters, and the fitting parameters are determined based on a meat image without foreign objects; and determining a target image based on the low-energy image, the low-energy processed image, the high-energy processed image, and the fitted image.
[0004] In some embodiments, fitting the low-energy processed image to determine the fitted image includes: obtaining the fitting parameters; and fitting the low-energy processed image based on the fitting parameters to determine the fitted image.
[0005] In some embodiments, determining the target image based on the low-energy image, the low-energy processed image, the high-energy processed image, and the fitted image includes: performing a difference analysis between the fitted image and the high-energy processed image to determine a difference image; and fusing the low-energy image, the low-energy processed image, and the difference image to determine the target image.
[0006] In some embodiments, determining a difference image based on the difference between the fitted image and the high-energy processed image includes: subtracting the corresponding gray values of the fitted image and the high-energy processed image to determine the difference data; and performing gray-level normalization based on the difference data to determine the difference image.
[0007] In some embodiments, fusing the low-energy image, the low-energy processed image, and the difference image to determine the target image includes: performing pyramid enhancement processing on the low-energy image, the low-energy processed image, and the difference image respectively; and fusing the enhanced low-energy image, the low-energy processed image, and the difference image to determine the target image.
[0008] In some embodiments, the pyramid enhancement process employs a five-layer Laplacian pyramid enhancement, with gains of 2.0, 1.5, 1.2, 1.0, and 0.8.
[0009] In some embodiments, the step of denoising the low-energy image to determine the low-energy processed image includes: performing threshold smoothing on the low-energy image; and performing logarithmic transformation on the threshold smoothed low-energy image to determine the low-energy processed image.
[0010] In some embodiments, the step of denoising the high-energy image to determine the high-energy processed image includes: performing Gaussian filtering on the high-energy image; and performing logarithmic smoothing on the Gaussian-filtered high-energy image to determine the high-energy processed image.
[0011] Secondly, this disclosure also provides an image recognition method for recognizing meat images, the image recognition method comprising: acquiring a low-energy image of meat using low-energy rays; acquiring a high-energy image of meat using high-energy rays; determining a target image based on the low-energy image and the high-energy image using an image preprocessing method as described in the first aspect; and recognizing the meat image based on the target image.
[0012] Thirdly, this disclosure also provides a sorting device for performing the image recognition method as described in the second aspect to identify meat images.
[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0014] According to the image preprocessing method provided in this disclosure, high-energy and low-energy images of meat can be acquired and preprocessed, thereby extracting feature information of foreign matter tissues such as bones in the meat. This can effectively distinguish meat tissues from foreign matter tissues in the image, effectively avoid false detection or missed detection of foreign matter, thereby improving the accuracy of subsequent meat detection and improving the quality of meat products. Attached Figure Description
[0015] This disclosure can be better understood by describing exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, in which: Figure 1 A flowchart of an image preprocessing method provided in an exemplary embodiment of this disclosure; Figure 2 A flowchart of an image preprocessing method provided in an exemplary embodiment of this disclosure; Figure 3 A flowchart of an image preprocessing method provided in an exemplary embodiment of this disclosure; Figure 4 A flowchart of an image preprocessing method provided in an exemplary embodiment of this disclosure; Figure 5 A flowchart of an image preprocessing method provided in an exemplary embodiment of this disclosure; Figure 6 A flowchart of an image preprocessing method provided in an exemplary embodiment of this disclosure; Figure 7 A flowchart of an image preprocessing method provided in an exemplary embodiment of this disclosure; Figure 8 This is a flowchart of an image preprocessing method provided as an exemplary embodiment of the present disclosure. Detailed Implementation
[0016] The following describes specific embodiments of this disclosure. It should be noted that, in order to maintain brevity, this specification cannot provide a detailed description of all features of the actual embodiments. It should be understood that, in the actual implementation of any embodiment, just as in any engineering or design project, various specific decisions are often made to achieve the developer's specific goals and to meet system-related or business-related constraints, and this can change from one embodiment to another. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content of this disclosure, changes in design, manufacturing, or production based on the technical content disclosed herein are merely conventional technical means and should not be construed as insufficient content of this disclosure.
[0017] Unless otherwise defined, the technical or scientific terms used in the claims and description shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” and similar terms used in the specification and claims of this patent application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. The terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the element or object preceding “comprising” or “including” encompasses the element or object listed following “comprising” or “including” and its equivalents, and do not exclude other elements or objects. The terms “connected” or “linked” and similar terms are not limited to physical or mechanical connections, nor are they limited to direct or indirect connections.
[0018] For deboned meat, such as chicken thighs, quality inspection is generally required. This inspection identifies the remaining meat tissue and soft or hard bone / foreign matter after deboning. During the sorting process, meat without foreign matter is inspected and output, while meat containing residual foreign matter is removed, ensuring high-quality meat products. Currently, X-ray scanning of deboned meat typically involves only single-image processing, making it difficult to distinguish between meat tissue and foreign matter. Specifically, in the images obtained after X-ray scanning, the grayscale values of thicker meat tissue and cartilage tissue are similar, making it difficult to differentiate between them. This leads to missed or false detections of meat containing residual cartilage, resulting in lower accuracy in subsequent meat quality inspection and sorting.
[0019] To solve the above technical problems, such as Figure 1 , Figure 8 As shown, an exemplary embodiment of this disclosure provides an image preprocessing method for preprocessing meat images. The image preprocessing method may include steps S110 to S150.
[0020] Step S110: Acquire low-energy and high-energy images of the meat. First, images of the meat can be acquired using an image acquisition device, or stored meat images can be retrieved from a database using the device's control system to obtain low-energy and high-energy images of the meat. Each low-energy and high-energy image of the meat contains only the image of a single piece of meat to be tested, and there are no overlapping edges. For the same piece of meat to be tested, its low-energy and high-energy images can be acquired separately. Specifically, X-rays can be emitted onto the surface of the meat to be tested using an emitter to acquire meat images, and the X-rays passing through the meat can be received by a dual-energy detector. Specifically, the dual-energy detector can be two layers of detectors arranged vertically, including a low-energy detector for acquiring low-energy data and a high-energy detector for acquiring high-energy data. Thus, X-rays can be emitted onto the meat to be tested in a single burst using an emitter, and the low-energy and high-energy detectors can simultaneously acquire the X-rays, determining the low-energy and high-energy images of the image. The meat to be tested is irradiated with X-rays, and the X-rays passing through the meat are received by a low-energy detector, thereby obtaining a low-energy image of the meat. Alternatively, the meat to be tested can be irradiated with X-rays, and the X-rays passing through the meat can be received by a high-energy detector, thereby obtaining a high-energy image of the meat.
[0021] Step S120: Denoising the low-energy image to determine the low-energy processed image. Denoising the low-energy image distinguishes the background from the meat portion, highlighting the meat's image information. Determining the low-energy processed image through denoising also allows the grayscale values of residual bone fragments and cartilage within the meat to be differentiated from the meat tissue, increasing the grayscale difference between the foreign matter and the meat tissue, thus facilitating subsequent image recognition and sorting.
[0022] Step S130: Denoising the high-energy image to determine the high-energy processed image. Denoising the high-energy image distinguishes the background from the meat portion, highlighting the meat's image information. Determining the high-energy processed image through denoising also allows the grayscale values of residual bone fragments and cartilage within the meat to be differentiated from the meat tissue, increasing the grayscale difference between the two and facilitating subsequent image recognition and sorting.
[0023] Step S140: Fit the low-energy processed image to determine the fitted image. The fitting of the low-energy processed image is based on fitting parameters, which are determined based on images of meat without foreign objects. Data fitting can be performed based on the low-energy processed image, and the data can be fitted in a linear or non-linear manner. Specifically, pre-set boneless meat images can be used as sample data to determine the fitted image from the low-energy processed image.
[0024] Step S150: Determine the target image based on the low-energy image, the low-energy processed image, the high-energy processed image, and the fitted image. The target image can be determined based on the initial low-energy image, the low-energy processed image after noise reduction, the high-energy processed image after noise reduction, and the fitted image. Compared to the low-energy and high-energy images, the grayscale of foreign tissues such as bone and cartilage in the target image is more prominent than that of meat tissue, which can effectively improve the accuracy of subsequent meat identification and classification.
[0025] According to the image preprocessing method provided in this embodiment, based on X-rays and a dual-energy detector, low-energy and high-energy images of the same piece of meat to be tested can be acquired separately. Noise reduction processing is then performed on both low-energy and high-energy images to effectively distinguish the meat area from the image background, while enhancing the grayscale difference between foreign matter tissue and meat tissue. Based on this, a fitted image conforming to the characteristics of normal meat tissue is constructed by fitting the low-energy processed image to an image of meat without foreign matter, thereby highlighting areas in the low-energy processed image that deviate from the fitted features. Furthermore, the target image is determined by combining the low-energy image, low-energy processed image, high-energy processed image, and fitted image, making the grayscale characteristics of foreign matter tissues such as bone and cartilage more obvious in the target image compared to meat tissue. This effectively alleviates the problem in existing technologies where meat tissue and cartilage tissue are difficult to distinguish due to their similar grayscale values, reduces missed and false detections of cartilage and small-sized bone, improves the accuracy of subsequent detection and identification of foreign matter tissue in meat, and thus enhances the reliability of meat quality inspection and sorting.
[0026] In some embodiments, such as Figure 2 As shown, step S140, fitting the low-energy processed image to determine the fitted image, may include steps S141 and S142.
[0027] Step S141: Obtain the fitting parameters. First, the fitting parameters can be determined based on pre-acquired samples. The fitting parameters can be determined based on multiple images of boneless meat. Therefore, it is possible to predict the grayscale value of the corresponding high-energy processed image when there are no foreign objects such as bones in the low-energy processed image. Specifically, 500 dual-energy image data of chicken leg meat without foreign objects can be used for data fitting to determine the grayscale relationship between the low-energy processed image and the high-energy processed image. The fitting formula can be obtained as follows: Where x can be information from the low-energy processed image. Based on the aforementioned dual-energy image data, the values of fitting parameters a, b, and c can be determined. Parameter a can be greater than or equal to 0.1 and less than or equal to 0.5; parameter b can be greater than or equal to 0.4 and less than or equal to 0.8; parameter c can be greater than or equal to -0.1 and less than 0. Specifically, in one embodiment, the fitting formula can be:
[0028] Step S142: Based on the fitting parameters, fit the low-energy processed image to determine the fitted image. According to the fitting parameters and the fitting formula determined after data fitting, the low-energy processed image can be fitted based on the fitting parameters to determine the predicted value of the high-energy processed image corresponding to this low-energy processed image, i.e., the fitted image. The fitted image can be the predicted value of the high-energy processed image corresponding to the low-energy processed image, assuming no foreign tissue such as bone is present in the meat. Therefore, based on the difference between the fitted image and the actually acquired and denoised high-energy processed image, it can be determined whether there is cartilage, bone, or other foreign tissue in the corresponding region of the meat image acquired based on high-energy rays.
[0029] According to the image preprocessing method provided in this embodiment, in step S141, the grayscale mapping relationship between the low-energy processed image and the high-energy processed image is determined using multiple dual-energy image samples of boneless meat, thereby obtaining fitting parameters and fitting formulas that can reflect the dual-energy response characteristics of normal meat tissue. Since the fitting parameters are obtained statistically based on a large amount of boneless meat sample data, they can accurately characterize the intrinsic correspondence between the low-energy processed image and the high-energy processed image in the absence of foreign tissues such as cartilage and bone. Therefore, they can effectively reduce the influence of factors such as meat thickness variation and uneven tissue distribution on grayscale changes, improving the stability and reliability of the prediction results. By comparing and analyzing the fitted image with the actual acquired and denoised high-energy processed image, when there is a significant deviation between the two, it can effectively characterize the presence of foreign tissues such as cartilage and bone in the corresponding area. Compared to making judgments based on a single high-energy or low-energy image, this method can utilize the difference information between dual-energy images to make foreign tissues such as cartilage, whose grayscale is similar to that of meat tissue in a single-energy image, stand out more in the differential features. This significantly reduces the probability of missed and false detections of cartilage and improves the accuracy and robustness of detecting residual foreign tissues in meat.
[0030] In some embodiments, such as Figure 3 As shown, step S150, which determines the target image based on the low-energy image, the low-energy processed image, the high-energy processed image, and the fitted image, may include steps S151 and S152.
[0031] Step S151: Determine the difference image by performing a difference between the fitted image and the high-energy processed image. First, the difference between the fitted image and the high-energy processed image can be performed. That is, the pixels in the fitted image and the high-energy image are mapped one-to-one, and the gray level difference between the corresponding pixel in the fitted image and the corresponding pixel in the high-energy processed image is calculated. This determines the gray level difference for each corresponding pixel, and the difference image is determined based on the gray level differences of all pixels. Specifically, the difference image can be determined based on the formula shown below. Based on the difference image, the difference between the actual high-energy processed image and the high-energy processed image predicted based on the low-energy processed image under the premise of no foreign matter can be determined. This allows for a more accurate and faster determination of whether foreign matter such as bones exists in the image. Specifically, when the gray level value in the difference image determined by the above formula is small and close to 0, it can be determined that the meat material in the corresponding area where the gray level value in the difference image is close to 0 does not contain foreign matter such as bones. When the gray level value in the difference image is large, it can be determined that the meat material may contain foreign matter in this area.
[0032] Step S152: Fusing the low-energy image, the low-energy processed image, and the difference image to determine the target image. The target image can be determined by fusing the low-energy image, the low-energy processed image after noise reduction, and the difference image determined by the high-energy processed image and the fitted image. Specifically, the target image can be determined by fusing the grayscale values of the low-energy image, the low-energy processed image, and the difference image. This result can be a pseudo-color image. The pixel values in the low-energy image, the low-energy processed image, and the difference image can be used as indices to map to predefined colors in a color lookup table, thereby generating rich color representations. This effectively improves the detection accuracy of residual foreign matter in the target image.
[0033] According to the image preprocessing method provided in this embodiment, by performing pixel-by-pixel difference processing on the fitted image and the high-energy processed image in step S151, the difference information between the actual high-energy processed image and the high-energy image predicted under the assumption of no foreign body tissue can be determined. Since the fitted image reflects the theoretical grayscale distribution of the high-energy image under the condition of only meat tissue, when there is no foreign body tissue such as cartilage or bone inside the meat, the grayscale value of the corresponding area in the difference image approaches zero; however, when there is foreign body tissue such as cartilage or bone inside the meat, due to the difference in the absorption characteristics of high-energy rays between the foreign body tissue and the meat tissue, the actual high-energy processed image and the fitted image will have a significant deviation in the corresponding area, resulting in a significant increase in the grayscale value of the corresponding area in the difference image. Therefore, the difference image can effectively suppress the grayscale interference of the meat tissue itself, making the features of the foreign body tissue more prominent in the image, thereby reducing the risk of foreign bodies such as cartilage being submerged in the complex background of meat tissue and improving the sensitivity and accuracy of foreign body detection. In step S152, by fusing the low-energy image, the low-energy processed image, and the differential image, the system can comprehensively utilize the low-energy image's ability to represent the overall structure of meat, the low-energy processed image's enhancement effect on meat, background, and tissue details, and the differential image's ability to highlight foreign matter tissues, thereby generating a target image with richer information. By fusing multi-source image information and expressing it in the form of a pseudo-color image, meat tissues that are originally difficult to distinguish in grayscale space, as well as foreign matter tissues such as cartilage and bone, can be mapped to regions with obvious color differences, making foreign matter tissues more intuitive and conspicuous in the target image. This not only reduces the dependence of subsequent image recognition algorithms on complex threshold settings but also significantly improves the detection rate of small bone fragments and cartilage tissues with grayscale similar to meat tissues, reducing false positives and false negatives, thereby effectively improving the overall accuracy and reliability of meat quality detection and sorting processes.
[0034] In some embodiments, such as Figure 4As shown, step S151, which involves performing a difference analysis between the fitted image and the high-energy processed image to determine the difference image, may include steps S1511 and S1512.
[0035] Step S1511: Subtract the corresponding grayscale values of the fitted image and the high-energy processed image to determine the difference data. This can be done by mapping the pixels of the fitted image and the high-energy processed image one-to-one, and then subtracting the corresponding grayscale values of the fitted image and the high-energy processed image using the following formula to determine the difference data:
[0036] in, It describes the gray values in the difference image, that is, the gray values of the corresponding pixels in the difference data. This represents the grayscale value of the fitted image. This represents the grayscale value of the high-energy processed image. By subtracting the corresponding grayscale values of the fitted image from those of the high-energy processed image, the difference data can be determined. This allows us to ascertain the difference in grayscale values between the fitted image and the actual high-energy processed image, thereby determining whether foreign tissue such as bone exists in the corresponding region of the current difference image.
[0037] Step S1512: Based on the differential data, grayscale normalization is performed to determine the differential image. This can be based on the difference between the fitted image determined in step S1511 and the actual high-energy processed image, i.e., the differential data. Grayscale normalization of the differential data maps the grayscale values in the determined differential data to a unified standard range according to certain rules. The differential data is determined by subtracting the grayscale values of the fitted image and the high-energy processed image. Since the grayscale values of the fitted image and the high-energy processed image are not at the same scale, grayscale normalization ensures that all grayscale values in the differential data are at the same scale, thereby reducing the grayscale scale difference in the differential image and enhancing the contrast of effective features, i.e., the contrast and clarity of parts containing foreign tissues such as bones in the meat image in the differential image. This further improves the stability and reliability of subsequent meat quality detection.
[0038] According to the image preprocessing method provided in this embodiment, the gray values of the fitted image and the high-energy processed image are subtracted pixel-by-pixel. This gray-level difference method effectively suppresses gray-level interference caused by variations in the thickness of the meat tissue itself, allowing foreign tissues such as cartilage and bone to be prominently represented in the differential data, thereby improving the distinguishability of foreign tissues. By performing gray-level normalization on the differential data, the differential gray values, which originally had inconsistent distribution ranges and large scale differences, can be mapped to a unified standard gray-level range, thus eliminating the influence introduced by the difference in gray-level scale between the fitted image and the high-energy processed image. Therefore, the differential image can have higher stability and consistency in subsequent image fusion, feature extraction, and recognition processes, reducing false detections or false negatives caused by gray-level fluctuations, thereby improving the reliability and accuracy of the meat quality detection process.
[0039] In some embodiments, such as Figure 4 , Figure 7 As shown, step S152, fusing the low-energy image, the low-energy processed image, and the differential image to determine the target image, may include steps S1521 and S1522.
[0040] Step S1521 involves performing pyramid enhancement processing on the low-energy image, the low-energy processed image, and the difference image separately. Because the target size may be small (i.e., small foreign matter regions exist in the image), it can be difficult to detect these regions. Furthermore, directly fusing the low-energy image, low-energy processed image, and difference image may lead to interference between target features at different scales, and the features of small foreign matter regions may be masked by background information or large-scale structures, resulting in insufficient contrast in the fused foreign matter region and poor accuracy and stability in subsequent detection. Therefore, by performing pyramid enhancement processing on the low-energy image, low-energy processed image, and difference image separately, the image can be decomposed into different spatial scales, each corresponding to structural information of different sizes. This allows for enhancement of corresponding features at appropriate scales. Specifically, for small foreign matter, contrast and local details can be enhanced at high-resolution layers. For the contours of foreign matter, pyramid enhancement processing can improve the clarity and contrast of the contours.
[0041] Step S1522 involves fusing the enhanced low-energy image, the low-energy processed image, and the difference image to determine the target image. By fusing the pyramid-enhanced low-energy image, the low-energy processed image, and the difference image, effective features at different scales are preserved and enhanced, thereby improving the contrast and detectability of small foreign matter regions in the target image and reducing the interference of background information on the detection results. Figure 8As shown, specifically, low-energy images, low-energy processed images, and differential images can be fused to determine pseudo-color images, which can further enhance the visual discrimination of the area where the foreign body tissue is located, so as to facilitate the annotation of sample images and the training of models.
[0042] According to the image preprocessing method provided in this embodiment, pyramid enhancement can highlight the local details of minute foreign body tissues in high-resolution layers and enhance the overall contour and structural information of foreign body tissues in low-resolution layers. This effectively avoids the problem of the features of minute foreign body tissues being submerged by background noise, improves the contrast of foreign body tissues in the image, and facilitates the detection of foreign body tissue regions during subsequent model training and recognition. By fusing the low-energy image after pyramid enhancement, the low-energy processed image, and the difference image, effective features extracted from different energy information, different processing stages, and different scales can be comprehensively expressed. This allows the target image to simultaneously possess the structural information sensitive to soft tissues in the low-energy image, the meat region features enhanced by noise reduction in the low-energy processed image, and the differential features highly sensitive to foreign body tissues such as cartilage and bone in the difference image. Through the fusion of multi-source and multi-scale features, the contrast and salience of foreign body tissue regions in the target image can be significantly enhanced, while suppressing the interference of meat tissue background and noise information, thereby improving the detectability and stability of foreign body tissues in the target image. It effectively improves the detection accuracy of tiny foreign matter in meat images, reduces the risk of false positives and false negatives, and further enhances the reliability and stability of meat quality inspection and sorting processes.
[0043] In some embodiments, the pyramid enhancement process employs a five-layer Laplacian pyramid enhancement, with gains of 2.0, 1.5, 1.2, 1.0, and 0.8. Pyramid enhancement can be performed separately on the low-energy image, the low-energy processed image, and the difference image, all using a five-layer Laplacian pyramid enhancement. A five-layer pyramid decomposition is performed on the low-energy image, the low-energy processed image, and the difference image, with different gain coefficients applied to each layer for enhancement. The image is then reconstructed to simultaneously enhance both global contours and local details. Specifically, a five-layer Laplacian pyramid decomposition is performed on the low-energy image, the low-energy processed image, and the difference image to obtain corresponding multi-scale Laplacian components. The high-resolution layers primarily represent the detailed information and microstructural features in the image, while the low-resolution layers primarily represent the overall contours and background trend information in the image. During the pyramid enhancement process, different enhancement gains are applied to the Laplacian components at different scales. A larger enhancement gain is applied to high-resolution layers to enhance the contrast of small foreign matter areas and detailed features; a medium enhancement gain is applied to medium-resolution layers to maintain the continuity of the target structure; and a smaller enhancement gain, close to 1, is applied to low-resolution layers to avoid over-amplification of background information. Specifically, the gains for Laplacian pyramid enhancement are 2.0, 1.5, 1.2, 1.0, and 0.8. Subsequently, the enhanced Laplacian components of each layer are reconstructed to obtain the enhanced low-energy image, the low-energy processed image, and the difference image, thereby achieving coordinated enhancement of global contours and local details while suppressing noise.
[0044] In some embodiments, such as Figure 5 As shown, step S120, which involves denoising the low-energy image and determining the low-energy processed image, may include steps S121 and S122.
[0045] Step S121: Perform threshold smoothing on the low-energy image. First, threshold smoothing can be performed on the low-energy image. Specifically, a 3×3 rectangular window can be used to smooth the grayscale values of the low-energy image. Mean smoothing is performed to eliminate minor noise. Specifically, it can be determined according to the following formula;
[0046] Therefore, the grayscale information of the low-energy image after threshold smoothing can be determined. .
[0047] Step S122: Perform a logarithmic transformation on the low-energy image after threshold smoothing to determine the low-energy processed image. The reason for performing a logarithmic transformation on the X-ray transmission data is that the detector receives an exponentially decaying raw signal. The logarithmic transformation converts the signal into one that has a linear relationship with the material properties, facilitating material identification and composition analysis. Specifically, the intensity decay follows the Beer-Lambert law, which can be used to determine the intensity I of the X-ray after penetrating the material, as shown in the following formula:
[0048] The initial intensity of low-energy rays during image acquisition; The mass decay coefficient of the substance is expressed in cm² / g and is a function of the X-ray energy E. t represents the density of the substance, in g / cm³; t represents the thickness of the substance, in cm.
[0049] Logarithmic enhancement can be performed on low-energy images after threshold smoothing, where the linear array space value can be set as the base. As shown in the following formula, the information of the low-energy processed image can be determined. :
[0050] Therefore, by performing logarithmic enhancement on the low-energy image after threshold smoothing, it is possible to effectively avoid oversaturation of high-density areas in the low-energy image, while amplifying low-contrast areas, namely the grayscale difference between cartilage and meat tissue.
[0051] According to the image preprocessing method provided in this embodiment, by performing threshold smoothing on low-energy images, high-frequency random noise introduced by ray statistical fluctuations, detector noise, or scanning environment can be effectively suppressed, making the image background smoother and more stable. Simultaneously, this smoothing process can reduce drastic fluctuations in pixel-level grayscale without significantly weakening the main structure of meat and the contour information of foreign matter tissues, thereby reducing the risk of misjudgment caused by noise amplification in subsequent image processing. This provides a more stable and reliable input image basis for subsequent logarithmic transformation and image fitting, improving the robustness of the overall image preprocessing workflow. By performing logarithmic transformation on the low-energy images after threshold smoothing, the problem of high-density areas, such as thick meat tissue with high grayscale, can be effectively suppressed, preventing high grayscale areas from obscuring detailed information. At the same time, logarithmic transformation can significantly amplify the grayscale differences in low-grayscale and low-contrast areas, making the grayscale features of foreign matter tissues such as cartilage tissue and small bone fragments more prominent than those of meat tissue in low-energy images. Therefore, by combining threshold smoothing and logarithmic transformation, noise interference in low-energy images can be reduced, while grayscale contrast between meat tissue and foreign tissues such as cartilage and bone can be enhanced. This allows the low-energy processed image to maintain overall structural information stability while significantly improving the detection accuracy of foreign tissues. Consequently, higher-quality feature inputs can be provided for subsequent differential calculations, image fusion, and target image generation, effectively reducing the probability of missed or false detections of cartilage and improving the accuracy and reliability of meat quality detection.
[0052] In some embodiments, such as Figure 6 As shown, step S130, which involves denoising the high-energy image and determining the high-energy processed image, may include the following steps.
[0053] Step S131: Perform Gaussian filtering on the high-energy image. First, Gaussian filtering can be applied to the high-energy image to reduce noise. Specifically, a 5×5 kernel Gaussian filter with a standard deviation σ=1.5 can be used to filter the high-energy image. Filtering is performed to suppress quantum noise and system noise while preserving the structural contours of bone or cartilage. This allows for the determination of the high-energy image after Gaussian filtering. .
[0054] Step S132: Perform logarithmic smoothing on the high-energy image after Gaussian filtering to determine the high-energy processed image. Logarithmic transformation can be performed on the high-energy image after Gaussian filtering, where the linear array empty value can be set as the base. As shown in the following formula, the information of the high-energy processed image can be determined. :
[0055] Therefore, by performing logarithmic transformation on the high-energy image after Gaussian filtering, the edge features of tiny foreign objects can be effectively enhanced.
[0056] According to the image preprocessing method provided in this embodiment, Gaussian filtering can effectively suppress quantum noise and system noise generated during high-energy X-ray imaging, reducing the interference of random noise and local gray-level fluctuations in high-energy images on subsequent processing. Simultaneously, the Gaussian filter configured with these parameters smooths noise while effectively preserving the structural contour information of high-density foreign body tissues such as bone and cartilage, avoiding excessive smoothing that could lead to blurred edges or loss of detail. This provides a more stable and reliable high-energy image foundation for subsequent differential calculations and foreign body detection. By performing logarithmic smoothing on the Gaussian-filtered high-energy image in step S132, and introducing a logarithmic transformation method based on the linear array space correction value, nonlinear compression and remapping of the gray-level distribution of the high-energy image can be achieved. Logarithmic transformation can effectively suppress the dynamic range of high-grayscale regions in high-energy images, making the grayscale changes in high-density meat tissue regions smoother and avoiding interference with foreign body detection. On the other hand, logarithmic transformation can amplify the grayscale differences in low-grayscale and low-to-medium contrast regions, thereby enhancing the edge response and structural contrast of foreign bodies such as cartilage tissue and small-sized bone fragments in high-energy images. Therefore, through the synergistic effect of Gaussian filtering and logarithmic smoothing, the edge features and structural information of foreign body tissue in high-energy images can be highlighted while effectively reducing noise interference. This allows the high-energy processed image to have stronger foreign body sensitivity while maintaining overall structural stability. This not only facilitates subsequent difference calculations between the high-energy processed image and the fitted image obtained from the low-energy processed image, but also improves the saliency and reliability of foreign body regions in the difference image, thereby further enhancing the accuracy and stability of detecting foreign body tissues such as cartilage and bone.
[0057] Based on the same inventive concept, this disclosure also provides an image recognition method for recognizing meat images, which may include the following steps.
[0058] Low-energy images of meat are acquired using low-energy X-rays. Firstly, dual-energy images of the meat can be acquired using X-rays and a dual-energy detector. Specifically, the meat can be scanned with X-rays, and the corresponding X-rays are received by a low-energy detector to acquire a low-energy image of the meat. Simultaneously, the corresponding X-rays can be received by a high-energy detector to acquire a high-energy image of the meat. Specifically, the X-ray parameters can be set to 60kV / 4mA, allowing for the acquisition of low-energy images of the meat using the low-energy detector and high-energy images using the high-energy detector.
[0059] Specifically, the meat to be imaged can be placed on a conveyor platform, allowing it to pass through the X-ray imaging area at a constant speed under the conveyor's action, thereby simultaneously acquiring low-energy and high-energy images. Each frame of both low-energy and high-energy images contains only a single piece of meat, facilitating subsequent preprocessing, recognition, and detection of the meat images.
[0060] Based on low-energy and high-energy images, a target image is determined using the image preprocessing method described in any of the foregoing embodiments. The low-energy and high-energy images can be preprocessed according to the image preprocessing method described in any of the foregoing embodiments to determine the target image. The features in the target image are more obvious than those in the low-energy and high-energy images, making it easier and more accurate to determine whether foreign tissues such as cartilage or bone fragments exist in the target image.
[0061] Based on the target image, identify meat images. The target image can be input into a pre-trained model, enabling the model to identify the type of meat in the image and determine the presence of foreign objects such as bones.
[0062] According to the image recognition method provided in this embodiment, dual-energy imaging of meat is performed using both low-energy and high-energy rays to acquire low-energy and high-energy images of the meat, respectively. This allows for the acquisition of information on the differences in the radiation absorption characteristics of meat tissue and foreign body tissue from different energy dimensions. Compared to methods that acquire meat images based solely on single-energy rays, dual-energy imaging provides a richer and more complementary image information foundation for subsequent image processing and recognition, offering favorable conditions for distinguishing meat tissue from foreign body tissues such as cartilage and bone fragments. By inputting the acquired low-energy and high-energy images into the image preprocessing method described in any of the aforementioned embodiments, the feature expression of foreign body tissues in the meat image can be effectively enhanced. Through noise reduction, fitting, difference, and multi-image fusion processing of the low-energy and high-energy images, foreign body tissues such as cartilage and bone in the target image can be made more prominent in terms of grayscale distribution, contrast, and spatial features compared to meat tissue. This effectively reduces the interference of meat tissue thickness variations on the recognition results and lowers the risk of false detection and false negative detection due to similar grayscale levels. When performing meat image recognition based on target images, compared to directly using raw low-energy or high-energy images as recognition input, the target images used in this embodiment have higher feature discrimination and discriminative power. This allows the pre-trained recognition model to more accurately extract key features related to foreign body tissues, improving the model's detection rate of foreign body tissues such as cartilage and small-sized bone fragments, while reducing the false alarm rate. The image recognition method provided in this disclosure can achieve high-accuracy identification of foreign body tissues such as cartilage and bone in deboned meat during meat quality inspection, effectively reducing missed and false detections, improving the accuracy and stability of meat sorting and quality inspection, thereby ensuring the quality of meat products and meeting the application needs of industrialized meat inspection and sorting.
[0063] Based on the same inventive concept, this disclosure also provides a sorting device for executing the image recognition method as described in any of the foregoing embodiments to identify meat images. By integrating and executing the image recognition method provided in any of the foregoing embodiments into the sorting device, the sorting device can achieve high-precision identification and discrimination of meat images during the meat sorting process. This sorting device can generate target images based on low-energy and high-energy images acquired by X-rays and low-energy and dual-energy detectors, combined with image preprocessing methods, making the features of meat tissue and foreign matter such as cartilage and bone fragments more prominent in the target image. Because the target image undergoes noise reduction, fitting, difference, multi-scale enhancement, and fusion processing, the differences in grayscale distribution, edge features, and spatial structure of foreign matter are significantly amplified, enabling the sorting device to more accurately identify the presence of residual foreign matter such as cartilage and bone in the meat when executing the image recognition method. Compared to traditional sorting devices based on single-energy images or simple image processing methods, the sorting device in this embodiment can effectively reduce the probability of missed or false detections of cartilage, improving the accuracy and consistency of meat quality detection and sorting results. The sorting equipment provided in this disclosure enables highly reliable identification and sorting of foreign tissues such as cartilage and bone in deboned meat in industrial meat inspection and sorting scenarios, effectively improving the quality of meat products and meeting the application requirements of meat processing production lines for high-precision and high-efficiency quality inspection.
[0064] This application uses specific terms to describe embodiments of the application. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of the application. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, certain features, structures, or characteristics in one or more embodiments of the application can be appropriately combined.
[0065] In the context of this application, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0066] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of the present application requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.
[0067] The basic concepts have been described above. Obviously, for those skilled in the art, the above disclosure is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore remain within the spirit and scope of the embodiments of this application.
Claims
1. An image preprocessing method for preprocessing meat images, wherein, The image preprocessing method includes: Acquire low-energy and high-energy images of meat; The low-energy image is subjected to noise reduction processing to determine the low-energy processed image; The high-energy image is subjected to noise reduction processing to determine the high-energy processed image; The low-energy processed image is fitted to determine the fitted image, wherein the fitting of the low-energy processed image is based on fitting parameters, which are determined based on meat images without foreign objects. The target image is determined based on the low-energy image, the low-energy processed image, the high-energy processed image, and the fitted image.
2. The image preprocessing method according to claim 1, wherein, The step of fitting the low-energy processed image to determine the fitted image includes: Obtain the fitting parameters; Based on the fitting parameters, the low-energy processed image is fitted to determine the fitted image.
3. The image preprocessing method according to claim 1, wherein, The step of determining the target image based on the low-energy image, the low-energy processed image, the high-energy processed image, and the fitted image includes: The difference image is determined by performing a difference analysis between the fitted image and the high-energy processed image; The target image is determined by fusing the low-energy image, the low-energy processed image, and the differential image.
4. The image preprocessing method according to claim 3, wherein, The step of determining the difference image by performing difference analysis between the fitted image and the high-energy processed image includes: The difference data is determined by subtracting the corresponding gray values of the fitted image from those of the high-energy processed image. Based on the differential data, grayscale normalization is performed to determine the differential image.
5. The image preprocessing method according to claim 3, wherein, The process of fusing the low-energy image, the low-energy processed image, and the difference image to determine the target image includes: Pyramid enhancement processing is performed on the low-energy image, the low-energy processed image, and the difference image, respectively. The enhanced low-energy image, the low-energy processed image, and the differential image are fused to determine the target image.
6. The image preprocessing method according to claim 5, wherein, The pyramid enhancement process employs a five-layer Laplacian pyramid enhancement, with gains of 2.0, 1.5, 1.2, 1.0, and 0.
8.
7. The image preprocessing method according to claim 1, wherein, The step of denoising the low-energy image and determining the low-energy processed image includes: The low-energy image is subjected to threshold smoothing. The low-energy image after threshold smoothing is subjected to logarithmic transformation to determine the low-energy processed image.
8. The image preprocessing method according to claim 1, wherein, The step of denoising the high-energy image to determine the high-energy processed image includes: The high-energy image is subjected to Gaussian filtering. The high-energy image after Gaussian filtering is smoothed by logarithmic processing to determine the high-energy image.
9. An image recognition method for recognizing meat images, wherein, The image recognition method includes: Low-energy images of meat are acquired using low-energy rays; High-energy images of meat are acquired using high-energy rays; Based on the low-energy image and the high-energy image, the target image is determined by the image preprocessing method as described in any one of claims 1-8; Based on the target image, the meat image is identified.
10. A sorting device for performing the image recognition method as described in claim 9 to identify meat images.