CN115330781A - Steel plate defect identification method - Google Patents

Steel plate defect identification method Download PDF

Info

Publication number
CN115330781A
CN115330781A CN202211250374.XA CN202211250374A CN115330781A CN 115330781 A CN115330781 A CN 115330781A CN 202211250374 A CN202211250374 A CN 202211250374A CN 115330781 A CN115330781 A CN 115330781A
Authority
CN
China
Prior art keywords
blocks
image
defect
graph
steel plate
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.)
Granted
Application number
CN202211250374.XA
Other languages
Chinese (zh)
Other versions
CN115330781B (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.)
Qidong Gucheng Stainless Steel Products Co ltd
Original Assignee
Qidong Gucheng Stainless Steel Products 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 Qidong Gucheng Stainless Steel Products Co ltd filed Critical Qidong Gucheng Stainless Steel Products Co ltd
Priority to CN202211250374.XA priority Critical patent/CN115330781B/en
Publication of CN115330781A publication Critical patent/CN115330781A/en
Application granted granted Critical
Publication of CN115330781B publication Critical patent/CN115330781B/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
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • 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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30136Metal
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention relates to the technical field of graphic data identification, in particular to a steel plate defect identification method. The method comprises the following steps: preprocessing the surface image of the steel plate containing the defects to obtain a gray-scale image; dividing the gray scale image into square image blocks with preset sizes, and obtaining a defect judger by utilizing the comprehensive characteristics of the image blocks; obtaining independent blocks in the gray level image, recording the independent blocks as initial independent blocks, and continuously dividing the initial independent blocks to obtain defective pixel blocks with the number of pixels smaller than a preset threshold value; acquiring merging blocks, and combining all the merging blocks into different types of graphs to be decomposed; respectively and continuously decomposing different types of graphs to be decomposed by using corresponding graph decomposition methods to finally obtain a defective pixel block; and extracting a steel plate defect area in the defect pixel block. According to the method, the more accurate estimation range of the steel plate defect area is obtained according to the texture and the gray characteristic of the steel plate defect, and the accuracy of subsequently identifying and classifying the defect is improved.

Description

