Grinding wheel defect detection method based on machine vision
By performing image processing and clustering analysis on the surface of the grinding wheel, combined with the gradient direction analysis of pixel points, we can determine whether there are cracks on the surface of the grinding wheel, which solves the problem of insufficient detection accuracy in the prior art and improves the accuracy and robustness of the detection.
Patent Information
- Application Number
- CN202510305240.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-03-14
AI Technical Summary
The prior art has problems with insufficient accuracy when detecting cracks on the surface of the grinding wheel, especially when the surface roughness of the grinding wheel is uneven and the texture is complex, it is difficult to distinguish cracks and backgrounds, resulting in erroneous identification or missed inspection.
Using a detection method based on machine vision, the local density value of each aliquot image is calculated by performing grayscale processing and circumcision aliquoting of the grinding wheel surface image, and clustering analysis is performed to screen out cluster clusters that are suspected to have cracks. Further, the crack confidence of each aliquot image is calculated through the gradient direction analysis of pixel points, and then whether there are cracks on the surface of the grinding wheel is judged.
The accuracy of crack detection on the surface of the grinding wheel is improved, the robustness of the uneven factors of the grinding wheel surface is enhanced, and the efficiency in the grinding wheel production quality inspection process is improved.
Smart Images

Figure CN119831990A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a grinding wheel defect detection method based on machine vision. Background Art
[0002] Grinding wheel is a tool used for grinding, polishing, cutting and other processing operations. It is composed of hard abrasive particles and a binder and is widely used in mechanical processing. The production process of grinding wheel includes raw material batching, mixing, molding, sintering, cooling and dressing. In the production process of grinding wheel, the grinding wheel may have defects such as cracks due to uneven mixing of raw materials or the influence of temperature during sintering. Therefore, it is of great significance to detect defects such as cracks in the produced grinding wheel to ensure the quality of the grinding wheel.
[0003] In the prior art, threshold segmentation is usually used to detect crack defects in produced grinding wheels, and the traditional threshold segmentation method usually relies on the difference in pixel intensity in the image to distinguish cracks from the background. However, the surface of a grinding wheel usually has different roughness, and there may be locally smoother or rougher areas. This uneven surface characteristic will cause changes in the brightness and texture in the grinding wheel surface image. Secondly, the surface of the grinding wheel may have patterns such as printed textures, and these textures and cracks may have visual similarities, resulting in the cracks may have no obvious intensity difference with the surrounding areas, ultimately leading to misidentification or missed detection.
[0004] Therefore, how to improve the accuracy of detecting crack defects in grinding wheels has become an urgent problem to be solved. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a grinding wheel defect detection method based on machine vision to solve the problem of how to improve the accuracy of detecting crack defects of a grinding wheel.
[0006] An embodiment of the present invention provides a method for detecting grinding wheel defects based on machine vision, the method comprising the following steps: Capturing images of the surface of the grinding wheel produced on the quality inspection line to obtain a grinding wheel surface image, graying the grinding wheel surface image to obtain a corresponding grayscale image, obtaining a circumscribed circle of the grinding wheel in the grayscale image, and dividing the circumscribed circle into a preset number of equally divided images according to the center of the circumscribed circle; For any equally divided image, according to the spectrum data difference between the any equally divided image and other equally divided images, a local density value of the any equally divided image is obtained, and the local density values of each of the equally divided images are sorted in ascending order to obtain a target local density value sequence; The maximum value and the minimum value in the target local density value sequence are used as initial cluster centers, the target local density value sequence is clustered to obtain two clusters, and whether there are cracks in the surface of the grinding wheel is detected according to the difference between the two clusters. If suspected cracks are detected in the surface of the grinding wheel, a suspected abnormal cluster is obtained from all clusters; According to the gradient direction of the pixel points in the equally divided image corresponding to each local density value in the suspected abnormal cluster, the confidence of the existence of cracks in each equally divided image corresponding to the suspected abnormal cluster is obtained respectively, and according to the confidence of the existence of cracks in each equally divided image corresponding to the suspected abnormal cluster, the crack defect in the grinding wheel surface is detected.
[0007] Preferably, obtaining the local density value of any equally divided image according to the spectrum data difference between any equally divided image and other equally divided images includes: After rotating each of the equally divided images to the same preset direction, obtaining a frequency spectrum diagram corresponding to each of the equally divided images; For any other equally divided image, according to the spectrum diagram of any equally divided image and the spectrum diagram of any other equally divided image, obtain the square of the mean square error of the spectrum data in the horizontal direction and the square of the mean square error of the spectrum data in the vertical direction, which are respectively recorded as the horizontal error and the vertical error, and obtain the spectrum difference index between any equally divided image and any other equally divided image according to the horizontal error and the vertical error; According to the frequency spectrum difference index between any one equally divided image and each other equally divided image, a local density value of any one equally divided image is obtained.
[0008] Preferably, obtaining the local density value of any equally divided image according to the frequency spectrum difference index between any equally divided image and each other equally divided image comprises: The spectrum difference index of any equally divided image and each other equally divided image is averaged to obtain an average spectrum difference index, the average spectrum difference index is normalized to obtain a corresponding normalized value, and the local density value of any equally divided image is obtained according to the difference between a constant 1 and the normalized value.
[0009] Preferably, detecting whether there is a crack in the surface of the grinding wheel according to the difference between the two clusters comprises: Respectively obtain the sum of the local density values contained in each of the clusters, mark the cluster corresponding to the minimum sum as the first cluster, and mark the cluster corresponding to the maximum sum as the second cluster; Obtaining an average value of all local density values in the first cluster, recorded as a first average value, obtaining an average value of all local density values in the second cluster, recorded as a second average value, calculating the absolute value of the difference between every two local density values in the second cluster, and obtaining an accumulated value of the absolute values of the differences; Calculating an absolute value of a difference between the first average value and the second average value, recording the difference as an average difference value, and obtaining a crack judgment index according to a ratio between the average difference value and an accumulated value of the absolute values of the difference; A preset crack judgment index threshold is obtained, and if the crack judgment index is greater than the crack judgment index threshold, it is determined that there is suspected crack in the surface of the grinding wheel.
[0010] Preferably, obtaining a suspected abnormal cluster from all clusters includes: The first cluster is taken as a suspected abnormal cluster.
[0011] Preferably, the step of obtaining the confidence level of crack existence in each equally divided image corresponding to the suspected abnormal cluster according to the gradient direction of the pixel points in the equally divided image corresponding to each local density value in the suspected abnormal cluster comprises: Mark the equally divided images corresponding to the cluster centers of non-suspected abnormal clusters as reference images. After rotating the equally divided images corresponding to each local density value in the reference image and the suspected abnormal cluster to the same preset direction, respectively obtaining the gradient direction of each pixel point in each equally divided image corresponding to the reference image and the suspected abnormal cluster; For any equally divided image corresponding to the suspected abnormal cluster, the pixel points in the any equally divided image that are different from the pixel points in the reference image are marked to obtain marked pixel points, and the gradient directions of all marked pixel points are counted according to a preset gradient direction interval to obtain a gradient direction histogram, wherein the horizontal axis of the gradient direction histogram is the gradient direction interval, and the vertical axis is the number of marked pixel points; The maximum ordinate value in the gradient direction histogram is obtained, recorded as the maximum amplitude, the average value of all ordinate values in the gradient direction histogram except the maximum amplitude is obtained, recorded as the average amplitude, and the ratio of the maximum amplitude to the average amplitude is normalized to obtain the confidence level of the existence of cracks in any of the equally divided images.
[0012] Preferably, the detecting crack defects in the grinding wheel surface according to the confidence of the existence of cracks in each equally divided image corresponding to the suspected abnormal cluster comprises: A preset confidence threshold is obtained, and if the confidence corresponding to any equally divided image in the suspected abnormal cluster is greater than the confidence threshold, it is confirmed that a crack defect exists on the surface of the grinding wheel.
[0013] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: The present invention takes into account that when cracks exist on the surface of the grinding wheel, the area occupied by the cracks is small. By equally dividing the grayscale image corresponding to the grinding wheel surface, a plurality of equally divided images are obtained, and the frequency spectrum differences between the equally divided images are analyzed to conveniently measure the differences between the equally divided images, and obtain the local density value of each equally divided image, which is used to divide the equally divided images into two clusters according to the local density values, and quickly screen out the clusters suspected of having cracks, that is, the suspected clusters, and then obtain the confidence of the existence of cracks in each equally divided image for the gradient direction of the pixel points in each equally divided image corresponding to the suspected clusters. The greater the confidence, the more likely it is that cracks exist, so that the cracks on the grinding wheel surface are judged more accurately based on the confidence, so as to improve the interference of other factors in the traditional method when detecting cracks on the grinding wheel surface, improve the robustness of the detection of cracks on the grinding wheel surface, and thus improve the efficiency in the quality inspection process of grinding wheel production. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be 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 labor.
[0015] Figure 1 is a method flow chart of a grinding wheel defect detection method based on machine vision provided in Embodiment 1 of the present invention; Figure 2 It is a schematic diagram of a grinding wheel provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0016] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, but should not be understood as limiting the present disclosure.
[0017] It should be noted that the terms "first", "second", etc. in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0018] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.
[0019] See also Figure 1 , is a method flow chart of a grinding wheel defect detection method based on machine vision provided in Embodiment 1 of the present invention, such as Figure 1 As shown, the method may include: Step S101, capture an image of the surface of the grinding wheel produced on the quality inspection line to obtain a grinding wheel surface image, grayscale the grinding wheel surface image to obtain a corresponding grayscale image, obtain the circumscribed circle of the grinding wheel in the grayscale image, and divide the circumscribed circle into a preset number of equally divided images according to the center of the circumscribed circle.
[0020] For the already produced Figure 2 The grinding wheel shown is placed on a transmission belt on a quality inspection line, and then a high-definition camera arranged above the transmission belt collects an image of the surface of the grinding wheel placed on the transmission belt to obtain an image of the grinding wheel surface.
[0021] During the production process of grinding wheels, the cracks on their surfaces are usually long and thin lines, and radial cracks are generally the majority (that is, their distribution direction is usually along the radius of the grinding wheel). Due to the long and thin characteristics of the cracks, the area they occupy when they appear is very small compared to the area of the grinding wheel surface. Therefore, it is necessary to quickly lock and screen the crack areas that may exist on the grinding wheel surface.
[0022] Considering that the shape of the grinding wheel is circular, it has certain characteristics such as central symmetry and axial symmetry. Local analysis can be performed based on the circular features of the grinding wheel to improve the detection accuracy. Therefore, in the embodiment of the present invention, the surface image of the grinding wheel is first grayed to obtain a corresponding gray image, and then the Hough circle detection (Hough Circle Transform) is used to obtain the circumscribed circle of the grinding wheel in the gray image and the center of the circumscribed circle. Hough circle detection (Hough Circle Transform) is an algorithm for detecting circles in images, which is widely used in the fields of computer vision and image processing. The algorithm is a well-known technology and will not be repeated here. Finally, the circumscribed circle is divided into a preset number of equal parts along the center of the circle according to the radius of the circumscribed circle, that is, an equally divided image. One equally divided image corresponds to a local area on the surface of the grinding wheel. The preset number here is 12 (empirical value).
[0023] Step S102, for any equally divided image, according to the spectrum data difference between the any equally divided image and other equally divided images, obtain the local density value of the any equally divided image, and sort the local density values of each of the equally divided images in ascending order to obtain a target local density value sequence.
[0024] When cracks appear on the surface of the grinding wheel, the cracks may appear in some of the equally divided images. Since the texture distribution and direction between normal equally divided grinding wheels are similar, the corresponding spectral data between these normal equally divided images are also relatively similar. However, when a crack exists in a certain equally divided image, its corresponding spectral data will be different from the spectral data between normal equally divided images. Therefore, according to the difference in spectral data between each equally divided image, the spectral difference index between any two equally divided images is analyzed.
[0025] Specifically, with the center of the circumscribed circle as the rotation center, each equally divided image is rotated to the same preset direction (for example, horizontally to the right), and then each equally divided image is subjected to Fourier transform to obtain the spectrum diagram corresponding to each equally divided image, wherein the spectrum diagram of the image obtained by Fourier transform belongs to the prior art and will not be described here. Since the spectrum data in the horizontal and vertical directions of the spectrum diagram have a certain comparability, taking any equally divided image as an example, the remaining equally divided images are used as other equally divided images, and according to the difference in the spectrum diagram between any equally divided image and each other equally divided image, the spectrum difference index between any equally divided image and each other equally divided image is analyzed: For any other equally divided image, based on the spectrum diagram of any equally divided image and the spectrum diagram of any other equally divided image, obtain the square of the mean square error of the spectrum data in the horizontal direction and the square of the mean square error of the spectrum data in the vertical direction, which are respectively recorded as horizontal error and vertical error. Based on the horizontal error and the vertical error, obtain the spectrum difference index between any equally divided image and any other equally divided image.
[0026] In one implementation, taking the a-th equally divided image and the b-th other equally divided image as an example, the spectrum data of the spectrum diagram of the a-th equally divided image and the b-th other equally divided image in the horizontal direction are aligned, and the mean square error is calculated, which is recorded as the horizontal error. Similarly, the spectrum data of the spectrum diagram of the a-th equally divided image and the b-th other equally divided image in the vertical direction are aligned, and the mean square error is calculated, which is recorded as the vertical error. According to the horizontal error and the vertical error, the spectrum difference index between the a-th equally divided image and the b-th other equally divided image is characterized, and the calculation expression of the corresponding spectrum difference index is: in, It represents the spectrum difference index between the a-th equally divided image and the b-th other equally divided image. Represents the spectrum data of the spectrum graph of the a-th equally divided image in the horizontal direction, Represents the spectrum data of the spectrum diagram of the bth other equally divided image in the horizontal direction, x represents the horizontal direction, y represents the vertical direction, Represents the spectrum data of the spectrum graph of the a-th equally divided image in the vertical direction, Represents the spectrum data of the spectrum graph of the bth other equally divided image in the vertical direction, Represents the mean square error in the horizontal direction, that is, the horizontal error, Represents the mean square error in the vertical direction, that is, the vertical error, represents the mean square error.
[0027] It should be noted that and It is used to characterize the sum of the square of the mean square error in the horizontal direction and the square of the mean square error in the vertical direction. The larger the sum is, the greater the difference in the spectrum between the a-th equally divided image and the b-th equally divided image is. The probability that one of them has a crack is very high, and the corresponding spectrum difference index is larger.
[0028] Similarly, the spectrum difference index between any equally divided image and each other equally divided image can be obtained. If the spectrum difference index between any equally divided image and all other equally divided images is larger, it means that there is a high probability of cracks in any equally divided image. Therefore, by analyzing the overall spectrum difference between any equally divided image and the equally divided images within its local range, the local density value of any equally divided image is obtained to characterize the entire local spectrum difference of any equally divided image. The larger the local density value, the smaller the corresponding entire local spectrum difference. Then, according to the spectrum difference index between any equally divided image and each other equally divided image, the local density value of any equally divided image is obtained, including: The spectrum difference index of any equally divided image and each other equally divided image is averaged to obtain an average spectrum difference index, the average spectrum difference index is normalized to obtain a corresponding normalized value, and the local density value of any equally divided image is obtained according to the difference between a constant 1 and the normalized value.
[0029] In one embodiment, the calculation expression of the local density value of the a-th equally divided image is: in, represents the local density value of the a-th equally divided image, 1 represents a constant, norm() represents the normalization function, and m represents the number of equally divided images. It represents the spectrum difference index between the a-th equally divided image and the b-th other equally divided image.
[0030] It should be noted that The smaller the value is, the smaller the local spectrum difference of the a-th equally divided image is, the more the a-th equally divided image and its periodic equally divided image belong to the same category, and the larger the corresponding local density value is.
[0031] Similarly, the local density value of each equally divided image is obtained, and the local density values of all equally divided images are arranged in order from small to large to obtain a target local density value sequence.
[0032] Step S103, taking the maximum value and the minimum value in the target local density value sequence as the initial clustering centers, clustering the target local density value sequence to obtain two clustering clusters, and detecting whether there are cracks in the grinding wheel surface according to the difference between the two clustering clusters. If suspected cracks are detected in the grinding wheel surface, a suspected abnormal clustering cluster is obtained from all clustering clusters.
[0033] The target local density value sequence is used to characterize the local spectrum difference of each equally divided image. If the local spectrum differences of all equally divided images are similar, it means that the equally divided images are similar, belong to the same category, there is no major abnormality, and the probability of cracks on the corresponding grinding wheel surface is very small. Therefore, in an embodiment of the present invention, a clustering algorithm is used to cluster the target local density value sequence, and the maximum and minimum values in the target local density value sequence are used as initial clustering centers. K-means clustering is performed on the target local density value sequence to obtain two cluster clusters, one cluster cluster corresponding to the equally divided images of a class with the highest similarity, and then, the addition results of the local density values contained in each of the cluster clusters are obtained respectively, and the cluster cluster corresponding to the minimum addition result is marked as the first cluster cluster, and the cluster cluster corresponding to the maximum addition result is marked as the second cluster cluster.
[0034] If the difference characteristics of the two clusters are larger, it means that the possibility of cracks on the grinding wheel surface is greater. On the contrary, if the difference characteristics of the two clusters are smaller, it means that the texture characteristics between the equally divided areas on the grinding wheel surface are similar, and the probability of cracks is very small. Therefore, according to the local density values in the two clusters, a judgment index for judging whether there are cracks on the grinding wheel surface can be obtained. Specifically: the average value of all local density values in the first cluster is obtained, recorded as the first average value, the average value of all local density values in the second cluster is obtained, recorded as the second average value, and the absolute value of the difference between each two local density values in the second cluster is calculated to obtain the accumulated value of the absolute value of the difference; The absolute value of the difference between the first average value and the second average value is calculated and recorded as the average difference value, and the crack judgment index is obtained according to the ratio between the average difference value and the accumulated value of the absolute value of the difference.
[0035] In one embodiment, the calculation expression of the crack judgment index is: Among them, Y represents the crack judgment index, represents the first average value, represents the second mean value, represents the average difference value, Represents the accumulated value of the absolute value of the difference between every two local density values in the second cluster, c1 represents the first cluster, and c2 represents the second cluster.
[0036] It should be noted that Used to characterize the normal error between two normal equal parts, so the ratio is used To analyze the proportion of the difference between the two clusters in the normal error, the larger the proportion, the larger the error. The larger the difference between the two clusters, the more likely there is a crack on the grinding wheel surface, and the larger the corresponding crack judgment index.
[0037] Furthermore, the crack judgment index threshold is set to 3. If the crack judgment index is greater than the crack judgment index threshold, it is determined that there are suspected cracks in the grinding wheel surface or an abnormality caused by the inconsistency of the uniformity of grit distribution on the normal grinding wheel surface, and further crack precision detection of the grinding wheel is required.
[0038] When it is determined that there are suspected cracks in the surface of the grinding wheel, it means that the feature difference between the two clusters is large. Considering that the local density value in the first cluster is small, it is believed that the probability of cracks existing in the equally divided images in the first cluster is high, and there are no cracks in the equally divided images in the second cluster. Therefore, the first cluster is used as a suspected abnormal cluster for subsequent precise detection of cracks.
[0039] Step S104, according to the gradient direction of the pixel points in the equally divided image corresponding to each local density value in the suspected abnormal cluster, respectively obtain the confidence that cracks exist in each equally divided image corresponding to the suspected abnormal cluster, and detect the crack defect in the grinding wheel surface according to the confidence that cracks exist in each equally divided image corresponding to the suspected abnormal cluster.
[0040] Since the second cluster is a non-suspected abnormal cluster, that is, there is no crack in its corresponding equally divided image, the equally divided image corresponding to the cluster center of the non-suspected abnormal cluster is marked as a reference image, and according to the above-mentioned rotation method for obtaining the spectrum diagram, the reference image and the equally divided image corresponding to each local density value in the suspected abnormal cluster are rotated to the same preset direction (horizontally to the right), and the Sobel operator is used to obtain the gradient direction of each pixel point in each equally divided image corresponding to the reference image and the suspected abnormal cluster, respectively, wherein the Sobel operator belongs to the prior art and will not be described in detail here.
[0041] Taking the gradient direction of each pixel in the reference image as a reference, the texture pixels of each equally divided image corresponding to the suspected abnormal cluster are excluded, that is, the pixels with the same gradient direction as the pixels in the reference image. Therefore, for any equally divided image corresponding to the suspected abnormal cluster, the pixels in the any equally divided image that are different from the gradient direction of the pixels in the reference image are marked to obtain marked pixels. The range of the gradient direction angle difference of 2 degrees is used as a preset gradient direction interval, corresponding to 180 gradient direction intervals. Then, according to the preset gradient direction interval, the gradient directions of all marked pixels are counted to obtain a gradient direction histogram, wherein the horizontal axis of the gradient direction histogram is the gradient direction interval, and the vertical axis is the number of marked pixels.
[0042] Since cracks are usually long and thin lines, the gradient direction of the corresponding pixel points has a relatively regular directionality. The gravel on the surface of the grinding wheel has random distribution, and the gradient direction of the corresponding pixel points has random characteristics. Therefore, when there is a crack in any equally divided image, the number of marked pixels corresponding to a certain gradient direction interval in the corresponding gradient direction histogram is relatively high. Therefore, the confidence of the existence of cracks in any equally divided image can be obtained according to the gradient direction of the pixel points in any equally divided image. The specific acquisition method is: The maximum ordinate value in the gradient direction histogram is obtained, recorded as the maximum amplitude, the average value of all ordinate values in the gradient direction histogram except the maximum amplitude is obtained, recorded as the average amplitude, and the ratio of the maximum amplitude to the average amplitude is normalized to obtain the confidence level of the existence of cracks in any of the equally divided images.
[0043] In one embodiment, the confidence level of the existence of cracks in any equally divided image is calculated as follows: in, It indicates the confidence that there is a crack in the rth equally divided image corresponding to the suspected abnormal cluster. norm() indicates the normalization function, and max() indicates the maximum value function. Represents the maximum ordinate value in the gradient direction histogram of the rth equally divided image, that is, the maximum peak value, Represents the average value of all ordinate values except the maximum ordinate value in the gradient direction histogram of the r-th equally divided image.
[0044] It should be noted that It is used to characterize the ratio between the peak value in the gradient direction histogram of the r-th equally divided image and the mean value of all amplitudes except the peak value. The larger the ratio is, the larger the peak value is, and the greater the confidence that there is a crack in the corresponding r-th equally divided image is.
[0045] Similarly, the confidence level of the existence of cracks in each equally divided image corresponding to the suspected abnormal cluster is obtained, so as to detect the crack defect in the grinding wheel surface according to the confidence level of the existence of cracks in each equally divided image corresponding to the suspected abnormal cluster. The specific detection method is: obtaining a preset confidence threshold value, if the confidence level corresponding to any equally divided image in the suspected abnormal cluster is greater than the confidence threshold value, it is confirmed that there is a crack defect on the grinding wheel surface.
[0046] In one embodiment, the confidence threshold is 0.45. When there is at least one equally divided image in the suspected abnormal cluster whose corresponding confidence is greater than 0.45, it is confirmed that there is a crack defect on the surface of the grinding wheel, and then the degree of the crack defect in the corresponding equally divided image is obtained according to the confidence of the crack, which characterizes the degree of the crack defect on the surface of the grinding wheel, wherein the greater the confidence, the higher the degree of the crack defect. Specifically, the confidence can be used as the degree of the crack defect on the surface of the grinding wheel. When there are multiple equally divided images with cracks, the cumulative value of the confidence is calculated as the degree of the crack defect on the surface of the grinding wheel, and then the grinding wheels that may have cracks are screened out through mechanical grippers and other devices on the quality inspection line, so as to perform a more accurate quality inspection on the presence of cracks on the surface of the grinding wheel; conversely, when the confidences corresponding to the equally divided images in the suspected abnormal cluster are all less than or equal to 0.45, it is considered that there is no crack on the surface of the grinding wheel, and the above-mentioned suspected crack exists due to the inconsistent uniformity of grit distribution on the surface of the normal grinding wheel.
[0047] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those 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 invention, and should be included in the protection scope of the present invention.
Claims
1. A grinding wheel defect detection method based on machine vision, characterized in that: The method comprises: Capturing images of the surface of the grinding wheel produced on the quality inspection line to obtain a grinding wheel surface image, graying the grinding wheel surface image to obtain a corresponding grayscale image, obtaining a circumscribed circle of the grinding wheel in the grayscale image, and dividing the circumscribed circle into a preset number of equally divided images according to the center of the circumscribed circle; For any equally divided image, according to the spectrum data difference between the any equally divided image and other equally divided images, a local density value of the any equally divided image is obtained, and the local density values of each of the equally divided images are sorted in ascending order to obtain a target local density value sequence; The maximum value and the minimum value in the target local density value sequence are used as initial cluster centers, the target local density value sequence is clustered to obtain two clusters, and whether there are cracks in the surface of the grinding wheel is detected according to the difference between the two clusters. If suspected cracks are detected in the surface of the grinding wheel, a suspected abnormal cluster is obtained from all clusters; According to the gradient direction of the pixel points in the equally divided image corresponding to each local density value in the suspected abnormal cluster, the confidence of the existence of cracks in each equally divided image corresponding to the suspected abnormal cluster is obtained respectively, and according to the confidence of the existence of cracks in each equally divided image corresponding to the suspected abnormal cluster, the crack defect in the grinding wheel surface is detected.
2. A grinding wheel defect detection method based on machine vision according to claim 1, characterized in that: The obtaining the local density value of any equally divided image according to the spectrum data difference between any equally divided image and other equally divided images includes: After rotating each of the equally divided images to the same preset direction, obtaining a frequency spectrum diagram corresponding to each of the equally divided images; For any other equally divided image, according to the spectrum diagram of any equally divided image and the spectrum diagram of any other equally divided image, obtain the square of the mean square error of the spectrum data in the horizontal direction and the square of the mean square error of the spectrum data in the vertical direction, which are respectively recorded as the horizontal error and the vertical error, and obtain the spectrum difference index between any equally divided image and any other equally divided image according to the horizontal error and the vertical error; According to the frequency spectrum difference index between any one equally divided image and each other equally divided image, a local density value of any one equally divided image is obtained.
3. A grinding wheel defect detection method based on machine vision according to claim 2, characterized in that: The obtaining, according to the frequency spectrum difference index between any one equally divided image and each other equally divided image, a local density value of any one equally divided image comprises: The spectrum difference index of any equally divided image and each other equally divided image is averaged to obtain an average spectrum difference index, the average spectrum difference index is normalized to obtain a corresponding normalized value, and the local density value of any equally divided image is obtained according to the difference between a constant 1 and the normalized value.
4. The method for detecting grinding wheel defects based on machine vision according to claim 1, characterized in that: The step of detecting whether there is a crack on the surface of the grinding wheel according to the difference between the two clusters comprises: Respectively obtain the sum of the local density values contained in each of the clusters, mark the cluster corresponding to the minimum sum as the first cluster, and mark the cluster corresponding to the maximum sum as the second cluster; Obtaining an average value of all local density values in the first cluster, recorded as a first average value, obtaining an average value of all local density values in the second cluster, recorded as a second average value, calculating the absolute value of the difference between every two local density values in the second cluster, and obtaining an accumulated value of the absolute values of the differences; Calculating an absolute value of a difference between the first average value and the second average value, recording the difference as an average difference value, and obtaining a crack judgment index according to a ratio between the average difference value and an accumulated value of the absolute values of the difference; A preset crack judgment index threshold is obtained, and if the crack judgment index is greater than the crack judgment index threshold, it is determined that there is suspected crack in the surface of the grinding wheel.
5. The method for detecting grinding wheel defects based on machine vision according to claim 4, characterized in that: The step of obtaining suspected abnormal clusters from all clusters includes: The first cluster is taken as a suspected abnormal cluster.
6. The method for detecting grinding wheel defects based on machine vision according to claim 1, characterized in that: The step of obtaining the confidence level of cracks in each equally divided image corresponding to the suspected abnormal cluster according to the gradient direction of the pixel points in the equally divided image corresponding to each local density value in the suspected abnormal cluster comprises: Mark the equally divided images corresponding to the cluster centers of non-suspected abnormal clusters as reference images. After rotating the equally divided images corresponding to each local density value in the reference image and the suspected abnormal cluster to the same preset direction, respectively obtaining the gradient direction of each pixel point in each equally divided image corresponding to the reference image and the suspected abnormal cluster; For any equally divided image corresponding to the suspected abnormal cluster, the pixel points in the any equally divided image that are different from the pixel points in the reference image are marked to obtain marked pixel points, and the gradient directions of all marked pixel points are counted according to a preset gradient direction interval to obtain a gradient direction histogram, wherein the horizontal axis of the gradient direction histogram is the gradient direction interval, and the vertical axis is the number of marked pixel points; The maximum ordinate value in the gradient direction histogram is obtained, recorded as the maximum amplitude, the average value of all ordinate values in the gradient direction histogram except the maximum amplitude is obtained, recorded as the average amplitude, and the ratio of the maximum amplitude to the average amplitude is normalized to obtain the confidence level of the existence of cracks in any of the equally divided images.
7. A method for detecting grinding wheel defects based on machine vision according to claim 6, characterized in that: The method of detecting crack defects in the surface of the grinding wheel according to the confidence level of the existence of cracks in each equally divided image corresponding to the suspected abnormal cluster comprises: A preset confidence threshold is obtained, and if the confidence corresponding to any equally divided image in the suspected abnormal cluster is greater than the confidence threshold, it is confirmed that a crack defect exists on the surface of the grinding wheel.
Citation Information
Patent Citations
Road pavement construction quality detection method and system
CN117557569A
Civil air defense channel blocking method and system
CN118196082A
Online monitoring method for polishing of shaft forgings
CN119180836A
Cited By
Laminated slab quality detection method and system based on image processing
CN120598967A
Cylinder identifying and grabbing method and system based on machine vision and medium
CN121083615A