Titanium scrap impurity sorting monitoring method based on image processing

CN122265984BActive Publication Date: 2026-08-11BAOJI BOYUTAI SPECIAL METAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]为解决上述背景技术中提出的目标分割与杂质识别准确性不高的问题,本发明提供如下方案

Benefits of technology

本发明通过在图像增强阶段引入随像素局部反光特性及其与整体亮度分布偏离程度动态变化的自适应调节机制,使多尺度处理过程中的平滑强度能够根据不同区域的光照与结构差异进行灵活调整,从而在高反光区域有效抑制过强光照带来的细节淹没问题,同时在亮度相对均衡区域保持适度增强以避免信息失真,显著提升图像整体的亮度均衡性与细节表达能力;进一步结合对局部邻域亮度变化一致性与梯度结构信息的综合刻画,使高光扩散特性能够更准确反映真实反射强度与结构复杂程度,从而增强对复杂金属表面光学特征的区分能力。在此基础上,通过自适应阈值分割与形态学处理相结合的方式,有效提升候选区域提取的完整性与抗噪能力,并借助连通域分析与形状特征约束实现对规则钛屑与非规则杂质的差异化判别,从而降低误检与漏检概率。最终结合空间位置信息实现精准剔除控制,使整个分拣流程在复杂光照与多干扰背景条件下仍具备较高的稳定性、鲁棒性与工程适用性,有效提升钛屑杂质分拣监控的自动化水平与检测可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265984B_ABST
    Figure CN122265984B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing technology, specifically to a method for monitoring and sorting titanium scrap impurities based on image processing. The method includes: acquiring an original image of a titanium scrap conveyor belt; enhancing the original image using an improved multi-scale Retinex algorithm to obtain an enhanced original image; and sorting impurities from the enhanced original image. The improved multi-scale Retinex algorithm includes standard deviation. This invention solves the problem of low accuracy in target segmentation and impurity identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method for sorting and monitoring titanium scrap impurities based on image processing. Background Technology

[0002] With the application of titanium alloy materials in aerospace, military manufacturing, and high-end equipment, a large amount of titanium shavings of various shapes are generated during the cutting, grinding, and forming processes. These titanium shavings usually need to be sorted during recycling to remove impurities and ensure the purity and performance stability of the recycled materials. In actual industrial production environments, titanium shavings are often continuously transported by conveyor belts, exhibiting stacking, overlapping, and random distribution during transport. They may also contain other metal fragments, oxide residues, and non-metallic impurities, making the sorting process highly complex and unpredictable.

[0003] In the image processing-based titanium scrap impurity sorting process, image quality directly affects the subsequent segmentation and recognition results. Due to the strong metallic reflectivity of titanium scrap surfaces, they are easily affected by changes in ambient lighting during actual acquisition, resulting in a distinct distribution of alternating highlight and shadow areas in the image. This complex lighting distribution not only compresses the effective dynamic range of the image but also obscures some details, reducing the contrast between the impurity area and the background, thus increasing the difficulty of subsequent recognition. To address these issues, image enhancement processing is typically required before image analysis to normalize illumination and highlight detailed features. Among numerous image enhancement methods, the multi-scale Retinex algorithm is widely used in industrial visual inspection because it can separate illumination and reflection components to a certain extent, thereby improving the overall visual effect and local detail representation of the image. This algorithm processes the image at different scales and fuses the results from each scale, thus balancing global brightness balance and local detail enhancement, demonstrating good applicability in general scenarios.

[0004] However, in the application scenario of titanium scrap impurity sorting, which has strong reflective properties and complex texture structure, the existing multi-scale Retinex algorithm usually constructs Gaussian filters of different scales by setting multiple fixed standard deviations to estimate the illumination components of the image. However, since each standard deviation remains unchanged throughout the entire image range, the algorithm is difficult to adaptively adjust according to the actual characteristics of different regions when processing images with uneven brightness distribution or strong reflective properties. It is prone to detail suppression in highlight areas and insufficient enhancement in low brightness areas, resulting in low accuracy of subsequent target segmentation and impurity identification. Summary of the Invention