Steel plate defect identification method
Technical Field
The invention relates to the technical field of graphic data identification, in particular to a steel plate defect identification method.
Background
The application of the steel plate is visible everywhere in the current society, the application of the steel plate is very wide, and the industries such as chemical engineering, mechanical manufacturing, aerospace, automobiles, household appliances and the like have great demand on the steel plate, so the quality requirement on the steel plate is more and more strict, and as a main product in the steel industry, different types of defects can appear on the surface of the steel plate due to the production process, the production environment, the production equipment faults and the like during the production of the steel plate, the defects not only can affect the appearance of the steel plate, but also can limit the application of the steel plate, and can be directly scrapped seriously, so the economic benefit of steel plate manufacturers can be reduced.
The defects on the surface of the steel plate are distributed randomly in the space position and have complicated morphological structures, the defects on the surface of the steel plate are difficult to be accurately segmented by adopting a manual detection method, along with the development of an image processing technology, the surface defects are detected by utilizing threshold segmentation, edge detection and morphological processing of image processing, and the algorithm has a good effect on the condition that the gray values of a normal area and a defect area are obviously changed and the defect area distribution is relatively discrete.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a method for identifying defects of a steel plate, which adopts the following technical solutions:
one embodiment of the invention provides a steel plate defect identification method, which comprises the following steps: preprocessing the surface image of the steel plate containing the defects to obtain a gray-scale image; dividing the gray scale image into square image blocks with preset sizes, obtaining comprehensive characteristics of each image block based on a gray scale histogram and a gray scale co-occurrence matrix of each image block, and obtaining the image block with defects as a defect block by utilizing the comprehensive characteristics of each image block; acquiring a defect judger by utilizing the comprehensive characteristics of each image block;
recording image blocks with defects and without overlapping edges with other image blocks with defects as independent blocks, and recording defect blocks with overlapping edges with other image blocks with defects as combined blocks; recording the independent blocks in the gray image as initial independent blocks, uniformly dividing the initial independent blocks into four primary blocks in a square shape, recording the independent blocks in the four primary blocks as primary independent blocks, continuously dividing the primary independent blocks to obtain secondary independent blocks, continuously dividing until the number of pixels in the finally obtained independent blocks is less than a preset threshold value or a merged block appears, and stopping dividing; taking the independent blocks with the number of pixels smaller than a preset threshold value as defective pixel blocks;
when the merging blocks are divided, combining all the merging blocks into different types of graphs to be decomposed; decomposing different types of graphs to be decomposed by using corresponding graph decomposition methods respectively to obtain different subblocks respectively, and screening the defect subblocks by using a defect judger; merging the defective sub-blocks with coincident edges into a pattern to be decomposed, continuously decomposing by using a corresponding pattern decomposition method to obtain primary sub-blocks and screening out the primary defective sub-blocks with defects until the ratio of the number of the defective sub-blocks in the gray-scale image to all the sub-blocks is maximum or the number of pixels in the finally obtained sub-blocks is less than a preset threshold value, and stopping dividing to obtain defective pixel blocks; and extracting a steel plate defect area in the defect pixel block.
Preferably, the preprocessing the surface image of the steel plate containing the defect to obtain the gray-scale map comprises: graying the image on the surface of the steel plate and enhancing the grayed image by histogram equalization to obtain a grayscale image.
Preferably, the obtaining of the comprehensive characteristics of each image block based on the gray level histogram and the gray level co-occurrence matrix of each image block includes: obtaining the gray features of the image blocks based on the gray histogram of each image block, wherein the gray features comprise gray variance, gray mean, kurtosis, skewness, entropy and energy; acquiring texture features of the image blocks, including energy, entropy, contrast and inverse difference, based on the gray level co-occurrence matrix of the image blocks; and the texture features and the gray features form feature vectors as comprehensive features of the image blocks.
Preferably, the obtaining the defective image block as the defective block by using the comprehensive features of the image blocks comprises: clustering is carried out on the basis of comprehensive characteristics of each image block to divide the image blocks into two types, wherein the type with a large number of image blocks is the image block without defects; and the image block with the smaller number of image blocks is the image block with the defect, and the image block with the defect is used as the defect block.
Preferably, the obtaining a defect determiner using the integrated features of the image block includes: and processing the comprehensive characteristics of the image block without the defect and the defect block by utilizing an LDA algorithm to obtain a weight vector and a weight threshold, and obtaining a defect judger based on the weight vector and the weight threshold.
Preferably, when the merge block stop division occurs, the grouping all the merge blocks into different types of graphs to be decomposed includes: if only two merging blocks exist in four primary blocks obtained by dividing the initial independent blocks, a graph formed by the two merging blocks is a type of graph to be decomposed and is marked as a first graph; if only three combined blocks exist in four primary blocks obtained by dividing the initial independent blocks, a graph formed by the three combined blocks is a type of graph to be decomposed and is marked as a second graph; and if the four primary blocks obtained by dividing the initial independent blocks are all the merging blocks, the four merging blocks form a type of graph to be decomposed, and the graph is marked as a third graph.
Preferably, decomposing different types of graphs to be decomposed by using corresponding graph decomposition methods respectively comprises: for the first graph, obtaining a line segment of a straight line passing through the center points of the two merging blocks and intersecting two long edges of the first graph, and decomposing the first graph; for the second graph, decomposing the second graph by using straight lines in the horizontal direction and straight lines in the vertical direction passing through the center points of the three merging blocks; and decomposing the third graph by using a straight line in the horizontal direction and a straight line in the vertical direction which pass through the center points of the four merging blocks.
Preferably, the merging the defect sub-blocks with coincident edges into the graph to be decomposed includes: when the defect subblocks with overlapped edges are merged into a graph to be decomposed, the priority level is that the merged third graph is larger than the merged first graph, and the merged first graph is larger than the merged second graph; when the defect sub-blocks with the overlapped edges are combined into the pattern to be decomposed, if the defect sub-blocks with the overlapped edges cannot be combined into the first, second and third patterns, the adjacent defect sub-blocks without defects of the defect sub-blocks with the overlapped edges are used for filling, and the pattern formed after filling is decomposed into the first, second or third patterns.
Preferably, the extracting the defective area of the steel plate in the defective pixel block includes: and (4) performing histogram equalization processing on the defective pixel blocks, and processing the defective pixel blocks subjected to histogram equalization by using a significance FT algorithm to obtain a steel plate defect area.
The embodiment of the invention at least has the following beneficial effects: the method comprises the steps of dividing a gray scale image of a steel plate surface image containing defects to obtain image blocks with preset sizes, and obtaining a defect judger to judge whether the defects exist or not based on comprehensive characteristics of the image blocks; the method comprises the steps of continuously dividing independent image blocks and image blocks which can be combined into blocks, simultaneously, dividing the independent blocks and the images which can be combined into the image blocks and are to be decomposed into different images, improving the fineness degree of the divided image blocks, continuously reducing the sizes of the blocks in the dividing process, enabling the defect areas to occupy most areas of the blocks, and quickly and accurately dividing the defect areas of the steel plate from the defect pixel blocks when the defect areas are extracted in the follow-up process according to the prior art.
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 embodiments or the description of 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 flowchart of a method for identifying defects of a steel plate 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 provides a steel plate defect identification method according to the present invention with reference to the accompanying drawings and preferred embodiments, and the detailed description, structure, features and effects thereof are as follows. In the following description, the different references to "one embodiment" or "another embodiment" do not necessarily refer to 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 steel plate defect identification method provided by the invention in detail with reference to the accompanying drawings.
Example 1:
the main application scenarios of the invention are as follows: the surface image of the produced steel plate is shot, and the areas with the defects in the surface image are divided graphically, so that the areas with the defects can be divided, and the types of the defects on the surface of the steel plate can be identified.
Referring to fig. 1, a method for identifying defects of a steel plate according to an embodiment of the present invention is shown, the method including the following steps:
s1, preprocessing a steel plate surface image containing defects to obtain a gray-scale image; dividing the gray-scale image into square image blocks with preset sizes, obtaining the comprehensive characteristics of each image block based on a gray-scale histogram and a gray-scale co-occurrence matrix of each image block, and obtaining the image block with defects as a defect block by utilizing the comprehensive characteristics of each image block; and obtaining a defect judger by utilizing the comprehensive characteristics of the image blocks.
First, a steel plate surface image including defects needs to be obtained, and when the steel plate surface image is photographed, the surface of a flat steel plate needs to be photographed at a top view angle to obtain the steel plate surface image, wherein the steel plate surface image is a color RGB image, the color RGB image is grayed, and the image after graying is subjected to image enhancement by histogram equalization to obtain a grayscale image.
Further, in the steel sheet defect, the proportion of the defective area is small compared to the normal steel sheet surface area. Generally, an image partitioning idea is adopted, a picture is divided into a plurality of image blocks, and steel plate defect detection is performed on each image block. However, when the defects of the steel plate are distributed at different positions with close distances, for example, in the same image block, they may belong to different defect categories, and at this time, the defects cannot be distinguished by adopting the image block, and the two defects belonging to different categories are extracted as a defect region for defect detection, and when the defects are classified subsequently, a situation of misclassification may occur. In addition, in image partitioning, if the position of the defect is exactly at a position where the corner of the image block is very small, the image block with a larger size is used for partitioning, and the classification result is inaccurate, for example, threshold partitioning is used, the influence of the small block area on the whole gray value distribution is not great, and the small block area cannot be accurately partitioned, and the calculation amount is increased.
In this embodiment, based on the divided image blocks, whether an image block has a defect is determined based on the gray scale information and the texture information of each image block, which specifically includes:
dividing the gray scale image into square image blocks with preset sizes, wherein the size of the preset sizes is determined by an implementer according to actual conditions; obtaining a gray level histogram of each image block, and simultaneously obtaining gray level characteristics of each image block based on the gray level histogram of each image block, including gray level variance
Figure DEST_PATH_IMAGE001
Mean value of gray scale
Figure 145779DEST_PATH_IMAGE002
Kurtosis
Figure DEST_PATH_IMAGE003
Degree of distortion
Figure 79231DEST_PATH_IMAGE004
Entropy of
Figure DEST_PATH_IMAGE005
And energy
Figure 764028DEST_PATH_IMAGE006
(ii) a Simultaneously obtaining a gray level co-occurrence matrix of each image block, and obtaining the gray level co-occurrence matrix based on each image blockObtaining texture features, including energy, of each image block
Figure DEST_PATH_IMAGE007
Entropy value of
Figure 300183DEST_PATH_IMAGE008
Contrast ratio of
Figure DEST_PATH_IMAGE009
Sum and inverse difference moment
Figure 645713DEST_PATH_IMAGE010
(ii) a The texture features and the grayscale features of the respective image blocks constitute a feature vector for each image block,
Figure DEST_PATH_IMAGE011
wherein T represents the transposition of the vector, and the characteristic vector is the comprehensive characteristic of each image block;
the gray scale and texture features between normal image blocks without defects are very similar and differ from those between image blocks with defects by a very large amount. Using density-based clustering algorithms
Figure 110586DEST_PATH_IMAGE012
For each image block's integrated feature its distance to is calculated
Figure DEST_PATH_IMAGE013
Euclidean distance of close composite features
Figure 518565DEST_PATH_IMAGE014
Wherein
Figure DEST_PATH_IMAGE015
A distance from
Figure 497891DEST_PATH_IMAGE014
Sort from small to large, and then sort the distances
Figure 229087DEST_PATH_IMAGE014
As the neighborhood radius
Figure 301079DEST_PATH_IMAGE016
Number threshold
Figure DEST_PATH_IMAGE017
. Thereby classifying the normal image blocks and the defective image blocks into different categories. Preferably, the number of normal image blocks is considered to be more than the number of image blocks in which defects occur in the present embodiment, and thus the category including the largest number of image blocks is determined as a normal image block, and the other categories of image blocks in which defects occur are determined as defective image blocks, that is, defective blocks.
Finally, the LDA algorithm is adopted to integrate the characteristics of all the normal image blocks
Figure 697819DEST_PATH_IMAGE018
As a first class, the combined features of all defect image blocks
Figure 497147DEST_PATH_IMAGE018
As a second type of the above-mentioned,
Figure DEST_PATH_IMAGE019
the algorithm outputs
Figure 302423DEST_PATH_IMAGE020
Weight vector of (2)
Figure DEST_PATH_IMAGE021
And a threshold weight that is constant
Figure 371748DEST_PATH_IMAGE022
And obtaining a defect judger based on the output weight vector and the weight threshold:
Figure 675691DEST_PATH_IMAGE024
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE025
transpose representing weight vector, carry the comprehensive characteristics of image block into defect judger when judging, if
Figure 91760DEST_PATH_IMAGE026
If yes, the image block is judged to be a normal image block; if it is used
Figure DEST_PATH_IMAGE027
It means that the image block should be determined as a defective image block. All defective image blocks in the gray-scale image are obtained.
S2, recording image blocks which have defects and do not have superposition edges with other image blocks which have defects as independent blocks, and recording defect blocks which have superposition edges with other image blocks which have defects as combined blocks; recording the independent blocks in the gray level image as initial independent blocks, uniformly dividing the initial independent blocks into four primary blocks in a square shape, recording the independent blocks in the four primary blocks as primary independent blocks, continuously dividing the primary independent blocks to obtain secondary independent blocks, continuously dividing until the number of pixels in the finally obtained independent blocks is less than a preset threshold value or a merged block appears, and stopping dividing; and taking the independent blocks with the number of pixels smaller than a preset threshold value as the defective pixel blocks.
First, in order to more accurately divide the defective area, the defective area needs to be limited to a smaller block so that the defective area is as close as possible to the block containing it. If a defective image block is obtained in step S1 and if there is no overlapping side between the defective image block and another defective image block, this is called an independent block, and among them, a merged block where there is overlapping side between the defective image block and another defective image block, it is to be noted that in this embodiment, the overlapping side means that two blocks can completely overlap with each other with one side.
Furthermore, the independent blocks in the gray scale map are called as initial independent blocks, the initial independent blocks are uniformly divided into four primary blocks which are squares, and when the independent blocks are divided into the four primary blocks which are squares, a cross is drawn in the initial independent blocks to uniformly divide one initial independent block into the four primary blocks which are squares; the method comprises the steps of obtaining independent blocks in a primary block, recording the independent blocks as primary independent blocks, continuing to divide the primary independent blocks, obtaining four secondary blocks which are squares, obtaining the independent blocks in the secondary blocks by using a defect judger, recording the independent blocks as secondary independent blocks, continuing to divide the secondary independent blocks, obtaining tertiary independent blocks, and obtaining the tertiary independent blocks until the number of pixels in the obtained independent blocks is smaller than a preset threshold value, wherein in the embodiment, the value of the preset threshold value is 20, namely the independent blocks with the number of pixels smaller than 20 are not divided.
Finally, when the independent blocks are divided, merged blocks may occur, and when the merged blocks occur, the division of the independent blocks needs to be stopped, the merged blocks are processed by another graph decomposition method, and iteration of the division of the independent blocks is based on the fact that the independent blocks always occur in the dividing process, and in addition, it needs to be noted that the condition for stopping the division of the independent blocks is that the finally obtained independent blocks are small enough, that is, the number of pixels in the finally obtained independent blocks is less than 20, the independent blocks with defects under the condition are defective pixel blocks, and the condition is that the merged blocks occur, and the independent blocks cannot be divided according to the method for dividing the independent blocks at this time.
S3, when the merging blocks stop dividing, combining all the merging blocks into different types of graphs to be decomposed; decomposing different types of graphs to be decomposed by using corresponding graph decomposition methods respectively to obtain different subblocks respectively, and screening the defect subblocks by using a defect judger; merging the defective sub-blocks with coincident edges into a pattern to be decomposed, continuously decomposing by using a corresponding pattern decomposition method to obtain primary sub-blocks and screening out the primary defective sub-blocks with defects until the ratio of the number of the defective sub-blocks in the gray-scale image to all sub-blocks is maximum or the number of pixels in the finally obtained sub-blocks is less than a preset threshold value, and stopping dividing to obtain defective pixel blocks; and extracting a steel plate defect area in the defect pixel block.
Firstly, in the process of dividing the independent blocks, if combined blocks appear, stopping the independent block dividing method in the step S2, and using a graph decomposition method instead, dividing the combined blocks, firstly combining the combined blocks, taking the division of one initial independent block to obtain a first-level block as an example, if only two combined blocks exist in four first-level blocks, a graph formed by two combined blocks is a type of graph to be decomposed and is marked as a first graph, and at the moment, the first graph is a rectangle formed by two first-level blocks; if only three combined blocks exist in the four primary blocks obtained by dividing the initial independent blocks, the graph formed by the three combined blocks is a type of graph to be decomposed and is marked as a second graph, and the second graph at the moment is a graph formed by the three primary blocks and provided with a corner; if all the four primary blocks obtained by dividing the initial independent blocks are merged blocks, the four merged blocks form a type of graph to be decomposed, the graph is marked as a third graph, the third graph is a square formed by the four primary blocks, and the first graph, the second graph and the third graph are all referred to as graphs to be decomposed, but the types are different. At the beginning of the division of the grayscale map into image blocks, the merging for the merged blocks therein is the same as the merging of the merged blocks in the one-level blocks.
The decomposition methods of the graphs to be decomposed for merging the merging blocks are different and have corresponding graph decomposition methods, and in this case, in order to avoid the defect appearing in the central areas of the first graph, the second graph and the third graph, the staggered grid method is adopted to extract the central areas of the first graph, the second graph and the third graph. For the first graph, the central area of the first graph is an area in the middle of a vertical line which takes a central point as a starting point to be used as a central point connecting line, namely a line segment which is obtained by intersecting straight lines of the central points of two merging blocks in four primary blocks with two long sides of the first graph is used for decomposing the first graph, and a square and two small rectangular sub-blocks with the same size in the first graph can be obtained after decomposition; for the second graph, decomposing the second graph by using straight lines in the horizontal direction and straight lines in the vertical direction of the central points of three merging blocks in the four primary blocks to obtain 5 small squares, 2 small rectangles and a graph which is smaller than the second graph in the same shape and size as the second graph, wherein the central area of the second graph is the graph which is smaller than the second graph in the same shape and size as the second graph; for the third graph, decomposing the third graph by using straight lines in the horizontal direction and straight lines in the vertical direction of the central points of the four primary blocks which are all combined blocks to obtain 4 small squares, 4 small rectangles and 1 square which is the central area of the third graph; the plurality of different patterns obtained by the division are a plurality of different subblocks.
The sub-blocks are screened by a defect classifier to obtain sub-blocks with defects, the sub-blocks are marked as defective sub-blocks, the defective sub-blocks with coincident edges are merged, the merging condition is two, one is that the merged sub-blocks are a first graph, a second graph or a third graph, the other is that the merged sub-blocks are not the first graph, the second graph or the third graph, for the condition that one sub-block needs to be filled so that the sub-block can be decomposed into the first graph, the second graph or the third graph, for example, three defective sub-blocks are connected, one sub-block is filled at any end of the three defective sub-blocks so that the sub-block can be divided into two first graphs. And in addition, the defective sub-blocks which do not have overlapped edges are divided by the method for dividing the first-level block in the step S2.
It should be noted that, when the defect sub-blocks with overlapped edges are merged into a pattern to be decomposed, the priority levels are respectively that the third pattern is merged into a pattern larger than the first pattern, the first pattern is merged into a pattern larger than the second pattern, that is, the first pattern is merged into the first pattern, the second pattern is merged into the second pattern, and the third pattern is finally formed; when the defect sub-blocks with the overlapped edges are combined into the pattern to be decomposed, if the defect sub-blocks with the overlapped edges cannot be combined into the first, second and third patterns, the adjacent defect sub-blocks without the defects of the defect sub-blocks with the overlapped edges are used for filling, and the pattern formed after filling is decomposed into the first, second or third patterns.
Further, the defect subblocks with coincident edges are merged into a pattern to be decomposed, the three different types of patterns to be decomposed are decomposed by using the corresponding pattern decomposition method continuously to obtain first-level subblocks, the defect judgers are used for screening out the first-level subblocks with defects, the first-level subblocks are marked as first-level defect subblocks, the same first-level defect subblocks are also divided into the first-level defect subblocks with coincident edges and the first-level defect subblocks without coincident edges, the first-level defect subblocks with coincident edges are also merged into a first pattern, a second pattern or a third pattern, or the merged first-level defect subblocks are filled with subblocks and then are decomposed into the first pattern, the second pattern or the third pattern, and the pattern decomposition method corresponding to each type of patterns to be decomposed is used for decomposition again. Similarly, the graph decomposition is an iterative process, and the process is stopped until the ratio of the number of sub-blocks occupied by the sub-blocks with defects in the gray scale map reaches the maximum, or the number of pixels in the finally obtained sub-blocks is smaller than a preset threshold. It should be noted that, the sub-block determined to have a defect when stopping includes obtaining a defective pixel block in step S2, that is, the operation of partitioning and the operation of graph decomposition are performed simultaneously, and after stopping, obtaining the defective pixel block, where the defective pixel block is characterized in that the defective region is small enough and occupies most of a defective pixel block, and each defective pixel block is independent and non-intersecting, so that the obtained defective pixel block well solves the problem that the defect is distributed at different positions of the same steel plate image at close distances and respectively performs range estimation on the defect, and also solves the problem that the defect position is exactly at the corner of an adjacent image block in the image partition.
Finally, the finally obtained independent and disjoint defective pixel blocks are finely divided, the defective area and the normal area are finely divided, the defective pixel blocks are locally expanded in gray level, and the range of the gray level in the original defective pixel blocks is assumed to be
Figure 253007DEST_PATH_IMAGE028
Histogram equalization is carried out on the gray level of the defective pixel block, and the gray level is expanded to
Figure DEST_PATH_IMAGE029
And the contrast of the gray scale is improved. Lack of histogram equalization using significance FT algorithmAnd extracting a saliency map from the defective pixel block, setting a saliency threshold value to be 0.7, and taking the region where the saliency point greater than the saliency threshold value is located as a steel plate defect region in the defect pixel block, so that all steel plate defect regions in the image of the steel plate can be accurately obtained.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And that specific embodiments have been described above. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A steel plate defect identification method is characterized by comprising the following steps: preprocessing the surface image of the steel plate containing the defects to obtain a gray-scale image; dividing the gray scale image into square image blocks with preset sizes, obtaining comprehensive characteristics of each image block based on a gray scale histogram and a gray scale co-occurrence matrix of each image block, and obtaining the image block with defects as a defect block by utilizing the comprehensive characteristics of each image block; obtaining a defect judger by utilizing the comprehensive characteristics of each image block;
recording image blocks which have defects and are not overlapped with other image blocks with defects as independent blocks, and recording defect blocks which are overlapped with other image blocks with defects as combined blocks; recording the independent blocks in the gray level image as initial independent blocks, uniformly dividing the initial independent blocks into four primary blocks in a square shape, recording the independent blocks in the four primary blocks as primary independent blocks, continuously dividing the primary independent blocks to obtain secondary independent blocks, continuously dividing until the number of pixels in the finally obtained independent blocks is less than a preset threshold value or a merged block appears, and stopping dividing; taking the independent blocks with the number of pixels smaller than a preset threshold value as defective pixel blocks;
when the merging blocks are divided, combining all the merging blocks into different types of graphs to be decomposed; decomposing different types of graphs to be decomposed by using corresponding graph decomposition methods respectively to obtain different subblocks respectively, and screening the defect subblocks by using a defect judger; merging the defective sub-blocks with coincident edges into a pattern to be decomposed, continuously decomposing by using a corresponding pattern decomposition method to obtain primary sub-blocks and screening out the primary defective sub-blocks with defects until the ratio of the number of the defective sub-blocks in the gray-scale image to all the sub-blocks is maximum or the number of pixels in the finally obtained sub-blocks is less than a preset threshold value, and stopping dividing to obtain defective pixel blocks; and extracting a steel plate defect area in the defect pixel block.
2. The steel plate defect identification method according to claim 1, wherein the preprocessing of the steel plate surface image containing the defect to obtain the gray-scale map comprises: graying the image on the surface of the steel plate and enhancing the grayed image by utilizing histogram equalization to obtain a grayscale image.
3. The steel plate defect identification method according to claim 1, wherein the obtaining of the comprehensive characteristics of each image block based on the gray level histogram and the gray level co-occurrence matrix of each image block comprises: obtaining the gray features of the image blocks based on the gray histogram of each image block, wherein the gray features comprise gray variance, gray mean, kurtosis, skewness, entropy and energy; acquiring texture features of the image blocks based on the gray level co-occurrence matrix of the image blocks, wherein the texture features comprise energy, entropy, contrast and inverse difference; and the texture features and the gray features form feature vectors which are used as comprehensive features of the image blocks.
4. The steel plate defect identification method according to claim 1, wherein the obtaining a defective image block as a defective block by using the comprehensive features of the image blocks comprises: clustering is carried out on the basis of comprehensive characteristics of each image block to divide the image blocks into two types, wherein the type with a large number of image blocks is the image block without defects; and the image block with the smaller number of image blocks is the image block with the defect, and the image block with the defect is taken as the defect block.
5. The steel plate defect recognition method according to claim 1, wherein the defect determiner using the integrated features of the image blocks comprises: and processing the comprehensive characteristics of the image block without the defect and the defect block by utilizing an LDA algorithm to obtain a weight vector and a weight threshold, and obtaining a defect judger based on the weight vector and the weight threshold.
6. The steel plate defect identification method according to claim 1, wherein when the merged block stops dividing, the step of combining all the merged blocks into different types of patterns to be decomposed comprises the following steps: if only two merging blocks exist in four primary blocks obtained by initially dividing the independent blocks, a graph formed by the two merging blocks is a type of graph to be decomposed and is marked as a first graph; if only three combined blocks exist in four primary blocks obtained by dividing the initial independent blocks, a graph formed by the three combined blocks is a type of graph to be decomposed and is marked as a second graph; and if the four primary blocks obtained by dividing the initial independent blocks are all the merging blocks, the four merging blocks form a type of graph to be decomposed, and the graph is marked as a third graph.
7. The method for identifying the defects of the steel plate as claimed in claim 6, wherein the decomposing the patterns to be decomposed with different types by using the corresponding pattern decomposition method respectively comprises the following steps: for the first graph, obtaining a line segment of a straight line passing through the center points of the two merging blocks and intersecting two long edges of the first graph, and decomposing the first graph; for the second graph, decomposing the second graph by using a straight line in the horizontal direction and a straight line in the vertical direction passing through the center points of the three merging blocks; and decomposing the third graph by using the straight line in the horizontal direction and the straight line in the vertical direction which pass through the central points of the four merging blocks.
8. The steel plate defect identification method according to claim 6, wherein the merging of the defect sub-blocks with coincident edges into the pattern to be decomposed comprises: when the defect sub-blocks with overlapped edges are combined into a graph to be decomposed, the priority levels are respectively that the third graph is combined into a graph larger than the first graph, and the first graph is combined into a graph larger than the second graph; when the defect sub-blocks with the overlapped edges are combined into the pattern to be decomposed, if the defect sub-blocks with the overlapped edges cannot be combined into the first, second and third patterns, the adjacent defect sub-blocks without defects of the defect sub-blocks with the overlapped edges are used for filling, and the pattern formed after filling is decomposed into the first, second or third patterns.
9. The steel plate defect identification method according to claim 1, wherein the extracting of the steel plate defect area in the defect pixel block comprises: and (4) performing histogram equalization processing on the defective pixel blocks, and processing the defective pixel blocks subjected to histogram equalization by using a significance FT algorithm to obtain a steel plate defect area.
CN202211250374.XA 2022-10-13 2022-10-13 Steel plate defect identification method Active CN115330781B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211250374.XA CN115330781B (en) 2022-10-13 2022-10-13 Steel plate defect identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211250374.XA CN115330781B (en) 2022-10-13 2022-10-13 Steel plate defect identification method

