CN115311277B - Pit defect identification method for stainless steel product - Google Patents

Pit defect identification method for stainless steel product Download PDF

Info

Publication number
CN115311277B
CN115311277B CN202211242194.7A CN202211242194A CN115311277B CN 115311277 B CN115311277 B CN 115311277B CN 202211242194 A CN202211242194 A CN 202211242194A CN 115311277 B CN115311277 B CN 115311277B
Authority
CN
China
Prior art keywords
pixel
value
distance
clustering center
pixel value
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
Application number
CN202211242194.7A
Other languages
Chinese (zh)
Other versions
CN115311277A (en
Inventor
严惠卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong Melco Material Technology Co ltd
Original Assignee
Nantong Melco Material Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nantong Melco Material Technology Co ltd filed Critical Nantong Melco Material Technology Co ltd
Priority to CN202211242194.7A priority Critical patent/CN115311277B/en
Publication of CN115311277A publication Critical patent/CN115311277A/en
Application granted granted Critical
Publication of CN115311277B publication Critical patent/CN115311277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention relates to the technical field of image data identification, in particular to a pit defect identification method of a stainless steel product, which comprises the following steps: acquiring RGB images of the surface of the stainless steel metal through identification, converting the RGB images into LAB images, segmenting the images, and identifying connected domains to obtain a plurality of connected domains; calculating the density of the pixel points, and determining a clustering center according to the density; calculating the distance between the clustering centers to further obtain an optimal clustering center; and determining the optimal clustering center according to the distance from the optimal clustering center to other pixel points, and further performing superpixel segmentation to obtain a defect region image to obtain a pit defect region of the stainless steel product. The invention can obtain accurate super-pixel segmentation results, so that accurate pit areas can be identified and obtained.

Description

Pit defect identification method for stainless steel product
Technical Field
The invention relates to the technical field of image data identification, in particular to a pit defect identification method for a stainless steel product.
Background
In the process of storage and transportation of stainless steel products, the pits can be damaged by the cushion caused by the looseness of bolts and the protrusion of nuts on the transportation frame.
In the patent CN202111587840.9, when the surface pit defect of the product is detected, the gray level image is subjected to sliding window to obtain the gray level co-occurrence matrix of each sliding window area, and the contrast value of each sliding window area is clustered to obtain possible pit pixels; calculating the directional heart rate; acquiring coordinates of all pixel points which are greater than a first threshold value; making a circle by using the coordinate mean value of the pixel points of the same pit, and calculating the gradient coincidence rate; and changing the set radius, obtaining all maximum gradient coincidence rates, performing Gaussian smoothing to obtain a boundary circle with a corresponding angle, and fitting to obtain a pit boundary. The method has the defects that the contrast value of the gray level co-occurrence matrix of the sliding window area obtained by identification is calculated, and then clustering is carried out according to the contrast to obtain possible pit pixels. Clustering is carried out according to the contrast value, and due to the fact that the metal product is greatly influenced by illumination and the like, the contrast of a sunken area and a non-sunken area is also large, and therefore the problem that partial pit pixel points cannot be accurately divided exists.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method for identifying the pit defects of a stainless steel product, which adopts the following technical scheme:
acquiring a surface RGB image of the stainless steel metal through identification, converting the RGB image into an LAB image, segmenting the image, and identifying connected domains to obtain a plurality of connected domains;
calculating the density of the pixel points with the same pixel value according to the pixel values of the pixel points of all connected domains, and taking the pixel point with the maximum density as a clustering center; the clustering center is a 3 multiplied by 3 pixel block, and pixel values of pixel points in the pixel block are equal;
determining three clustering centers belonging to the same region according to the distances among the three clustering centers, calculating the pixel value mean values of the three clustering centers, and taking the pixel value mean value meeting a threshold value as an optimal clustering center;
and calculating the distance between other pixel points and each pixel point in the optimal clustering center according to the pixel value of each channel of the pixel point in the LAB color space, acquiring the pixel point in the optimal clustering center corresponding to the minimum value of the distance of any pixel point as the optimal clustering center of the pixel point, and further performing superpixel segmentation to obtain a defect region image and obtain a pit defect region of the stainless steel product.
Preferably, the segmenting the image is specifically: and segmenting the image by using an OTSU threshold segmentation algorithm.
Preferably, the method for obtaining the density of the pixel points of the same pixel value specifically comprises:
Figure 279841DEST_PATH_IMAGE002
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE003
represents the density of a pixel having the same pixel value, based on the pixel value>
Figure 392285DEST_PATH_IMAGE004
Indicates that the pixel value is->
Figure DEST_PATH_IMAGE005
The number of the pixel points, in>
Figure 166206DEST_PATH_IMAGE006
Represents a number of levels of pixel values>
Figure DEST_PATH_IMAGE007
Indicates that the pixel value is->
Figure 641180DEST_PATH_IMAGE005
The occupation ratio of the pixel point in the area is greater than or equal to>
Figure 248879DEST_PATH_IMAGE008
The distance between the pixels with the same pixel value is represented.
Preferably, the preferable clustering center that the pixel value mean satisfies the threshold is specifically:
the condition that the distance satisfies the threshold is as follows:
Figure 425783DEST_PATH_IMAGE010
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE011
、/>
Figure 485618DEST_PATH_IMAGE012
、/>
Figure 939733DEST_PATH_IMAGE012
represents the distance between the three cluster centers, and->
Figure DEST_PATH_IMAGE013
、/>
Figure 311809DEST_PATH_IMAGE014
Respectively representing the coordinates of the central pixel points of the two cluster centers.
Preferably, the calculating the distance between the other pixel points and each pixel point in the cluster center according to the pixel value of each channel of the pixel point in the LAB color space specifically includes:
Figure 726741DEST_PATH_IMAGE016
Figure 248989DEST_PATH_IMAGE018
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE019
representing the color distance between pixels>
Figure 151086DEST_PATH_IMAGE020
Represents the spatial distance between the pixels, is>
Figure DEST_PATH_IMAGE021
、/>
Figure 179216DEST_PATH_IMAGE022
、/>
Figure DEST_PATH_IMAGE023
、/>
Figure 533974DEST_PATH_IMAGE024
、/>
Figure DEST_PATH_IMAGE025
、/>
Figure 858DEST_PATH_IMAGE026
Coordinates of pixel values of respective channels in the LAB color space are respectively expressed. />
Figure DEST_PATH_IMAGE027
、/>
Figure 757462DEST_PATH_IMAGE028
Are spatial coordinates.
The embodiment of the invention at least has the following beneficial effects:
the invention selects the clustering center according to the characteristics of the image, carries out superpixel segmentation on the image, and identifies and obtains the superpixel block, thereby achieving the purpose of defect detection. And the optimal clustering center is obtained through three times of iterative identification, and can reflect the pixel relationship among the edge of the pit, the inner wall of the pit and the central bright spot, so that the accurate pit area can be identified and obtained by performing superpixel segmentation according to the optimal clustering center.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a method flow chart of a method for identifying a pit defect in a stainless steel product according to the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to the method for identifying the pit defect of the stainless steel product according to the present invention, and the specific implementation manner, structure, features and effects thereof, with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the method for identifying the pit defects of the stainless steel product provided by the invention in detail by combining with the accompanying drawings.
Example (b):
the specific scenes aimed by the invention are as follows: when the pit defect on the surface of the stainless steel product is detected, because the metal surface can reflect light, the extracted edge is inaccurate due to edge blurring when the pit is extracted.
Referring to fig. 1, a flow chart of a method for identifying a pit defect of a stainless steel product according to an embodiment of the present invention is shown, wherein the method comprises the following steps:
the method comprises the steps of firstly, acquiring RGB images of the surface of the stainless steel metal through recognition, converting the RGB images into LAB images, segmenting the images, and recognizing connected domains to obtain a plurality of connected domains.
Specifically, the pit defect on the surface of the stainless steel product needs to be detected, so that a surface image of the stainless steel metal needs to be acquired. Because the color characteristics of the LAB color space are more obvious, the LAB color space is more suitable for the application scene of the invention. Converting the RGB image to the LAB color space is a well known technique and will not be described in detail here.
Because the edge of the pit can form a bright edge line, the protruding degree of the edge is higher than that of the flat area, the central position of the pit can also form a bright area, and the pixel value of the bright area is larger than that of the inner wall of the pit, when the initial edge pixel point of the image is obtained through identification, the initial edge pixel point of the image needs to be segmented according to the change of the pixel value of the image edge pixel point, and the edge pixel point of the suspected pit area is searched.
Since the edge of the pit forms a certain protrusion, a shadow-like region is formed on the inner side or the outer side of the edge, but the edge is blurred due to reflection, and the blurred region and the normal edge region cannot be accurately connected together, in this embodiment, the image is firstly segmented by an OTSU threshold segmentation algorithm, and the segmented image is identified to obtain an initial connected domain. However, a plurality of connected domains can be formed by a pit defect, the bright edge of the outermost circle, the inner wall of the pit with a smaller pixel value and the center position of the pit need to select the optimal clustering center during clustering, and then the image is subjected to superpixel segmentation.
The selection of the clustering center of the invention relates to the accuracy of super-pixel segmentation, so that the clustering center is determined according to the pixel density of different connected domains when the clustering center is searched. Because the pixel value change of each connected domain is different in the three connected domains of a pit area, the pixel value of the pixel point in the central area of the pit is larger and is densely distributed, and a bright circular spot is formed; the inner wall pixel value of the pit is smaller and is positioned in a transition area of two areas, namely the edge of the pit and the center of the pit; while the peripheral edge region forms a larger area with the flat region due to the reflection.
It should be noted that, the present invention needs to detect the surface pit defect of the stainless steel product, because the surface of the stainless steel metal reflects light, when the surface of the stainless steel product is subjected to threshold segmentation, the segmented pit edge is inaccurate due to unclear boundary. Therefore, in order to obtain an accurate pit edge, the embodiment firstly identifies an edge initial pixel point of a suspected pit defect in an obtained image as a clustering center, then carries out superpixel segmentation on the image, and identifies a superpixel block of the obtained image.
Calculating the density of pixel points with the same pixel value according to the pixel values of the pixel points in each region, and taking the pixel point with the maximum density as a clustering center; the clustering center is a 3 x 3 pixel block, and the pixel values of the pixel points in the pixel block are equal.
Specifically, the density of the pixels with the same pixel value in each region is calculated, and the most clustered center pixel of the pixel with the highest density is calculated, and the pixels with the same pixel value must be continuous pixels.
Assume that the pixel value of a pixel point of a certain connection domain is
Figure DEST_PATH_IMAGE029
And calculating the density of the pixel points with the same pixel value by the following calculation formula:
Figure 230861DEST_PATH_IMAGE030
in the formula (I), the compound is shown in the specification,
Figure 745019DEST_PATH_IMAGE003
representing the density of pixels having the same pixel value, based on the pixel value>
Figure 733704DEST_PATH_IMAGE004
Indicates that the pixel value is->
Figure 751338DEST_PATH_IMAGE005
The number of the pixel points of (a),
Figure 183588DEST_PATH_IMAGE006
represents a number of levels of pixel values>
Figure 919463DEST_PATH_IMAGE007
Representing a pixel value of +>
Figure 711838DEST_PATH_IMAGE005
Based on the number of the pixel points in the area, is combined with the area>
Figure 583979DEST_PATH_IMAGE008
Representing the distance between pixels having the same pixel value, wherein &>
Figure DEST_PATH_IMAGE031
Indicates that the pixel value is->
Figure 655972DEST_PATH_IMAGE005
Based on the distance between the pixel points, and>
Figure 3776DEST_PATH_IMAGE032
representing a pixel point->
Figure 209630DEST_PATH_IMAGE029
In the horizontal and vertical coordinates of (c), in combination with the combination of>
Figure DEST_PATH_IMAGE033
Representing all possibilities for combination between two regions, 2 represents the repeated calculation between two regions, so a division by 2 is required. The density of the region is represented by calculating the distance between every two pixel points and then averaging all the distances, the more the number of the pixel points with the same pixel value in the same connected domain is, and the more the distance between the pixel points is, the greater the density of the pixel points is. I.e. is>
Figure 546064DEST_PATH_IMAGE003
Is the pixel value is->
Figure 303805DEST_PATH_IMAGE005
The density of the pixel points.
The density of pixel points with the same pixel value in the same connected domain is calculated, and the pixel point with the maximum density is used as a clustering center, but the pixel point of the clustering center must be a continuous pixel point, so that a 3 x 3 template needs to be screened and selected. Namely, the pixel point with the maximum density is obtained as the central pixel point of the pixel block of 3 × 3, the pixel values of the surrounding neighborhood pixel points of the pixel point are the same as the pixel value of the central pixel point, then the pixel block is used as the clustering center, and the mathematical expression is as follows:
Figure 748693DEST_PATH_IMAGE034
. The clustering centers of different areas are identified and obtained by the same method, the clustering center is not a single pixel point but a->
Figure DEST_PATH_IMAGE035
The pixel block of (2) thus selecting the clustering center has the advantages that: one point is not randomly selected, but a point with the maximum density is selected from all data points to serve as a first initial clustering center point, the possibility of selecting outliers is avoided to a certain extent, and meanwhile, the value of a proper radius needs to be adjusted.
And step three, determining three clustering centers belonging to the same region according to the distances among the three clustering centers, calculating the pixel value mean values of the three clustering centers, and taking the pixel value mean values meeting a threshold value as an optimal clustering center.
In particular, according to the cluster center obtained by the above identification, since the final purpose is to divide the same pit defect rather than different connected domains when performing superpixel division, the pixel relationship between the stainless steel metal pit connected domains needs to be considered. And then performing super-pixel segmentation according to edge variation between different connected domains.
In the threshold segmentation process, three connected domains of the same pit, namely the bright edge at the outermost circle, the pit inner wall with a smaller pixel value and the pit center position are identified and obtained, and the final clustering center is determined according to the clustering centers of the three connected domains obtained by identification. The change of the edge pixel values of the three connected domains is severe, so that the pixel points at the edge cannot be selected when the clustering center is selected, and excessive segmentation is prevented when segmentation is performed.
The cluster center selected at the first time is one
Figure 365094DEST_PATH_IMAGE035
And selecting three proper pixel blocks, and calculating the pixel mean value of the pixel blocks to serve as the clustering center of the same region. Set a->
Figure 602040DEST_PATH_IMAGE036
The sliding window is slid to four directions of upper, lower, left and right by the pixel block with the largest pixel value, and the pixel mean value ^ is calculated in the sliding window>
Figure DEST_PATH_IMAGE037
Because the biggest pixel of pixel value is marginal pixel or central pixel, so in the in-process that slides to four directions, the sliding window that has at least one direction can pass through three connected domain, and the average pixel value of sliding window can big to the size grow again, consequently calculates the distance D of three clustering piece according to the change of sliding window pixel value, if the distance satisfies:
Figure 750256DEST_PATH_IMAGE010
in the formula (I), the compound is shown in the specification,
Figure 948019DEST_PATH_IMAGE011
、/>
Figure 354730DEST_PATH_IMAGE012
、/>
Figure 321549DEST_PATH_IMAGE012
and representing the distance between the three clustering centers, wherein the distance can be obtained by calculating the pixel distance between the center pixel points of the clustering centers or the Euclidean distance between the center pixel points.
Figure 171824DEST_PATH_IMAGE038
Representing the distance between two sliding windows in different connected domains where the pixel value is largest. />
Figure 856884DEST_PATH_IMAGE013
Figure 332864DEST_PATH_IMAGE014
Respectively representing the coordinates of the central pixel points of the two cluster centers. And determining three clustering pixel blocks belonging to the same region in the three connected domains obtained by segmentation according to the change of the pixel values of the pixel points.
Then, calculating the pixel mean value of the three cluster pixel blocks according to the obtained three cluster pixel blocks
Figure DEST_PATH_IMAGE039
Then the pixel block that satisfies the pixel value is taken as the new cluster center. Because a plurality of pixel points meeting the threshold value exist, only one pixel block is needed by the selected clustering center, and the condition that the pixel point meets the condition of being in or in the device is calculated>
Figure 498398DEST_PATH_IMAGE035
And taking the pixel blocks with the same pixel value in the template as a new cluster center, and recording as the preferred cluster center.
And step four, calculating the distance between other pixel points and each pixel point in the clustering center according to the pixel value of each channel of the pixel point in the LAB color space, obtaining the pixel point in the clustering center corresponding to the minimum value of the distance of any pixel point as the optimal clustering center of the pixel point, and further carrying out superpixel segmentation to obtain a defect region image and obtain a pit defect region of the stainless steel product.
Specifically, a new cluster center of the pit region is identified and obtained by the above method, and superpixel segmentation is performed according to the identified optimal cluster center. Firstly, the distance between pixels is calculated, wherein the distance between each pixel point in the area and the clustering center is calculated by using a mode of combining the color distance and the space distance, and the calculation formula is as follows:
Figure 909787DEST_PATH_IMAGE016
Figure 941197DEST_PATH_IMAGE018
in the formula (I), the compound is shown in the specification,
Figure 830656DEST_PATH_IMAGE019
represents the color distance between pixels->
Figure 568805DEST_PATH_IMAGE020
Represents the spatial distance between the pixels, is>
Figure 757953DEST_PATH_IMAGE021
、/>
Figure 152025DEST_PATH_IMAGE022
、/>
Figure 969809DEST_PATH_IMAGE023
、/>
Figure 765726DEST_PATH_IMAGE024
、/>
Figure 128706DEST_PATH_IMAGE025
、/>
Figure 10074DEST_PATH_IMAGE026
Coordinates of pixel values of respective channels in the LAB color space are respectively expressed. />
Figure 365969DEST_PATH_IMAGE027
、/>
Figure 16393DEST_PATH_IMAGE028
Are spatial coordinates. The formula is the existing formula and is not logically explained. A final metric distance ≦ is then calculated>
Figure 815853DEST_PATH_IMAGE040
Because each pixel point can be searched by a plurality of seed points, each pixel point has a distance with the surrounding seed points, and the seed point corresponding to the minimum value is taken as the optimal clustering center of the pixel point. I.e. due to the cluster center being one
Figure 184517DEST_PATH_IMAGE035
Therefore, the distance between other pixel points and each pixel point in the cluster center needs to be obtained, and the pixel point in the cluster center corresponding to the minimum distance value is used as the optimal cluster center of other pixel points. />
Further, superpixel segmentation is carried out according to the obtained optimal clustering center, because threshold segmentation processing is carried out on the image in the steps, a defect area is obtained through identification, only part of the edge of the defect area is not clear, a clear and accurate edge is obtained after superpixel segmentation identification, the image obtained after the original image is subjected to threshold segmentation is superposed with the image obtained after the superpixel segmentation, a defect area image is obtained, further, a pit defect area of a stainless steel product can be identified and obtained, and the defect area is marked, so that manual check is facilitated.
Finally, it is to be noted that connected domains are obtained through threshold segmentation and identification, then density clustering is carried out on the connected domains according to the characteristics of the images, and an initial clustering center is obtained through identification, wherein the clustering center is the clustering center of a certain connected domain; and identifying and obtaining an iterative clustering center according to the change of the edge pixels, identifying the clustering center of the obtained iterative clustering center, which represents the defect area of the whole pit, finally identifying and obtaining the optimal clustering center according to the distance between the pixels, performing super-pixel segmentation on the image, and identifying and obtaining the accurate defect area.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; the modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present application, and are included in the protection scope of the present application.

Claims (2)

1. A method for identifying a pit defect in a stainless steel product, the method comprising:
acquiring RGB images of the surface of the stainless steel metal through identification, converting the RGB images into LAB images, segmenting the images, and identifying connected domains to obtain a plurality of connected domains;
calculating the density of the pixel points with the same pixel value according to the pixel values of the pixel points of all connected domains, and taking the pixel point with the maximum density as a clustering center; the clustering center is a 3 multiplied by 3 pixel block, and pixel values of pixel points in the pixel block are equal;
determining three clustering centers belonging to the same region according to the distances among the three clustering centers, calculating the pixel value mean values of the three clustering centers, and taking the pixel value mean value meeting a threshold value as an optimal clustering center;
calculating the distance between other pixel points and each pixel point in the preferred clustering center according to the pixel value of each channel of the pixel point in the LAB color space, obtaining the pixel point in the preferred clustering center corresponding to the minimum value of the distance of any pixel point as the optimal clustering center of the pixel point, and further carrying out superpixel segmentation to obtain a defect region image and obtain a pit defect region of a stainless steel product;
the method for obtaining the density of the pixel points with the same pixel value specifically comprises the following steps:
Figure DEST_PATH_IMAGE002
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE004
represents the density of a pixel having the same pixel value, based on the pixel value>
Figure DEST_PATH_IMAGE006
Indicates that the pixel value is->
Figure DEST_PATH_IMAGE008
The number of the pixel points is greater or less>
Figure DEST_PATH_IMAGE010
Represents a number of levels of pixel values>
Figure DEST_PATH_IMAGE012
Indicates that the pixel value is->
Figure 478787DEST_PATH_IMAGE008
The occupation ratio of the pixel point in the area is greater than or equal to>
Figure DEST_PATH_IMAGE014
Representing the distance between pixel points with the same pixel value;
the specific preferred clustering center that the pixel value mean value satisfies the threshold is as follows:
the condition that the distance satisfies the threshold is as follows:
Figure DEST_PATH_IMAGE016
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE018
、/>
Figure DEST_PATH_IMAGE020
、/>
Figure 333610DEST_PATH_IMAGE020
represents the distance between the three cluster centers, and->
Figure DEST_PATH_IMAGE022
、/>
Figure DEST_PATH_IMAGE024
Respectively representing the coordinates of central pixel points of the two clustering centers;
the specific steps of calculating the distance between other pixel points and each pixel point in the cluster center according to the pixel value of each channel of the pixel point in the LAB color space are as follows:
Figure DEST_PATH_IMAGE026
Figure DEST_PATH_IMAGE028
in the formula (I), the compound is shown in the specification,
Figure DEST_PATH_IMAGE030
represents the color distance between pixels->
Figure DEST_PATH_IMAGE032
Representing the spatial distance between the pixels,/>
Figure DEST_PATH_IMAGE034
、/>
Figure DEST_PATH_IMAGE036
、/>
Figure DEST_PATH_IMAGE038
、/>
Figure DEST_PATH_IMAGE040
、/>
Figure DEST_PATH_IMAGE042
、/>
Figure DEST_PATH_IMAGE044
respectively representing the coordinates of the pixel values of the channels in the LAB color space, based on the value of the pixel value in the LAB color space>
Figure DEST_PATH_IMAGE046
、/>
Figure DEST_PATH_IMAGE048
、/>
Figure DEST_PATH_IMAGE050
、/>
Figure DEST_PATH_IMAGE052
Are spatial coordinates.
2. The method for identifying the pit defect of the stainless steel product according to claim 1, wherein the segmenting the image is specifically as follows: and segmenting the image by using an OTSU threshold segmentation algorithm.
CN202211242194.7A 2022-10-11 2022-10-11 Pit defect identification method for stainless steel product Active CN115311277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211242194.7A CN115311277B (en) 2022-10-11 2022-10-11 Pit defect identification method for stainless steel product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211242194.7A CN115311277B (en) 2022-10-11 2022-10-11 Pit defect identification method for stainless steel product

Publications (2)

Publication Number Publication Date
CN115311277A CN115311277A (en) 2022-11-08
CN115311277B true CN115311277B (en) 2023-04-07

Family

ID=83867645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211242194.7A Active CN115311277B (en) 2022-10-11 2022-10-11 Pit defect identification method for stainless steel product

Country Status (1)

Country Link
CN (1) CN115311277B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115511889B (en) * 2022-11-23 2023-03-03 江苏惠汕新能源集团有限公司 Method for detecting welding defects on surface of solar cell panel bracket
CN115661667B (en) * 2022-12-13 2023-04-07 济宁市土哥农业服务有限公司 Method for identifying impurities in descurainia sophia seeds based on computer vision
CN116091499B (en) * 2023-04-07 2023-06-20 山东中胜涂料有限公司 Abnormal paint production identification system
CN116597188B (en) * 2023-07-17 2023-09-05 山东北国发展集团有限公司 Vision-based solid waste resource utilization method and system
CN116645367B (en) * 2023-07-27 2023-12-01 山东昌啸商贸有限公司 Steel plate cutting quality detection method for high-end manufacturing
CN116645374B (en) * 2023-07-27 2024-03-22 深圳思谋信息科技有限公司 Point defect detection method, point defect detection device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112489025A (en) * 2020-12-07 2021-03-12 南京钢铁股份有限公司 Method for identifying pit defects on surface of continuous casting billet
CN114998198A (en) * 2022-04-24 2022-09-02 南通夏克塑料包装有限公司 Injection molding surface defect identification method
CN115018838B (en) * 2022-08-08 2022-11-29 和诚精密管业(南通)有限公司 Method for identifying pitting defects on surface of oxidized steel pipe material
CN115082683B (en) * 2022-08-22 2023-07-14 深圳市松泽实业发展有限公司 Injection molding defect detection method based on image processing

Also Published As

Publication number Publication date
CN115311277A (en) 2022-11-08

Similar Documents

Publication Publication Date Title
CN115311277B (en) Pit defect identification method for stainless steel product
CN114862862B (en) Pump body cold shut defect identification method and system based on image processing
CN115018828B (en) Defect detection method for electronic component
CN115311292B (en) Strip steel surface defect detection method and system based on image processing
CN115829883A (en) Surface image denoising method for dissimilar metal structural member
CN110197153B (en) Automatic wall identification method in house type graph
CN109741356B (en) Sub-pixel edge detection method and system
CN113554629A (en) Strip steel red rust defect detection method based on artificial intelligence
CN115511889A (en) Method for detecting welding defects on surface of solar cell panel bracket
JP2024050880A (en) Character segmentation method, device, and computer-readable storage medium
CN116740070B (en) Plastic pipeline appearance defect detection method based on machine vision
CN115797342B (en) Industrial control capacitive touch LCD display assembly defect detection method
CN114820625B (en) Automobile top block defect detection method
CN115131375B (en) Automatic ore cutting method
CN113112519B (en) Key frame screening method based on interested target distribution
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN115330645A (en) Welding image enhancement method
CN115359237A (en) Gear broken tooth identification method based on pattern identification
CN115511907B (en) Scratch detection method for LED screen
CN111047603A (en) Aerial image hybrid segmentation algorithm based on novel Markov random field and region combination
CN110648330A (en) Defect detection method for camera glass
CN116630813A (en) Highway road surface construction quality intelligent detection system
CN109741358B (en) Superpixel segmentation method based on adaptive hypergraph learning
CN104268845A (en) Self-adaptive double local reinforcement method of extreme-value temperature difference short wave infrared image
US6963664B2 (en) Segmentation of digital images

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