CN116523904B - Artificial intelligence-based metal stamping part surface scratch detection method - Google Patents
Artificial intelligence-based metal stamping part surface scratch detection method Download PDFInfo
- Publication number
- CN116523904B CN116523904B CN202310752430.8A CN202310752430A CN116523904B CN 116523904 B CN116523904 B CN 116523904B CN 202310752430 A CN202310752430 A CN 202310752430A CN 116523904 B CN116523904 B CN 116523904B
- Authority
- CN
- China
- Prior art keywords
- point
- gray value
- sequence
- autocorrelation
- straight line
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 239000002184 metal Substances 0.000 title claims abstract description 35
- 238000013473 artificial intelligence Methods 0.000 title claims abstract description 19
- 238000001514 detection method Methods 0.000 title abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 27
- 230000009466 transformation Effects 0.000 claims abstract description 16
- 238000012545 processing Methods 0.000 claims abstract description 15
- 229910052704 radon Inorganic materials 0.000 claims abstract description 15
- SYUHGPGVQRZVTB-UHFFFAOYSA-N radon atom Chemical compound [Rn] SYUHGPGVQRZVTB-UHFFFAOYSA-N 0.000 claims abstract description 15
- 239000013598 vector Substances 0.000 claims description 27
- 238000005520 cutting process Methods 0.000 claims description 10
- 238000001228 spectrum Methods 0.000 claims description 5
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 238000009825 accumulation Methods 0.000 claims description 2
- KJONHKAYOJNZEC-UHFFFAOYSA-N nitrazepam Chemical compound C12=CC([N+](=O)[O-])=CC=C2NC(=O)CN=C1C1=CC=CC=C1 KJONHKAYOJNZEC-UHFFFAOYSA-N 0.000 claims description 2
- 238000012795 verification Methods 0.000 claims description 2
- 230000007547 defect Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000010276 construction Methods 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000005299 abrasion Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30136—Metal
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The application relates to the field of image processing, and provides a metal stamping part surface scratch detection method based on artificial intelligence, which comprises the following steps: collecting a surface image of the metal stamping part, and processing the surface image to obtain a significant area; carrying out radon transformation on the salient region to obtain a straight line corresponding to each projection angle in the salient region; calculating an autocorrelation sequence corresponding to the straight line based on the gray value of the pixel point on each straight line; the scratch area is determined based on the autocorrelation sequence. The method can improve the scratch detection accuracy.
Description
Technical Field
The application relates to the field of image processing, in particular to a metal stamping part surface scratch detection method based on artificial intelligence.
Background
The metal stamping technology originates from the middle of the 19 th century, is mainly finished by hand in the early stage, has low production efficiency and poor product precision, and is used for producing simple objects. With the development of automation, electronic technology and computer technology, metal stamping steps into a high-automation stage, the production efficiency and the product precision reach higher levels, and the product variety is also richer. The metal stamping technology has wide application fields including household appliances, vehicles, electronic products, mechanical equipment, medical appliances and the like. It can be said that the metal stamping technology has penetrated into various aspects of life of people, has wide product types and application scenes, and has embodied the important function and wide application prospect of the metal stamping technology in modern industrial production. The precise pressure gauge shell also belongs to a metal stamping part, and the appearance quality of the precise pressure gauge shell can greatly influence the use effect due to the specificity of an application scene. Conventional image processing-based defect detection algorithms may suffer from low detection accuracy in this scenario.
Disclosure of Invention
The application provides an artificial intelligence-based metal stamping part surface scratch detection method which can improve scratch detection accuracy.
In a first aspect, the application provides a metal stamping part surface scratch detection method based on artificial intelligence, which comprises the following steps:
collecting a surface image of the metal stamping part, and processing the surface image to obtain a significant area;
carrying out radon transformation on the salient region to obtain a straight line corresponding to each projection angle in the salient region;
calculating an autocorrelation sequence corresponding to each straight line based on the gray value of the pixel point on each straight line;
a scratch area is determined based on the autocorrelation sequence.
In an embodiment, calculating the autocorrelation sequence corresponding to each straight line based on the gray value of the pixel point on each straight line includes:
determining a cutting point, and dividing the gray value sequence based on the cutting point to obtain a plurality of gray value subsequences; the gray value sequence is a sequence formed by gray values of all pixel points on the straight line;
calculating an autocorrelation coefficient of each gray value subsequence;
and sequencing the autocorrelation coefficients of the gray value subsequences to obtain an autocorrelation sequence of a gray value sequence, wherein the autocorrelation sequence of the gray value sequence is the autocorrelation sequence corresponding to the straight line.
In an embodiment, determining the cut point comprises:
and calculating the breakpoint of each gray value sequence by using an accumulation and verification method, and taking the breakpoint as the cutting point.
In one embodiment, calculating the autocorrelation coefficients for each sub-sequence of gray values includes:
;
wherein ,for grey value sequences->First->Gray value subsequence->Is a coefficient of autocorrelation of (a); />Is->Gray value subsequence->Middle->Element(s)>For grey value sequences->Mean value of->Is->Gray value subsequence->Hysteresis step number of autocorrelation coefficients of +.>For grey value sequences->Middle->Gray scale of eachValue subsequence->Total number of inner pixels.
In an embodiment, determining the scratch area based on the autocorrelation sequence comprises:
determining peak points corresponding to the autocorrelation sequences of all gray value sequences;
determining a center point of a straight line where the peak point is located based on a middle point of the pixel points contained in the gray value subsequence corresponding to the peak point;
converting the gray level map of the salient region into a distance map of a relative peak point by taking the central point as a distance origin, wherein the value of a pixel point in the distance map of the relative peak point represents the distance between the pixel point and the central point;
and determining a scratch area based on the relative peak point distance map.
In an embodiment, determining the scratch area based on the relative peak point distance map comprises:
constructing a neighborhood window by taking the central point as the center;
calculating neighborhood vectors of the center point and other pixel points in the neighborhood window;
calculating the similarity between the neighborhood vector of each pixel point in the neighborhood window and the neighborhood vector of the center point;
and determining whether the pixel points contained in the gray value subsequence corresponding to the peak point are in the scratch area or not based on the similarity.
In an embodiment, determining whether the pixel point included in the gray value subsequence corresponding to the peak point is in the scratch area based on the similarity includes:
determining pearson coefficients of an autocorrelation sequence of a straight line where a pixel point corresponding to a neighborhood vector with highest similarity is located and an autocorrelation sequence of a straight line where a peak point is located;
and determining whether the pixel points contained in the gray value subsequence corresponding to the peak point are in the scratch area or not based on the Pelson coefficient.
In an embodiment, if the pearson coefficient is greater than a preset value, it is determined that the pixel points included in the gray value sub-sequence corresponding to the peak point are in the scratch area, so that all the pixel points in the scratch area in the significant area are determined to perform scratch detection.
In one embodiment, capturing a surface image of a metal stamping and processing the surface image to obtain a salient region comprises:
and processing the surface image by using a residual spectrum algorithm, so as to obtain a significant region.
In one embodiment, the method comprises the steps of before processing the surface image by using a residual spectrum algorithm to obtain a salient region;
graying the surface image by using a weighted average method;
and carrying out noise reduction treatment on the image subjected to graying.
The application has the beneficial effects that the method is different from the prior art, and the method for detecting the scratches on the surface of the metal stamping part based on artificial intelligence comprises the following steps: collecting a surface image of the metal stamping part, and processing the surface image to obtain a significant area; carrying out radon transformation on the salient region to obtain a straight line corresponding to each projection angle in the salient region; calculating an autocorrelation sequence corresponding to the straight line based on the gray value of the pixel point on each straight line; the scratch area is determined based on the autocorrelation sequence. The method can improve the scratch detection accuracy.
Drawings
FIG. 1 is a schematic flow chart of a first embodiment of an artificial intelligence based method for detecting scratches on a metal stamping part surface;
FIG. 2 is a schematic illustration of a gray scale image of a precision pressure gauge housing;
FIG. 3 is a schematic diagram of a region of interest (ROI region);
FIG. 4 is a schematic diagram of a Radon transform;
FIG. 5 is a gray value sequenceSchematic diagram of middle peak point and center point;
FIG. 6 is a center pointIs a schematic of a neighborhood of pixels.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The main purpose of the application is as follows: aiming at the detection method of the scratches on the surface of the metal stamping part, a high-definition industrial camera is used for shooting gray images of the shell of the precise pressure gauge, the conventional image processing defect detection method is abandoned, radon transformation is carried out on the characteristics of the defect area so as to improve the robustness of a subsequent algorithm, meanwhile, the construction of an autocorrelation sequence is carried out according to the Radon transformation result, and finally, the similarity between sequences is determined by using the Pearson coefficients so as to obtain the scratch area. In order to realize the application, the application designs a metal stamping part surface scratch detection method based on artificial intelligence. The present application will be described in detail with reference to the accompanying drawings and examples.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of a metal stamping part surface scratch detection method based on artificial intelligence according to the present application, including:
step S11: and collecting the surface image of the metal stamping part, and processing the surface image to obtain a significant area.
In one embodiment, collecting a surface image of the metal stamping part, and graying the surface image by using a weighted average method; and carrying out noise reduction treatment on the image subjected to graying.
Specifically, after the metal stamping part such as the precision pressure gauge shell is manufactured (such as a warehouse-in stage), an LED scattering light source is erected to eliminate illumination change of the shell surface, meanwhile, a high-definition industrial camera is used for shooting a micro-distance RGB image of the precision pressure gauge shell, a weighted average method is used for graying the RGB image of the precision pressure gauge shell, richer gray detail information is reserved, and Gaussian filtering noise reduction is performed after the graying image, so that more edge information in the image is reserved.
Fig. 2 is a gray level image of a housing of the precision pressure gauge, the housing of the precision pressure gauge is round by observing the surface of the housing, the surface of the housing is smooth and flat when no scratches exist, and meanwhile, the gray level distribution is relatively uniform under a fixed light source, so that the stress of each area of the surface of the housing of the precision pressure gauge is relatively uniform when the housing of the precision pressure gauge is in a working state. However, when scratches exist on the surface of the pressure gauge, the thickness of the precision pressure gauge shell is changed, so that the pressure intensity of a defect scratch area is high in a working state, the pressure leakage problem can be caused, and the precision pressure gauge can also burst when the pressure leakage problem is severe, so that the scratch appearance detection of the precision pressure gauge shell is necessary.
When the precision pressure gauge shell is manufactured, due to the reasons of abrasion and the like caused by a stamping process and long-term use of a stamping die, scratch appearance damage can occur on the surface of the precision pressure gauge shell, scratch types are various, the depth and the occurrence position of scratches are not fixed, but no matter what type of scratches are, scratches formed at the moment that an object is contacted with the precision pressure gauge shell are shallow and have small contact areas, after the objects are contacted with the precision pressure gauge shell, the scratches are gradually deepened and have large contact areas, firstly, a residual spectrum algorithm is used for extracting a significant area in an image from a gray level image of the surface of the precision pressure gauge shell, the algorithm is input into a gray level image of the surface of the precision pressure gauge shell, the obtained significant area image comprises a high-frequency structure area of an input image, the significant area output by the algorithm is recorded as an ROI (the ROI area) corresponding to the main structure of the input image, and the significant area (the ROI area) is shown in fig. 3.
Step S12: and carrying out radon transformation on the salient region to obtain a straight line corresponding to each projection angle in the salient region.
As shown in fig. 3, the tip region, i.e., the scored contact point, gradually widens as the sharp object slides within the precision pressure gauge housing. And carrying out Radon transformation (Radon transformation) on the ROI, wherein the Radon corresponds one row of pixel points in the ROI to one point in a transformation result, and the peak point in the transformation result is the row of pixel points with the largest accumulated value of the pixel points, so that a straight line under each projection angle in the ROI can be obtained according to the brightest point in the Radon transformation. According to the characteristic that the gray value of the pixel points in the scratch area in the scene is larger, the pixel points in the scratch area correspond to straight lines under different angles, if the pixel points on the straight lines are also in the neighborhood of the pixel points on the obtained straight lines, the straight lines necessarily contain the pixel points in the defect area, and the similarity between the straight lines can be gradually changed along with the increase of the defect pixel points.
The projection angle of the maximum peak value in the Radon transformation, namely the angle identical to the straight line of the long side of the scratch, is selected, and the straight line corresponding to the defect area under the projection angle is relatively visual and representative, as shown in fig. 4.
Step S13: and calculating an autocorrelation sequence corresponding to the straight line based on the gray value of the pixel point on each straight line.
Determining a cutting point, and dividing the gray value sequence based on the cutting point to obtain a plurality of gray value subsequences; the gray value sequence is a sequence formed by gray values of all pixel points on a straight line. Specifically, record the firstThe gray value sequence corresponding to the pixel point on the straight line is +.>That is, each dotted line in the above diagram has a corresponding gray value sequence, the straight lines in the ROI area are ordered according to the Radon transformation result, the ordering mode is that the straight lines are ordered from small to large according to the transformation result, the spatial positions of each sequence are different, and the gray value distribution in the sequence is also different. Computing each sequence of gray values using a cumulative sum test algorithmThe break point is used as a cutting point, the gray value sequence is divided to obtain a plurality of gray value subsequences, and the gray value sequence is recorded +.>First->The sub-sequence of gray values is +.>。
An autocorrelation coefficient of each sub-sequence of gray values is calculated. Calculating an autocorrelation coefficient of each sub-sequence of gray values, comprising:
;
wherein ,for grey value sequences->First->Gray value subsequence->Is a coefficient of autocorrelation of (a); />Is->Gray value subsequence->Middle->Element(s)>For grey value sequences->Mean value of->Is->Gray value subsequence->The hysteresis step of the autocorrelation coefficient of (a) where the variation between adjacent segmentation sequences is of interest, so +.>The empirical value of 1 may be taken to be,for grey value sequences->Middle->Gray value subsequence->Total number of inner pixels.
And sequencing the autocorrelation coefficients of the gray value subsequences to obtain an autocorrelation sequence of the gray value sequence, wherein the autocorrelation sequence of the gray value sequence is an autocorrelation sequence corresponding to a straight line.
The first calculation can be obtainedGray value subsequence->If the gray value sequence is the autocorrelation coefficient of (a)There is->A sub-sequence of gray values, corresponding to the sub-sequence of gray values, the sub-sequence of gray values having +.>And an autocorrelation coefficient. Ordering these autocorrelation coefficients to obtain a grey value sequence +.>Is to be a gray value sequence +.>The autocorrelation sequence of (2) is marked->。
Step S14: the scratch area is determined based on the autocorrelation sequence.
Specifically, peak points corresponding to the autocorrelation sequences of all gray value sequences are determined. In one embodiment, the autocorrelation sequence is analyzed by first finding the peak position, where the peak position is calculated using a thresholding method, which may take an empirical value,/>Is the average value of autocorrelation coefficients in the autocorrelation sequence, < >>The standard deviation of the autocorrelation coefficients in the autocorrelation sequence is the autocorrelation coefficient greater than the threshold value, namely the peak point. Within the region of the ROI, the gray value sequence +.>Corresponding autocorrelation sequence->Middle peak point->The pixels included in the corresponding sub-sequence may be pixels in the scratch area.
For the corresponding autocorrelation sequence of gray value sequence in ROI regionPeak point of columnFor example, if the pixel point included in the corresponding gray value sub-sequence is in the scratch area, the pixel point corresponding to the gray value sub-sequence is not an isolated point, that is, the pixel point of the gray value sub-sequence corresponding to the peak point in the other autocorrelation sequences exists around the pixel point included in the gray value sub-sequence corresponding to the peak point.
And determining the center point of the straight line where the peak point is located based on the middle point of the pixel points contained in the gray value subsequence corresponding to the peak point. Specifically, the peak points of the autocorrelation sequences corresponding to all gray value sequences in the ROI are calculated, the middle point of the pixel points contained in the gray value subsequence corresponding to the peak points is taken as the center point of the straight line where the peak points are located, and the center point is recorded asIf the total number of elements in the gray value sub-sequence corresponding to the peak point is even, then the pixel point with the front two points in the middle is used as the center point, and each autocorrelation sequence corresponds to a straight line and has the center point ∈according to the above>。
Converting the gray level map of the salient region into a distance map of a relative peak point by taking the central point as a distance origin, wherein the value of a pixel point in the distance map of the relative peak point represents the distance between the pixel point and the central point; the scratch area is determined based on the relative peak point distance map. Specifically, the center point is taken as the distance origin, and each pixel point on the straight line has a relative distance from the center point, so that the gray level map of the ROI area can be converted into a relative peak value distance map. Gray value sequence corresponding to a straight lineFor example, as shown in FIG. 5, the values of the pixels in the relative peak distance graph represent the positions +.>Is a distance of (3).
In one embodiment, the neighborhood window is constructed centered around a center point. In particular, in a sequence of grey valuesCorresponding autocorrelation sequence->Middle peak point->Site +.>For the center, constructing a 3*3 neighborhood window, if the point is in the scratch area, at least one pixel point contained in another peak value corresponding sub-sequence should exist in the neighborhood window besides the point, and the autocorrelation sequence of the sub-sequence corresponding to the other peak value should be equal to the peak value->Autocorrelation sequence corresponding to gray value subsequence +.>There is a certain similarity to avoid it being a sequence of normal region noise points.
And calculating neighborhood vectors of the center point and other pixel points in the neighborhood window. Specifically, the mid-site is first determinedNeighborhood window built for center and mid site->Another pixel point that is most similar. Calculation Point->Neighborhood vector of relative peak distance from other pixels in neighborhood window>Site>Azimuth distance relationship between the rest pixel points and the middle point in the neighborhood window. Let dot->The Euclidean distance between the pixel and other pixels in the neighborhood is marked as +.>The other pixel points and the middle point +.>There is a spatial relationship, 8 direction angles are total, 0 °, 45 °, 90 °, 135 °, 180 °, 225 °, 270 °, 315 °, then euclidean distance is used as the modular length, and the angle of the direction angle is used as the vector angle construction point->Is a neighborhood vector of (1), and all other points except for the middle point in the neighborhood have corresponding vectors +.>As shown in particular in fig. 6. Then dot->Neighborhood vector of->The specific calculation method is as follows:
;
wherein the first in the neighborhood window isThe individual vectors are denoted->Vector modulo isAnd median->The Euclidean distance relative to the peak distance, the vector direction is that it is within the neighborhood window and is +.>Is>Then the total number of vectors in the neighborhood window, in this scenario +.>I.e. 8, these 8 vectors are added to obtain the representation mid-site +.>Neighborhood vector of azimuth distance relation between other pixel points and central point in neighborhood window>. Calculating the remaining pixels in the neighborhood window in the same way>Neighborhood vector of->Thus->Each pixel in the neighborhood window has a neighborhood vector.
And calculating the similarity between the neighborhood vector of each pixel point in the neighborhood window and the neighborhood vector of the center point. Specifically, the cosine similarity is used to calculate the inner and outer sums of the neighborhood windowMost similar neighborhood vector value->Is marked as->。
And determining whether the pixel points contained in the gray value subsequence corresponding to the peak point are in the scratch area or not based on the similarity. Specifically, the neighborhood vector is notedThe autocorrelation sequence of the straight line where the corresponding pixel point is located is +.>When it is associated with an autocorrelation sequence +.>When the similarity is high, the autocorrelation sequence can be considered +.>Middle peak point->The pixel points contained in the corresponding subsequence are in the scratch area.
In an embodiment, determining pearson coefficients of an autocorrelation sequence of a straight line where a pixel point corresponding to a neighborhood vector with highest similarity is located and an autocorrelation sequence of a straight line where a peak point is located; and determining whether the pixel points contained in the gray value subsequence corresponding to the peak point are in the scratch area or not based on the Pearson coefficient. Specifically, the peak point is calculatedThe self-correlation sequence->Sites in the subsequence corresponding to the peak value +.>The autocorrelation sequence of the most similar pixel point in the neighborhood +.>Is recorded as the Pearson coefficient of (2)When->The closer to 1, the higher the similarity of the two autocorrelation sequences, the stronger the correlation, and when +.>When the number of the sequences is less than 0.5, the similarity of the two autocorrelation sequences is weak correlation, and the two autocorrelation sequences are +.>Below 0, this indicates that there is no similarity between the two autocorrelation sequences, that is to say the peak +.>The pixel points contained in the corresponding sub-sequence are not the pixel points of the scratch area. Threshold value can be set according to the analysis content>When the pearson coefficient between two autocorrelation sequences is greater than the threshold +.>In this case, it is considered that the pixel point included in the peak corresponding sub-sequence is located in the scratch area, and a threshold value may be set therein>Is an empirical value of 0.8, that is, when the pearson coefficient of the two autocorrelation sequences is equal to or greater than 0.8, the peak point in the autocorrelation sequence is +.>And the pixel points contained in the corresponding subsequence are positioned in the scratch area, and the like, and all the pixel points of the scratch area in the ROI area are calculated, so that the scratch area can be obtained, and the scratch detection is realized.
According to the method, based on the gray level image of the shell of the precision pressure gauge, the image segmentation method based on edge detection is used for segmenting the ROI, radon transformation is used for defect characteristics, local characteristics in the image are amplified from different projection angles or are more remarkable, the scale direction invariant characteristic of a scratch detection algorithm is guaranteed, the applicability of the whole detection algorithm is higher, and simultaneously, an autocorrelation sequence is built for a gray level value sequence corresponding to the defect region so as to reflect the change condition of pixel points of the linear region corresponding to the sequence, and the detection precision of the final scratch region is higher.
The foregoing is only the embodiments of the present application, and therefore, the patent scope of the application is not limited thereto, and all equivalent structures or equivalent processes using the descriptions of the present application and the accompanying drawings, or direct or indirect application in other related technical fields, are included in the scope of the application.
Claims (9)
1. The method for detecting the surface scratches of the metal stamping part based on artificial intelligence is characterized by comprising the following steps of:
collecting a surface image of the metal stamping part, and processing the surface image to obtain a significant area;
carrying out radon transformation on the salient region to obtain a straight line corresponding to each projection angle in the salient region;
calculating an autocorrelation sequence corresponding to each straight line based on the gray value of the pixel point on each straight line;
determining a scratch area based on the autocorrelation sequence;
calculating an autocorrelation sequence corresponding to each straight line based on the gray value of the pixel point on each straight line, including:
determining a cutting point, and dividing the gray value sequence based on the cutting point to obtain a plurality of gray value subsequences; the gray value sequence is a sequence formed by gray values of all pixel points on the straight line;
calculating an autocorrelation coefficient of each gray value subsequence;
and sequencing the autocorrelation coefficients of the gray value subsequences to obtain an autocorrelation sequence of a gray value sequence, wherein the autocorrelation sequence of the gray value sequence is the autocorrelation sequence corresponding to the straight line.
2. The method for detecting scratches on a metal stamping part surface based on artificial intelligence of claim 1, wherein determining the cutting point comprises:
and calculating the breakpoint of each gray value sequence by using an accumulation and verification method, and taking the breakpoint as the cutting point.
3. The method for detecting scratches on a metal stamping part surface based on artificial intelligence of claim 1, wherein calculating the autocorrelation coefficient of each sub-sequence of gray values comprises:
;
wherein ,for grey value sequences->First->Gray value subsequence->Is a coefficient of autocorrelation of (a); />Is->Gray value subsequence->Middle->Element(s)>For grey value sequences->Mean value of->Is->Sub-sequence of gray valuesHysteresis step number of autocorrelation coefficients of +.>For grey value sequences->Middle->Gray value subsequence->Total number of inner pixels.
4. The method for detecting scratches on a metal stamping part surface based on artificial intelligence of claim 1, wherein determining a scratch area based on the autocorrelation sequence comprises:
determining peak points corresponding to the autocorrelation sequences of all gray value sequences;
determining a center point of a straight line where the peak point is located based on a middle point of the pixel points contained in the gray value subsequence corresponding to the peak point;
converting the gray level map of the salient region into a distance map of a relative peak point by taking the central point as a distance origin, wherein the value of a pixel point in the distance map of the relative peak point represents the distance between the pixel point and the central point;
and determining a scratch area based on the relative peak point distance map.
5. The method for detecting scratches on a metal stamping part surface based on artificial intelligence of claim 4, wherein determining a scratch area based on the relative peak point distance map comprises:
constructing a neighborhood window by taking the central point as the center;
calculating neighborhood vectors of the center point and other pixel points in the neighborhood window;
calculating the similarity between the neighborhood vector of each pixel point in the neighborhood window and the neighborhood vector of the center point;
and determining whether the pixel points contained in the gray value subsequence corresponding to the peak point are in the scratch area or not based on the similarity.
6. The method for detecting scratches on a metal stamping part surface based on artificial intelligence of claim 5, wherein determining whether the pixel point included in the gray value subsequence corresponding to the peak point is in the scratch area based on the similarity comprises:
determining pearson coefficients of an autocorrelation sequence of a straight line where a pixel point corresponding to a neighborhood vector with highest similarity is located and an autocorrelation sequence of a straight line where a peak point is located;
and determining whether the pixel points contained in the gray value subsequence corresponding to the peak point are in the scratch area or not based on the Pelson coefficient.
7. The method for detecting scratches on a metal stamping part surface based on artificial intelligence according to claim 6, wherein if the pearson coefficient is greater than a preset value, determining that the pixel points contained in the gray value sub-sequence corresponding to the peak point are in the scratch area, thereby determining all the pixel points in the scratch area in the significant area to detect scratches.
8. The method for detecting scratches on a metal stamping part surface based on artificial intelligence according to claim 1, wherein the steps of collecting the metal stamping part surface image and processing the surface image to obtain a salient region comprise:
and processing the surface image by using a residual spectrum algorithm, so as to obtain a significant region.
9. The method for detecting scratches on a metal stamping part surface based on artificial intelligence according to claim 8, wherein before processing the surface image by using a residual spectrum algorithm to obtain a salient region, the method comprises:
graying the surface image by using a weighted average method;
and carrying out noise reduction treatment on the image subjected to graying.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310752430.8A CN116523904B (en) | 2023-06-26 | 2023-06-26 | Artificial intelligence-based metal stamping part surface scratch detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310752430.8A CN116523904B (en) | 2023-06-26 | 2023-06-26 | Artificial intelligence-based metal stamping part surface scratch detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116523904A CN116523904A (en) | 2023-08-01 |
CN116523904B true CN116523904B (en) | 2023-09-08 |
Family
ID=87401454
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310752430.8A Active CN116523904B (en) | 2023-06-26 | 2023-06-26 | Artificial intelligence-based metal stamping part surface scratch detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116523904B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103236065A (en) * | 2013-05-09 | 2013-08-07 | 中南大学 | Biochip analysis method based on active contour model and cell neural network |
CN109276296A (en) * | 2018-12-02 | 2019-01-29 | 沈阳聚声医疗***有限公司 | A kind of puncture needle method for visualizing based on two-dimensional ultrasound image |
CN110852992A (en) * | 2019-10-11 | 2020-02-28 | 中国科学院国家空间科学中心 | Ship trail detection method based on top hat transformation and Radon transformation |
WO2020244098A1 (en) * | 2019-06-05 | 2020-12-10 | 山东科技大学 | Method for detecting and locating metal needle in x-ray ct image |
CN115272335A (en) * | 2022-09-29 | 2022-11-01 | 江苏万森绿建装配式建筑有限公司 | Metallurgical metal surface defect detection method based on significance detection |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8587666B2 (en) * | 2011-02-15 | 2013-11-19 | DigitalOptics Corporation Europe Limited | Object detection from image profiles within sequences of acquired digital images |
-
2023
- 2023-06-26 CN CN202310752430.8A patent/CN116523904B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103236065A (en) * | 2013-05-09 | 2013-08-07 | 中南大学 | Biochip analysis method based on active contour model and cell neural network |
CN109276296A (en) * | 2018-12-02 | 2019-01-29 | 沈阳聚声医疗***有限公司 | A kind of puncture needle method for visualizing based on two-dimensional ultrasound image |
WO2020244098A1 (en) * | 2019-06-05 | 2020-12-10 | 山东科技大学 | Method for detecting and locating metal needle in x-ray ct image |
CN110852992A (en) * | 2019-10-11 | 2020-02-28 | 中国科学院国家空间科学中心 | Ship trail detection method based on top hat transformation and Radon transformation |
CN115272335A (en) * | 2022-09-29 | 2022-11-01 | 江苏万森绿建装配式建筑有限公司 | Metallurgical metal surface defect detection method based on significance detection |
Non-Patent Citations (1)
Title |
---|
纬编针织物疵点实时智能检测的研究;孙尧;《中国博士学位论文全文数据库 (信息科技辑)》(第8期);第I138-46页 * |
Also Published As
Publication number | Publication date |
---|---|
CN116523904A (en) | 2023-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117078671B (en) | Thyroid ultrasonic image intelligent analysis system | |
CN109978848B (en) | Method for detecting hard exudation in fundus image based on multi-light-source color constancy model | |
CN110766708B (en) | Image comparison method based on contour similarity | |
CN117315289B (en) | Aeroengine blade contour edge detection method based on image processing | |
Khalid et al. | Bhattacharyya Coefficient in Correlation of Gray-Scale Objects. | |
CN116883408B (en) | Integrating instrument shell defect detection method based on artificial intelligence | |
CN102340620B (en) | Mahalanobis-distance-based video image background detection method | |
CN116721107A (en) | Intelligent monitoring system for cable production quality | |
CN110766657A (en) | Laser interference image quality evaluation method | |
CN116051820A (en) | Single target detection method based on multiple templates | |
CN115639248A (en) | System and method for detecting quality of building outer wall | |
CN115731257A (en) | Leaf form information extraction method based on image | |
CN109063774B (en) | Image tracking effect evaluation method, device and equipment and readable storage medium | |
CN110852292A (en) | Sketch face recognition method based on cross-modal multi-task depth measurement learning | |
CN116523904B (en) | Artificial intelligence-based metal stamping part surface scratch detection method | |
CN113052794A (en) | Image definition recognition method based on edge features | |
CN112734816A (en) | Heterogeneous image registration method based on CSS-Delaunay | |
CN112329662A (en) | Multi-view saliency estimation method based on unsupervised learning | |
CN109544614B (en) | Method for identifying matched image pair based on image low-frequency information similarity | |
CN112085683B (en) | Depth map credibility detection method in saliency detection | |
CN107273801B (en) | Method for detecting abnormal points by video multi-target tracking | |
CN113643290B (en) | Straw counting method and device based on image processing and storage medium | |
CN113409334B (en) | Centroid-based structured light angle point detection method | |
CN111626325B (en) | Feature-based image matching method | |
CN110222599B (en) | Gait recognition method based on Gaussian mapping |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |