CN116777918B - Visual auxiliary kiln surface defect rapid detection method - Google Patents

Visual auxiliary kiln surface defect rapid detection method Download PDF

Info

Publication number
CN116777918B
CN116777918B CN202311075168.4A CN202311075168A CN116777918B CN 116777918 B CN116777918 B CN 116777918B CN 202311075168 A CN202311075168 A CN 202311075168A CN 116777918 B CN116777918 B CN 116777918B
Authority
CN
China
Prior art keywords
edge
image
projection
gray
shadow
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
CN202311075168.4A
Other languages
Chinese (zh)
Other versions
CN116777918A (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.)
Suzhou Cohen New Energy Technology Co ltd
Original Assignee
Suzhou Keer Poen Machinery Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Keer Poen Machinery Technology Co ltd filed Critical Suzhou Keer Poen Machinery Technology Co ltd
Priority to CN202311075168.4A priority Critical patent/CN116777918B/en
Publication of CN116777918A publication Critical patent/CN116777918A/en
Application granted granted Critical
Publication of CN116777918B publication Critical patent/CN116777918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

  • Image Analysis (AREA)

Abstract

The application provides a visual auxiliary kiln surface defect rapid detection method, which relates to the field of image data processing and comprises the following steps: acquiring a first image of the kiln; preprocessing the first image to obtain a second image; extracting an interested region from the second image, and performing edge detection to obtain a first edge image; calculating multiple projection degrees of the first edge image to obtain multiple projection degree indexes; carrying out gray entropy calculation on the first edge image to obtain a gray entropy value; the scale proportion of the Gaussian surrounding function is improved based on the multiple projection degree index and the gray entropy value, and image enhancement is carried out to obtain a third image; and using the third image for classifier training, and adopting the trained classifier to finish defect detection of the kiln surface. By improving the Gaussian surrounding function in the SSR algorithm, different self-adaptive improvements can be carried out in different areas, and details of darker projection positions and complex texture positions can be better enhanced, so that quick detection of kiln surface defects is realized.

Description