[0005] To address the problem of low accuracy in target segmentation and impurity identification mentioned in the background art, the present invention provides the following solution.

[0006] This invention provides a titanium scrap impurity sorting and monitoring method based on image processing, comprising: acquiring an original image of a titanium scrap conveyor belt; enhancing the original image using an improved multi-scale Retinex algorithm to obtain an enhanced original image; and sorting impurities in the enhanced original image; wherein the improved multi-scale Retinex algorithm includes a standard deviation, which is the product of an initial value and an adjustment factor, and the adjustment factor is positively correlated with the specular diffusion degree of the target pixel and the difference between the target pixel and the mean brightness of all pixels in the original image; the specular diffusion degree characterizes the reflectivity of the target pixel, and the target pixel is any pixel in the original image.

[0007] The aforementioned technical solution transforms the smoothing scale in the image enhancement process from a fixed setting to an adaptive form that dynamically changes according to the local reflectivity of pixels and their deviation from the overall brightness distribution. This allows the algorithm to automatically adjust the processing intensity for different lighting conditions, thereby appropriately enhancing the ability to suppress light in highly reflective areas while preserving key structural details. At the same time, it maintains a relatively soft processing effect in areas where the brightness is close to overall balance or deviates only slightly, avoiding detail distortion caused by over-enhancement. This effectively improves the problems of excessive highlight suppression or insufficient local enhancement that traditional methods often encounter in complex metallic reflection scenes, improves the overall brightness balance and detail expression of the image, and further enhances the separability between subsequent impurity areas and the background, thereby improving the accuracy, stability, and robustness of sorting and recognition.

[0008] Furthermore, pixels Regulatory factors for: , For pixels The degree of highlight diffusion, This represents the average highlight diffusion across all pixels in the original image. For pixels brightness value, This is the average brightness value of all pixels in the original image.

[0009] The above technical solution couples the relative strength of a target pixel in its local specular diffusion characteristics with its deviation from the global brightness distribution, thereby achieving adaptive adjustment of the processing intensity of different pixels. This allows for appropriate enhancement of the processing response in areas with high overall specular diffusion levels, while further amplifying the adjustment range in areas where the local brightness differs significantly from the overall balance. This forms a dynamic adjustment mechanism that takes into account both local features and global statistical information. As a result, it effectively avoids the problems of over-enhancement or under-enhancement caused by fixed processing intensity, making the image enhancement process more closely match the actual changes in illumination distribution. In scenes with complex reflections and uneven brightness, it improves the ability to preserve details and overall visual consistency, and further enhances the stability and accuracy of subsequent target segmentation and anomaly recognition.

[0010] Furthermore, pixels Highlight diffusion for: , For pixels brightness value, In pixels Pixels within the set neighborhood of the center brightness value, The total number of pixels within the defined neighborhood. For pixels The mean of the discrete gradient in the neighborhood, In pixels The average gradient magnitude of all pixels within a defined neighborhood of the center. These are the preset hyperparameters.

[0011] The aforementioned technical solution comprehensively considers the brightness level of the target pixel itself, the consistency of the brightness change direction in its neighborhood, and the relationship between local brightness differences and the intensity of structural changes. This allows the characterization of highlight areas to not only rely on single brightness information but also reflect the dominance and diffusion trend of brightness. Based on this, it constrains areas of drastic local changes, thereby avoiding misclassification of edges or areas with strong textures as highlight areas. As a result, it can more accurately distinguish between real highlights and structural details under complex lighting conditions, enhancing the ability to identify highlight areas while suppressing the influence of noise and local abnormal fluctuations, making the overall result more stable. This is beneficial for improving the accuracy and reliability of subsequent image enhancement, region segmentation, and impurity identification processes.

[0012] Furthermore, pixels neighborhood discrete gradient mean for: ;in, , For pixels brightness value, In pixels Pixels within the set neighborhood of the center brightness value, The total number of pixels within the defined neighborhood.

