CN115330781B - Steel plate defect identification method - Google Patents

Steel plate defect identification method Download PDF

Info

Publication number
CN115330781B
CN115330781B CN202211250374.XA CN202211250374A CN115330781B CN 115330781 B CN115330781 B CN 115330781B CN 202211250374 A CN202211250374 A CN 202211250374A CN 115330781 B CN115330781 B CN 115330781B
Authority
CN
China
Prior art keywords
blocks
image
defect
graph
merging
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
CN202211250374.XA
Other languages
Chinese (zh)
Other versions
CN115330781A (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

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 a surface image of the steel plate containing the defects to obtain a gray scale image; dividing a gray level map into square image blocks with preset sizes, and obtaining a defect judging device by utilizing the comprehensive characteristics of the image blocks; obtaining an independent block in a gray image, marking the independent block as an initial independent block, and continuously dividing the initial independent block to obtain defective pixel blocks with the pixel number smaller than a preset threshold value; obtaining merging blocks, and forming different types of graphics to be decomposed by all the merging blocks; continuously decomposing different types of patterns to be decomposed by using corresponding pattern decomposition methods respectively to finally obtain defective pixel blocks; and extracting a steel plate defect area in the defect pixel block. According to the invention, the more accurate estimation range of the defect area of the steel plate is obtained according to the texture and gray characteristics of the defect of the steel plate, and the accuracy of identifying and classifying the defects in the follow-up process 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 widely seen everywhere in the prior society, the application of the steel plate is very wide, and the industries such as chemical industry, 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, the steel plate is used as a main product in the steel industry, and when the steel plate is produced, due to the reasons of production technology, production environment, production equipment faults and the like, different types of defects can appear on the surface of the steel plate, the defects not only can influence the appearance of the steel plate, but also can limit the application of the steel plate, and serious direct scrapping is possible, so the economic benefit of a steel plate manufacturer can be reduced.
The distribution of defects on the surface of the steel plate at the space position is random, the morphological structure is complex, the defects on the surface of the steel plate are difficult to accurately divide by adopting a manual detection method, along with the development of an image processing technology, the surface defects are detected by utilizing threshold division, edge detection and morphological processing of image processing, the algorithm has good effects on the conditions that the gray value change of a normal area and the gray value change of a defect area are obvious and the distribution of the defect area is discrete, but the effect is not good on the condition that the distribution of the defect areas of different types is dense, and each defect area on the surface of the steel plate cannot be accurately divided and identified.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a steel plate defect identification method, which adopts the following technical scheme:
one embodiment of the invention provides a method for identifying defects of a steel plate, which comprises the following steps: preprocessing a surface image of the steel plate containing the defects to obtain a gray scale image; dividing a gray level map into square image blocks with preset sizes, obtaining comprehensive characteristics of each image block based on a gray level histogram and a gray level co-occurrence matrix of each image block, and obtaining the image block with the defect as a defect block by utilizing the comprehensive characteristics of each image block; obtaining a defect judging device by utilizing the comprehensive characteristics of each image block;
the image blocks with defects and the non-overlapping edges of the other image blocks with defects are marked as independent blocks, and the defect blocks with overlapping edges of the other image blocks with defects are marked as merging blocks; the method comprises the steps of marking independent blocks in a gray image as initial independent blocks, uniformly dividing the initial independent blocks into four square primary blocks, marking 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 smaller than a preset threshold value, or merging blocks appear, and stopping dividing; taking an independent block with the pixel number smaller than a preset threshold value as a defective pixel block;
when the merging blocks stop dividing, all the merging blocks are formed into different types of graphics to be decomposed; decomposing different types of patterns to be decomposed by using corresponding pattern decomposition methods respectively to obtain different sub-blocks, and screening the defective sub-blocks by using a defect judging device; combining the defective sub-blocks with coincident edges into a pattern to be decomposed, continuing to decompose by using a corresponding pattern decomposition method to obtain first-stage sub-blocks, and screening out defective first-stage defective sub-blocks until the ratio of the number of the defective sub-blocks occupying all the sub-blocks in the gray level map reaches the maximum, or stopping dividing until the number of pixels in the finally obtained sub-blocks is smaller than a preset threshold value to obtain defective pixel blocks; and extracting a steel plate defect area in the defect pixel block.
Preferably, the preprocessing of the surface image of the steel plate containing the defects to obtain the gray scale map includes: graying the surface image of the steel plate, and enhancing the grayed image by utilizing histogram equalization to obtain a gray map.
Preferably, obtaining the integrated feature of each image block based on the gray histogram and gray co-occurrence matrix of each image block includes: obtaining 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; obtaining texture features of the image block based on the gray level co-occurrence matrix of the image block, wherein the texture features comprise energy, entropy value, contrast and inverse distance; the texture features and the gray features form feature vectors as integrated features of the image block.
Preferably, obtaining the defective image block as the defective block using the integrated feature of each image block includes: clustering is carried out based on the comprehensive characteristics of each image block to divide the image blocks into two types, wherein the type with more image blocks is the image block without defects; the type with a smaller number of image blocks is an image block with a defect, and the image block with a defect is regarded as a defect block.
Preferably, the obtaining of the defect determiner using the integrated characteristic of the image block includes: and processing the comprehensive characteristics of the image block without the defect and the defect block by using an LDA algorithm, obtaining a weight vector and a weight threshold value, and obtaining a defect judging device based on the weight vector and the weight threshold value.
Preferably, when the merge block stop division occurs, composing all the merge blocks into different types of graphics to be decomposed includes: if only two merging blocks exist in four primary blocks obtained by dividing the initial independent blocks, the graph formed by the two merging blocks is a type of graph to be decomposed and is recorded as a first graph; if only three merging blocks exist in four primary blocks obtained by dividing the initial independent blocks, the graph formed by the three merging blocks is one type of graph to be decomposed and is recorded as a second graph; if the four primary blocks obtained by dividing the initial independent blocks are all merging blocks, the four merging blocks form a type of graph to be decomposed, and the type of graph to be decomposed is recorded as a third graph.
Preferably, decomposing the graphics to be decomposed of different types by using the corresponding graphic decomposition method respectively includes: for the first graph, the line segments of the two long sides of the first graph, which are intersected by the straight line passing through the center points of the two merging blocks, are obtained to decompose 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; the third pattern is decomposed by a straight line in the horizontal direction and a straight line in the vertical direction passing through the center points of the four merge blocks.
Preferably, merging defective sub-blocks having overlapping edges into a pattern to be decomposed includes: when the defect sub-blocks with coincident edges are combined into the graphics to be decomposed, the priority levels are respectively that the combined third graphics are larger than the combined first graphics, and the combined first graphics are larger than the combined second graphics; when the defect sub-blocks with overlapping edges are combined into the patterns to be decomposed, if the defect sub-blocks cannot be combined into the first, second and third patterns, filling the defect sub-blocks adjacent to the defect sub-blocks with overlapping edges, and decomposing the patterns formed after filling into the first, second or third patterns.
Preferably, extracting the steel plate defect region in the defective pixel block includes: and carrying out 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 defective region.
The embodiment of the invention has at least the following beneficial effects: dividing a gray level image of a steel plate surface image containing defects to obtain image blocks with preset sizes, and simultaneously obtaining a defect judging device based on comprehensive characteristics of the image blocks to judge whether the defects are contained; the independent image blocks and the combinable image blocks are continuously divided, meanwhile, the dividing methods of the independent blocks and the combinable image blocks for combining the images to be decomposed are different, the image decomposing methods corresponding to the different images to be decomposed are different, the fineness degree of the image blocks in dividing is improved, the size of the blocks is continuously reduced in the dividing process, the defect areas can occupy most of the areas of the blocks, and when the defect areas are extracted according to the prior art, the defect areas of the steel plate can be rapidly and accurately divided from the defect pixel blocks, and meanwhile, the problem that the two defect areas are relatively close and are not easy to divide is solved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for identifying defects of a steel plate.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purposes, the following description refers to specific embodiments, structures, features and effects of a steel plate defect identification method according to the present invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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 specifically describes a specific scheme of the steel plate defect identification method provided by the invention with reference to the accompanying drawings.
Example 1:
the main application scene of the invention is as follows: and shooting a surface image of the produced steel plate, and graphically dividing the area with the defects in the surface image so as to divide the area with the defects and identify the type of the defects on the surface of the steel plate.
Referring to fig. 1, a method for identifying defects of a steel plate according to an embodiment of the invention is shown, the method includes the following steps:
step S1, preprocessing a surface image of a steel plate containing defects to obtain a gray scale image; dividing a gray level map into square image blocks with preset sizes, obtaining comprehensive characteristics of each image block based on a gray level histogram and a gray level co-occurrence matrix of each image block, and obtaining the image block with the defect as a defect block by utilizing the comprehensive characteristics of each image block; and obtaining a defect judging device by utilizing the comprehensive characteristics of the image blocks.
First, it is necessary to obtain a surface image of a steel sheet including defects, and it is necessary to obtain a surface image of a steel sheet by photographing a surface of a flat steel sheet from a top view angle, wherein the surface image of the steel sheet is a color RGB image, graying the image, and performing image enhancement on the grayed image by histogram equalization to obtain a gray map.
Further, in the case of the steel sheet defect, the defective area is smaller in proportion to the normal steel sheet surface area. Generally, an idea of image segmentation is adopted, a picture is segmented into a plurality of image blocks, and steel plate defect detection is performed on each image block. However, when defects of the steel plate are distributed in different positions close to each other, for example, in the same image block, they may belong to different defect categories, and at this time, the image blocks cannot be used to distinguish them, and the two defects belonging to different categories are extracted as a defect area for defect detection, and when the defects are classified later, misclassification occurs. In addition, in the image segmentation, if the position of the defect is just at a position where the corner of the image block is small, the larger image block is adopted for segmentation at the moment, inaccurate classification results can occur, for example, threshold segmentation is adopted, the influence of the small area on the whole gray value distribution is not great, at the moment, the small area cannot be accurately segmented, and meanwhile, the calculation amount can be increased.
The embodiment is based on divided image blocks, and judges whether the image blocks have defects based on gray information and texture information of each image block, specifically:
dividing the gray level map into square image blocks with preset sizes, wherein the sizes of the preset sizes are determined by an implementer according to actual conditions; obtaining each ofGray level histogram of image block, and gray level characteristic of each image block is obtained based on gray level histogram of each image block, including gray level varianceGray level mean->Kurtosis->Degree of askew->Entropy->And energy->The method comprises the steps of carrying out a first treatment on the surface of the Simultaneously obtaining a gray level co-occurrence matrix of each image block, obtaining texture features of each image block based on the gray level co-occurrence matrix of each image block, including energy +.>Entropy value->Contrast->And the inverse moment->The method comprises the steps of carrying out a first treatment on the surface of the The texture features and the gray features of the image blocks constitute feature vectors for each image block,wherein T represents the transpose of the vector, and the feature vector is the comprehensive feature of each image block;
normal image without defectThe gray and texture features between blocks are quite similar and differ significantly from those between defective image blocks. Clustering algorithm based on densityComputing its distance to the synthesized feature of each image block>Euclidean distance of near complex features +.>Wherein->Distance +.>Ordering from small to large, then distance +.>Is taken as the inflection point of the neighborhood radius->Number threshold->. Thereby classifying the normal image blocks and the defective image blocks into different categories. Preferably, the number of image blocks considered normal in the present embodiment is greater than the number of image blocks having defects, whereby the category containing the largest number of image blocks is determined as a normal image block, and the image blocks having defects of the other categories are determined as defective image blocks, that is, defective blocks.
Finally, the LDA algorithm is adopted to integrate the characteristics of all normal image blocksAs a first class, all defect mapsIntegrated features of image blocks->As the second kind, ++>The algorithm outputs +.>Weight vector +.>And threshold weight of constant>Obtaining a defect determiner based on the output weight vector and the weight threshold value:
wherein,,representing the transpose of the weight vector, and bringing the integrated features of the image block into the defect determiner at the time of determination, if +.>Then the image block is judged to be normal; if->It is explained that the image block should be discriminated as a defective image block. So far all defective image blocks in the gray scale are obtained.
Step S2, marking the image blocks with defects and the non-overlapping edges of the other image blocks with defects as independent blocks, and marking the defect blocks with overlapping edges of the other image blocks with defects as merging blocks; the method comprises the steps of marking independent blocks in a gray image as initial independent blocks, uniformly dividing the initial independent blocks into four square primary blocks, marking 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 smaller than a preset threshold value, or merging blocks appear, and stopping dividing; and taking the independent block with the pixel number smaller than a preset threshold value as a defective pixel block.
First, in order to be able to divide the defective area more precisely, it is necessary to localize the defective area in a smaller block so that the defective area approaches as closely as possible the block containing it. In step S1, a defective image block is obtained, and if the defective image block does not overlap with other defective image blocks, such a block is referred to as an independent block, and the overlapping edge with other defective image blocks is referred to as a merge block, it should be noted that the presence of the overlapping edge in this embodiment means that two blocks have one edge that can be completely overlapped.
Further, for the independent blocks in the gray level diagram, the initial independent blocks are called initial independent blocks, the initial independent blocks are uniformly divided into four square primary blocks, and when the four square primary blocks are divided, a cross is drawn in the initial independent blocks to uniformly divide an initial independent block into four square primary blocks; the method for dividing the first-stage independent blocks is characterized in that the independent blocks in the first-stage blocks are obtained and marked as first-stage independent blocks, the dividing method is the same as that when the initial independent blocks are divided, four square second-stage blocks are obtained, the independent blocks in the second-stage blocks are obtained by using a defect judging device and marked as second-stage independent blocks, the second-stage independent blocks are required to be divided continuously, the dividing method is the same as that when the initial independent blocks are divided, three-stage independent blocks are obtained until the number of pixels in the obtained independent blocks is smaller than a preset threshold value, and 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, a merging block may occur, when the merging block occurs, the division of the independent blocks needs to be stopped, the merging block is processed by using another graphic decomposition method, and in addition, the 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 is to be noted that the condition of 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 smaller than 20, and the independent blocks with defects are defective pixel blocks under the condition, and in addition, the iteration of the division of the independent blocks is based on the fact that the division of the independent blocks cannot be performed according to the method of dividing the independent blocks.
S3, when the merging blocks stop dividing, forming different types of graphics to be decomposed by all the merging blocks; decomposing different types of patterns to be decomposed by using corresponding pattern decomposition methods respectively to obtain different sub-blocks, and screening the defective sub-blocks by using a defect judging device; combining the defective sub-blocks with coincident edges into a pattern to be decomposed, continuing to decompose by using a corresponding pattern decomposition method to obtain first-stage sub-blocks, and screening out defective first-stage defective sub-blocks until the ratio of the number of the defective sub-blocks occupying all the sub-blocks in the gray level map reaches the maximum, or stopping dividing until the number of pixels in the finally obtained sub-blocks is smaller than a preset threshold value to obtain defective pixel blocks; and extracting a steel plate defect area in the defect pixel block.
Firstly, in the process of dividing independent blocks, if the combined blocks appear, stopping the independent block dividing method in the step S2, and dividing the combined blocks by using a graph decomposition method, wherein the combined blocks are first combined, an initial independent block is divided to obtain one-stage blocks as an example, if only two combined blocks exist in four one-stage blocks, the graph formed by the two combined blocks is a type of graph to be decomposed and is marked as a first graph, and the first graph is a rectangle formed by the two one-stage blocks; if the four primary blocks obtained by dividing the initial independent blocks have three merging blocks, the graph formed by the three merging blocks is a type of graph to be decomposed and is recorded as a second graph, and the second graph at the moment is a graph with one corner formed by the three primary blocks; if the four primary blocks obtained by dividing the initial independent blocks are all merging blocks, the four merging blocks form a type of graphics to be decomposed, the graphics are marked as a third graphics, the third graphics at the moment are square formed by the four primary blocks, and the first graphics, the second graphics and the third graphics are all commonly called as graphics to be decomposed, but are different in type. At the beginning of dividing the gray scale map into image blocks, the merging of the merging blocks therein is the same as the merging of the merging blocks in the one-stage block.
The pattern decomposition methods to be decomposed for the merging block merging are different, and there are corresponding pattern decomposition methods, and in this case, in order to avoid defects from occurring in the central areas of the first, second and third patterns, the central areas of the first, second and third patterns are extracted by the staggered grid method. For the first graph, the central area of the first graph is an area in the middle of a perpendicular line which takes the central point as a starting point as a central point connecting line, namely, a line segment of which the straight line passing through the central points of two merging blocks in four primary blocks intersects two long sides of the first graph is used for decomposing the first graph, and a square sub-block and two sub-blocks with the same size and small rectangle in the first graph can be obtained after the first graph is decomposed; 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 three merging blocks in the four primary blocks to obtain 5 small squares, 2 small rectangles and a graph with the same size as the second graph and smaller than the second graph, wherein the center area of the second graph is a graph with the same size as the second graph and smaller than 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 center points of four primary blocks which are all combined blocks to obtain 4 small squares, 4 small rectangles and 1 square which is the center area of the third graph; the plurality of different patterns obtained by the division are a plurality of different sub-blocks.
The sub-blocks are screened by using a defect classifier to obtain sub-blocks with defects, the sub-blocks are marked as defect sub-blocks, the defect sub-blocks with coincident edges are combined, one of the cases is a first pattern, a second pattern or a third pattern after the combination, the other case is a first pattern, a second pattern or a third pattern after the combination, and one sub-block is filled to be capable of being decomposed into the first pattern, the second pattern or the third pattern when the combination is needed, for example, three defect sub-blocks are connected, one sub-block is added at any one end of the three defect sub-blocks, and the three defect sub-blocks can be divided into two first patterns. And in addition, the defective sub-blocks which are not overlapped with other defective sub-blocks are divided by using the method for dividing the first-level blocks in the step S2.
When the defect sub-blocks with overlapping edges are combined into the graphics to be decomposed, the priority levels are respectively that the third graphics are combined into the graphics which are larger than the first graphics, and the first graphics are combined into the graphics which are larger than the second graphics, namely the first graphics are combined into the first graphics, the second graphics are combined into the second graphics, and the third graphics are finally combined into the graphics; and when the defect sub-blocks with the overlapped edges are combined into the patterns to be decomposed, if the defect sub-blocks cannot be combined into the first, second and third patterns, filling the defect sub-blocks adjacent to the defect sub-blocks with the overlapped edges, and decomposing the patterns formed after filling into the first, second or third patterns.
Further, the defect sub-blocks with the coincident edges are combined into patterns to be decomposed, the patterns to be decomposed of three different types are decomposed by using corresponding pattern decomposition methods continuously, the first-stage sub-blocks are obtained, the defect-judging device is utilized to screen out the first-stage sub-blocks with defects, the first-stage defect sub-blocks are recorded as first-stage defect sub-blocks, the same first-stage defect sub-blocks are equally divided into first-stage defect sub-blocks with coincident edges and first-stage defect sub-blocks without coincident edges, the first-stage defect sub-blocks with coincident edges are equally combined into first patterns, second patterns or third patterns, or the first-stage defect sub-blocks are combined into filling sub-blocks and then decomposed into the first patterns, the second patterns or the third patterns are obtained, and the first patterns, the second patterns or the third patterns are decomposed again by using the pattern decomposition methods corresponding to the patterns to be decomposed of each type. Similarly, the graph decomposition is also an iterative process, and the stopping condition is that the ratio of the number of sub-blocks occupied by the sub-blocks with defects in the gray graph reaches the maximum, or the number of pixels in the sub-block obtained finally is smaller than a preset threshold value. It should be noted that, here, the determination of the sub-blocks having defects during stopping includes that the obtaining of the defective pixel blocks in step S2, that is, the operation of dividing the blocks and the operation of decomposing the pattern are performed simultaneously, after stopping, the defective pixel blocks are obtained, the defective pixel blocks are characterized in that the defective area occupies a large area of one defective pixel block, and each defective pixel block is independent and disjoint, so that the obtained defective pixel blocks well solve the problem that defects are distributed in different positions of the same steel plate image at a relatively short distance to estimate their respective ranges, and also solve the problem that in the image dividing process, the defective positions are just at corners of adjacent image blocks.
Finally, the final independent disjoint defective pixel block is finely divided, the defective area and the normal area are finely divided, the defective pixel block is locally expanded in gray level, and the gray level range in the original defective pixel block is assumed to beHistogram equalization of the gray level of the defective pixel block, expanding the gray level toThe contrast of gray scale is improved. And extracting a saliency map from the defect pixel block subjected to histogram equalization by using a saliency FT algorithm, setting a saliency threshold value to be 0.7, and taking the region where the salient point larger 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 an image of the steel plate can be accurately obtained.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. 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 are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (6)

1. A method for identifying defects in a steel sheet, the method comprising: preprocessing a surface image of the steel plate containing the defects to obtain a gray scale image; dividing a gray level map into square image blocks with preset sizes, obtaining comprehensive characteristics of each image block based on a gray level histogram and a gray level co-occurrence matrix of each image block, and obtaining the image block with the defect as a defect block by utilizing the comprehensive characteristics of each image block; obtaining a defect judging device by utilizing the comprehensive characteristics of each image block;
the image blocks with defects and the non-overlapping edges of the other image blocks with defects are marked as independent blocks, and the defect blocks with overlapping edges of the other image blocks with defects are marked as merging blocks; the method comprises the steps of marking independent blocks in a gray image as initial independent blocks, uniformly dividing the initial independent blocks into four square primary blocks, marking 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 smaller than a preset threshold value, or merging blocks appear, and stopping dividing; the pixel number is smaller than a preset threshold value as a defective pixel block;
when the merging blocks stop dividing, all the merging blocks are formed into different types of graphics to be decomposed; decomposing different types of patterns to be decomposed by using corresponding pattern decomposition methods respectively to obtain different sub-blocks, and screening the defective sub-blocks by using a defect judging device; combining the defective sub-blocks with coincident edges into a pattern to be decomposed, continuing to decompose by using a corresponding pattern decomposition method to obtain first-stage sub-blocks, and screening out defective first-stage defective sub-blocks until the ratio of the number of the defective sub-blocks occupying all the sub-blocks in the gray level map reaches the maximum, or stopping dividing until the number of pixels in the finally obtained sub-blocks is smaller than a preset threshold value to obtain defective pixel blocks; extracting a steel plate defect area in the defect pixel block;
when the merging block stopping dividing occurs, forming all the merging blocks into different types of graphics to be decomposed, wherein the steps comprise: if only two merging blocks exist in four primary blocks obtained by dividing the initial independent blocks, the graph formed by the two merging blocks is a type of graph to be decomposed and is recorded as a first graph; if only three merging blocks exist in four primary blocks obtained by dividing the initial independent blocks, the graph formed by the three merging blocks is one type of graph to be decomposed and is recorded as a second graph; if the four primary blocks obtained by dividing the initial independent blocks are all merging blocks, the four merging blocks form a type of graph to be decomposed, and the type of graph to be decomposed is recorded as a third graph;
the decomposing of the graphics to be decomposed of different types by the corresponding graphic decomposing method comprises the following steps: for the first graph, the line segments of the two long sides of the first graph, which are intersected by the straight line passing through the center points of the two merging blocks, are obtained to decompose 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; decomposing the third graph by using straight lines in the horizontal direction and straight lines in the vertical direction passing through the center points of the four merging blocks;
the merging the defect sub-blocks with the coincident edges into the graph to be decomposed comprises the following steps: when the defect sub-blocks with coincident edges are combined into the graphics to be decomposed, the priority levels are respectively that the combined third graphics are larger than the combined first graphics, and the combined first graphics are larger than the combined second graphics; when the defect sub-blocks with overlapping edges are combined into the patterns to be decomposed, if the defect sub-blocks cannot be combined into the first, second and third patterns, filling the defect sub-blocks adjacent to the defect sub-blocks with overlapping edges, and decomposing the patterns formed after filling into the first, second or third patterns.
2. The method for identifying defects of steel plate according to claim 1, wherein preprocessing the surface image of the steel plate containing the defects to obtain a gray scale image comprises: graying the surface image of the steel plate, and enhancing the grayed image by utilizing histogram equalization to obtain a gray map.
3. The method of claim 1, wherein obtaining the composite characteristics of each image block based on the gray level histogram and gray level co-occurrence matrix of each image block comprises: obtaining 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; obtaining texture features of the image block based on the gray level co-occurrence matrix of the image block, wherein the texture features comprise energy, entropy value, contrast and inverse distance; the texture features and the gray features form feature vectors as integrated features of the image block.
4. The method of claim 1, wherein obtaining the defective image block as the defective block using the integrated characteristics of the image blocks comprises: clustering is carried out based on the comprehensive characteristics of each image block to divide the image blocks into two types, wherein the type with more image blocks is the image block without defects; the type with a smaller number of image blocks is an image block with a defect, and the image block with a defect is regarded as a defect block.
5. The method of claim 1, wherein the obtaining the defect determiner using the integrated characteristic of the image blocks comprises: and processing the comprehensive characteristics of the image block without the defect and the defect block by using an LDA algorithm, obtaining a weight vector and a weight threshold value, and obtaining a defect judging device based on the weight vector and the weight threshold value.
6. The method for identifying defects of steel plates according to claim 1, wherein said extracting defective areas of steel plates in defective pixel blocks comprises: and carrying out 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 defective region.
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 CN115330781A (en) 2022-11-11
CN115330781B true 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)