Publications (2)

Publication Number Publication Date
CN115330781A true CN115330781A (en) 2022-11-11
CN115330781B CN115330781B (en) 2023-07-28

Family

ID=83913498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211250374.XA Active CN115330781B (en) 2022-10-13 2022-10-13 Steel plate defect identification method

Country Status (1)

Country Link
CN (1) CN115330781B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116205911A (en) * 2023-04-27 2023-06-02 济南市莱芜区综合检验检测中心 Machine vision-based method for detecting appearance defects of leather sports goods

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007062563A1 (en) * 2005-12-01 2007-06-07 Bohai Shipbuilding Industry Co., Ltd. On-line automatic inspection method for detecting surface flaws of steel during the pretreatment of the ship steel
CN106780486A (en) * 2017-01-16 2017-05-31 大连海事大学 A kind of Surface Defects in Steel Plate image extraction method
CN110618134A (en) * 2019-09-16 2019-12-27 山西大数据产业发展有限公司 Steel plate surface quality defect detection and rating system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007062563A1 (en) * 2005-12-01 2007-06-07 Bohai Shipbuilding Industry Co., Ltd. On-line automatic inspection method for detecting surface flaws of steel during the pretreatment of the ship steel
CN106780486A (en) * 2017-01-16 2017-05-31 大连海事大学 A kind of Surface Defects in Steel Plate image extraction method
CN110618134A (en) * 2019-09-16 2019-12-27 山西大数据产业发展有限公司 Steel plate surface quality defect detection and rating system and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116205911A (en) * 2023-04-27 2023-06-02 济南市莱芜区综合检验检测中心 Machine vision-based method for detecting appearance defects of leather sports goods

