A method and system for real-time detection of scrap steel impurities

By constructing persistent maps and verifying texture consistency, the problems of missed detection and false detection in scrap steel impurity detection in existing technologies have been solved, achieving efficient identification and accurate screening of impurities with complex shapes, and improving the stability and reliability of detection.

CN121074056BActive Publication Date: 2026-02-17JIANGXI JIANGLING NON-FERROUS METAL DIE-CASTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511632485.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-17
Estimated Expiration
2045-11-10

AI Technical Summary

Technical Problem

Existing real-time detection methods and systems for scrap steel impurities are prone to missed detections or false detections when identifying impurities with complex topological structures and diverse morphologies. Furthermore, they are difficult to quantify abnormal areas and cannot effectively cope with interference from different shapes and materials.

Method used

By acquiring real-time video data of scrap steel surface, gradient intensity and local anisotropy information of the area to be detected are generated, a persistent map is constructed, the generation and disappearance process of topological features is recorded, a topological anomaly score is generated by combining the centroid deviation degree, and the impurity area is confirmed by texture consistency verification.

Benefits of technology

It improves the accuracy of identifying impurities with complex shapes, reduces the false detection and false negative rates, enhances the stability and reliability of detection, and can effectively distinguish between real impurities and non-impurity areas that are similar in appearance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074056B_ABST
    Figure CN121074056B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of industrial vision detection, and discloses a kind of scrap impurity real-time detection method and system, including real-time collection scrap surface video data, slice processing is carried out to video data, and the detection area of scrap piece is generated;Gradient intensity and local anisotropy information of the detection area are extracted, combined to form regional characteristic function, and the sub-region sequence under different threshold values is obtained;The topological characteristics of scrap piece structure are recorded in different sub-regions, the generation and extinction process of topological characteristics is tracked, and the corresponding persistent atlas is constructed;And different topological characteristics are weighted, combined with the deviation degree of topological characteristic centroid and the overall gravity center of detection area, to generate scrap piece topological anomaly score;Based on scrap piece topological anomaly score, all detection areas are sorted, and whether the detection area is an abnormal area is judged, and all abnormal areas are summarized as suspected scrap impurity area;The intelligent level of scrap impurity detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial vision detection, more particularly, the present application relates to a scrap impurity real-time detection method and system. BACKGROUND

[0002] The existing scrap impurity real-time detection method and system mainly have the following problems:

[0003] In the process of scrap recycling and smelting, real-time detection of scrap impurities is an important link to ensure production quality and efficiency. The existing scrap impurity detection method and system are usually based on image processing technology, which identifies impurities by analyzing the local pixel features or regional features of scrap fragments. However, these methods have many problems in practical application:

[0004] Scrap fragments often have complex topological structures, such as connected components, ring structures, holes, and interlaced shapes. Existing methods mainly focus on local features and lack effective modeling and analysis of overall topological structures, making it difficult to comprehensively identify these complex structures and prone to missed detection or false detection, especially for impurities with diverse shapes and irregular boundaries.

[0005] Traditional methods only focus on local pixels or regional features, lack the ability to compare local features with the overall structure of the entire detection area, and cannot quantify abnormal regions. Even if morphological features are used, different topological features cannot be processed, and the importance of long-life topological features cannot be reflected. Some non-impurity regions may be similar to scrap fragments in shape, color, or grayscale, and existing methods may misjudge them as impurities. Existing technologies usually rely only on topological features or pixel value thresholds for judgment, making it difficult to deal with different shapes and materials in complex scrap pile scenes.

[0006] In view of the above problems, the present application proposes a scrap impurity real-time detection method. SUMMARY

[0007] In order to overcome the above-mentioned defects of the prior art, in order to achieve the above-mentioned purpose, the present application provides the following technical scheme: a scrap impurity real-time detection method, comprising:

[0008] S1, real-time acquisition of scrap surface video data, slice processing of the video data to generate a scrap fragment detection area; extract the gradient intensity and local anisotropy information of the detection area, combine to form a regional feature function, and obtain a sub-region sequence under different thresholds;

[0009] S2, record the topological features of the scrap piece structure in different sub-regions, track the generation and disappearance process of the topological features, construct the corresponding persistent atlas, and weight different topological features, combine the deviation degree of the topological feature centroid and the overall gravity center of the to-be-detected region, and generate a scrap piece topological anomaly score;

[0010] S3, based on the scrap piece topological anomaly score, sorting all to-be-detected regions, and judging whether the to-be-detected region is an abnormal region, and collecting all abnormal regions as suspected scrap impurity regions;

[0011] S4, using a texture consistency measurement method, verifying the authenticity of the suspected scrap impurity region, and confirming the real scrap impurity region; according to the spatial coordinate information of the real scrap impurity region, spatial positioning the detected impurities, and determining the spatial position of the impurities in the scrap.