Visual auxiliary kiln surface defect rapid detection method
Technical Field
The application relates to the field of image data processing, in particular to a visual auxiliary kiln surface defect rapid detection method.
Background
The main application scenes of the industrial kiln are industries such as metallurgy, building materials, chemical industry and the like. In the metallurgical industry, industrial kilns are required to carry out heating and smelting processes of iron making and steel making; in the aspect of building materials, the industrial kiln can help people to produce cement, glass, bricks, tiles and the like; in the chemical industry, industrial kilns are used for the production of products such as synthetic ammonia, acetylene and the like. However, if defects occur in the surface during the production of the kiln, this can have a very large impact on the performance of the industrial kiln and even on its lifetime. Surface defects such as cracks, pits and the like can damage the structural integrity of the industrial kiln, affect the strength and the tightness of the industrial kiln, reduce the service performance, increase the loss of convection and radiant heat, consume more fuel to maintain the normal working temperature, increase the energy consumption, accelerate the oxidation and the loss of metal, cause the faster aging and damage of the industrial kiln, and possibly cause the failure and even the rejection of the industrial kiln when serious. And the surface defects can cause the leak tightness of the industrial kiln to be reduced, so that the outward emission of pollutants such as smoke, dust and the like is increased, the pollution to the environment is increased, and the potential safety hazard and the maintenance cost are improved.
When the visual auxiliary kiln surface defect is detected rapidly, the surface of the industrial kiln is usually provided with a plurality of pipelines and industrial parts, the industrial parts and the pipelines cast shadows on the surface of the melting furnace after the images are acquired, and the shadows cast by a plurality of parts exist in some places, so that different areas of the same image are different in brightness. And when the defect detection of the kiln surface is carried out, the influence of factors such as surface aging, rust and the like can be caused. This affects part of the visual effect and information extraction of the image. Defects under shadows are difficult to distinguish when defect detection is performed, and Retinex image enhancement is required to enhance the detail features of dark parts. However, conventional Retinex image enhancement algorithms tend to increase the pixel values of the dark areas, but also expand this area, resulting in loss of detail and image blur. Improvements in the scale ratio of the gaussian surround function in the single-scale Retinex algorithm (SSR) are needed to solve the above-mentioned problems.
Disclosure of Invention
In view of the above problems, the application provides a visual auxiliary kiln surface defect rapid detection method, which improves Gaussian surrounding functions in an SSR algorithm, so that the algorithm can carry out different self-adaptive improvements in different areas, and the details of darker projection positions and complex texture positions can be better enhanced, thereby realizing the kiln surface defect rapid detection.
In a first aspect, an embodiment of the present application provides a method for quickly detecting a surface defect of a vision-aided kiln, including:
acquiring a first image of the kiln;
preprocessing the first image to obtain a second image;
extracting an interested region from the second image, and performing edge detection on the interested region to obtain a first edge image inside the interested region;
calculating the multiple projection degree of the first edge image to obtain a multiple projection degree index of a projection shadow part;
carrying out gray entropy calculation on the first edge image to obtain a gray entropy value inside the closed edge;
the scale proportion of the Gaussian surrounding function is improved based on the multiple projection degree index and the gray entropy value, and the second image is subjected to image enhancement based on the scale proportion of the improved Gaussian surrounding function to obtain a third image;
and using the third image for classifier training, and adopting the trained classifier to finish defect detection of the kiln surface.
In one possible implementation manner, the preprocessing the first image to obtain a second image includes:
and carrying out graying treatment and Gaussian filtering treatment on the first image to obtain a second image.
In one possible implementation manner, the calculating the multiple projection degree of the first edge image to obtain a multiple projection degree index of the projected shadow portion includes:
performing gradient amplitude variation calculation on the first edge image to obtain gradient amplitude variation values of all edge pixels of the first edge image, and removing the edges of external parts in the first edge image based on the gradient amplitude variation values to obtain a second edge image;
calculating part projection probability of the second edge image to obtain part projection probability of each edge, and obtaining part projection shadows based on the part projection probability;
and growing the part projection shadow by using an area growing algorithm to obtain a multi-projection area, and calculating the multi-projection degree of the multi-projection area to obtain a multi-projection degree index of the part projection shadow.
In one possible implementation manner, the calculating the gradient amplitude value change of the first edge image to obtain gradient amplitude value change values of all edge pixels of the first edge image, removing edges of external components in the first edge image based on the gradient amplitude value change values, and obtaining a second edge image includes:
all edge pixels of the first edge image are traversed, a window is built by taking the edge pixels as the center, gradient amplitude values in the horizontal direction and the vertical direction are calculated on the center of the window, gradient amplitude value change values in the horizontal direction and the vertical direction of all edge pixels are calculated, and a calculation formula of the gradient amplitude value change values in the horizontal direction and the vertical direction is as follows:
wherein ,horizontal gradient magnitude for window center pixel, < >>Left side horizontal for center pixel +.>Gradient magnitude of individual unit pixels, ">Horizontal right side for center pixel +.>Gradient magnitude of individual unit pixels, ">Representing the gradient amplitude variation value of the central pixel in the horizontal direction,/for the central pixel>Vertical gradient magnitude for the window center pixel, +.>Is the vertical lower side of the central pixel +.>Gradient magnitude of individual unit pixels, ">Is the vertical upper side of the central pixel +.>Gradient magnitude of individual unit pixels, ">Representing the gradient amplitude variation value of the center pixel in the vertical direction;
will beEdge pixels each larger than the first threshold are set to 0 +.>At least one of the first edge images is set to 1, which is smaller than the first threshold value, so that a second edge image with the edges of the external part removed is obtained.
In one possible implementation manner, the calculating part projection probability of the second edge image to obtain part projection probability of each edge, and obtaining part projection shadows based on the part projection probability includes:
8 neighborhood chain code method coding is carried out on all edges in the second edge image, and for non-closed edge chain codes, the chain code length is set asBuild a +.>Matrix of->Calculating straight line edge confidence of non-closed edge +.>And circular edge confidence->The calculation formulas of the straight edge confidence coefficient ZZ and the circular edge confidence coefficient YZ are as follows:
wherein For chain code at the sign +.>Continuously in the direction of (a)>Times of times->For matrix->Is>Line->Column (S)/(S)>Defined as coding +.>And code->The number of consecutive occurrences;
based on the straight edge confidenceAnd the circular edge confidence +.>Calculating the part projection probability of each edge +.>The projection probability of the part>The calculation formula of (2) is as follows:
probability of projection of the partThe non-closing edge that is greater than the second threshold is set as the part projection edge, and the portion between the part projection edge and the nearest part projection edge is defined as the part projection shadow.
In one possible implementation manner, the growing the part projection shadow by using a region growing algorithm to obtain a multiple projection region, and performing multiple projection degree calculation on the multiple projection region to obtain a multiple projection degree index of the part projection shadow, including:
and growing the shadow cast by using an area growing algorithm to obtain multiple projection areas in the shadow cast part, calculating the average value of gray values of all the multiple projection areas, and carrying out maximum-minimum normalization on the average value of the gray values of all the multiple projection areas to obtain multiple projection degree indexes of the shadow cast part.
In one possible implementation manner, the performing gray entropy calculation on the first edge image to obtain a gray entropy value inside the closed edge includes:
for the closed edge, counting the gray value distribution of pixels in the edge, generating a gray histogram, normalizing the gray histogram to obtain the probability of each gray value, and calculating the gray entropy value in the closed edge based on the probability of each gray value, wherein the calculation formula of the gray entropy value is as follows:
wherein ,for gray entropy value>Representing the +.>Probability of individual gray levels and the summation operation traverses all gray levels.
In one possible implementation manner, the improving the scale ratio of the gaussian surrounding function based on the multiple projection degree index and the gray entropy value, and the image enhancing the second image based on the scale ratio of the improved gaussian surrounding function, to obtain a third image, includes:
the scale proportion of the Gaussian surround function in the single-scale Retinex algorithm is improved based on the multiple projection degree index of the projection shadow part and the gray entropy value in the closed edge, the improved scale proportion is obtained, and an improved formula is as follows:
wherein ,for improved dimensional ratios, +.>Is a multiple projection degree index of the projected shadow portion, < >>Is the gray entropy inside the closed edge, +.>The scale ratio in the original single-scale Retinex algorithm is as follows; /> and />Is a weight factor defined as +_in when running in the shadow area is not detected when the single scale Retinex algorithm is performed> and />Are all 0; when it is detected that the shadow part runs inside the non-closed edge +.>,/>The method comprises the steps of carrying out a first treatment on the surface of the When it is detected that the shadow portion runs inside the closed edge +.>,/>
Size ratio after improvementAnd carrying out single-scale Retinex algorithm, and enhancing the second image to obtain a third image.
In one possible implementation manner, the step of using the third image for classifier training and using the trained classifier to complete defect detection of the kiln surface includes:
dividing the third image into a training set and a testing set, training a classifier by using the third image in the training set, inputting the testing set into the trained classifier to evaluate the trained classifier, and identifying and judging the acquired image by adopting the classifier passing the evaluation to detect defects on the surface of the kiln; the classifier is a support vector machine.
In one possible implementation, the ratio of the training set to the test set is 7:3 or 8:2.
In a second aspect, embodiments of the present application provide an electronic device, including a memory and a processor, where the memory stores executable code, and where the processor executes the executable code to implement embodiments as possible in the first aspect.
In a third aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the embodiments as possible in the first aspect.
The application has the beneficial effects that: because of the reasons of illumination, pipeline parts and the like outside the kiln can generate projection on the surface of the kiln, and a plurality of different parts generate multiple projections on the same part of the surface, the illumination value is darker, and the internal texture of an aging area of the surface is extremely complex; both of these cases have a large impact on defect detection. The traditional single-scale Retinex algorithm has stronger enhancement effect on a low-illumination area, but has poor effect under the condition of complex texture characteristics in the area when single projection and multiple projections are mixed, and the application improves the Gaussian surrounding function in the single-scale Retinex algorithm aiming at the characteristic, so that the algorithm can carry out different self-adaptive improvement under different areas, can solve the two different conditions in a classified way, and can better enhance details of darker projections and complex textures.
Drawings
FIG. 1 is a flow chart of steps of a method for rapidly detecting defects on a surface of a kiln with visual assistance provided by an embodiment of the application;
FIG. 2 is a schematic illustration of an obtained industrial kiln image;
FIG. 3 is a schematic view of the kiln surface and part edges and projected edges;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a block diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
So that the manner in which the above recited objects, features and advantages of the present application can be understood in detail, a more particular description of the application, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings, and some, but not all of which are illustrated in the appended drawings. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the application, fall within the scope of protection of the application.
The terminology used in the description of the embodiments of the application herein is for the purpose of describing particular embodiments of the application only and is not intended to be limiting of the application.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those skilled in the art will appreciate that "one or more" is intended to be construed as "one or more" unless the context clearly indicates otherwise.
Embodiments of the present application are described below with reference to the accompanying drawings. As one of ordinary skill in the art can know, with the development of technology and the appearance of new scenes, the technical scheme provided by the embodiment of the application is also applicable to similar technical problems.
Referring to fig. 1, the embodiment of the application discloses a visual auxiliary kiln surface defect rapid detection method, which comprises the following steps:
s11, acquiring a first image of the kiln;
step S12, preprocessing the first image to obtain a second image;
step S13, extracting an interested region from the second image, and carrying out edge detection on the interested region to obtain a first edge image inside the interested region;
step S14, calculating the multiple projection degree of the first edge image to obtain a multiple projection degree index of a projection shadow part;
step S15, gray entropy calculation is carried out on the first edge image, and gray entropy values inside the closed edge are obtained;
step S16, improving the scale proportion of the Gaussian surrounding function based on the multiple projection degree index and the gray entropy value, and carrying out image enhancement on the second image based on the scale proportion of the improved Gaussian surrounding function to obtain a third image;
and S17, using the third image for classifier training, and finishing defect detection of the kiln surface by using the trained classifier.
In order to ensure the normal use of the industrial kiln, regular surface defect monitoring is required to be carried out on the industrial kiln, and photographing and acquisition are carried out on the industrial kiln to obtain high-quality industrial kiln images, as shown in figure 2; for example, the acquisition device may be a CMOS camera, which is not particularly limited herein.
In the steps of the above embodiment, a first image of the kiln is obtained by using an image acquisition device, the first image is preprocessed to obtain a second image, good image quality is provided for subsequent image enhancement, a region of interest is extracted from the second image, edge detection is performed on the region of interest, an edge at the kiln surface is extracted to obtain a first edge image inside the region of interest, multiple projection degree calculation is performed on the first edge image, a shadow region generated by part projection is determined, multiple projection portions inside the shadow region are divided to obtain multiple projection degree indexes of the projected shadow portion, gray entropy calculation is performed on the first edge image, gray value characteristics of pixels inside a closed edge are calculated, and whether the inside of the edge belongs to an aging region or not is determinedAnd (3) a surface part, namely obtaining a gray entropy value in the closed edge, improving the scale proportion of the Gaussian surrounding function based on the multiple projection degree index and the gray entropy value, carrying out image enhancement on the second image based on the scale proportion of the improved Gaussian surrounding function, completing image enhancement aiming at multiple projection and aging areas, obtaining a third image, using the third image for classifier training, and completing defect detection of the kiln surface by adopting a trained classifier. Wherein, before image enhancement, the industrial furnace part in the image can be divided into regions of interest (ROI) manually, so that the subsequent calculation is performed on the industrial furnace region when the image enhancement is performed to obtain the regions of interest (ROI), and after the regions of interest (ROI) are obtained, the Sobel edge detection is used for calculating the horizontal gradient of each pixel in the imageAnd vertical gradient->Obtaining an edge map of the interior of a region of interest (ROI) image; the extraction method of the region of interest (ROI) may also be automatic extraction, which is not specifically limited here; the edge detection operator may use Roberts operator, prewitt operator, laplacian operator, etc. besides Sobel operator, and is not limited herein.
In an optional embodiment of the present application, the preprocessing the first image to obtain a second image includes:
and carrying out graying treatment and Gaussian filtering treatment on the first image to obtain a second image.
In the steps of the embodiment, preprocessing is performed on the acquired image, including graying processing and gaussian filtering processing, so as to eliminate the influence of most of noise in the image, and provide good image quality for subsequent image enhancement. The filtering mode is not unique, and an implementer can adjust and change according to actual situations, and the filtering mode is not particularly limited herein.
In an optional embodiment of the present application, the calculating the multiple projection degree of the first edge image to obtain a multiple projection degree index of the shadow portion includes:
performing gradient amplitude variation calculation on the first edge image to obtain gradient amplitude variation values of all edge pixels of the first edge image, and removing the edges of external parts in the first edge image based on the gradient amplitude variation values to obtain a second edge image;
calculating part projection probability of the second edge image to obtain part projection probability of each edge, and obtaining part projection shadows based on the part projection probability;
and growing the part projection shadow by using an area growing algorithm to obtain a multi-projection area, and calculating the multi-projection degree of the multi-projection area to obtain a multi-projection degree index of the part projection shadow.
It should be noted that, in the obtained first edge image, there are mainly an external part edge, a part projection edge, an aged rust edge, and the like of the kiln surface, but the present application is mainly directed to the part projection edge and the aged rust edge of the kiln surface, and it is difficult to directly extract the part in the edge image.
In the steps of the embodiment, through the transitional pixel characteristics generated by the distance between the edge of the external part and the part projection edge and the aging rust edge, the edge generated by the connection of the external part and the kiln surface is removed based on the gradient amplitude change value to obtain a second edge image, the confidence degree (part projection probability) of part projection is calculated on the shadow part of the second edge image, the shadow area generated by the part projection is determined based on the part projection probability, the multiple projection part inside the shadow area is divided by using an area growth algorithm, and the multiple projection degree index of the part projection shadow is obtained by calculating the multiple projection degree of the multiple projection area.
In an optional embodiment of the present application, the calculating the gradient amplitude value of the first edge image to obtain gradient amplitude value variation values of all edge pixels of the first edge image, removing edges of external components in the first edge image based on the gradient amplitude value, and obtaining a second edge image includes:
all edge pixels of the first edge image are traversed, a window is built by taking the edge pixels as the center, gradient amplitude values in the horizontal direction and the vertical direction are calculated on the center of the window, gradient amplitude value change values in the horizontal direction and the vertical direction of all edge pixels are calculated, and a calculation formula of the gradient amplitude value change values in the horizontal direction and the vertical direction is as follows:
wherein ,horizontal gradient magnitude for window center pixel, < >>Left side horizontal for center pixel +.>Gradient magnitude of individual unit pixels, ">Horizontal right side for center pixel +.>Gradient magnitude of individual unit pixels, ">Representing the gradient amplitude variation value of the central pixel in the horizontal direction,/for the central pixel>Is in the windowVertical gradient magnitude of cardiac pixel, +.>Is the vertical lower side of the central pixel +.>Gradient magnitude of individual unit pixels, ">Is the vertical upper side of the central pixel +.>Gradient magnitude of individual unit pixels, ">Representing the gradient amplitude variation value of the center pixel in the vertical direction;
will beEdge pixels each larger than the first threshold are set to 0 +.>At least one of the first edge images is set to 1, which is smaller than the first threshold value, so that a second edge image with the edges of the external part removed is obtained.
A schematic view of the kiln surface and part edges, projected edges, as shown in fig. 3. Since the projection is a shadow of the part projected onto the kiln surface by illumination, in the projection formed on the kiln surface, the part (e.g., pipe) projection is abrupt to the kiln surface and has no transition (see left side of fig. 3); similarly, the edge analogy produced by aging the rust edge is also abrupt and does not transition. However, the outer member edges tend to have some transition pixels for the surface (see right side of fig. 3).
In the above embodiment steps, the gradient magnitude calculation in the horizontal direction and the vertical direction is performed for all edge pixels based on the differences in the transition pixels of the projected edge of the part, the aged rust edge and the external part edge, based on the horizontal directionAnd calculating the gradient amplitude values in the direction and the vertical direction, and corresponding gradient amplitude change rule values in the horizontal direction and the vertical direction. Setting a first threshold T, taking an empirical value of 0.2, binarizing the first edge image, specificallyThe edge pixels which are all larger than T are set to 0, the edges of the external parts are removed, and the parts are left and right>At least one edge which is smaller than T and is set to be 1 is reserved, and the edge formed by part projection and aging rust is reserved, so that the edge of the external part in the edge area is finally removed, and a second edge image is obtained.
In an optional embodiment of the present application, the calculating part projection probability of the second edge image to obtain part projection probability of each edge, and obtaining part projection shadows based on the part projection probability includes:
8 neighborhood chain code method coding is carried out on all edges in the second edge image, and for non-closed edge chain codes, the chain code length is set asBuild a +.>Matrix of->Calculating straight line edge confidence of non-closed edge +.>And circular edge confidence->The calculation formulas of the straight edge confidence coefficient ZZ and the circular edge confidence coefficient YZ are as follows:
wherein For chain code at the sign +.>Continuously in the direction of (a)>Times of times->For matrix->Is>Line->Column (S)/(S)>Defined as coding +.>And code->The number of consecutive occurrences;
based on the straight edge confidenceAnd the circular edge confidence +.>Calculating the part projection probability of each edge +.>The projection probability of the part>The calculation formula of (2) is as follows:
probability of projection of the partThe non-closing edge that is greater than the second threshold is set as the part projection edge, and the portion between the part projection edge and the nearest part projection edge is defined as the part projection shadow.
In the steps of the embodiment, in the obtained second edge image, since the part projection is projected onto the kiln surface by the pipeline or other parts outside the kiln due to illumination, and since the regular pipeline and other parts are more in line with the requirements of industrial production and use, the pipeline or other parts outside the kiln are all in regular shape, such as straight pipeline, circular gears, valves, etc., so the projected edge projected onto the kiln surface is also regular, all edges in the edge image are encoded by the 8-neighborhood Freeman chain code method, one pixel point is defined with 8 direction symbols according to the horizontal, vertical and two diagonal directions, and two adjacent pixel points are defined with 8 direction symbols: 0. 1, 2, 3, 4, 5, 6, 7. The Freeman chain code refers to a method for describing a curve or a boundary by using coordinates of a starting point of the curve and direction codes of boundary points, and for the edge chain code which is not closed, the chain code length is set asBuild a +.>Matrix of->
In the non-closed edges, there may be some straight zerosProjection of parts, there are also some projections of circular parts that are not fully revealed by illumination projection. For this purpose, the confidence of the straight edge (straight part) of the non-closed edge can be determinedAnd round edge (round part) confidence +.>The method comprises the steps of carrying out a first treatment on the surface of the Confidence of straight line edge (straight line part)>The probability of the occurrence of the linear edge on a section of non-closed edge is expressed, and the confidence of the linear part of the secondary edge can be well reflected; confidence of round edge (round part)>Representing the code->And code->The number of consecutive occurrences is proportional to the coding length, since for circular pixel coding, coding is +_ due to radian>And code->Will often occur continuously, so +.>May represent the confidence of a circular part. Based on the straight line edge confidence +.>And the circular edge confidence +.>Part projections for each edge can be calculatedProbability->The larger the part projection probability V value of an edge pixel, the more likely that edge pixel is the edge projected to the dark portion of the kiln surface. Setting a second threshold value +.>,/>Taking the empirical value of 0.6, will +.>The non-closed edge of (2) is set as a part projection edge, the part between the non-closed edge and the nearest part projection edge is defined as a part projection shadow, and marking is carried out to obtain all the part projection shadows.
In an optional embodiment of the present application, the growing the part shadow using an area growing algorithm to obtain a multiple projection area, and calculating multiple projection degrees of the multiple projection area to obtain a multiple projection degree index of the part shadow, including:
and growing the shadow cast by using an area growing algorithm to obtain multiple projection areas in the shadow cast part, calculating the average value of gray values of all the multiple projection areas, and carrying out maximum-minimum normalization on the average value of the gray values of all the multiple projection areas to obtain multiple projection degree indexes of the shadow cast part.
It should be noted that, in the shadow of part projection, there is not only projection of a single part in one place, but also mixed projection of a plurality of parts in one place, and this mixed projection results in darker brightness value compared to the single projection, and needs to be emphasized.
In the steps of the above embodiment, the area growing algorithm is used to grow the shadow cast on the part, and the shadow cast part growsArea(s)>Then represent the shadow part has +>Multiple projection areas. Calculating the gray value average value of all the multiple projection areas, and carrying out maximum-minimum normalization on the gray value average value of all the areas to obtain multiple projection degree index of the projection shadow part>. Multiple projection degree index->Reflecting the intensity and number of the projected shadow portions, larger values indicate that the projected shadow portions are more pronounced.
In an optional embodiment of the present application, the performing gray entropy calculation on the first edge image to obtain a gray entropy value inside the closed edge includes:
for the closed edge, counting the gray value distribution of pixels in the edge, generating a gray histogram, normalizing the gray histogram to obtain the probability of each gray value, and calculating the gray entropy value in the closed edge based on the probability of each gray value, wherein the calculation formula of the gray entropy value is as follows:
wherein ,for gray entropy value>Representing the +.>Of individual grey levelsThe probability, sum operation traverses all gray levels.
In the above embodiment steps, for a closed edge, the round edge confidence of the closed edge is determined using the chain code principle as described aboveCounting the gray value distribution of pixels in the edge, generating a gray histogram, normalizing the gray histogram, namely dividing the gray value frequency by the total number of pixels in the edge to obtain the probability of each gray value, and calculating the gray entropy value in the closed edge based on the probability of each gray value>. Gray entropy value->The uncertainty of the texture complexity or the grey scale distribution inside the closed edge area can be described, since on the kiln surface it is possible to have the closed edge area either a surface carried part or a surface ageing area, when the grey scale entropy value +.>The larger the representative edge the more disturbed the texture distribution inside the edge, the more likely it is an aged area and vice versa the more likely it is a part carried by the surface. Finally, the shadow part inside the non-closed edge and the part inside the closed edge are marked by different colors respectively.
In an optional embodiment of the present application, the improving the scale ratio of the gaussian surrounding function based on the multiple projection degree index and the gray entropy value, and the image enhancing the second image based on the scale ratio of the improved gaussian surrounding function, to obtain a third image, includes:
the scale proportion of the Gaussian surround function in the single-scale Retinex algorithm is improved based on the multiple projection degree index of the projection shadow part and the gray entropy value in the closed edge, the improved scale proportion is obtained, and an improved formula is as follows:
wherein ,for improved dimensional ratios, +.>Is a multiple projection degree index of the projected shadow portion, < >>Is the gray entropy inside the closed edge, +.>The scale ratio in the original single-scale Retinex algorithm is as follows; /> and />Is a weight factor defined as +_in when running in the shadow area is not detected when the single scale Retinex algorithm is performed> and />Are all 0; when it is detected that the shadow part runs inside the non-closed edge +.>,/>The method comprises the steps of carrying out a first treatment on the surface of the When it is detected that the shadow portion runs inside the closed edge +.>,/>
Size ratio after improvementAnd carrying out single-scale Retinex algorithm, and enhancing the second image to obtain a third image.
In the above embodiment step, the pairs of gray entropy values inside the closed edge and the multiple projection degree index of the projected shadow portion are used to determine the gray entropy values of the closed edgeValue is improved, and the improved value is obtainedThe method is brought into a single-scale Retinex (SSR) algorithm, so that the image enhancement of the kiln image is realized, a third image is obtained, and the texture characteristics of the projection part and the aging part can be further reserved, so that the texture information in the projection part and the aging part is clearer, and the subsequent detection is convenient.
It should be noted that, when the operation of the shadow portion inside the non-closed edge is detected,,/>at this time, the pixels of the shadow part at the projection of the pipeline part are +.>An adaptive increase improvement is made with respect to the degree of multiple projection so that the enhancement effect on lower brightness is enhanced; when it is detected that the shadow portion runs inside the closed edge +.>,/>At the moment, the self-adaption improvement is carried out on the pixels on the surface of the pipeline according to the entropy value inside the edge, and the surface part is adaptedWhen reinforcing, the reinforcing effect is stronger on the aged part.
It should be further noted that, and />Is of the size pair->Is to be added to the following: />Reflecting the intensity and number of the projected shadow portions, a larger value indicates that the projected shadow portions are more pronounced, and the improvement on the scale ratio is more significant; />The larger the value, the more the gray level change inside the edge, i.e. the more uneven the gray level, the greater the enhancement effect should be, and the greater the impact on the improvement of the scale ratio.
In an optional embodiment of the present application, the step of using the third image for classifier training and using the trained classifier to complete defect detection of the kiln surface includes:
dividing the third image into a training set and a testing set, training a classifier by using the third image in the training set, inputting the testing set into the trained classifier to evaluate the trained classifier, and identifying and judging the acquired image by adopting the classifier passing the evaluation to detect defects on the surface of the kiln; the classifier is a support vector machine.
In the above embodiment step, the enhanced third image is divided into a training set and a test set, and the ratio of the third image to the test set is about 7:3 or 8:2. The training set is used to train the classifier, and the Support Vector Machine (SVM) classifier is used to train the images in the training set. Inputting the test set into a trained Support Vector Machine (SVM) classifier to evaluate the trained classifier, identifying and judging the collected image by the classifier passing the evaluation to realize classification of the image, namely normal and defect classification, obtaining whether the image is normal or has defects and belongs to which defect category, and finally identifying and judging the collected image to realize rapid automatic surface defect monitoring. Other conventional classifiers may be used in addition to the support vector machine, and are not particularly limited herein.
Referring to fig. 4, an embodiment of the present application discloses an electronic device 20 comprising a processor 21 and a memory 22; wherein the memory 22 is used for storing a computer program; the processor 21 is configured to implement the visual auxiliary kiln surface defect rapid detection method provided by the foregoing method embodiment by executing a computer program.
The specific process of the visual aid kiln surface defect rapid detection method can refer to the corresponding content disclosed in the foregoing embodiment, and will not be described in detail herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the storage may be a temporary storage or a permanent storage.
In addition, the electronic device 20 further includes a power supply 23, a communication interface 24, an input-output interface 25, and a communication bus 26; wherein the power supply 23 is used for providing working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
Further, the embodiment of the application also discloses a computer readable storage medium, as shown in fig. 5, for storing a computer program 31, wherein the computer program, when executed by a processor, implements the method for quickly detecting the surface defect of the visual auxiliary kiln provided by the foregoing method embodiment.
The specific process of the visual aid kiln surface defect rapid detection method can refer to the corresponding content disclosed in the foregoing embodiment, and will not be described in detail herein.
The embodiment of the application also provides a computer program product containing instructions, which when run on a computer, cause the computer to execute the visual auxiliary kiln surface defect rapid detection method shown in the method embodiment of the application.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method, the device and the medium for rapidly detecting the surface defects of the visual auxiliary kiln provided by the application are described in detail, and specific examples are applied to the description of the principle and the implementation mode of the application, and the description of the examples is only used for helping to understand the method and the core idea of the application; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the idea of the present application, the present disclosure should not be construed as limiting the present application in summary.

