Visual inspection system for saw blade tooth profile defects based on deep learning model
Through a vision detection system based on deep learning model, combined with the first visual detection and the second visual detection, the problem of missed detection and accuracy in saw blade tooth defect detection is solved, and more efficient and accurate defect detection is achieved. Ensures the quality traceability of the saw blade.
Patent Information
- Application Number
- CN202411445758.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is prone to missed detection and accuracy affecting problems in saw blade tooth defect detection.
Using a vision detection system based on a deep learning model, the characteristic values of the saw blade surface are extracted through the first visual detection device and compared with the set threshold interval to initially identify obvious tooth defect areas. For the characteristic values within the threshold interval, the second visual detection device is activated for spectral analysis to further identify tiny or hidden defects.
It improves the efficiency and accuracy of saw blade tooth defect detection, reduces redundant detection, ensures more accurate detection of problem areas, improves detection reliability, and provides traceability records of defects.
Smart Images

Figure CN119395039A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of saw blade tooth profile defect detection, and in particular to a saw blade tooth profile defect visual detection system based on a deep learning model. Background Art
[0002] Saw blades are cutting tools, and teeth defects on them can significantly affect their cutting ability. During high-speed cutting, missing or cracked teeth can weaken the overall strength of the blade and increase the risk of breakage, which not only results in incomplete cutting, but can also damage the material being cut, causing economic losses. Scratches on the teeth can increase the friction between the blade and the material, resulting in an uneven cutting surface, which not only affects the cutting quality, but can also cause cutting jams and increase the difficulty of operation.
[0003] Therefore, in order to prevent the above problems from occurring, it is necessary to perform tooth profile detection during the saw blade production process to promptly detect tooth profile defects on the saw blade and facilitate subsequent defect repair.
[0004] Currently, in the industrial production line of saw blades, camera vision inspection is mostly used to detect tooth defects by taking images of saw blades and then comparing them with standard images. This automated inspection method is highly dependent on the quality and accuracy of the standard image. If the standard image cannot cover all possible defect types or feature changes, the accuracy of the inspection results will be affected; if the defect features are not significantly different from the standard image, such as small crack features or slight surface scratches, they will be ignored by the system in the difference inspection, resulting in missed defects. Summary of the invention
[0005] 1) Technical issues solved
[0006] The present invention provides a visual detection system for saw blade tooth profile defects based on a deep learning model to solve the problems that the existing method of detecting saw blade tooth profile defects by image visual comparison is prone to missed detection and the accuracy is easily affected.
[0007] 2) Technical solution
[0008] To achieve the above object, the present invention provides the following technical solution: a visual inspection system for saw blade tooth defects based on a deep learning model, suitable for saw blades for continuous segmented inspection, comprising:
[0009] a light source configured to provide light of a plurality of different specific wavelengths;
[0010] A first visual inspection device is used to photograph saw blades within a certain length range and generate digital images, adjust the digital images to a uniform pixel size, perform edge detection, texture analysis and morphological operations on pixel information in the scanned image, and extract corresponding feature values; wherein the feature values include crack width, contrast and tooth spacing;
[0011] The second visual inspection device is used to receive the light of the different specific wavelengths reflected from the surface of the saw blade within a certain length range, generate a reflection spectrum and analyze the change in the intensity of the reflected light of the different specific wavelengths; wherein the area where the reflection intensity drops significantly is marked as having a tooth shape defect;
[0012] A judgment unit, used for receiving the characteristic values extracted by the first visual detection device and their corresponding pixel positions, and comparing the different characteristic values with the set threshold interval; wherein, when all characteristic values are less than the minimum value of the corresponding threshold interval, the detection is stopped and marked as no tooth defect; when there is a characteristic value greater than the maximum value of the corresponding threshold interval, it is marked as the presence of a tooth defect; when there is at least one characteristic value whose size is within the corresponding threshold interval, the second visual detection device is started to perform spectral analysis;
[0013] The marking unit is used to receive in real time the characteristic value marked as having a tooth shape defect transmitted by the judgment unit and the reflection spectrum marked as having a tooth shape defect by the second visual detection device, and record the pixel position corresponding to the tooth shape defect.
[0014] Furthermore, the length of the saw blade detected and photographed each time by the first visual detection device is equal to the length of the saw blade detected each time by the second visual detection device, and the first visual detection device and the second visual detection device are arranged on the same side relative to the saw blade.
[0015] Furthermore, the digital image captured by the first visual detection device on the saw blade is a grayscale image. After the grayscale image is smoothed using a Gaussian filter, the grayscale image is adjusted to the uniform pixel size.
[0016] Furthermore, the first visual detection device scans the pixel information in the image to perform edge detection for identifying and calculating the crack width W, specifically the following steps:
[0017] Converting the grayscale image into a two-dimensional pixel matrix;
[0018] Use the Canny edge detection method to calculate the gradient of each pixel and identify the edges with significant brightness changes;
[0019] Get the coordinate points of the edge;
[0020] determining a region of the crack according to the edge coordinates;
[0021] According to the extracted edge coordinates, the crack width W is calculated.
[0022] Furthermore, the first visual detection device scans the pixel information in the image to perform texture analysis for identifying and calculating the contrast C, specifically by the following steps:
[0023] Defining a grayscale value range, mapping the pixel values in the two-dimensional pixel matrix to the defined grayscale value range by linear mapping, and obtaining a quantized grayscale matrix;
[0024] For the quantized grayscale matrix, counting the number of occurrences of grayscale pairs therein to obtain a grayscale co-occurrence matrix;
[0025] Calculate the contrast in the image according to the contrast C formula;
[0026] C=-∑(ij) 2 p(i,j)
[0027] The element p(i, j) in the gray-level co-occurrence matrix represents the number of times a pixel pair with gray-level values i and j appears in the image.
[0028] Furthermore, the first visual detection device performs morphological analysis on the pixel information in the scanned image to identify and calculate the tooth spacing D, specifically by the following steps:
[0029] Convert the two-dimensional pixel matrix into a binary image, and separate the jagged area from the background; wherein pixel values greater than a set value are set to 1, and the rest are set to 0, to obtain the binary image;
[0030] Applying morphological erosion operation and dilation operation to the binary image successively to extract the shape and position of the tooth;
[0031] The tooth distance D is calculated by calculating the distance between adjacent foreground pixels.
[0032] Further, the judgment unit receives the crack width W, contrast C and tooth spacing D extracted and calculated by the first visual detection device, as well as the pixel position corresponding to each characteristic value, and compares the characteristic value with the set crack width threshold interval, contrast threshold interval and tooth spacing threshold respectively; correspondingly,
[0033] If the extracted and calculated crack width W is less than the minimum value in the crack width threshold interval, it is marked as no crack defect; if the crack width W is greater than the maximum value in the crack width threshold interval, it is marked as the presence of a crack defect;
[0034] If the extracted calculated contrast C is less than the minimum value in the contrast threshold interval, it is marked as no scratch defect; if the contrast C is greater than the maximum value in the contrast threshold interval, it is marked as the presence of a scratch defect;
[0035] If the tooth spacing D calculated by the extraction is less than the tooth spacing threshold, it is marked as no tooth defect; if the tooth spacing D calculated by the extraction is greater than the tooth spacing threshold, it is marked as the presence of a tooth defect; the tooth defect is characterized by tooth missing or tooth damage;
[0036] When the crack width W is within the crack width threshold range, it indicates that the crack defect is small, and the second visual detection device is started to perform spectral analysis;
[0037] When the contrast C is within the contrast threshold range, it indicates that the scratch defect is small, and the second visual inspection device is started to perform spectral analysis.
[0038] Further, the first visual detection device detects the crack width W and / or contrast C within the corresponding threshold interval, and the corresponding pixel position, and the second visual detection device analyzes the reflection spectrum data of different specific wavelengths at the pixel position, specifically analyzing the change in the reflected light intensity of different specific wavelengths; correspondingly,
[0039] At the pixel position where the crack width W is extracted and calculated, if the reflection intensity in the reflection spectrum of a specific wavelength at the position decreases significantly, it is marked as the presence of a crack defect;
[0040] When the pixel position where the contrast C is extracted and calculated is used, if the reflection intensity in the reflection spectrum of a specific wavelength at the position significantly increases or fluctuates, it is marked as the presence of a scratch defect.
[0041] Furthermore, the marking unit records the pixel position corresponding to the tooth defect, which includes a crack defect, a scratch defect and a tooth defect, and converts it into an actual position on the saw blade and marks it; the conversion steps are as follows:
[0042] Determining the proportional relationship between the actual physical size of the saw blade being visually inspected and the pixel resolution of the image;
[0043] The pixel position is mapped to an actual physical position on the saw blade according to the proportional relationship.
[0044] Furthermore, it also includes a stable light source, which is used to provide stable and uniform illumination for the first visual detection device, and the stable light source does not interfere with the light of the light source.
[0045] 3) Beneficial effects:
[0046] Compared with the prior art, the invention has the following beneficial effects:
[0047] The present invention uses a first visual inspection device to extract corresponding feature values from the image recognition of the saw blade surface, compares the extracted feature values with a set threshold range, and preliminarily identifies obvious tooth defect areas, thereby quickly filtering out obvious tooth defect areas and improving inspection efficiency.
[0048] The comparison result with the set threshold is used as the starting condition for whether to conduct a second precise detection. The second visual inspection device conducts a more accurate inspection of the area where potential defects are initially detected to identify deep-seated defect characteristics. By limiting the triggering conditions of the second precise detection, redundant comprehensive analysis of the entire saw blade surface is avoided, which reduces the detection time and system load, while ensuring that the problem area is detected more accurately, thereby improving the detection accuracy and reliability of tooth defect detection.
[0049] The identified defects are marked through real-time recording, and the location and type of the defects are recorded in the form of coordinate axes to provide a reference for subsequent processing and ensure the quality traceability of the saw blade. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of an application scenario of a continuously transporting saw blade provided by an embodiment of the present invention;
[0051] Figure 2 A principle block diagram of a visual inspection system for saw blade tooth defects based on a deep learning model provided by an embodiment of the present invention;
[0052] Figure 3 A schematic diagram of an application scenario of continuously transferring a saw blade to a first visual inspection device and a second visual inspection device in sequence provided by an embodiment of the present invention;
[0053] Figure 4 A schematic diagram of the detection areas of the first visual detection device and the second visual detection device in the visual detection system provided by an embodiment of the present invention;
[0054] Figure 5 When a crack defect occurs, the second visual detection device detects and analyzes the reflection spectrum of light of a specific wavelength provided by the embodiment of the present invention;
[0055] Figure 6 When a scratch defect occurs, the second visual inspection device detects and analyzes the reflection spectrum of light of a specific wavelength provided by the embodiment of the present invention;
[0056] In the figure: 1. Industrial camera; 2. Stable light source; 3. Spectral camera; 4. Light source. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present invention will be clearly and completely described below 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 without making creative work are within the scope of protection of the present invention.
[0058] In the description of the present invention, it should be understood that the terms "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0059] In the process of detecting tooth defects of saw blades, the inventors found that:
[0060] In the industrial assembly line saw blade production process, machine vision is often used to compare and detect whether there are tooth defects on the saw blade. For example, a camera is used to capture an image of the saw blade, which is then compared with normal and tooth-defective images in a database. The degree of overlap is then compared to determine whether there are tooth defects on the saw blade.
[0061] However, this method requires a large number of images of known defects and normal samples to be stored. In addition, the cost and workload of maintaining and updating the database are very high when there are many types of products and complex defect types. Different types of defects (such as cracks, scratches, missing teeth, etc.) will show different visual characteristics, which requires that the samples in the database have sufficient diversity to cope with various situations. In addition, for some minor or hidden defects (such as fine cracks and deep scratches), it will be difficult to identify them if they rely solely on one-by-one comparison of images. These defects may not be obvious in the image or may be confused with the background, resulting in detection failure.
[0062] Furthermore, in order to improve the various defects in the above-mentioned prior art, the embodiment of the present invention proposes a visual detection system for saw blade tooth defects based on a deep learning model, which can initially identify more obvious tooth defects such as cracks, scratches and missing teeth by processing the saw blade image; and further identify small or hidden defects by analyzing the reflection spectrum of the saw blade surface to different specific wavelengths. The identified defects are marked by real-time recording, and the location and type of the defects are recorded in the form of coordinate axes, providing a reference for subsequent repair processing and ensuring the quality traceability of the saw blade.
[0063] Combination Figures 1 to 6 The visual inspection system for saw blade tooth defects based on the deep learning model shown in the figure is suitable for the field application scenario of continuous visual inspection of the whole saw blade in an industrial assembly line. Specifically, the whole saw blade is continuously transported to the inspection area in sections, and the inspection device in the inspection area performs visual inspection on the surface defects of the rack. In some feasible embodiments provided by the present invention, the inspection process is subdivided into the following parts:
[0064] First inspection: Perform a preliminary inspection of the overall appearance of the saw blade surface to identify common defects such as cracks, scratches and missing teeth. Quickly screen out obvious defect areas to reduce the burden of invalid data processing.
[0065] Error analysis and judgment phase: Based on the results of the first test, perform error analysis on the characteristic values to determine whether further testing is needed, thereby reducing unnecessary subsequent testing and optimizing resource and time consumption.
[0066] Second inspection: Perform more accurate inspection on the areas with potential defects detected initially to identify the deep-level defect characteristics. Provide deeper and more accurate analysis than the first inspection, reduce false alarm rate, and accurately distinguish different types of defects.
[0067] Defect marking: Mark the identified defects and record the location and type of the defects in the form of coordinate axes.
[0068] Regarding the first inspection, in some feasible embodiments provided by the present invention, the process is divided into: the saw blade enters the first inspection area in segments at a constant speed; the first visual inspection device takes a high-definition image of each segment of the saw blade; the image is adjusted to a uniform pixel size after processing; edge detection, texture analysis and morphological operations are used to extract the feature value of the saw blade; and then the extracted feature value is compared with the set threshold range to preliminarily identify the potential defect area.
[0069] Specifically, in some feasible embodiments provided by the present invention, an industrial camera is used as the first visual inspection device, and the industrial camera is used to collect images of the surface of the saw blade. It should be noted that it is necessary to ensure that the industrial camera has sufficient resolution and image quality to clearly capture the defects of the saw blade. Regarding lighting conditions, ensure that the detection area is adequately illuminated to avoid the influence of shadows and reflections on the image quality. To this end, a stable light source can be set next to the industrial camera, and the industrial camera is perpendicular to the surface of the saw blade for shooting. The stable light source is set on the same side as the industrial camera to ensure the quality of the captured image.
[0070] Before analyzing and processing the image captured by the first visual inspection device, some preprocessing steps are required to improve the accuracy of subsequent analysis. Specifically, the following steps are included:
[0071] Resizing: Resize images to a uniform size required for model input (e.g. 224×224 pixels).
[0072] Normalization: Scale pixel values to between 0 and 1 to improve the efficiency and effectiveness of model training.
[0073] Denoising: Filtering techniques (such as Gaussian filtering) can be used to remove image noise and enhance features.
[0074] The following is a Python sample code in an embodiment of the present invention, which demonstrates how to perform data preprocessing on an image.
[0075]
[0076]
[0077] The preprocessed digital image (usually a grayscale image) is subjected to edge detection, texture analysis and morphological operations, the changes in pixel values are scanned, and the corresponding feature information is extracted.
[0078] Edge detection algorithms (such as Canny and Sobel operators) scan the pixels in the image and identify edges with significant brightness changes. The tooth-shaped crack defect characteristics will be highlighted in the edge detection, and the crack width is determined by calculating the distance between the edges.
[0079] Specifically, the pixel image is scanned to identify areas where the pixel grayscale changes significantly, and edges are extracted in these areas. In some embodiments of the present invention, the Canny edge detection algorithm is used to calculate the gradient of the image and find the edge. The pixel values in the grayscale image are now set to the following two-dimensional pixel value matrix:
[0080]
[0081] In this matrix, each element represents the grayscale value or color value of a pixel. A two-dimensional pixel matrix can represent a grayscale image, a color image, or a binary image. For a grayscale image, the pixel value is usually between 0 and 255.
[0082] After the above two-dimensional pixel matrix is subjected to Canny edge detection, the edge detection result is set to:
[0083]
[0084] The edge coordinates extracted from the above binary image are:
[0085] (0,2),(0,3),
[0086] (1,1),(1,2),(1,3),
[0087] (2,1),(2,2),(2,3),
[0088] (3,2)
[0089] It is important to note that pixel coordinates are usually expressed in the form of (y, x), where y is the row index (vertical direction) and x is the column index (horizontal direction). This is because images are usually stored row-first in memory.
[0090] It can be understood that in this example, it can be observed that the upper and lower edges of the crack are roughly between row 0 and row 3, and between column 1 and column 3.
[0091] Based on the extracted edge coordinates, the width can be calculated: in rows 1 and 2, the leftmost edge is in column 1 and the rightmost edge is in column 3.
[0092] Calculate the crack width using the formula:
[0093] Crack width (W) = right edge column - left edge column} + 1
[0094] Corresponding to this example:
[0095] W=3-1+1=3pixels
[0096] Assuming that each pixel in this area corresponds to an actual size of 0.5 mm, and the crack width in the horizontal direction is 3 pixels, the actual crack width = 3 × 0.5 mm = 1.5 mm.
[0097] Regarding how the first visual inspection device extracts and calculates the eigenvalues of scratch defects, in some feasible 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 to extract texture information, thereby calculating the contrast C.
[0098] Specifically, we take the above two-dimensional pixel matrix as an example to calculate the gray level co-occurrence matrix (GLCM). First, we need to define the gray value range. In this example, we only care about gray values of 0-3 (for simplicity, a larger range may be required in actual applications). Map the pixel values of the above matrix to the range of 0-3 (through some quantization method, such as linear mapping), and we get:
[0099]
[0100] Next, the GLCM is calculated, taking into account the relationship between adjacent pixels (e.g., horizontal relationship) and counting the number of occurrences of grayscale pairs. The resulting GLCM is as follows:
[0101]
[0102] The element p(i,j) in GLCM represents the number of times the pixel pair with grayscale values i and j appears in the image. For example, the element p(0,0)=4 means that the pixel pair with grayscale values 0 and 0 appears 4 times, p(0,1)=2 means that the pixel pair with grayscale values 0 and 1 appears 2 times, and so on.
[0103] The formula for contrast is:
[0104] C=-∑(ij) 2 p(i,j)
[0105] Contrast is calculated from GLCM, where
[0106] (0-0) 2 4=0 represents the contrast contribution of the gray value (0,0).
[0107] (0-2) 2 2=8 represents the contrast contribution of the gray value (0,0).
[0108] (2-0) 2 2=4 represents the contrast contribution of the gray value (0,0).
[0109] (1-1) 2 3=0 represents the contrast contribution of the gray value (0,0).
[0110] The result is C=0+8+4+0=12, which represents the degree of contrast between gray values in the image.
[0111] Regarding how the first visual detection device extracts and calculates the characteristic value of the missing tooth or tooth damage defect, in some feasible embodiments of the present invention, morphological calculation is used to extract geometric features in the image, identify specific type devices and structures in the image, and detect missing teeth and tooth spacing. Specifically, by binarizing the image, the tooth spacing D of the tooth structure is calculated using morphological operations.
[0112] Taking the above two-dimensional pixel matrix as an example, we first perform binary processing on it to separate the jagged area from the background, and then extract the shape and position of the teeth through the image analysis algorithm. A binary image means that each pixel has only two possible values, usually 0 and 1. 0 usually represents the background (black), and 1 represents the foreground (white or other colors). Binary images are mainly used to represent the separation of objects and backgrounds in an image. The extracted binary image is shown above.
[0113] First, the binary image is eroded. Erosion can remove small noise, refine the boundaries of objects, and separate adjacent objects. Specifically, by scanning the binary image with a small structural element (such as a 3×3 matrix), the foreground area is reduced, and the foreground pixels (value 1) are eroded. Only when all pixels covered by the structural element are foreground pixels, the resulting pixels are foreground pixels.
[0114] The erosion operation will shrink the foreground area, and the erosion result is:
[0115]
[0116] Then the dilation operation is performed. In contrast to erosion, the dilation operation expands the foreground pixels. If any pixel covered by the structural element is a foreground pixel, the result pixel is the foreground. Dilation can increase the size of the foreground area, fill small holes, or connect adjacent objects.
[0117] The dilation operation will expand the foreground area, and the dilation result is:
[0118]
[0119] The tooth spacing D can be realized by calculating the distance between adjacent foreground pixels. Assume that we define the tooth spacing as the width of the foreground area (from the center of one foreground pixel to the center of the next foreground pixel).
[0120] In the image after erosion and dilation, the tooth spacing can be calculated as follows:
[0121] Find the location of foreground pixels;
[0122] Calculate the distance between neighboring foreground pixels.
[0123] For example, in the dilation result, the position of the foreground pixels is:
[0124] First foreground pixel position: (0,2);
[0125] Second foreground pixel position: (0,3);
[0126] The third foreground pixel position: (0,4);
[0127] Calculate column index difference:
[0128] For the first and second foreground pixels:
[0129] Column index difference = 3-2 = 1
[0130] This means that the distance between columns 2 and 3 is 1.
[0131] For the second and third foreground pixels:
[0132] Column index difference = 4-3 = 1
[0133] This means that the distance between columns 3 and 4 is also 1.
[0134] This column index difference calculates the horizontal distance (number of columns) between adjacent foreground pixels. In this example, the distance between all adjacent foreground pixels is 1, indicating that they are adjacent and there are no other foreground pixels separating them.
[0135] The tooth spacing D can be understood as the distance between adjacent teeth. If the column index difference is 1, it means that there is no gap between the two teeth.
[0136] refer to Figure 2 , Figure 2 A principle block diagram of a visual inspection system for saw blade tooth defects based on a deep learning model provided in an embodiment of the present invention. After a first visual inspection device extracts and calculates the corresponding feature value from the saw blade tooth profile image taken by the first visual inspection device, it is transmitted to a judgment unit in which an initially defined feature threshold is set.
[0137] Correspondingly, the characteristic values (crack width W, contrast C and tooth spacing D) extracted in the first detection are compared with the preset threshold interval [A, B].
[0138] If the feature value exceeds the upper threshold value B, the defect is considered to be large and can be marked directly without the need for a second inspection, which can save time.
[0139] If the characteristic value is between A and B, it means the defect is small and a second test is needed for more accurate analysis and confirmation.
[0140] Second precise inspection For smaller defects (characteristic values between A and B), a second more precise inspection is triggered, such as using spectral analysis, to confirm the nature and severity of the defect before marking it.
[0141] Understandably, this approach strikes a balance between speed and accuracy, allowing for in-depth analysis of obscure defects while skipping further inspection for obvious defects. This flexibility can improve overall inspection efficiency.
[0142] Specifically, in some feasible embodiments of the present invention, specific reference is made to Figure 3 and Figure 4 For example, the whole saw blade is pushed forward by the same length each time, and enters the first visual inspection area and the second visual inspection area in turn for defect detection. In this embodiment, it is set that the saw blade is pushed forward by 10 cm each time to enter the inspection area, that is, the single inspection area distance L of the first visual inspection device1 , the single detection area distance L of the second visual detection device 2 Equal and L 1 =L 2 =10cm. The saw blade to be tested is made of low alloy spring steel, and the teeth on the saw blade are helical teeth with a front angle of 10° and a tooth pitch of 25.4mm.
[0143] Based on the above example, in the judgment unit, the crack width threshold interval is set as follows: the lower limit threshold A W =0.3mm, upper threshold B W =1.0mm;
[0144] About contrast threshold interval: lower threshold A C =10, upper threshold B C =30;
[0145] Regarding the tooth spacing threshold: tooth spacing threshold = 27.4 mm.
[0146] Still taking the crack width W, contrast C and tooth spacing D extracted and calculated from the two-dimensional pixel matrix converted from the above grayscale image as an example, feature error judgment is performed on this basis.
[0147] Specifically, after the first test, the width of the crack in a certain area was 1.5 mm, exceeding the upper threshold B W =1.0mm.
[0148] Since the crack width has obviously exceeded the threshold range, indicating that this is a serious crack, the system can directly mark it as a large crack without the need for a second spectral analysis test.
[0149] The contrast of a certain detection area is 12, which is within the lower threshold A of the threshold range. C =10 and upper threshold B C = between 30.
[0150] The contrast is within the threshold range, indicating that there may be a small scratch or surface irregularity. At this point, the system cannot determine the severity of the scratch and triggers a second test using spectral analysis for further confirmation.
[0151] In the calculation of the tooth spacing D, if the column index difference is 1, it means that there is no gap between the two teeth. No second detection is required. In addition, if the tooth spacing D is between the sawtooth spacing and the tooth spacing threshold, it means that it is within the tooth spacing error and no second detection is required; if the tooth spacing D is greater than the set tooth spacing threshold, it means that there is a tooth loss defect and no second detection is required.
[0152] Specific reference Figure 4In some feasible embodiments of the invention, a spectral camera 3 is used as a second visual inspection device, and a light source 4 that can emit light of different specific wavelengths is arranged next to the spectral camera 3. The spectral camera 3 can detect the details of cracks and scratches by analyzing the spectral information reflected or emitted by the object. The advantage of spectral detection is that it can capture the light reactions of different wavelengths and reveal the slight differences in the surface of the material under different light, especially when the industrial camera 1 may not detect fine cracks or scratches. The detection process of the spectral camera 3 is as follows:
[0153] Spectral data acquisition: The light source 4 next to the spectral camera 3 will emit a wide-band light (visible light, infrared light, etc.) to the surface of the saw blade. The surface of the material will reflect light of different wavelengths, and the spectral camera 3 will obtain spectral data based on the characteristics of the reflected light. For cracks and scratches, these defects will cause abnormal light reflection and generate specific spectral signals.
[0154] In addition, it should be noted that after the first detection by industrial camera 1, only the problematic areas are spectrally analyzed. Industrial camera 1 has preliminarily detected the locations of potential cracks or scratches, and spectral camera 3 only needs to focus on analyzing the pixels at these locations. For example, an image of a 10 cm saw blade is captured by industrial camera 1 at one time to generate an image of 224×224 pixels. Through the image processing algorithm, defects such as cracks and scratches are preliminarily detected. The pixel coordinates of these areas are marked. Based on the results of the first detection, only the pixels in those defective areas are selected for spectral analysis. For example, if the edge pixels of the crack are in the range of (50,100) to (80,130) of the image, spectral camera 3 only performs a detailed analysis of these coordinate ranges. This design reduces the workload of spectral analysis of the overall image and significantly improves the detection speed.
[0155] Generation of spectrum graph: The reflectance spectrum of each area can generate a spectrum curve, with the horizontal axis representing the wavelength (nm) and the vertical axis representing the reflection intensity.
[0156] The spectral curve at the crack or scratch location may show a significant decrease or increase in reflection intensity at specific wavelengths compared to normal areas, indicating that light has different absorption or scattering characteristics in these areas.
[0157] Now let's take an example to illustrate the spectrum analysis of cracks. Assume that there is a tiny crack on the surface of the saw blade, that is, the crack width W is within the lower limit threshold A of the threshold interval. W and upper threshold B W In some wavelengths, the reflection intensity from cracks can be significantly reduced because cracks increase the surface roughness and cause light scattering.
[0158] like Figure 5 As shown, Figure 5When a crack defect occurs, the spectral camera 3 detects and analyzes the reflection spectrum of light of a specific wavelength provided in the embodiment of the present invention. The spectral curve in the normal area is relatively smooth in the wavelength range of 500-700nm, and the reflection intensity is about 0.7-0.8 in this range. The spectrum at the crack shows a large drop in reflection intensity near 550nm, and the reflection intensity drops to 0.5, forming an obvious "valley", which can be used to determine that there is a crack in the area.
[0159] Now let's take an example to illustrate the spectrum analysis of scratches. Assume that there is a tiny scratch on the surface of the saw blade, that is, the contrast C mentioned above is within the lower threshold value A in the threshold range. C and upper threshold B C Scratches are different from cracks. They are usually scratches on the surface, causing scattering and reflection changes of light of different wavelengths. Scratches will produce peaks or fluctuations in reflection intensity at some wavelengths, which manifests as abnormal changes in the spectral curve.
[0160] like Figure 6 As shown, Figure 6 When a scratch defect occurs, the spectral camera 3 provided in the embodiment of the present invention detects and analyzes the reflection spectrum of light of a specific wavelength. In the wavelength range of 600-700nm, the spectral curve in the normal area is relatively smooth, and the reflection intensity in this range is about 0.8-0.9. However, the reflection intensity at the scratch near 650nm suddenly rises to 1.1, forming a "peak" of reflection intensity. There is a significant reflection anomaly in this area, and it can be determined that there is a scratch in this area.
[0161] It should be noted that the surface of the saw blade should be kept clean and free of dust, oil or other contaminants, which may change the reflection of light and cause spectral signal distortion. Regular cleaning of the detected object and the detection area is the key to ensure detection accuracy. The lens of the spectral camera 3 also needs to be kept clean to avoid dust or fingerprints affecting the transmission and reflection of light.
[0162] Based on the above, it can be understood that, considering the light cross-interference between the light source 4 (such as a LED light source with a specific wavelength) configured for the spectral camera 3 and the stable light source 2 (such as white light with a wide spectrum) configured for the industrial camera 1, as shown in FIG. Figure 3 and Figure 4 As shown, shielding objects are used to place the two detection areas at different positions, so as to isolate the two detection areas in space and avoid the light from the light source 4 from crossing.
[0163] Considering how to display the actual position of each tooth defect on the saw blade without disturbing the detection work, in some feasible embodiments provided by the present invention, a recording unit is introduced in the detection system to receive 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 spacing D greater than the tooth spacing threshold in the first visual detection device, and record the (x, y) pixel coordinates of each detected defect in the digital image.
[0164] After recording the pixel positions of the defects, the next step is to map these pixel positions to the actual physical positions of the saw blade for subsequent annotation.
[0165] Specifically, the detected pixel position is converted to the corresponding physical position according to the ratio between the actual length of the saw blade and the image pixels. For example, assuming that the length of the saw blade is 10 cm and corresponds to 224 pixels, the mapping calculation is that the length of each pixel is 0.0446 cm / pixel.
[0166] If the pixel position of a crack is (50,120), its physical position is calculated as:
[0167] x 实际 =50×0.0446=2.23cm
[0168] y 实际 =120×0.0446=5.35cm
[0169] In order to mark the defect on the entire saw blade, the local physical position needs to be proportionally expanded to the entire saw blade. Assuming the total length of the saw blade is 100cm and the detection area is 10cm, the position conversion formula is as follows:
[0170]
[0171] The above formula scales the locally detected defects to 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. Under the premise of ensuring that the detection work is not disturbed, the system can record and display the defect location on the saw blade in real time and accurately, which is convenient for subsequent analysis and marking.
[0172] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. The patent protection scope of the present invention shall be based on the claims. All equivalent structural changes made using the contents of the description and drawings of the present invention should also be included in the protection scope of the present invention.
Claims
1. A visual inspection system for saw blade tooth defects based on a deep learning model, suitable for saw blades that undergo continuous segmented inspection, characterized in that: include: a light source configured to provide light of a plurality of different specific wavelengths; A first visual inspection device is used to photograph saw blades within a certain length range and generate digital images, adjust the digital images to a uniform pixel size, perform edge detection, texture analysis and morphological operations on pixel information in the scanned image, and extract corresponding feature values; wherein the feature values include crack width, contrast and tooth spacing; The second visual inspection device is used to receive the light of the different specific wavelengths reflected from the surface of the saw blade within a certain length range, generate a reflection spectrum and analyze the change in the intensity of the reflected light of the different specific wavelengths; wherein the area where the reflection intensity drops significantly is marked as having a tooth shape defect; A judgment unit, used for receiving the characteristic values extracted by the first visual detection device and their corresponding pixel positions, and comparing the different characteristic values with the set threshold interval; wherein, when all characteristic values are less than the minimum value of the corresponding threshold interval, the detection is stopped and marked as no tooth defect; when there is a characteristic value greater than the maximum value of the corresponding threshold interval, it is marked as the presence of a tooth defect; when there is at least one characteristic value whose size is within the corresponding threshold interval, the second visual detection device is started to perform spectral analysis; The marking unit is used to receive in real time the characteristic value marked as having a tooth shape defect transmitted by the judgment unit and the reflection spectrum marked as having a tooth shape defect by the second visual detection device, and record the pixel position corresponding to the tooth shape defect.
2. The visual inspection system for saw blade tooth defects based on a deep learning model according to claim 1, characterized in that: The length of the saw blade detected and photographed each time by the first visual detection device is equal to the length of the saw blade detected by the second visual detection device each time, and the first visual detection device and the second visual detection device are arranged on the same side relative to the saw blade.
3. The visual inspection system for saw blade tooth defects based on a deep learning model according to claim 1, characterized in that: The digital image captured by the first visual detection device on the saw blade is a grayscale image. After the grayscale image is smoothed using a Gaussian filter, the grayscale image is adjusted to the uniform pixel size.
4. The visual inspection system for saw blade tooth defects based on a deep learning model according to claim 3, characterized in that: The first visual detection device scans the pixel information in the image to perform edge detection for identifying and calculating the crack width W, specifically the following steps: Converting the grayscale image into a two-dimensional pixel matrix; Use the Canny edge detection method to calculate the gradient of each pixel and identify the edges with significant brightness changes; Get the coordinate points of the edge; Determine the area of the crack according to the edge coordinates; According to the extracted edge coordinates, the crack width W is calculated.
5. The visual inspection system for saw blade tooth defects based on a deep learning model according to claim 4, characterized in that: The first visual detection device scans the pixel information in the image to perform texture analysis for identifying and calculating the contrast C, specifically the following steps: Defining a grayscale value range, mapping the pixel values in the two-dimensional pixel matrix to the defined grayscale value range by linear mapping, and obtaining a quantized grayscale matrix; For the quantized grayscale matrix, counting the number of occurrences of grayscale pairs therein to obtain a grayscale co-occurrence matrix; Calculate the contrast in the image according to the contrast C formula; C=-∑(i-j) 2 p(i,j) The element p(i, j) in the gray-level co-occurrence matrix represents the number of times a pixel pair with gray-level values i and j appears in the image.
6. The visual inspection system for saw blade tooth defects based on a deep learning model according to claim 5, characterized in that: The first visual detection device scans the pixel information in the image and performs morphological analysis to identify and calculate the tooth spacing D, specifically the following steps: Convert the two-dimensional pixel matrix into a binary image, and separate the jagged area from the background; wherein pixel values greater than a set value are set to 1, and the rest are set to 0, to obtain the binary image; Applying morphological erosion operation and dilation operation to the binary image successively to extract the shape and position of the tooth; The tooth distance D is calculated by calculating the distance between adjacent foreground pixels.
7. The visual inspection system for saw blade tooth defects based on a deep learning model according to any one of claims 1 to 6, characterized in that: The judgment unit receives the crack width W, contrast C and tooth spacing D extracted and calculated by the first visual detection device, as well as the pixel position corresponding to each characteristic value, and compares the characteristic value with the set crack width threshold interval, contrast threshold interval and tooth spacing threshold respectively; correspondingly, If the extracted and calculated crack width W is less than the minimum value in the crack width threshold interval, it is marked as no crack defect; if the crack width W is greater than the maximum value in the crack width threshold interval, it is marked as the presence of a crack defect; If the extracted calculated contrast C is less than the minimum value in the contrast threshold interval, it is marked as no scratch defect; if the contrast C is greater than the maximum value in the contrast threshold interval, it is marked as the presence of a scratch defect; If the extracted and calculated tooth spacing D is less than the tooth spacing threshold, it is marked as no tooth defect; if the extracted and calculated tooth spacing D is greater than the tooth spacing threshold, it is marked as a tooth defect; the tooth defect is characterized by tooth missing or tooth damage; When the crack width W is within the crack width threshold range, it indicates that the crack defect is small, and the second visual detection device is started to perform spectral analysis; When the contrast C is within the contrast threshold range, it indicates that the scratch defect is small, and the second visual inspection device is started to perform spectral analysis.
8. The visual inspection system for saw blade tooth defects based on a deep learning model according to claim 7, characterized in that: The first visual detection device detects the crack width W and / or contrast C within the corresponding threshold interval, and the corresponding pixel position, and the second visual detection device analyzes the reflection spectrum data of different specific wavelengths at the pixel position, specifically analyzing the change in the intensity of reflected light at different specific wavelengths; correspondingly, At the pixel position where the crack width W is extracted and calculated, if the reflection intensity in the reflection spectrum of a specific wavelength at the position decreases significantly, it is marked as the presence of a crack defect; When the pixel position where the contrast C is extracted and calculated is used, if the reflection intensity in the reflection spectrum of a specific wavelength at the position significantly increases or fluctuates, it is marked as the presence of a scratch defect.
9. The visual inspection system for saw blade tooth defects based on a deep learning model according to any one of claims 1 to 8, characterized in that: The marking unit records the pixel position corresponding to the tooth defect, which includes a crack defect, a scratch defect and a tooth defect, and converts it into an actual position on the saw blade and marks it; the conversion steps are as follows: Determining the proportional relationship between the actual physical size of the saw blade being visually inspected and the pixel resolution of the image; The pixel position is mapped to an actual physical position on the saw blade according to the proportional relationship.
10. The visual inspection system for saw blade tooth defects based on a deep learning model according to claim 2, characterized in that: It also includes a stable light source, which is used to provide stable and uniform illumination for the first visual detection device, and the stable light source does not interfere with the light of the light source.
Citation Information
Cited By
Medical refrigerator body manufacturing detection system and method
CN119985356A
Non-contact copper pipe surface sawtooth damage detection method and system
CN121275777A
Chip packaging body defect detection method
CN121633106A