[0013] The above technical solution extracts the dominant trend of brightness change in a local area by uniformly encoding and statistically analyzing the direction of brightness change in the neighborhood of the target pixel. This makes the result more focused on whether the overall brightness tends to increase or decrease, while weakening the influence of the specific difference magnitude on the result. This can effectively reduce the interference of random noise or local abnormal fluctuations on the judgment result, maintain a stable response in areas with weak texture or relatively uniform brightness, and still reflect the difference in consistency of change in areas with obvious structural transitions. This improves the perception ability of boundary and structural changes and provides a more robust and discriminative feature basis for subsequent image analysis.

[0014] Furthermore, the impurity sorting specifically involves: performing binarization and morphological operations on the enhanced original image to obtain candidate regions; performing connected component analysis on the candidate regions to obtain shape features; filtering out impurity regions and their corresponding spatial location information based on the shape features; and performing impurity removal operations based on the spatial location information.

[0015] The aforementioned technical solution introduces a hierarchical region extraction and discrimination mechanism based on image enhancement. First, threshold segmentation is used to initially separate the target region from the complex background. Then, morphological operations are combined to structurally repair edge breaks, missing holes, and noise interference, thereby obtaining candidate regions with stronger continuity and higher anti-interference capabilities. Furthermore, connected component analysis is used to analyze the structural attributes of each independent region, giving it quantifiable morphological description capabilities, thus providing a stable feature foundation for subsequent discrimination. Based on this, a morphological feature screening mechanism is combined to effectively identify abnormal regions, significantly reducing the impact of false background detection and fragment interference, and improving the distinction between targets and impurities. Simultaneously, through precise spatial positioning of impurity regions, the system can directly drive subsequent removal units to complete accurate removal, thus achieving closed-loop control from image perception to physical removal. Overall, this technical solution can improve segmentation stability, recognition accuracy, and execution positioning precision under complex lighting and multi-interference environments, enhancing the system's automation level and engineering reliability.

[0016] Furthermore, raw images of the titanium chip conveyor belt are acquired using a CCD or CMOS camera.

[0017] Furthermore, the defined neighborhood range is 3. 3, 5 5 or 7 7.

[0018] Furthermore, the binarization process employs an adaptive threshold segmentation method.

[0019] Furthermore, the shape features include at least one of aspect ratio, roundness, and area.

[0020] Furthermore, based on the shape features, impurity regions are screened out, specifically by calculating the area, aspect ratio, and circularity of candidate regions. When the area, aspect ratio, and circularity of a candidate region do not meet the preset range, the candidate region is determined to be an impurity region and is removed.

[0021] The above technical solution performs multi-dimensional joint characterization of the geometric structure of the candidate region and establishes constraints from multiple perspectives such as scale characteristics, degree of morphological stretching, and boundary regularity. This allows target recognition to no longer rely on a single feature judgment, but to distinguish normal titanium chips from non-target impurity regions by comprehensively considering morphological consistency, thereby improving the reliability and stability of the judgment. When the candidate region deviates from the typical distribution range of normal targets in terms of the above geometric features, it is regarded as a structurally abnormal region and is eliminated. This can effectively avoid misidentification problems caused by local noise, adhesion, or light interference, while enhancing the ability to suppress irregularly shaped particles and complex background interference, making the sorting results more consistent and accurate, and significantly improving the robustness and engineering applicability of the overall detection system.