[0012] Specifically, the method for generating the to-be-detected region of the scrap piece comprises:

[0013] Through the industrial camera arranged above the scrap pile area, the surface of the scrap is continuously video collected, and the scrap surface video data is obtained; the collected scrap surface video data is time-sliced in time sequence, and is divided into different continuous time segments, each time segment containing a fixed number of continuous image frames;

[0014] Each frame of image in the time segment is spatially sliced, and the image is divided into different local regions according to the preset number of rows and columns, each local region covering a part of the scrap piece in the image, and the local region is defined as the to-be-detected region of the scrap piece.

[0015] Specifically, the method for extracting the gradient intensity and local anisotropy information of the to-be-detected region comprises:

[0016] For each image pixel point of the to-be-detected region, the gray level change rate of the image pixel point in the horizontal and vertical directions is obtained through the Sobel operator, and the gradient amplitude of the pixel point is calculated; the directional feature of the gray level distribution in the neighborhood of each image pixel point in the to-be-detected region is analyzed, and the local anisotropy information of the to-be-detected region is calculated through the gray level co-occurrence matrix method.

[0017] Specifically, the method for obtaining the sub-region sequence under different threshold values comprises:

[0018] The gradient amplitude and the local anisotropy information are weighted and fused according to a preset weight to obtain a regional feature value of each pixel point, and a regional feature function of the region to be detected is generated; a group of increasing threshold sequences is preset according to the numerical range of the regional feature function, and for each threshold, the pixel points with a regional feature value less than or equal to the threshold are screened out, and the pixel point set screened out for each threshold is counted, that is, a sub-region corresponding to the threshold is formed; the threshold sequences are sequentially traversed from small to large, and a sub-region sequence under different thresholds is formed.

[0019] Specifically, the method for constructing the corresponding persistent atlas comprises:

[0020] The topological features of the scrap steel fragment structure are recorded in different sub-regions, and the topological features include connected component ring structures and cavities; the generation time and the disappearance time of each topological feature are recorded, and the generation and disappearance processes of each topological feature are sequentially tracked along the threshold sequence;

[0021] The spatial positions and pixel compositions of the topological features under different thresholds are marked, and the topological features in adjacent sub-regions are matched to form a topological feature evolution track; the disappearance time and the generation time of each topological feature are subtracted to obtain the topological feature lifetime, and a persistent atlas of each region to be detected is constructed according to the topological feature type, the topological feature lifetime and the spatial position.

[0022] Specifically, the method for generating the scrap steel fragment topological anomaly score comprises:

[0023] For each topological feature in the persistent atlas, the centroid coordinates are calculated, and the topological feature centroid is a weighted average value of the pixel point coordinates corresponding to the topological feature; the overall gravity center of the region to be detected is a weighted average coordinate of all pixel point coordinates of the entire region to be detected;

[0024] The Euclidean distance between the topological feature centroid and the overall gravity center of the region to be detected is taken as the deviation degree of the topological feature centroid from the overall gravity center of the region to be detected; for the topological features recorded in the persistent atlas, corresponding weights are respectively set according to the topological feature types;

[0025] The topological feature lifetime, the topological feature type weight and the deviation degree of the topological feature centroid from the overall gravity center of the region to be detected are weighted and accumulated to generate a scrap steel fragment topological anomaly score of each region to be detected.

[0026] Specifically, the method for collecting all the abnormal regions into a suspected scrap steel impurity region comprises:

[0027] According to the obtained scrap steel fragment topological anomaly score, all the regions to be detected are sorted according to the scrap steel fragment topological anomaly score from large to small to obtain a sorted region to be detected sequence; a scrap steel fragment topological anomaly score threshold is preset, and each region to be detected in the sorted sequence is sequentially judged;

[0028] When the scrap steel fragment topology anomaly score of any one to-be-detected region is greater than the preset scrap steel fragment topology anomaly score threshold, the to-be-detected region is marked as an abnormal region; when the scrap steel fragment topology anomaly score of the to-be-detected region is less than or equal to the preset scrap steel fragment topology anomaly score threshold, the to-be-detected region is marked as a normal region; all the marked abnormal regions are collected to form a suspected scrap steel impurity region.

[0029] Specifically, the method for confirming the real scrap steel impurity region comprises:

[0030] For the topology feature in the suspected scrap steel impurity region, a corresponding set of pixel point positions is determined, a local window of a preset size is taken around any one pixel point, and a local texture feature descriptor is extracted by using a normalized gradient histogram method;