Also Published As

Publication number Publication date
CN115330781B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN107833220B (en) Fabric defect detection method based on deep convolutional neural network and visual saliency
CN108898610B (en) Object contour extraction method based on mask-RCNN
CN115294158A (en) Hot continuous rolling strip steel image segmentation method based on machine vision
CN113724231B (en) Industrial defect detection method based on semantic segmentation and target detection fusion model
CN109523529B (en) Power transmission line defect identification method based on SURF algorithm
CN115018828A (en) Defect detection method for electronic component
Zhao et al. A method for detection and classification of glass defects in low resolution images
CN106846316A (en) A kind of GIS inside typical defect automatic distinguishing method for image
CN107610114A (en) Optical satellite remote sensing image cloud snow mist detection method based on SVMs
CN107256547A (en) A kind of face crack recognition methods detected based on conspicuousness
CN112508090A (en) External package defect detection method
CN104268600B (en) A kind of mineral flotation foam image texture analysis and operating mode's switch method based on Minkowski distances
CN105354533B (en) A kind of unlicensed vehicle model recognizing method of bayonet based on bag of words
CN108664969B (en) Road sign recognition method based on conditional random field
CN115578374A (en) Mechanical part casting quality evaluation method and system
CN114820625B (en) Automobile top block defect detection method
CN115330781A (en) Steel plate defect identification method
CN113256624A (en) Continuous casting round billet defect detection method and device, electronic equipment and readable storage medium
CN110516666B (en) License plate positioning method based on combination of MSER and ISODATA
CN115131356A (en) Steel plate defect classification method based on richness
CN109858484B (en) Multi-class transformation license plate correction method based on deflection evaluation
CN110060239B (en) Defect detection method for bottle opening of bottle
CN114863464A (en) Second-order identification method for PID drawing picture information
CN105469384A (en) Comprehensive evaluation methods of license plate image quality
TW201910021A (en) Method for detecting fracture of steel strip tail

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