[0022] The beneficial effects of this invention are as follows: This invention introduces an adaptive adjustment mechanism during the image enhancement stage that dynamically changes based on the local reflectivity of pixels and their deviation from the overall brightness distribution. This allows for flexible adjustment of the smoothing intensity during multi-scale processing according to the differences in illumination and structure in different regions. This effectively suppresses detail loss caused by excessive illumination in highly reflective areas, while maintaining moderate enhancement in relatively balanced brightness areas to avoid information distortion, significantly improving the overall brightness balance and detail representation of the image. Furthermore, by comprehensively characterizing the consistency of brightness changes and gradient structure information in local neighborhoods, the high light diffusion characteristics can more accurately reflect the true reflection intensity and structural complexity, thereby enhancing the ability to distinguish the optical features of complex metal surfaces. Based on this, the invention effectively improves the completeness and noise resistance of candidate region extraction by combining adaptive threshold segmentation and morphological processing. Finally, it achieves differentiated discrimination between regular titanium chips and irregular impurities through connected component analysis and shape feature constraints, thereby reducing the probability of false positives and false negatives. Ultimately, by combining spatial location information, precise rejection control is achieved, enabling the entire sorting process to maintain high stability, robustness, and engineering applicability under complex lighting and multi-interference background conditions, effectively improving the automation level and detection reliability of titanium scrap impurity sorting and monitoring. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating an image processing-based method for sorting and monitoring titanium scrap impurities according to an embodiment of the present invention; Figure 2 This is a schematic illustration of the original acquired image enhanced under complex lighting conditions according to an image processing-based titanium scrap impurity sorting and monitoring method based on an embodiment of the present invention. Detailed Implementation

[0024] An embodiment of a titanium scrap impurity sorting and monitoring method based on image processing.

[0025] like Figure 1 As shown, a flowchart of an image processing-based titanium scrap impurity sorting and monitoring method according to an embodiment of the present invention includes the following steps: S1: Obtain the raw image of the titanium chip conveyor belt.

[0026] In a preferred embodiment, an image acquisition device is installed above or to the side of the titanium chip conveyor belt to continuously or intermittently acquire images of the titanium chips during the conveying process, thereby obtaining raw image data covering the conveying area.

[0027] Specifically, a high-resolution CCD or CMOS camera is used to acquire raw images of the titanium scrap conveyor belt. In a further embodiment, a ring light source or strip light source can be used to uniformly illuminate the conveyor belt area, reducing the impact of ambient light fluctuations on image quality, enhancing the contrast between the titanium scrap and the background, and making the segmentation of the target area more accurate and reliable in subsequent image processing. The raw images acquired in this way not only have high spatial resolution and grayscale levels, but also maintain good robustness in complex industrial environments, thus providing a high-quality data foundation for subsequent image enhancement, feature extraction, and impurity identification steps, effectively improving the accuracy and stability of the overall detection process.

[0028] like Figure 2 As shown, an embodiment of the present invention provides an image processing-based method for sorting and monitoring titanium scrap impurities, with the original acquired image enhanced under complex lighting conditions.

[0029] S2: The original image is enhanced using the improved multi-scale Retinex algorithm to obtain the enhanced original image.

[0030] In a preferred embodiment, the improved multi-scale Retinex algorithm includes a standard deviation, which is the product of an initial value and an adjustment factor, for each pixel. Regulatory factors for: , For pixels The degree of highlight diffusion, This represents the average highlight diffusion across all pixels in the original image. For pixels brightness value, This is the average brightness value of all pixels in the original image.

[0031] In multi-scale processing, a variable scale parameter is introduced, which is no longer fixed but adaptively adjusted based on the brightness performance and diffusion characteristics of pixels in the global and local contexts. The logic is that, on the one hand, the diffusion performance of a pixel relative to the overall average level is used to characterize its relative intensity in the highlight region; on the other hand, the adjustment range is further corrected by combining the degree of deviation between the pixel and the overall brightness balance. Thus, the scale parameter can simultaneously reflect the highlight distribution characteristics and the brightness imbalance. Based on this approach, the suppression and detail recovery capabilities are enhanced in areas with concentrated highlights or prominent brightness, while over-processing is avoided in areas with relatively stable brightness. This effectively alleviates the problems of over-enhancement or detail loss in traditional methods, thereby improving the overall dynamic range compression effect and visual consistency of the image, while enhancing the ability to preserve image details and the processing stability under complex lighting conditions.