Families Citing this family (1)

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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100485371C (en) * 2005-12-01 2009-05-06 渤海船舶重工有限责任公司 Automatic online detection method for defects on upper and lower surfaces during steel plate pretreatment process
CN106780486B (en) * 2017-01-16 2019-12-24 大连海事大学 Steel plate surface defect image extraction method
CN110618134A (en) * 2019-09-16 2019-12-27 山西大数据产业发展有限公司 Steel plate surface quality defect detection and rating system and method

Also Published As

Publication number Publication date
CN115330781A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN107833220B (en) Fabric defect detection method based on deep convolutional neural network and visual saliency
CN115861135B (en) Image enhancement and recognition method applied to panoramic detection of box body
CN106846316B (en) Automatic identification method for typical defect images in GIS
CN109683360B (en) Liquid crystal panel defect detection method and device
CN104504669B (en) A kind of medium filtering detection method based on local binary patterns
Zhao et al. A method for detection and classification of glass defects in low resolution images
CN108596166A (en) A kind of container number identification method based on convolutional neural networks classification
Ai et al. Surface detection of continuous casting slabs based on curvelet transform and kernel locality preserving projections
CN115330781B (en) Steel plate defect identification method
CN117788467B (en) Defect image classification method for titanium metal plate
CN115049657A (en) Glass defect detection method
CN107240086B (en) A kind of fabric defects detection method based on integral nomography
CN115578374A (en) Mechanical part casting quality evaluation method and system
CN113506246B (en) Concrete 3D printing component fine detection method based on machine vision
CN104268600A (en) Mineral flotation froth image texture analysis and working condition identification method based on Minkowski distance
CN105469384A (en) Comprehensive evaluation methods of license plate image quality
CN109858484B (en) Multi-class transformation license plate correction method based on deflection evaluation
TW201910021A (en) Method for detecting fracture of steel strip tail
CN105654090A (en) Pedestrian contour detection method based on curve volatility description
CN104268509A (en) Method and system for detecting license plate of dump truck
CN107945164B (en) Textile flaw detection method based on peak threshold, rotational alignment and composite character
CN117975087A (en) Casting defect identification method based on ECA-ConvNext
CN116342589B (en) Cross-field scratch defect continuity detection method and system
CN115393325A (en) Method and system for detecting fabric defects
CN110378354B (en) Jacquard fabric picture color extraction method based on tissue filtering algorithm

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