Claims (4)

1. A visual auxiliary kiln surface defect rapid detection method is characterized by comprising the following steps:
acquiring a first image of the kiln;
preprocessing the first image to obtain a second image;
extracting an interested region from the second image, and performing edge detection on the interested region to obtain a first edge image inside the interested region;
calculating the multiple projection degree of the first edge image to obtain a multiple projection degree index of a projection shadow part;
carrying out gray entropy calculation on the first edge image to obtain a gray entropy value inside the closed edge;
the scale proportion of the Gaussian surrounding function is improved based on the multiple projection degree index and the gray entropy value, and the second image is subjected to image enhancement based on the scale proportion of the improved Gaussian surrounding function to obtain a third image;
the third image is used for training a classifier, and the trained classifier is adopted to finish defect detection of the surface of the kiln;
the calculating the multiple projection degree of the first edge image to obtain a multiple projection degree index of a projection shadow part comprises the following steps:
performing gradient amplitude variation calculation on the first edge image to obtain gradient amplitude variation values of all edge pixels of the first edge image, and removing the edges of external parts in the first edge image based on the gradient amplitude variation values to obtain a second edge image;
calculating part projection probability of the second edge image to obtain part projection probability of each edge, and obtaining part projection shadows based on the part projection probability;
the part projection shadow is grown by using an area growing algorithm to obtain a multi-projection area, and the multi-projection degree calculation is carried out on the multi-projection area to obtain a multi-projection degree index of the part projection shadow;
the step of performing gradient amplitude variation calculation on the first edge image to obtain gradient amplitude variation values of all edge pixels of the first edge image, and removing the edges of the external components in the first edge image based on the gradient amplitude variation values to obtain a second edge image, including:
all edge pixels of the first edge image are traversed, a window is built by taking the edge pixels as the center, gradient amplitude values in the horizontal direction and the vertical direction are calculated on the center of the window, gradient amplitude value change values in the horizontal direction and the vertical direction of all edge pixels are calculated, and a calculation formula of the gradient amplitude value change values in the horizontal direction and the vertical direction is as follows:
wherein ,horizontal gradient magnitude for window center pixel, < >>Left side horizontal for center pixel +.>Gradient magnitude of individual unit pixels, ">Horizontal right side for center pixel +.>Gradient magnitude of individual unit pixels, ">Representing the gradient amplitude variation value of the central pixel in the horizontal direction,/for the central pixel>Vertical gradient magnitude for the window center pixel, +.>Is the vertical lower side of the central pixel +.>The magnitude of the gradient of a unit pixel,is the vertical upper side of the central pixel +.>Gradient magnitude of individual unit pixels, ">Representing the gradient amplitude variation value of the center pixel in the vertical direction;
will beEdge pixels each larger than the first threshold are set to 0 +.>At least one second edge image which is smaller than the first threshold and is set to be 1 is obtained;
the calculating of the part projection probability is carried out on the second edge image to obtain the part projection probability of each edge, and the part projection shadow is obtained based on the part projection probability, and the method comprises the following steps:
8 neighborhood chain code method coding is carried out on all edges in the second edge image, and for non-closed edge chain codes, the chain code length is set asBuild a +.>Matrix of->Calculating non-closing edgesStraight line edge confidence->And circular edge confidence->The calculation formulas of the straight edge confidence coefficient ZZ and the circular edge confidence coefficient YZ are as follows:
wherein For chain code at the sign +.>Continuously in the direction of (a)>Times of times->For matrix->Is>Line->Column (S)/(S)>Defined as coding +.>And code->The number of consecutive occurrences;
based on the straight edge confidenceAnd the circular edge confidence +.>Calculating the part projection probability of each edge +.>The projection probability of the part>The calculation formula of (2) is as follows:
probability of projection of the partSetting the non-closed edge which is larger than a second threshold value as a part projection edge, and defining a part between the part projection edge and the nearest part projection edge as a part projection shadow;
the method for obtaining the multi-projection area by growing the part projection shadow by using an area growing algorithm, and obtaining the multi-projection degree index of the part projection shadow by calculating the multi-projection degree of the multi-projection area comprises the following steps:
using an area growing algorithm to grow the part shadow projection to obtain multiple projection areas in the shadow projection part, calculating the average value of gray values of all the multiple projection areas, and carrying out maximum-minimum normalization on the average value of the gray values of all the multiple projection areas to obtain multiple projection degree indexes of the shadow projection part;
the step of performing gray entropy calculation on the first edge image to obtain a gray entropy value inside the closed edge comprises the following steps:
for the closed edge, counting the gray value distribution of pixels in the edge, generating a gray histogram, normalizing the gray histogram to obtain the probability of each gray value, and calculating the gray entropy value in the closed edge based on the probability of each gray value, wherein the calculation formula of the gray entropy value is as follows:
wherein ,for gray entropy value>Representing the +.>Probability of individual gray levels, and summing operation traverses all gray levels;
the improvement of the scale ratio of the gaussian surrounding function based on the multiple projection degree index and the gray entropy value, the image enhancement of the second image based on the scale ratio of the improved gaussian surrounding function, and the obtaining of a third image, includes:
the scale proportion of the Gaussian surround function in the single-scale Retinex algorithm is improved based on the multiple projection degree index of the projection shadow part and the gray entropy value in the closed edge, the improved scale proportion is obtained, and an improved formula is as follows:
wherein ,for improved dimensional ratios, +.>Is a multiple projection degree index of the projected shadow portion, < >>Is the gray entropy inside the closed edge, +.>The scale ratio in the original single-scale Retinex algorithm is as follows; /> and />Is a weight factor defined as +_in when running in the shadow area is not detected when the single scale Retinex algorithm is performed> and />Are all 0; when it is detected that the shadow part runs inside the non-closed edge +.>,/>The method comprises the steps of carrying out a first treatment on the surface of the When it is detected that the shadow portion runs inside the closed edge +.>,/>
Size ratio after improvementAnd carrying out single-scale Retinex algorithm, and enhancing the second image to obtain a third image.
2. The method for quickly detecting the surface defects of the kiln with the visual aid according to claim 1, wherein the step of preprocessing the first image to obtain a second image comprises the following steps:
and carrying out graying treatment and Gaussian filtering treatment on the first image to obtain a second image.
3. The method for quickly detecting defects on a kiln surface by visual assistance according to claim 1, wherein the step of using the third image for classifier training and using the trained classifier to detect defects on the kiln surface comprises the steps of:
dividing the third image into a training set and a testing set, training a classifier by using the third image in the training set, inputting the testing set into the trained classifier to evaluate the trained classifier, and identifying and judging the acquired image by adopting the classifier passing the evaluation to detect defects on the surface of the kiln; the classifier is a support vector machine.
4. A visual aid kiln surface defect rapid detection method according to claim 3, wherein the ratio of training set to test set is 7:3 or 8:2.
CN202311075168.4A 2023-08-25 2023-08-25 Visual auxiliary kiln surface defect rapid detection method Active CN116777918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311075168.4A CN116777918B (en) 2023-08-25 2023-08-25 Visual auxiliary kiln surface defect rapid detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311075168.4A CN116777918B (en) 2023-08-25 2023-08-25 Visual auxiliary kiln surface defect rapid detection method