[0031] A preset standard scrap steel local texture feature descriptor is combined with the local texture feature descriptor, a texture consistency score is obtained by using a normalized cross-correlation method, and a texture true-false confidence is defined according to the texture consistency score; for each suspected scrap steel impurity region, a judgment is made based on the size of the texture true-false confidence, a preset texture true-false confidence threshold is set, when the texture true-false confidence is less than the preset texture true-false confidence threshold, the suspected scrap steel impurity region is confirmed as a non-impurity region; and when the texture true-false confidence is greater than or equal to the preset texture true-false confidence threshold, the suspected scrap steel impurity region is confirmed as a real scrap steel impurity region.

[0032] Specifically, the method for determining the spatial position of the impurity in the scrap steel comprises:

[0033] For each real scrap steel impurity region, a two-dimensional pixel coordinate of each real scrap steel impurity region in the image is obtained; the two-dimensional pixel coordinate is mapped to a three-dimensional spatial coordinate by using a calibration parameter of an industrial camera arranged above the scrap steel stacking area, and a spatial position of the impurity in the scrap steel is obtained.

[0034] A scrap steel impurity real-time detection system comprises:

[0035] A region feature acquisition module acquires scrap steel surface video data in real time, performs slice processing on the video data, generates to-be-detected regions of scrap steel fragments, extracts gradient intensity and local anisotropy information of the to-be-detected regions, combines to form a region feature function, and acquires a sub-region sequence under different thresholds;

[0036] A topology anomaly analysis module records topology features of scrap steel fragment structures in different sub-regions, tracks generation and disappearance processes of the topology features, constructs corresponding persistent maps, weights different topology features, and generates scrap steel fragment topology anomaly scores in combination with a deviation degree of a topology feature centroid from a whole gravity center of the to-be-detected region.

[0037] An abnormal candidate screening module sorts all to-be-detected regions based on the scrap piece topological anomaly score, and judges whether the to-be-detected region is an abnormal region, and all abnormal regions are summarized as suspected scrap impurity regions;

[0038] An impurity coordinate positioning module adopts a texture consistency measurement method to verify the authenticity of the suspected scrap impurity region, and confirms the real scrap impurity region; and according to the spatial coordinate information of the real scrap impurity region, the detected impurity is spatially positioned to determine the spatial position of the impurity in the scrap.

[0039] Compared with the prior art, the present application has the following beneficial effects:

[0040] The present application records the topological characteristics of scrap pieces by constructing a persistent map, and tracks the generation and disappearance process, realizing sensitive detection of complex morphological impurities. The centroid of each topological feature is calculated and compared with the overall center of gravity of the to-be-detected region to obtain the deviation degree, thereby quantifying the abnormality of the local topological feature relative to the overall region, improving the recognition accuracy of the abnormal region. According to the topological feature type, the weight is set, and the topological feature life and centroid deviation degree are combined for weighted accumulation to generate the scrap piece topological anomaly score, so that the topological features with long life and obvious deviation contribute more to the anomaly score, realizing efficient differentiation of potential impurities. Not only single pixels or local features are concerned, but also topological structure and spatial distribution are considered, which can effectively reduce the false detection and missed detection rate, and improve the stability and reliability of scrap impurity detection.

[0041] Some non-impurity regions may have similarities in shape, color or gray scale with scrap pieces, and existing methods are prone to misjudging these regions as impurities. Some non-impurity regions may have similarities in shape, color or gray scale with scrap pieces, and existing methods are prone to misjudging these regions as impurities. The prior art only relies on topological features or pixel value threshold for judgment, and it is difficult to cope with the interference of different shapes and different materials in complex scrap pile scenes.

[0042] For each topological feature corresponding to the pixel point in the suspected scrap impurity region, a local window of a preset size is taken around it, and a local texture feature descriptor is extracted to realize the acquisition of the region's fine-grained texture information. A preset standard scrap local texture feature descriptor is taken as a reference and compared with the local texture of the suspected region, so as to distinguish the real impurities from the non-impurity regions with similar appearance. The similarity between the local texture and the reference texture is calculated by normalizing cross-correlation to obtain the texture consistency score, which is used as the basis for judgment to realize accurate screening. Through texture consistency verification, false detection and missed detection can be effectively reduced, especially when the shape of the scrap piece is complex or similar to the surrounding background, the authenticity and stability of the detection result are guaranteed. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 A flowchart of a scrap steel impurity real-time detection method according to the present application is shown in the figure.

[0044] Figure 2 A structural diagram of a scrap steel impurity real-time detection system according to the present application is shown in the figure.

[0045] Figure 3 A flowchart of a method for generating a detection area of scrap steel fragments according to the present application is shown in the figure. DETAILED DESCRIPTION

[0046] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0047] Embodiment 1