[0032] pixel Highlight diffusion for: , For pixels brightness value, In pixels Pixels within the set neighborhood of the center brightness value, The total number of pixels within the defined neighborhood. For pixels The mean of the discrete gradient in the neighborhood, In pixels The average gradient magnitude of all pixels within a defined neighborhood of the center. The preset hyperparameters are defined with a neighborhood range of 3. 3, 5 5 or 7 7. Of course, you can also set it according to the actual situation.

[0033] By coupling the brightness level of the target pixel itself with the direction consistency of brightness changes in its neighborhood, and introducing the deviation between the target pixel and the average brightness of its neighborhood, as well as the overall gradient strength of the neighborhood, a comprehensive metric that takes into account brightness dominance, local change trends, and structural complexity is obtained. The logic is to use the numerator to highlight the response characteristics of the bright area under a consistent diffusion trend, and to suppress and balance local brightness differences and texture changes through the denominator, so as to avoid misjudgment in strong edges or drastic change areas. This can more accurately distinguish between bright areas caused by light diffusion and areas of real structural change, and maintain good stability and discrimination ability under uniform background and complex texture conditions, thereby effectively improving the accuracy of highlight area recognition and reducing the impact of noise interference on the results.

[0034] pixel neighborhood discrete gradient mean for: ;in, , For pixels brightness value, In pixels Pixels within the set neighborhood of the center brightness value, The total number of pixels within the defined neighborhood.

[0035] By symbolizing the brightness differences between the target pixel and its neighboring pixels within its neighborhood, and averaging the symbol results of all neighboring pixels, a statistical quantity that can characterize the consistency of local grayscale change direction is obtained. The logic is to weaken the influence of specific difference amplitudes and highlight the brightness magnitude rules and trends, making more attention paid to the overall change characteristics within the region, such as whether it is brightening or darkening. The results obtained in this way can effectively suppress amplitude fluctuation interference caused by noise or local anomalies, improve the response stability to real edge structures or texture transitions, and exhibit more consistent distribution characteristics in uniform regions, thereby improving the reliability and robustness of subsequent discrimination in edge detection, region segmentation, or anomaly recognition processes.

[0036] S3: Perform impurity sorting on the enhanced original image.

[0037] In a preferred embodiment, the impurity sorting process specifically includes the following steps: First, the enhanced original image is subjected to adaptive threshold segmentation processing. The segmentation threshold is dynamically determined according to the brightness distribution characteristics of the local area of ​​the image, so that the foreground and background can still be effectively distinguished under complex lighting conditions, avoiding the problem of missegmentation caused by the incompatibility of the global threshold. Building upon this, morphological operations, including opening and closing operations, are further performed on the binarized results to eliminate isolated noise, fill voids within the target region, and smooth region boundaries. This yields candidate regions with continuous structures and clear boundaries, effectively improving the stability and accuracy of subsequent analysis. Subsequently, connected component analysis is performed on the candidate regions. Geometric features are extracted from each connected region, including but not limited to area, aspect ratio, and shape regularity. Through comprehensive analysis of these features, the structural attributes of different regions can be finely characterized, allowing regular targets and anomalous impurities to form distinguishable differences in the feature space.

[0038] Furthermore, based on a pre-defined judgment range, the morphological features of each candidate region are screened. When a candidate region deviates from the typical distribution range of normal targets in terms of area, proportion, or shape regularity, it is judged as an impurity region, and its spatial location information in the image is extracted. Finally, based on the spatial location information, the corresponding actuator is controlled to accurately remove the impurities, thereby achieving automated sorting. This technical solution not only maintains high segmentation accuracy under complex backgrounds and varying lighting conditions but also effectively reduces the interference of noise and false targets on the detection results, improving the reliability and consistency of impurity identification. Furthermore, the combination of spatial positioning for precise removal helps improve overall sorting efficiency and system stability.