Publications (2)

Publication Number Publication Date
CN116777918A CN116777918A (en) 2023-09-19
CN116777918B true CN116777918B (en) 2023-10-31

Family

ID=88008466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311075168.4A Active CN116777918B (en) 2023-08-25 2023-08-25 Visual auxiliary kiln surface defect rapid detection method

Country Status (1)

Country Link
CN (1) CN116777918B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021000524A1 (en) * 2019-07-03 2021-01-07 研祥智能科技股份有限公司 Hole protection cap detection method and apparatus, computer device and storage medium
CN113837974A (en) * 2021-09-28 2021-12-24 国网上海市电力公司 NSST (non-subsampled contourlet transform) domain power equipment infrared image enhancement method based on improved BEEPS (Bayesian particle swarm optimization) filtering algorithm
CN114693610A (en) * 2022-03-15 2022-07-01 中南大学 Welding seam surface defect detection method, equipment and medium based on machine vision
CN115830033A (en) * 2023-02-23 2023-03-21 威海锐鑫丰金属科技有限公司 Automobile hub surface defect detection method based on machine vision
CN116468640A (en) * 2023-06-20 2023-07-21 山东正禾大教育科技有限公司 Video image enhancement method for Internet teaching

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021000524A1 (en) * 2019-07-03 2021-01-07 研祥智能科技股份有限公司 Hole protection cap detection method and apparatus, computer device and storage medium
CN113837974A (en) * 2021-09-28 2021-12-24 国网上海市电力公司 NSST (non-subsampled contourlet transform) domain power equipment infrared image enhancement method based on improved BEEPS (Bayesian particle swarm optimization) filtering algorithm
CN114693610A (en) * 2022-03-15 2022-07-01 中南大学 Welding seam surface defect detection method, equipment and medium based on machine vision
CN115830033A (en) * 2023-02-23 2023-03-21 威海锐鑫丰金属科技有限公司 Automobile hub surface defect detection method based on machine vision
CN116468640A (en) * 2023-06-20 2023-07-21 山东正禾大教育科技有限公司 Video image enhancement method for Internet teaching