[0048] Referring to FIGS. 1 and 2, the present embodiment provides a scrap steel impurity real-time detection method, which specifically includes the following steps: Figure 1 Figure 3 The method specifically includes the following steps:

[0049] S1, real-time collection of scrap steel surface video data, slicing processing of the video data to generate a detection area of scrap steel fragments; extraction of gradient intensity and local anisotropy information of the detection area to form a regional feature function by combination, and acquisition of a sub-region sequence under different threshold values;

[0050] S2, recording of topological features of scrap steel fragment structures in different sub-regions, tracking of generation and disappearance processes of the topological features to construct corresponding persistent maps; and weighting of different topological features, combined with a deviation degree of a topological feature centroid from a whole gravity center of the detection area, to generate a scrap steel fragment topological anomaly score;

[0051] S3, sorting of all detection areas based on the scrap steel fragment topological anomaly score, and judgment of whether the detection area is an abnormal area, and collection of all abnormal areas as suspected scrap steel impurity areas;

[0052] S4, real-time verification of the suspected scrap steel impurity areas by using a texture consistency measurement method, and confirmation of real scrap steel impurity areas; and spatial positioning of detected impurities according to spatial coordinate information of the real scrap steel impurity areas to determine spatial positions of the impurities in the scrap steel.

[0053] The method for generating a detection area of scrap steel fragments includes: ​

[0054] The steel scrap surface is continuously videoed by an industrial camera arranged above the steel scrap stacking area to obtain steel scrap surface video data; the collected steel scrap surface video data is time-sliced in time sequence to divide into different continuous time segments, and each time segment contains a fixed number of continuous image frames;

[0055] Each frame image in the time segment is spatially sliced to divide the image into different local regions according to a preset number of rows and columns, each local region covers a part of the steel scrap pieces in the image, and the local region is defined as a to-be-detected region of the steel scrap pieces.

[0056] The method for extracting gradient intensity and local anisotropy information of the to-be-detected region comprises:

[0057] For each image pixel point in the to-be-detected region, the gray level change rate of the image pixel point in the horizontal and vertical directions is obtained by a Sobel operator to calculate the gradient amplitude of the pixel point; the directional feature of the gray level distribution in the neighborhood of each image pixel point in the to-be-detected region is analyzed, and the local anisotropy information of the to-be-detected region is calculated by a gray level co-occurrence matrix method.

[0058] The method for obtaining a sequence of sub-regions under different threshold values comprises:

[0059] The gradient amplitude and the local anisotropy information are weighted and fused according to a preset weight to obtain a region feature value of each pixel point, and a region feature function of the to-be-detected region is generated; a sequence of increasing threshold values is preset according to the numerical range of the region feature function, and for each threshold value, the pixel points with a region feature value less than or equal to the threshold value are screened out, and the pixel point set screened out for each threshold value is counted, which constitutes a sub-region corresponding to the threshold value; the threshold sequence is sequentially traversed from small to large, and a sequence of sub-regions under different threshold values is formed.

[0060] The method for constructing a corresponding persistent atlas comprises:

[0061] The topological features of the steel scrap piece structure are recorded in different sub-regions, and the topological features include connected component ring structure and cavity; the generation time and disappearance time of each topological feature are recorded, and the generation and disappearance process of each topological feature is tracked in sequence along the threshold sequence;

[0062] The spatial position and pixel composition of the topological feature under different threshold values are marked, and the topological features in adjacent sub-regions are matched to form a topological feature evolution track; the disappearance time and the generation time of each topological feature are subtracted to obtain the topological feature lifetime, and a persistent atlas of each to-be-detected region is constructed according to the topological feature type, the topological feature lifetime and the spatial position.

[0063] The method for generating a steel scrap piece topological anomaly score comprises:

[0064] For each topological feature in the persistence graph, the centroid coordinates are calculated, and the topological feature centroid is the weighted average of the pixel point coordinates corresponding to the topological feature; the overall center of gravity of the to-be-detected region is the weighted average of the coordinates of all pixel points in the entire to-be-detected region;

[0065] The Euclidean distance between the topological feature centroid and the overall center of gravity of the to-be-detected region is taken as the deviation degree of the topological feature centroid from the overall center of gravity of the to-be-detected region; for the topological features recorded in the persistence graph, the corresponding weights are set according to the topological feature types;

[0066] The topological feature lifetime, the topological feature type weight, and the deviation degree of the topological feature centroid from the overall center of gravity of the to-be-detected region are weighted and accumulated to generate the scrap steel fragment topological anomaly score of each to-be-detected region.

