A hammer head fine defect detection method based on image enhancement
By converting texture image of the original image of the crusher hammer head and enhancing the multi-scale Retinex algorithm, combining enhanced image and texture image for bubble defect judgment, the problem of low detection reliability of existing methods is solved, and the accuracy and reliability of detection are improved.
Patent Information
- Application Number
- CN202210472066.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-04-29
AI Technical Summary
The existing methods have low reliability in detecting defects on the hammer head of the crusher, especially under the influence of external light, which makes it difficult to accurately detect bubble defects.
The hammer head fine defect detection method based on image enhancement is adopted. By acquiring the original image of the hammer head of the crusher, converting it into a texture image, and image enhancement is used to enhance the image, combining the enhanced image and texture image to judge bubble defects.
It improves the reliability and accuracy of the detection of hammer head defects of crusher and enhances the ability to identify bubble defects, especially under low illumination conditions.
Smart Images

Figure CN114937006B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of data processing, and in particular to a hammer head refined defect detection method based on image enhancement. Background Art
[0002] The hammer head commonly used in the crushing industry refers to the wearing parts of the crusher used to crush different materials; however, in industrial production, when producing the hammer head of the crusher, bubbles may appear in the hammer head due to exhaust problems or casting system planning problems. The appearance of bubbles will reduce the hardness of the hammer head, which may affect the efficiency of the crusher in crushing materials.
[0003] Existing methods for detecting crusher hammer defects may be affected by external light, which may reduce the reliability and accuracy of detecting crusher hammer defects. Summary of the invention
[0004] The present invention provides a hammer head fine defect detection method based on image enhancement, which is used to solve the problem of low reliability of existing methods for crusher hammer head defect detection. The technical scheme adopted is as follows:
[0005] In a first aspect, an embodiment of the present invention provides a method for fine-tuning defect detection of a hammer head based on image enhancement, comprising the following steps:
[0006] Get the original image of the crusher hammer;
[0007] According to the pixel values of the pixels on the original image, a texture image corresponding to the original image is obtained;
[0008] Using the multi-scale Retinex algorithm, the enhanced image corresponding to the original image is obtained;
[0009] According to the enhanced image and the texture image, it is determined whether there is a bubble defect in the original image.
[0010] Beneficial effects: The present invention uses the pixel values of the pixels on the original image as the basis for obtaining the texture image corresponding to the original image; uses the multi-scale Retinex algorithm as the basis for obtaining the enhanced image corresponding to the original image; uses the enhanced image and the texture image as the basis for judging whether there are bubble defects on the original image; the method provided by the present invention adopts a graphic recognition method and performs relevant data processing, which can increase the reliability of crusher hammer defect detection.
[0011] Preferably, the method for obtaining the original image of the crusher hammer head comprises:
[0012] An image acquisition device is used to acquire an image of the bottom of the hammer head, and the image of the bottom of the hammer head is gray-scaled, and the gray-scaled image is recorded as the original image of the crusher hammer head.
[0013] Preferably, the method for obtaining a texture image corresponding to an original image according to the pixel values of pixels on the original image includes:
[0014] Set the standard convolution kernel;
[0015] Extend the standard convolution kernel by one pixel in the four directions of up, down, left, and right. Then delete the pixels in the four directions around the center of the convolution kernel to get a new convolution kernel.
[0016] And traverse the original image, starting from a pixel at the upper left corner of the original image, place the pixel at the center of the convolution kernel, compare the grayscale values of the pixels at the rest of the convolution kernel with the grayscale value of the center pixel, if the grayscale value of the pixel is less than the grayscale value of the center point, mark the position of the pixel as 0, if it is greater than the grayscale value of the center point, mark the position of the pixel as 1, and construct a binary sequence;
[0017] Convert the binary sequence to decimal, assign the value to an image of the same size as the original image, and after traversing the original image, record the new image as the texture image corresponding to the original image.
[0018] Preferably, the standard convolution kernel is a 3×3 convolution kernel.
[0019] Preferably, the K value of the Retinex algorithm is 3, and the K value of 3 means taking 3 convolution kernels of different sizes.
[0020] Preferably, the method of obtaining an enhanced image corresponding to the original image using a multi-scale Retinex algorithm includes:
[0021] According to the new convolution kernel, get the first Gaussian kernel size;
[0022] The second Gaussian kernel size is obtained based on the pixel with the largest gray value in the original image and the point farthest from the pixel with the largest gray value;
[0023] The third Gaussian kernel size is obtained by averaging the grayscale values of each row in the original image;
[0024] According to the first Gaussian kernel size, the second Gaussian kernel size and the third Gaussian kernel size, an enhanced image corresponding to the original image is obtained.
[0025] Preferably, the method for judging whether there is a bubble defect in the original image according to the enhanced image and the texture image includes:
[0026] The texture image and the enhanced image are combined, and then the image segmentation algorithm is used to determine whether there are bubble defects in the original image. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 The present invention is a flowchart of a hammer head fine defect detection method based on image enhancement. DETAILED DESCRIPTION
[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the embodiments of the present invention.
[0030] 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 pertains.
[0031] This embodiment provides a hammer head fine defect detection method based on image enhancement, which is described in detail as follows:
[0032] like Figure 1 As shown, the hammer head fine defect detection method based on image enhancement includes the following steps:
[0033] Step S001, obtaining the original image of the crusher hammer head.
[0034] In industrial production, bubbles may appear in the hammer head of the crusher due to exhaust problems or problems in the planning of the casting system. The bubbles will reduce the hardness of the hammer head. Therefore, it is necessary to detect whether the hammer head has this problem after production. After production, the hammer head is transmitted with an intermittent conveyor belt. In this case, the light is dim, and the image of the bottom of the hammer head captured by the camera will be blurred. The bubbles will not be easy to find due to the dim light. Therefore, image enhancement methods are needed to process the image.
[0035] In this embodiment, an image of the bottom of the hammer head is collected by an image collection device, the image of the bottom of the hammer head is gray-scaled, and the gray-scaled image is recorded as the original image of the crusher hammer head.
[0036] Step S002, obtaining a texture image corresponding to the original image according to the pixel values of the pixels on the original image.
[0037] This embodiment mainly uses the improved Retinex algorithm to enhance the image, and then combines the texture information after enhancement to determine whether there is a bubble defect on the original image of the crusher hammer head; however, in the process of using the Retinex algorithm for image enhancement, the original image may become slightly blurred, and after the image becomes blurred, some image details and texture information will be lost. Therefore, this embodiment extracts the image details and texture information based on the original image to obtain the texture image corresponding to the original image; the specific process is:
[0038] Since the bubble defect is approximately circular in shape when there is a bubble defect in the original image of the crusher hammer, the convolution kernel shape is set to a standard 3×3 convolution kernel. The standard convolution kernel is extended outward by one pixel in the four directions of up, down, left, and right. The convolution kernel becomes 13 pixels. Then, the pixels in the four directions of up, down, left, and right around the center of the convolution kernel are deleted. In this way, a new convolution kernel is formed. The convolution kernel size is 9 pixels. Let the convolution kernel be E. Then, traverse the original image, starting from a pixel in the upper left corner of the original image, place the pixel in the center of the convolution kernel, and the remaining 8 pixels of the convolution kernel are deleted. The pixel points at each position are compared with the grayscale value of the center pixel one by one starting from the top pixel. If the grayscale value of the pixel point is less than the grayscale value of the center point, then the position of the pixel point is marked as 0. If it is greater than the grayscale value of the center point, then the position of the pixel point is marked as 1. Read clockwise from the top pixel point to form a binary sequence. Convert the sequence to decimal, and the converted value is exactly between [0,255]. Assign the value to an image of the same size as the original image. After traversing the original image, the new image obtained is the required texture image, which is recorded as the texture image corresponding to the original image.
[0039] Step S003, using a multi-scale Retinex algorithm to obtain an enhanced image corresponding to the original image.
[0040] In this embodiment, the original image is assumed to be F(x, y)=F L (x,y)·F R (x,y), where F L (x) is the irradiation image, F R (x) is the reflection image. The principle of the Retinex algorithm is to divide an image into an illumination image and a reflection image, and the image required is only the reflection image. Therefore, the algorithm is a process of separating the reflection image from the original image and finally obtaining the required incident image.
[0041] Using the multi-scale Retinex algorithm, this method can achieve effects such as color enhancement, color permanence, and local dynamic range compression. The calculation formula of this method is as follows:
[0042]
[0043] Among them, r(x,y) is the output image, which is the required reflection image after exponential transformation, that is, logF R (x) = r(x, y); in the formula, G k (x, y) is the Gaussian surround function, which is used to separate the incident image, w k It is the weight for different Gaussian functions.
[0044] In order to better use the Retinex algorithm, the most important thing is to determine the Gaussian kernel function; the most critical factor affecting the Gaussian kernel function is the size of the convolution kernel, and for the multi-scale Retinex algorithm, the K value is the same as the number of convolution kernels of different sizes. The purpose of this is to obtain the advantages of Gaussian kernels of different scales.
[0045] In this embodiment, K=3 is selected. If the K value is too large, more operations need to be performed, while if it is too small, there is no advantage of multiple scales. Therefore, K=3 is selected in this solution.
[0046] For the first Gaussian kernel c1, in the above steps, this embodiment uses a convolution kernel to extract texture information, and for this purpose, the first Gaussian convolution kernel c1=E; the reason for selecting this convolution kernel is that the enhanced image needs to be combined with the texture image in the final stage, and for this purpose, the convolution kernel is used to convolve the original image, so that there will not be a problem of too much change when it is combined later.
[0047] For the second Gaussian kernel, this embodiment determines it according to the size of the bubble. Since the image becomes very dark under low illumination, the bubble size cannot be stably determined. Therefore, this embodiment uses an estimation method to estimate the bubble size and then determines the size of the Gaussian kernel. The specific process is:
[0048] Since the bubble is approximately a circle, the bubble is treated as a circular area in this embodiment. Since the grayscale value of the pixel point at the edge of the bubble is larger than the grayscale value of the pixel point at the hammer head, the pixel point with the largest grayscale value is selected from the image, and it is considered that the point corresponds to the edge point of the bubble; and this point is used as the initial point to find the pixel point with the largest grayscale value in the surrounding 8 neighborhoods, and then the next pixel point finds the maximum value point in the surrounding 8 neighborhoods except the previous point, and iterates 100 times, marking each selected pixel point. After 100 iterations, a curve is obtained, and then the curve is refined to obtain a refined curve, with the initial point and the point farthest from the initial point at both ends of the curve. Let the coordinates of the initial point be n(i0,j0), then the point at the other end of the curve is:
[0049]
[0050] Among them, max(L) represents the maximum distance between all points on the curve and the initial point.
[0051] Finally, the point at the other end of the curve is recorded as n(i1,j1). The two points obtain a curvature based on the curve. A circle is determined by the coordinates and curvature of the two points. Assuming that the diameter of the circle is d, the size of the Gaussian kernel is d.
[0052] For the third Gaussian kernel, the grayscale value of each row is averaged, and an image projection is obtained. The projection is traversed to observe the grayscale changes at different positions. During the traversal process, a group of information with opposite grayscale is taken as a group. Start traversing from the first one, with a step length of 1. The first and second are compared and recorded as the first group. Regardless of the size, the first group is recorded as 1, and at this time, the comparison information of the two is counted. If the previous one is greater than the next one, it is recorded as a, and if the next one is greater than the previous one, it is recorded as b. Then compare the second and third ones and record them as the second group. If the second group has different information from the first group, that is, one is a and the other is b, then the second group is recorded as 0, and so on; similarly, average each column.
[0053] In this way, two codes of 0 and 1 are obtained, wherein this embodiment finds the most drastic changing parts, that is, the longest continuous parts of 1, records the two lengths at this time, averages the two lengths, and obtains the size of the third Gaussian kernel, recorded as l.
[0054] For the Retinex algorithm, after getting the sizes of the three Gaussian kernels, we can get r(x,y). Then, by performing exponential changes and illumination changes on r(x,y), we can get the enhanced image, which is R(x,y). The enhanced image is recorded as the enhanced image corresponding to the original image.
[0055] Step S004: judging whether there is a bubble defect in the original image according to the enhanced image and the texture image.
[0056] In this embodiment, the texture image and enhanced image corresponding to the original image obtained above are combined to obtain an image with clear edges and unchanged texture after combination, and then an image segmentation algorithm is used to determine whether there are bubble defects in the original image; the process of using an image segmentation algorithm to perform regional segmentation and analysis on the image is a prior art, so this embodiment will not be described in detail.
[0057] The purpose of image enhancement in this embodiment is to make the image clear. This embodiment selects the Retinex algorithm for use. This method can enhance the image well. However, unlike the existing Retinex algorithm, this embodiment adds texture image correction, and finally corrects the enhanced image and texture image. In addition, for the Retinex algorithm itself, the Gaussian surround function is the most important part. Most of the existing ones are adjusted using empirical values. In this embodiment, the Gaussian kernel used for texture extraction, the possible defect size as the Gaussian kernel template size, and the most drastic change in the image are combined as the Gaussian kernel size, so that the Retinex algorithm function is more in line with this embodiment.
[0058] Beneficial effects: This embodiment uses the pixel values of the pixels on the original image as the basis for obtaining the texture image corresponding to the original image; uses the multi-scale Retinex algorithm as the basis for obtaining the enhanced image corresponding to the original image; uses the enhanced image and the texture image as the basis for judging whether there are bubble defects on the original image; the method provided in this embodiment adopts a graphic recognition method and performs relevant data processing, which can increase the reliability of crusher hammer defect detection.
[0059] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A hammer head fine defect detection method based on image enhancement, characterized in that: The method comprises the following steps: Get the original image of the crusher hammer; According to the pixel values of the pixels on the original image, a texture image corresponding to the original image is obtained; Using the multi-scale Retinex algorithm, the enhanced image corresponding to the original image is obtained; According to the enhanced image and the texture image, determine whether there is a bubble defect on the original image; The method for obtaining a texture image corresponding to an original image according to pixel values of pixels on the original image comprises: Set the standard convolution kernel; Extend the standard convolution kernel by one pixel in the four directions of up, down, left, and right. Then delete the pixels in the four directions around the center of the convolution kernel to get a new convolution kernel. And traverse the original image, starting from a pixel at the upper left corner of the original image, place the pixel at the center of the convolution kernel, compare the grayscale values of the pixels at the rest of the convolution kernel with the grayscale value of the center pixel, if the grayscale value of the pixel is less than the grayscale value of the center point, mark the position of the pixel as 0, if it is greater than the grayscale value of the center point, mark the position of the pixel as 1, and construct a binary sequence; Convert the binary sequence to decimal, assign the value to an image of the same size as the original image, and after traversing the original image, record the new image as the texture image corresponding to the original image.
2. A hammer head fine defect detection method based on image enhancement as claimed in claim 1, characterized in that: The method for obtaining the original image of the crusher hammer head comprises: An image acquisition device is used to acquire an image of the bottom of the hammer head, and the image of the bottom of the hammer head is gray-scaled, and the gray-scaled image is recorded as the original image of the crusher hammer head.
3. A hammer head fine defect detection method based on image enhancement as claimed in claim 1, characterized in that: The standard convolution kernel is a 3×3 convolution kernel.
4. A hammer head fine defect detection method based on image enhancement as claimed in claim 1, characterized in that: The K value of the Retinex algorithm is 3, and the K value of 3 means taking 3 convolution kernels of different sizes.
5. A hammer head fine defect detection method based on image enhancement as claimed in claim 4, characterized in that: The method of obtaining an enhanced image corresponding to an original image by using a multi-scale Retinex algorithm comprises: According to the new convolution kernel, get the first Gaussian kernel size; The second Gaussian kernel size is obtained based on the pixel with the largest gray value in the original image and the point farthest from the pixel with the largest gray value; The third Gaussian kernel size is obtained by averaging the grayscale values of each row in the original image; According to the first Gaussian kernel size, the second Gaussian kernel size and the third Gaussian kernel size, an enhanced image corresponding to the original image is obtained.
6. The method for detecting hammer head defects based on image enhancement according to claim 1, characterized in that: The method for judging whether there is a bubble defect in the original image according to the enhanced image and the texture image comprises: The texture image and the enhanced image are combined, and then the image segmentation algorithm is used to determine whether there are bubble defects in the original image.
Citation Information
Patent Citations
Fan blade defect detection method and system based on machine vision
CN112098416A