[0039] This invention employs a multi-scale image enhancement mechanism that adaptively correlates local reflectivity and global brightness distribution. This allows the smoothing scale to dynamically adjust according to the lighting complexity of the pixel's location, thereby enhancing the suppression of lighting components and preserving key structural details in highly reflective areas, while improving local texture and boundary clarity in low-contrast areas. This avoids the over-enhancement or under-enhancement problems that occur with traditional fixed-parameter processing methods. Simultaneously, by introducing a comprehensive representation based on the consistency of neighborhood brightness change direction and gradient intensity, the characterization of high-light diffusion features becomes more robust, effectively distinguishing between real structural edges and lighting artifacts, thus improving the realism and consistency of the enhancement results. Furthermore, by combining adaptive threshold segmentation, morphological processing, and connected component analysis, the enhanced image is structurally analyzed, optimizing candidate regions in terms of noise suppression and boundary continuity. Shape feature constraints enable effective differentiation between regular titanium chips and abnormal impurities, significantly improving the accuracy and robustness of impurity region identification. This also allows for precise spatial positioning and reliable removal of impurities, ultimately enhancing the stability and engineering applicability of the overall sorting and monitoring system in complex lighting and stacking scenarios.

[0040] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise explicitly specified.

[0041] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. A method for sorting and monitoring titanium scrap impurities based on image processing, characterized in that, include: Obtain the raw image of the titanium chip conveyor belt; The original image is enhanced using an improved multi-scale Retinex algorithm to obtain an enhanced original image, and impurity sorting is performed on the enhanced original image. The improved multi-scale Retinex algorithm includes a standard deviation, which is the product of the initial value and an adjustment factor. The adjustment factor is positively correlated with the specular diffusion of the target pixel and the difference between the target pixel and the mean brightness of all pixels in the original image. The degree of highlight diffusion characterizes the reflectivity of the target pixel, where the target pixel is any pixel in the original image; pixel Regulatory factors for: , For pixels The degree of highlight diffusion, This represents the average highlight diffusion across all pixels in the original image. For pixels brightness value, This is the average brightness value of all pixels in the original image; pixel Highlight diffusion for: , In pixels Pixels within the set neighborhood of the center brightness value, The total number of pixels within the defined neighborhood. For pixels The mean of the discrete gradient in the neighborhood, In pixels The average gradient magnitude of all pixels within a defined neighborhood of the center. These are the preset hyperparameters.

2. The titanium scrap impurity sorting and monitoring method based on image processing according to claim 1, characterized in that, pixel neighborhood discrete gradient mean for: ; in, , For pixels brightness value, In pixels Pixels within the set neighborhood of the center brightness value, The total number of pixels within the defined neighborhood.

3. The titanium scrap impurity sorting and monitoring method based on image processing according to claim 1, characterized in that, The impurity sorting process specifically involves: performing binarization and morphological operations on the enhanced original image to obtain candidate regions, and performing connected component analysis on the candidate regions to obtain shape features. Based on the shape features, impurity regions and their corresponding spatial location information are selected, and impurity removal operations are performed based on the spatial location information.

4. The titanium scrap impurity sorting and monitoring method based on image processing according to claim 1, characterized in that, Use a CCD or CMOS camera to acquire raw images of the titanium chip conveyor belt.

5. The titanium scrap impurity sorting and monitoring method based on image processing according to claim 1, characterized in that, The defined neighborhood range is 3. 3, 5 5 or 7 7.

6. The titanium scrap impurity sorting and monitoring method based on image processing according to claim 3, characterized in that, The binarization process employs an adaptive threshold segmentation method.

7. The titanium scrap impurity sorting and monitoring method based on image processing according to claim 3, characterized in that, The shape features include at least one of aspect ratio, roundness, and area.

8. The titanium scrap impurity sorting and monitoring method based on image processing according to claim 3, characterized in that, Impurity regions are selected based on the shape features, specifically by calculating the area, aspect ratio, and roundness of candidate regions. When the area, aspect ratio, and roundness of candidate regions do not meet the preset range, the candidate regions are determined to be impurity regions and are removed.

Citation Information

Patent Citations

  • Titanium cylinder inner wall defect detection method and system

    CN121305312A

  • Stamping device with automatic waste cleaning structure

    CN218902778U