[0067] The scrap steel fragment topological anomaly score is: ; wherein, represents the scrap steel fragment topological anomaly score of the to-be-detected region ; represents the total number of topological features recorded in the to-be-detected region; represents a normalization coefficient for standardizing the scrap steel fragment topological anomaly score; represents the topological feature type weight of the i-th topological feature; represents the type of the i-th topological feature; represents the lifetime of the i-th topological feature, ; represents the generation time of the i-th topological feature; represents the disappearance time of the i-th topological feature; represents the centroid coordinates of the i-th topological feature; represents the overall center of gravity coordinates of the to-be-detected region; represents the Gaussian kernel width for controlling the punishment intensity of the centroid deviation from the center of gravity; represents the index of the topological feature; represents an exponential parameter, indicating the contribution of the topological feature lifetime to the scrap steel fragment topological anomaly score, and the longer the lifetime of the topological feature, the greater the weight of the topological feature in the topological anomaly score.

[0068] ​​​​​​The technical problems existing in the prior art are solved. The existing method cannot effectively identify the connectivity, ring structure or hollow of scrap steel fragments, and is prone to miss or misidentify impurities with various shapes. Traditional methods only focus on local pixels or regional features, without comparing local features with the overall structure of the entire region to be detected, making it difficult to quantify the significance of abnormal regions. Even if morphological features are used, the significance of different topological features (such as connected components, ring structures, and hollows) cannot be weighted, and the importance of long-life topological features cannot be reflected.

[0069] The beneficial effects of the prior art are that by constructing a persistence map, recording the topological features of scrap steel fragments, and tracking their generation and extinction processes, sensitive detection of complex-shaped impurities is achieved. The center of mass of each topological feature is calculated and compared with the overall center of mass of the region to be detected to obtain the deviation degree, thereby quantifying the abnormality of local topological features relative to the overall region and improving the identification accuracy of abnormal regions. According to the type of topological features, weights are set and weighted accumulation is performed in combination with the topological feature lifetime and center of mass deviation degree to generate a scrap steel topological anomaly score, so that topological features with long lifetimes and obvious deviations contribute more to the anomaly score, achieving efficient differentiation of potential impurities. Not only single pixels or local features are considered, but also topological structures and spatial distribution, which can effectively reduce the false detection and missed detection rates and improve the stability and reliability of scrap steel impurity detection.

[0070] The method of collecting all abnormal regions into suspected scrap steel impurity regions includes:

[0071] According to the obtained scrap steel topological anomaly score, all regions to be detected are sorted in descending order of the scrap steel topological anomaly score to obtain a sorted region sequence to be detected; a preset scrap steel topological anomaly score threshold is set, and each region to be detected in the sorted sequence is judged in turn;

[0072] When the scrap steel topological anomaly score of any region to be detected is greater than the preset scrap steel topological anomaly score threshold, the region to be detected is marked as an abnormal region; when the scrap steel topological anomaly score of the region to be detected is less than or equal to the preset scrap steel topological anomaly score threshold, the region to be detected is marked as a normal region; all marked abnormal regions are collected to form a suspected scrap steel impurity region.

[0073] The method of confirming the true scrap steel impurity region includes:

[0074] For the topological features in the suspected scrap steel impurity region, a corresponding set of pixel point positions is determined, a local window of a preset size is taken around any one pixel point, and a local texture feature descriptor is extracted using a normalized gradient histogram method;

[0075] A preset standard scrap steel local texture feature descriptor, a local texture feature descriptor, a texture consistency score obtained by a normalized cross-correlation method, and the texture consistency score are: ; wherein, represents the texture consistency score of the suspected scrap steel impurity region ; wherein, represents any pixel point position in the suspected scrap steel impurity region ; wherein, represents the position set of all candidate pixel points in the suspected scrap steel impurity region ; wherein, represents a local window with the pixel point as the center and a radius of ; wherein, represents a local texture feature descriptor of the local window; represents a texture feature descriptor of a reference window (equivalent to a preset standard scrap steel local texture feature descriptor); represents a normalized cross-correlation used to calculate the similarity between two texture feature descriptors;

[0076] A texture authenticity confidence is defined according to the texture consistency score; the texture authenticity confidence is: ; wherein, represents the texture authenticity confidence of the suspected scrap steel impurity region ; wherein,

[0077] For each suspected scrap steel impurity region, a determination is made based on the size of the texture authenticity confidence, a preset texture authenticity confidence threshold value, when the texture authenticity confidence is less than the preset texture authenticity confidence threshold value, the suspected scrap steel impurity region is confirmed as a non-impurity region; when the texture authenticity confidence is greater than or equal to the preset texture authenticity confidence threshold value, the suspected scrap steel impurity region is confirmed as a real scrap steel impurity region.