Also Published As

Publication number Publication date
CN116777918A (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN108961217B (en) Surface defect detection method based on regular training
CN108280823B (en) Method and system for detecting weak edge flaws on optical cable surface in industrial production
CN116758061B (en) Casting surface defect detection method based on computer vision
CN109872300A (en) A kind of vision significance detection method of friction plate open defect
CN114219805B (en) Intelligent detection method for glass defects
CN115345885A (en) Method for detecting appearance quality of metal fitness equipment
CN110544261B (en) Method for detecting coal injection state of blast furnace tuyere based on image processing
CN108389216B (en) Local self-adaptive threshold segmentation method for online ferrographic image abrasive particle identification
CN110288618B (en) Multi-target segmentation method for uneven-illumination image
CN113935666B (en) Building decoration wall tile abnormity evaluation method based on image processing
CN113902641B (en) Data center hot zone judging method and system based on infrared image
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN116777916B (en) Defect detection method based on metal shell of pump machine
CN115953398B (en) Defect identification method for strip steel surface
CN109239073A (en) A kind of detection method of surface flaw for body of a motor car
CN108335294A (en) The power distribution room abnormality image-recognizing method of complex condition
CN111896541B (en) Flue gas on-line monitoring system based on block chain
CN116342586A (en) Road surface quality detection method based on machine vision
CN109544513A (en) A kind of steel pipe end surface defect extraction knowledge method for distinguishing
CN115311289A (en) Method for detecting oil stain defects of plain-color cloth
CN113313107A (en) Intelligent detection and identification method for multiple types of diseases on cable surface of cable-stayed bridge
CN115131356A (en) Steel plate defect classification method based on richness
CN113744326B (en) Fire detection method based on seed region growth rule in YCRCB color space
CN116777918B (en) Visual auxiliary kiln surface defect rapid detection method
CN116630321B (en) Intelligent bridge health monitoring system based on artificial intelligence

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: No. 1398 Qinan Road, Yangcheng Science and Technology Industrial Park, Xiangcheng District, Suzhou City, Jiangsu Province, China

Patentee after: Suzhou Cohen New Energy Technology Co.,Ltd.

Country or region after: China

Address before: 215138 buildings 3 and 4, 289 Fengyang Road, Dalou village, Yangchenghu Town, Xiangcheng District, Suzhou City, Jiangsu Province

Patentee before: SUZHOU KEER POEN MACHINERY TECHNOLOGY Co.,Ltd.

Country or region before: China