Disclosure of Invention
First) solving the technical problems
The invention provides a visual detection system for saw blade tooth form defects based on a deep learning model, which aims to solve the problems that the conventional method for detecting saw blade tooth form defects by visual contrast of images is easy to miss detection and the accuracy is easy to influence.
Two) technical scheme
In order to achieve the purpose, the invention provides the following technical scheme that the visual detection system for the tooth form defect of the saw blade based on the deep learning model is applicable to the saw blade for continuous sectional detection and comprises the following components:
a light source configured to provide a plurality of different specific wavelengths of light;
The first visual detection device is used for shooting a saw blade with a certain length range and generating a digital image, adjusting the digital image into a uniform pixel size, and extracting corresponding characteristic values after edge detection, texture analysis and morphological operation of pixel information in a scanned image, wherein the characteristic values comprise crack width, contrast and tooth space;
The second visual detection device is used for receiving the light reflected by the saw blade surface in a certain length range from the light with different specific wavelengths, generating a reflection spectrum and analyzing the change of the reflected light intensity with different specific wavelengths, wherein the area with obviously reduced reflected intensity is marked as tooth-shaped defect;
the judging unit is used for receiving the characteristic values extracted by the first visual detection device and the corresponding pixel positions thereof, and comparing different characteristic values with a set threshold interval, wherein when all the characteristic values are smaller than the minimum value of the corresponding threshold interval, detection is stopped, no tooth-shaped defect exists, when the characteristic value is larger than the maximum value of the corresponding threshold interval, tooth-shaped defect exists, and when at least one characteristic value is located in the corresponding threshold interval, the second visual detection device is started for spectral analysis;
And the marking unit is used for receiving the characteristic value which is transmitted by the judging unit and marked as the tooth-shaped defect in real time, the second visual detection device marks the reflection spectrum with the tooth-shaped defect, and recording the pixel position corresponding to the tooth-shaped defect.
Further, the length of the saw blade that the first visual detection device detected at every turn is equal with the length of the saw blade that the second visual detection device detected at every turn to first visual detection device and second visual detection device set up for the saw blade homonymy.
Further, the first vision detecting device shoots the saw blade and generates a digital image which is a gray scale image, and after the gray scale image is smoothed by using Gaussian filtering, the gray scale image is adjusted to the uniform pixel size.
Further, the edge detection is performed on the pixel information in the scanned image of the first visual detection device for identifying and calculating the crack width W, which specifically comprises the following steps:
converting the gray scale map into a two-dimensional pixel matrix;
calculating the gradient of each pixel by using a Canny edge detection method, and identifying the edge with obvious brightness change;
acquiring coordinate points of edges;
determining a crack area according to the edge coordinates;
from the extracted edge coordinates, the crack width W is calculated.
Further, the texture analysis is performed on the pixel information in the scanned image of the first visual inspection device for identifying and calculating the contrast C, specifically including the following steps:
defining a gray value range, mapping pixel values in the two-dimensional pixel matrix to the defined gray value range in a linear mapping mode to obtain a quantized gray level matrix;
Counting the occurrence times of gray scale pairs in the quantized gray scale matrix to obtain a gray scale co-occurrence matrix;
Calculating the contrast in the image according to a contrast C formula;
C=-∑(i-j)2p(i,j)
wherein the element p (i, j) in the gray level co-occurrence matrix represents the number of times that a pair of pixels having gray values i and j appears in the image.
Further, the morphological analysis is performed on the pixel information in the scan map of the first visual detection device to identify and calculate the tooth space D, which specifically includes the following steps:
Converting the two-dimensional pixel matrix into a binary image, and separating a sawtooth region from a background, wherein the pixel value larger than a set value is set as 1, and the rest is set as 0, so as to obtain the binary image;
sequentially applying morphological corrosion operation and expansion operation to the binary image to extract the shape and position of the tooth;
the tooth spacing D is calculated by calculating the distance between adjacent ones of the foreground pixels.
Further, the judging unit receives the crack width W, the contrast C and the tooth space D extracted and calculated by the first visual detection device and the pixel position corresponding to each characteristic value, compares the characteristic value with a preset crack width threshold value interval, a preset contrast threshold value interval and a preset tooth space threshold value respectively, and correspondingly,
If the extracted and calculated crack width W is smaller than the minimum value in the crack width threshold interval, marking that no crack defect exists;
If the contrast C calculated by extraction is smaller than the minimum value in the contrast threshold interval, marking the image as having no scratch defect, and if the contrast C is larger than the maximum value in the contrast threshold interval, marking the image as having the scratch defect;
if the extracted and calculated tooth distance D is smaller than the tooth distance threshold value, marking the extracted and calculated tooth distance D as no tooth defect, and if the extracted and calculated tooth distance D is larger than the tooth distance threshold value, marking the extracted and calculated tooth distance D as the tooth defect;
when the size of the crack width W is within the crack width threshold interval, the crack defect is smaller, and the second visual detection device is started to perform spectral analysis;
And when the contrast C is within the contrast threshold interval, indicating that the scratch defect is smaller, and starting a second visual detection device for spectral analysis.
Further, the first visual inspection device detects the crack width W and/or the contrast C and the corresponding pixel position thereof within the corresponding threshold interval, the second visual inspection device analyzes the reflection spectrum data of different specific wavelengths of the pixel position, in particular the reflection light intensity changes of different specific wavelengths,
Extracting a pixel position for calculating the crack width W, and marking that a crack defect exists if the reflection intensity is obviously reduced in a reflection spectrum of a specific wavelength at the position;
And in the pixel position where the contrast C is extracted and calculated, if the reflection intensity is obviously increased or fluctuated in the reflection spectrum of the specific wavelength at the position, marking as scratch defects exist.
Further, the marking unit records the pixel positions corresponding to the tooth-shaped defects, wherein the tooth-shaped defects comprise crack defects, scratch defects and tooth defects, the crack defects, the scratch defects and the tooth defects are converted into actual positions on a saw blade and marked, and the conversion steps are as follows:
determining a proportional relationship between an actual physical size of the saw blade performing the visual inspection and a pixel resolution of the image;
and mapping the pixel position into an actual physical position on the saw blade according to the proportional relation.
Further, the device also comprises a stable light source, wherein the stable light source is used for providing stable and uniform illumination for the first visual detection device, and the stable light source does not interfere with the light rays of the light source.
Third), beneficial effects:
Compared with the prior art, the invention has the following beneficial effects:
according to the invention, the corresponding characteristic value is extracted through the first visual detection device for identifying the image on the surface of the saw blade, the extracted characteristic value is compared with the set threshold range, and the obvious tooth-shaped defect area is primarily identified, so that the obvious tooth-shaped defect area is rapidly filtered, and the detection efficiency is improved.
The comparison result with the set threshold is used as a starting condition for performing secondary accurate detection, the secondary visual detection device performs more accurate detection on the area where the potential defect is detected primarily, deep defect characteristics are identified, and by limiting the triggering condition of the secondary accurate detection, redundant comprehensive analysis on the surface of the whole saw blade is avoided, namely the detection duration and the system load are reduced, meanwhile, the problem area is ensured to be detected more accurately, and the detection precision and reliability of the tooth-shaped defect are improved.
The identified defects are marked through real-time recording, and the positions and types of the defects are recorded in the form of coordinate axes, so that references are provided for subsequent processing, and the quality traceability of saw blades is ensured.
Detailed Description
The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making creative efforts based on the embodiments of the present invention are included in the protection scope of the present invention.
In the description of the present invention, it should be understood that the terms "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the drawings, are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention.
In the process of detecting tooth form defects of a saw blade, the inventor finds that:
In the industrial assembly line type saw blade production process, machine vision is often used for comparing and detecting whether tooth form defects appear on the saw blade, for example, a camera is used for shooting and imaging the saw blade, and then the saw blade is compared with images with normal tooth form defects and images with tooth form defects in a database, and whether tooth form defects exist on the saw blade is judged through the contrast coincidence degree.
However, this method requires a large amount of storage of images of known defects and normal samples, and is very costly and labor intensive to maintain and update databases in the case of a wide variety of products and complex types of defects. Different types of defects (e.g., cracks, scratches, teeth missing, etc.) may exhibit different visual characteristics, which require that the samples in the database have sufficient diversity to cope with various situations. And for some tiny or hidden defects (such as tiny cracks and deep scratches), the situation that the defects are difficult to identify can occur singly depending on the comparison of images, and the defects can be not obvious in the images or confused with the background, so that detection fails.
Furthermore, in order to improve the defects in the prior art, the embodiment of the invention provides a visual detection system for saw blade tooth shape defects based on a deep learning model, which can primarily identify more obvious tooth shape defects such as cracks, scratches and missing teeth through processing saw blade images, and further identify tiny or hidden defects through analyzing the reflection spectrum of the saw blade surface on different specific wavelengths. The identified defects are marked through real-time recording, and the positions and types of the defects are recorded in the form of coordinate axes, so that references are provided for subsequent repair processing, and the quality traceability of saw blades is ensured.
In combination with the visual detection system for saw blade tooth form defects based on the deep learning model shown in fig. 1 to 6, the embodiment provided by the invention is suitable for the field application scene of continuous visual detection of the whole section of saw blade in an industrial assembly line, in particular, the whole section of saw blade is continuously conveyed to a detection area, the detection device of the detection area carries out visual detection on the surface defects of the rack, and in some practical embodiments provided by the invention, the detection flow is subdivided into the following parts:
and (4) performing primary detection on the overall appearance of the saw blade surface, and identifying common defects such as cracks, scratches and missing teeth. And the obvious defect area is quickly and primarily screened, so that the burden of invalid data processing is reduced.
And in the error analysis and judgment step, the error analysis of the characteristic value is carried out according to the result of the first detection, and whether further detection is needed is judged, so that unnecessary subsequent detection is reduced, and the resource and time consumption are optimized.
And (3) detecting for the second time, namely detecting the region where the potential defect is detected in the preliminary way more accurately, and identifying the deep defect characteristics. And compared with the first detection, the method has the advantages of deeper and more accurate analysis, reduced false alarm rate and accurate differentiation of different types of defects.
And marking the identified defects, and recording the positions and types of the defects in the form of coordinate axes.
Regarding the first detection, in some practical embodiments provided by the invention, the process comprises the steps of enabling a saw blade to enter a first detection area in a segmented mode at a constant speed, enabling a first visual detection device to shoot a high-definition image on each saw blade, adjusting the image to be of a uniform pixel size after processing, extracting characteristic values of the saw blade by using edge detection, texture analysis and morphological operation, and comparing the extracted characteristic values with a set threshold interval range to primarily identify potential defect areas.
In particular, in some practical embodiments provided by the present invention, an industrial camera is used as the first vision inspection device, and is used to capture images of the saw blade surface. It is noted that it is to be ensured that the industrial camera has sufficient resolution and image quality to clearly capture the defects of the saw blade. Regarding the illumination conditions, it is ensured that the illumination of the detection area is sufficient, avoiding the influence of shadows and reflections on the image quality. Therefore, a stable light source can be arranged beside the industrial camera, the industrial camera shoots perpendicular to the surface of the saw blade, and the stable light source and the industrial camera are arranged on the same side, so that the quality of shot images is ensured.
Before analyzing the image captured by the first visual inspection device, some preprocessing steps are required to improve the accuracy of subsequent analysis. The method specifically comprises the following steps:
Resizing the image to the uniform size (e.g., 224 x 224 pixels) required for the model input.
Normalization, namely scaling the pixel value to be between 0 and 1 so as to improve the efficiency and effect of model training.
Denoising, which is to remove image noise and enhance features by using a filtering technique (such as Gaussian filtering).
The following is a Python example code in an embodiment of the invention, demonstrating how to perform data preprocessing on an image.
And carrying out edge detection, texture analysis and morphological operation on the preprocessed digital image (usually a gray level image), scanning the change condition of pixel values, and extracting corresponding characteristic information.
An edge detection algorithm (such as Canny and Sobel operators) scans pixels in an image, identifies edges with significant brightness changes, tooth-shaped crack defect features are highlighted in edge detection, and the crack width is determined by calculating the distance between the edges.
Specifically, the pixel map is scanned, where the gray level change of the pixel is obvious, and edges are extracted from the areas, and in some embodiments of the present invention, the gradient of the image is calculated by using a Canny edge detection algorithm, so as to find the edges. The pixel values in the gray-scale map are now set as the following two-dimensional matrix of pixel values:
In this matrix, each element represents a gray value or color value of a pixel. The two-dimensional pixel matrix may represent a gray-scale image, a color image, or a binary image. For gray scale images, the pixel values are typically between 0 and 255.
After the two-dimensional pixel matrix is subjected to Canny edge detection, setting the obtained edge detection result as follows:
The edge coordinates of the binary image are extracted as follows:
(0,2),(0,3),
(1,1),(1,2),(1,3),
(2,1),(2,2),(2,3),
(3,2)
Note that the coordinates of a pixel are typically expressed in terms of (y, x), where y is the row index (vertical direction) and x is the column index (horizontal direction), since images are typically stored in memory on a row-by-row basis.
It will be appreciated that in this example, the upper and lower edges of the crack are observed to be approximately between row 0 and row 3, with columns between column 1 and column 3.
From the extracted edge coordinates, the width can be calculated such that in row 1 and row 2, the leftmost edge is in column 1 and the rightmost edge is in column 3.
The width of the crack was calculated using the formula:
crack width (W) =right edge column-left edge column } +1
Corresponding to this example:
W=3-1+1=3pixels
Assuming that each pixel of this area corresponds to an actual size of 0.5mm and the crack width is 3 pixels in the horizontal direction, the actual crack width=3×0.5 mm=1.5 mm.
Regarding how the first visual inspection apparatus extracts the feature values for calculating the scratch defects, in some practical embodiments of the present invention, a texture analysis algorithm (such as a gray level co-occurrence matrix GLCM) is used to analyze the relationship between adjacent pixels in the image, and extract texture information, thereby obtaining the contrast C.
Specifically, a gray level co-occurrence matrix (GLCM) is also calculated by taking the two-dimensional pixel matrix as an example. First, it is necessary to define a gray value range, in this example, assuming that only gray values of 0-3 are of interest (a larger range may be required in practical applications for simplicity), the pixel values of the above matrix are mapped to the 0-3 range (by some quantization method, such as a linear mapping method), resulting in:
next, GLCM is calculated, and the number of occurrences of the gradation pair is counted in consideration of the relationship (e.g., horizontal relationship) of the adjacent pixels. The GLCM obtained is as follows:
Where the element p (i, j) in GLCM represents the number of times a pixel pair with gray values i and j appears in the image. For example, the element p (0, 0) =4 indicates that the pixel pair having the gradation values of 0 and 0 appears 4 times, p (0, 1) =2 indicates that the pixel pair having the gradation values of 0 and 1 appears 2 times, and so on.
The formula for contrast is:
C=-∑(i-j)2p(i,j)
the contrast is calculated from the GLCM, wherein,
(0-0) 2 4=0 Represents a contrast contribution with a gray value of (0, 0).
(0-2) 2 2=8 Represents the contrast contribution with a gray value of (0, 0).
(2-0) 2 2=4 Represents the contrast contribution with a gray value of (0, 0).
(1-1) 2 3 =0 Represents the contrast contribution with a gray value of (0, 0).
The result is c=0+8+4+0=12, representing the degree of contrast between the gray values in the image.
Regarding how the first visual inspection device extracts the eigenvalues of the missing or damaged tooth defect, in some practical embodiments of the present invention, morphological calculations are used to extract geometric features in the image, identify specific type devices and structures in the image, and detect missing teeth and tooth spaces. Specifically, the tooth space D of the tooth structure is calculated by morphological operations by binarizing the image.
Taking the two-dimensional pixel matrix as an example, firstly performing binary processing on the two-dimensional pixel matrix, separating a sawtooth region from the background, and then extracting the shape and the position of the tooth through an image analysis algorithm. Binary images refer to only two possible values per pixel, typically 0 and 1.0 typically represents the background (black) and 1 represents the foreground (white or other color), with the binary image primarily used to represent the separation of objects in the image from the background. The extracted binary image is as described above.
The binary image is corroded, so that small noise can be removed, the boundary of the object is thinned, and adjacent objects are separated. Specifically, by scanning the binary image with a small structural element (e.g., a 3×3 matrix), the foreground region is reduced, the foreground pixels (having a value of 1) are eroded, and the resulting pixel is foreground only if all pixels covered by the structural element are foreground pixels.
The corrosion operation reduces the foreground area, and the corrosion result is:
Then an expansion operation is performed, which expands the foreground pixels as opposed to erosion. If any one pixel covered by a structural element is a foreground pixel, the resulting pixel is foreground, and expansion can increase the size of the foreground region, fill small holes, or connect adjacent objects.
The expansion operation expands the foreground region, resulting in:
the tooth spacing D may be achieved by calculating the distance between adjacent foreground pixels. Let us assume that the denture pitch is the width of the foreground region (from the center of one foreground pixel to the center of the next foreground pixel).
In the image after corrosion and swelling, the tooth spacing can be calculated by:
finding the position of a foreground pixel;
The distance between adjacent foreground pixels is calculated.
For example, in the expansion result, the positions of the foreground pixels are:
a first foreground pixel position (0, 2);
a second foreground pixel position (0, 3);
a third foreground pixel position (0, 4);
calculating a column index difference:
For the first and second foreground pixels:
Column index difference=3-2=1
This means that the distance between columns 2 and 3 is 1.
For the second and third foreground pixels:
Column index difference=4-3=1
This means that the distance between columns 3 and 4 is also 1.
This column index difference calculates the horizontal distance (column number) between adjacent foreground pixels. In this example, the distance between all adjacent foreground pixels is 1, which indicates that they are adjacent and no other foreground pixels are spaced apart.
The tooth spacing D can be understood as the distance between adjacent teeth, if the column index difference is 1, indicating that there is no gap between the two teeth.
Referring to fig. 2, fig. 2 is a schematic block diagram of a visual detection system for saw blade tooth form defect based on a deep learning model according to an embodiment of the present invention, after a first visual detection device extracts and calculates a corresponding feature value from a saw blade tooth form image captured by the first visual detection device, the feature value is sent to a judging unit, and a pre-defined feature threshold is set in the judging unit.
Correspondingly, the characteristic values (crack width W, contrast C and tooth space D) extracted in the first detection are compared with preset threshold intervals [ A, B ].
If the characteristic value exceeds the upper threshold B, the defect is considered to be larger, and the defect can be marked directly without secondary detection, so that time can be saved.
If the eigenvalue is between a and B, indicating that the defect is small, a second inspection is required for more accurate analysis and validation.
For smaller defects (feature values between a and B) a second accurate inspection needs to be triggered, such as using spectroscopic analysis, to confirm the nature and severity of the defect, and then to mark the defect.
It will be appreciated that this approach balances speed and accuracy, and allows in-depth analysis of ambiguous defects, while skipping further detection of apparent defects and direct processing. This flexibility may increase overall detection efficiency.
Specifically, in some practical embodiments of the present invention, referring specifically to fig. 3 and 4, the entire saw blade is advanced by the same saw blade length each time, and sequentially enters the first visual inspection area and the second visual inspection area for defect detection, in this embodiment, the saw blade advanced by a length of 10cm each time is set to enter the inspection area, that is, the single inspection area distance L 1 of the first visual inspection device, the single inspection area distance L 2 of the second visual inspection device is equal, and L 1=L2 =10 cm. The saw blade to be detected is made of low alloy spring steel, the tooth shape on the saw blade is an inclined tooth with a front angle of 10 degrees, and the tooth pitch is 25.4mm.
On the basis of the above example, in the judging unit, a lower threshold value a W =0.3 mm, and an upper threshold value B W =1.0 mm are set as the crack width threshold value interval;
Regarding the contrast threshold interval, a lower threshold a C =10, and an upper threshold B C =30;
regarding the tooth gap threshold, tooth gap threshold=27.4 mm.
Taking the crack width W, the contrast C and the tooth spacing D extracted and calculated by the two-dimensional pixel matrix converted by the gray level diagram as an example, the characteristic error judgment is carried out on the sub-basis.
Specifically, after the first detection, the width of the crack in a certain area is 1.5mm, and exceeds the upper threshold B W =1.0 mm.
Since the crack width has significantly exceeded the threshold range, indicating that this is a severe crack, the system can be marked directly as a large crack without the need for a second spectroscopic analysis to detect.
The contrast of a certain detection region is 12, and is between a lower threshold a C =10 and an upper threshold B C =30 in the threshold section.
Contrast is within the threshold interval, indicating that there may be minor scratches or surface irregularities. At this point, the system cannot determine the severity of the scratch, trigger a second detection, and use spectroscopic analysis for further validation.
In the calculation of the tooth space D, a column index difference of 1 indicates that there is no gap between the two teeth. No second detection is required. In addition, if the tooth spacing D is between the tooth spacing and the tooth spacing threshold, the second detection is not needed within the tooth spacing error, and if the tooth spacing D is greater than the set tooth spacing threshold, the defect of tooth loss is indicated, and the second detection is not needed.
With particular reference to fig. 4, in some practical embodiments of the invention, a spectral camera 3 is used as the second visual detection means, and a light source 4 is arranged beside the spectral camera 3, which can emit light of different specific wavelengths. The spectroscopic camera 3 can detect details of cracks and scratches by analyzing spectroscopic information reflected or emitted by the object. The advantage of spectral detection is that it can capture light responses of different wavelengths, revealing small differences in the material surface under different light rays, especially when micro-cracks or scratches may not be detected by the industrial camera 1. The detection flow of the spectrum camera 3 is specifically as follows:
Spectral data acquisition, in which a light source 4 beside a spectral camera 3 emits light rays (visible light, infrared rays and the like) in a wide frequency range to the surface of a saw blade, the surface of a material reflects light with different wavelengths, and the spectral camera 3 acquires spectral data according to the characteristics of the reflected light. For cracks and scratches, these defects can lead to anomalies in light reflection, producing specific spectral signals.
In addition, it should be noted that after the first detection by the industrial camera 1, only the problematic areas are subjected to spectral analysis. The industrial camera 1 has initially detected the locations of potential cracks or scratches and the spectroscopic camera 3 only needs to perform a focus analysis on the pixels of these locations. For example, an image of a 10cm saw blade is taken at one time by the industrial camera 1, producing an image of 224 x 224 pixels. And (5) primarily detecting defects such as cracks, scratches and the like through an image processing algorithm. The pixel coordinates of these areas are marked. According to the first detection result, only pixels of the defect areas are selected for spectral analysis. For example, if the edge pixel points of the crack are in the (50, 100) to (80, 130) range of the image, the spectrum camera 3 analyzes only these coordinate ranges in detail. The design reduces the workload of spectrum analysis of the whole image and remarkably improves the detection speed.
The generation of the spectrogram, namely, the reflection spectrum of each region can generate a spectrum curve, the horizontal axis represents wavelength (nm), and the vertical axis represents reflection intensity.
The spectral curve at the crack or scratch may significantly decrease or increase in reflected intensity at a particular wavelength compared to the normal region, indicating that the light has different absorption or scattering properties in these regions.
The spectral analysis of the crack will now be illustrated assuming that the saw blade surface has a micro-crack, i.e. the crack width W is between the lower threshold a W and the upper threshold B W within the threshold interval, and at certain wavelengths the reflected intensity of the crack will be significantly reduced, as the crack will increase the surface roughness, resulting in light scattering.
As shown in fig. 5, fig. 5 shows a reflection spectrum of light with a specific wavelength detected and analyzed by the spectrum camera 3 when a crack defect occurs, a spectrum curve of a normal area is relatively smooth within a wavelength range of 500-700nm, the reflection intensity is about 0.7-0.8 in the range, a spectrum of the crack is reduced to 0.5 in the vicinity of 550nm, and an obvious valley is formed, so that the crack can be judged to exist in the area.
The spectral analysis of scratches will now be illustrated assuming that the saw blade has a micro-scratch on its surface, i.e. the contrast C is between the lower threshold a C and the upper threshold B C within the threshold interval. Scratches, unlike cracks, which are typically surface scratches that cause scattering and reflectance changes in light of different wavelengths, produce peaks or fluctuations in reflected intensity at some wavelengths, and are manifested as abnormal changes in spectral curves.
As shown in fig. 6, fig. 6 shows a reflection spectrum diagram of a spectrum camera 3 for detecting and analyzing light with a specific wavelength when a scratch defect occurs in the embodiment of the present invention, in a wavelength range of 600-700nm, a spectrum curve of a normal region is relatively smooth, the reflection intensity in the range is about 0.8-0.9, but the reflection intensity suddenly rises to 1.1 when the scratch is located near 650nm, a "peak" of the reflection intensity is formed, and the region has a significant reflection abnormality, so that it can be determined that the scratch exists in the region.
It should be noted that the saw blade surface should remain clean from dust, oil or other contaminants that might alter the reflection of light, resulting in distortion of the spectral signal. Periodic cleaning of the inspected object and the inspection area is a key to ensuring inspection accuracy. The lens of the spectroscopic camera 3 also needs to be kept clean, avoiding dust or fingerprints from affecting the transmission and reflection of light.
On the basis of the above, it will be appreciated that, considering the cross-interference of light rays between the light source 4 configured for the spectrum camera 3 (for example, an LED light source of a specific wavelength) and the stable light source 2 configured for the industrial camera 1 (for example, white light of a wide spectrum), as shown in fig. 3 and 4, two detection areas are placed at different positions using a shutter, and the two detection areas are spatially isolated, avoiding the cross-light rays of the light source 4.
In view of how the actual position of the individual tooth form defects on the saw blade can be displayed without disturbing the inspection work, in some practical embodiments provided by the invention a recording unit is introduced in the inspection system for receiving in real time the crack width W greater than the minimum value in the crack width threshold interval, the contrast C greater than the minimum value in the contrast threshold interval and the tooth space D greater than the tooth space threshold in the first visual inspection device and recording the (x, y) pixel coordinates of each detected defect in the digital image.
After the defective pixel locations are recorded, these pixel locations next need to be mapped to the actual physical locations of the saw blade for subsequent labeling.
Specifically, the detected pixel position is converted into a corresponding physical position according to the proportional relation between the actual length of the saw blade and the image pixels. For example, assuming a saw blade of 10cm length corresponding to 224 pixels, the mapping is calculated as 0.0446 cm/pixel per pixel length.
If the pixel location of a crack is (50,120), its physical location is calculated as:
x Actual practice is that of =50×0.0446=2.23cm
y Actual practice is that of =120×0.0446=5.35cm
in order for a defect to be marked on the entire blade, it is necessary to scale the local physical location to the blade as a whole. Assuming that the total length of the saw blade is 100cm and the detection area is 10cm, the formula for the position conversion is as follows:
The above formula scales up locally detected imperfections over the length of the entire saw blade. In this way, the specific location of the defect on the saw blade can be accurately determined, and the subsequent system synchronously displays the defect location and records the data for subsequent processing. The system can record and display the defect position on the saw blade accurately in real time on the premise of ensuring that the detection work is not disturbed, and is convenient for subsequent analysis and marking.
The above description is only a preferred embodiment of the present invention, and the patent protection scope of the present invention is defined by the claims, and all equivalent structural changes made by the specification and the drawings of the present invention should be included in the protection scope of the present invention.