[0078] The following technical problems existing in the prior art are solved: Some non-impurity regions may have similarities in shape, color or gray scale with scrap steel fragments, and existing methods are prone to misjudging these regions as impurities. Some non-impurity regions may have similarities in shape, color or gray scale with scrap steel fragments, and existing methods are prone to misjudging these regions as impurities. The prior art only relies on topological features or pixel value thresholds for determination, and it is difficult to cope with the interference of different shapes and different materials in a complex scrap steel stacking scene.

[0079] The beneficial effects of the prior art are: for each pixel point corresponding to each topological feature in the suspected scrap steel impurity area, a local window of a preset size is taken around it, a local texture feature descriptor is extracted, and the acquisition of the region fine-grained texture information is realized. The preset standard scrap steel local texture feature descriptor is taken as a reference and compared with the local texture of the suspected area, so that the real impurities and the non-impurity areas with similar appearance can be distinguished. The similarity of the local texture and the reference texture is calculated by normalizing cross-correlation, the texture consistency score is obtained, and the texture authenticity confidence is defined according to the texture consistency score, which is used as a judgment basis to realize accurate screening. Through the texture consistency verification, the false detection and the missed detection can be effectively reduced, especially when the scrap steel fragments are complex or similar to the surrounding background, the authenticity and stability of the detection result are ensured.

[0080] The method for determining the spatial position of the impurities in the scrap steel comprises:

[0081] For each real scrap steel impurity area, the two-dimensional pixel coordinates of each real scrap steel impurity area in the image are obtained; the two-dimensional pixel coordinates are mapped to three-dimensional space coordinates by using the calibration parameters of the industrial camera arranged above the scrap steel stacking area, and the spatial position of the impurities in the scrap steel is obtained.

[0082] The preset scrap steel fragment topological anomaly score threshold is set by the staff based on the historical data analysis result, and the historical analysis process includes that the system collects a plurality of scrap steel fragment topological anomaly scores and calculates the average value as a reference to obtain the preset scrap steel fragment topological anomaly score threshold; similarly, the preset texture authenticity confidence threshold is also set by the staff according to the system historical running data and the specific application scene requirement. These preset thresholds can be adjusted by the staff according to the actual situation during the system running process.

[0083] In this embodiment, the topological features of the scrap steel fragments are recorded by constructing a persistent graph, and the generation and disappearance process thereof is tracked, so that sensitive detection of complex form impurities is realized. The center of mass of each topological feature is calculated, and it is compared with the overall center of gravity of the to-be-detected area to obtain the deviation degree, so as to quantify the abnormality of the local topological feature relative to the overall area, and improve the recognition accuracy of the abnormal area. According to the type of the topological feature, the weight is set, and the topological feature life and the center of mass deviation degree are combined for weighted accumulation to generate the scrap steel fragment topological anomaly score, so that the topological feature with long life and obvious deviation contributes more to the anomaly score, and the potential impurities are efficiently distinguished. Not only the single pixel or local feature is concerned, but also the topological structure and spatial distribution are considered, which can effectively reduce the false detection and the missed detection rate, and improve the stability and reliability of the scrap steel impurity detection.

[0084] Part of the non-impurity area may have similarity with scrap steel fragments in shape, color or gray level, and the existing method is easy to misjudge these areas as impurities. Part of the non-impurity area may have similarity with scrap steel fragments in shape, color or gray level, and the existing method is easy to misjudge these areas as impurities. The existing technology only relies on topological features or pixel value threshold for judgment, and it is difficult to deal with the interference of different shapes and different materials in the complex scrap steel yard scene.

[0085] For each topological feature corresponding to the suspected scrap steel impurity area, a local window of a preset size is taken around it, a local texture feature descriptor is extracted, and the acquisition of the fine-grained texture information of the area is realized. A preset standard scrap steel local texture feature descriptor is taken as a reference and compared with the local texture of the suspected area, so as to distinguish the real impurities from the non-impurity areas with similar appearance. The similarity of the local texture and the reference texture is calculated by normalized cross-correlation, and a texture consistency score is obtained, which is used as a judgment basis to realize accurate screening. Through texture consistency verification, false positives and false negatives can be effectively reduced, especially when the scrap steel fragments are complex or similar to the surrounding background, the authenticity and stability of the detection results are guaranteed.

[0086] Embodiment 2

[0087] Please refer to Figure 2 As shown in the figure, some parts of the embodiment are not described in detail, see the description of embodiment 1, and a scrap steel impurity real-time detection system is provided, which comprises:

[0088] The region feature acquisition module acquires scrap steel surface video data in real time, slices the video data, generates a scrap steel fragment to be detected, extracts gradient intensity and local anisotropy information of the to-be-detected region, combines to form a region feature function, and obtains a sub-region sequence under different thresholds;

[0089] The topological anomaly analysis module records the topological features of the scrap steel fragment structure in different sub-regions, tracks the generation and extinction process of the topological features, and constructs the corresponding persistence map. The topological features are weighted, and the deviation degree of the topological feature centroid and the overall gravity center of the to-be-detected region is combined to generate a scrap steel fragment topological anomaly score;

[0090] The anomaly candidate screening module sorts all to-be-detected regions based on the scrap steel fragment topological anomaly score, and judges whether the to-be-detected region is an abnormal region. All abnormal regions are summarized as suspected scrap steel impurity regions;

[0091] The impurity coordinate positioning module adopts a texture consistency measurement method to verify the authenticity of the suspected scrap steel impurity region, and confirms the real scrap steel impurity region. According to the spatial coordinate information of the real scrap steel impurity region, the detected impurities are spatially positioned to determine the spatial position of the impurities in the scrap steel.

[0092] The above formulas are all dimensionless numerical calculations, the formulas are obtained by collecting a large amount of data to simulate the recent real situation, and the preset parameters and threshold values in the formulas are set by the person skilled in the art according to the actual situation.

[0093] The above is only the preferred embodiment of the present application, the protection scope of the present application is not limited to the above-mentioned examples, any technical scheme belonging to the idea of the present application is within the protection scope of the present application. It should be pointed out that, for ordinary technical operators in the technical field, some improvements and decorations without departing from the principle of the present application should also be considered as the protection scope of the present application.

Claims

1. A method for real-time detection of scrap impurities, characterized in that, The method comprises the following steps: S1, collecting video data of a scrap steel surface in real time, performing slice processing on the video data, and generating a scrap steel fragment detection area; extracting gradient intensity and local anisotropy information of the detection area, combining to form an area feature function, and obtaining a sub-area sequence under different thresholds; S2, recording the topological features of the scrap steel fragment structure in different sub-areas, tracking the generation and disappearance process of the topological features to construct a corresponding persistent map; and weighting different topological features, combining the deviation degree of the topological feature centroid and the overall gravity center of the detection area, and generating a scrap steel fragment topological anomaly score; The method for constructing a corresponding persistent map comprises: recording the topological features of the scrap steel fragment structure in different sub-areas, the topological features including connected component ring structures and cavities; recording the generation time and disappearance time of each topological feature, and tracking the generation and disappearance process of each topological feature along the threshold sequence; marking the spatial position and pixel composition of the topological features under different thresholds, and matching the topological features in adjacent sub-areas to form a topological feature evolution track; subtracting the disappearance time from the generation time of each topological feature to obtain the topological feature lifetime, and constructing a persistent map for each detection area according to the topological feature type, the topological feature lifetime and the spatial position; The method for generating a scrap steel fragment topological anomaly score comprises: for each topological feature in the persistent map, calculating the centroid coordinates, and the topological feature centroid being a weighted average value of the pixel point coordinates corresponding to the topological feature; the overall gravity center of the detection area being a weighted average coordinate of all pixel point coordinates of the entire detection area; taking the Euclidean distance between the topological feature centroid and the overall gravity center of the detection area as the deviation degree of the topological feature centroid and the overall gravity center of the detection area; setting corresponding weights for the topological features recorded in the persistent map according to the topological feature type; weighting and accumulating the topological feature lifetime, the topological feature type weight and the deviation degree of the topological feature centroid and the overall gravity center of the detection area to generate a scrap steel fragment topological anomaly score for each detection area; S3, based on the scrap steel fragment topological anomaly score, sorting all detection areas, and judging whether the detection area is an abnormal area, and collecting all abnormal areas into a suspected scrap steel impurity area; S4, using a texture consistency measurement method to verify the authenticity of the suspected scrap steel impurity area, and confirming a real scrap steel impurity area; and according to the spatial coordinate information of the real scrap steel impurity area, spatially positioning the detected impurities to determine the spatial position of the impurities in the scrap steel.

2. A method of real-time detection of scrap impurities as claimed in claim 1 wherein, The method for generating a scrap steel fragment detection area comprises: acquiring scrap steel surface video data through an industrial camera arranged above a scrap steel stacking area; performing time slice processing on the collected scrap steel surface video data in chronological order, and dividing the scrap steel surface video data into different continuous time slices, each time slice containing a fixed number of continuous image frames; The spatial slice processing is performed on each frame image in the time segment, and the image is divided into different local regions according to a preset number of rows and columns, each local region covers a part of the scrap steel fragments in the image, and the local region is defined as a to-be-detected region of the scrap steel fragments.

3. A method of real-time detection of scrap impurities as claimed in claim 2, wherein, The method for extracting gradient intensity and local anisotropy information of the to-be-detected region comprises: For each image pixel point of the to-be-detected region, the gray change rate of the image pixel point in the horizontal and vertical directions is obtained through a Sobel operator, and the gradient amplitude of the pixel point is calculated; the directional feature of the gray distribution in the neighborhood of each image pixel point in the to-be-detected region is analyzed, and the local anisotropy information of the to-be-detected region is calculated through a gray level co-occurrence matrix method.

4. A method of real-time detection of scrap impurities as claimed in claim 3 wherein, The method for obtaining a sequence of sub-regions under different threshold values comprises: The gradient amplitude and the local anisotropy information are weighted and fused according to a preset weight to obtain a region feature value of each pixel point, and a region feature function of the to-be-detected region is generated; a sequence of increasing threshold values is preset according to the numerical range of the region feature function, and for each threshold value, a pixel point with a region feature value less than or equal to the threshold value is screened out, and a set of pixel points screened out for each threshold value is counted, which constitutes a sub-region corresponding to the threshold value; the threshold value sequence is sequentially traversed from small to large, and a sequence of sub-regions under different threshold values is formed.

5. A method of real-time detection of scrap impurities as claimed in claim 4, wherein, The method for collecting all abnormal regions into a suspected scrap steel impurity region comprises: According to the obtained scrap steel fragment topological anomaly score, all to-be-detected regions are sorted according to the scrap steel fragment topological anomaly score from large to small to obtain a sorted sequence of to-be-detected regions; a scrap steel fragment topological anomaly score threshold value is preset, and each to-be-detected region in the sorted sequence is sequentially judged; When the scrap steel fragment topological anomaly score of any to-be-detected region is greater than the preset scrap steel fragment topological anomaly score threshold value, the to-be-detected region is marked as an abnormal region; when the scrap steel fragment topological anomaly score of the to-be-detected region is less than or equal to the preset scrap steel fragment topological anomaly score threshold value, the to-be-detected region is marked as a normal region; all marked abnormal regions are collected to form a suspected scrap steel impurity region.

6. A method of real-time detection of scrap impurities as claimed in claim 5 wherein, The method for confirming a real scrap steel impurity region comprises: For the topological features in the suspected scrap steel impurity region, a corresponding set of pixel point positions is determined, a local window of a preset size is taken around any one pixel point, and a local texture feature descriptor is extracted by using a normalized gradient histogram method; A standard scrap steel local texture feature descriptor is preset, a texture consistency score is obtained by combining the local texture feature descriptor and the normalized cross-correlation method, and a texture authenticity confidence is defined according to the texture consistency score; For each suspected scrap steel impurity region, a judgment is made based on the size of the texture authenticity confidence, a texture authenticity confidence threshold value is preset, when the texture authenticity confidence is less than the preset texture authenticity confidence threshold value, the suspected scrap steel impurity region is confirmed as a non-impurity region; when the texture authenticity confidence is greater than or equal to the preset texture authenticity confidence threshold value, the suspected scrap steel impurity region is confirmed as a real scrap steel impurity region.

7. A method of real-time detection of scrap impurities as claimed in claim 6 wherein, The method for determining the spatial position of the impurity in the scrap steel comprises: For each real scrap impurity area, obtain the two-dimensional pixel coordinates of each real scrap impurity area in the image; map the two-dimensional pixel coordinates to three-dimensional space coordinates using the calibration parameters of the industrial camera arranged above the scrap stacking area to obtain the spatial position of the impurity in the scrap.

8. A scrap impurity real-time detection system for implementing the scrap impurity real-time detection method of any one of claims 1 to 7, characterized in that, Comprise: The area feature acquisition module acquires the video data of the scrap surface in real time, performs slice processing on the video data, and generates the to-be-detected area of the scrap pieces; Extract the gradient intensity and local anisotropy information of the to-be-detected area to form a region feature function, and obtain a sub-region sequence under different thresholds; The topological anomaly analysis module records the topological features of the scrap piece structure in different sub-regions, tracks the generation and disappearance process of the topological features, and constructs the corresponding persistent atlas; and the different topological features are weighted, combined with the deviation degree of the topological feature centroid and the overall gravity center of the to-be-detected area, and the scrap piece topological anomaly score is generated; The abnormal candidate screening module sorts all to-be-detected areas based on the scrap piece topological anomaly score, and judges whether the to-be-detected area is an abnormal area, and all abnormal areas are summarized as suspected scrap impurity areas; The impurity coordinate positioning module uses a texture consistency measurement method to verify the authenticity of the suspected scrap impurity area and confirm the real scrap impurity area; according to the spatial coordinate information of the real scrap impurity area, the spatial position of the detected impurity in the scrap is positioned, and the spatial position of the impurity in the scrap is determined.

Citation Information

Patent Citations

  • Topology anomaly detection method based on load current

    CN117054815A

  • Non-steel impurity detection method and device, server and storage medium

    CN120782757A