Indexable blade cutting edge defect detection method based on image processing
By building an image acquisition system and performing image processing steps, including preprocessing, contour extraction, morphological operations and image difference, the problems of detection adaptability, flexibility and cost in the prior art are solved, and efficient and accurate detection of indexable blade edge defects are achieved.
Patent Information
- Application Number
- CN202411837666.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-23
AI Technical Summary
The existing indexable blade edge defect detection technology based on image processing has challenges in adaptability, flexibility and cost, and it is difficult to detect edge defects efficiently and accurately in the production process.
Using image processing-based detection methods, by building an acquisition system, using industrial CCD cameras and computers for image preprocessing, edge contour extraction, morphological closed operations and image differences, to locate and judge the defect area of the blade edge.
It realizes efficient and accurate automated inspection, reduces manual inspection costs, fast detection speed and high flexibility, and does not require a large amount of data for training.
Smart Images

Figure CN120031786A_ABST
Abstract
Description
Technical Field
[0002] The present invention relates to the field of visual inspection in image processing, and more specifically, to a method for detecting edge defects of indexable inserts based on image processing. Background Art
[0004] An indexable turning tool is a polygonal insert (usually square, triangular, circular, etc.) with multiple cutting edges. When one cutting edge is worn, the insert can be rotated to use the next edge to continue working. Each insert has multiple available cutting edges, significantly improving the service life of the tool. However, in the production process of indexable inserts, due to the gap between the punch and the die cavity in the die pressing forming method, burrs will inevitably be generated at the edge of the green compact (i.e., the cutting edge part). In the grinding process, due to the use of a diamond grinding wheel to grind the tool, chipping will inevitably occur. These defects not only reduce the service life of the insert but may also have an adverse impact on production safety and product quality.
[0005] Traditional methods for detecting edge defects of indexable inserts mostly use manual visual inspection. This method is not only time-consuming and laborious but also relies on the experience and skills of the operator, easily leading to inconsistencies in the detection results. With the development of computer vision technology, automatic detection methods based on image processing have gradually become a new trend in detecting edge defects of indexable inserts. These methods use a camera or other image acquisition devices to obtain images of the edges of indexable inserts, and then analyze the defect features in the images through image processing algorithms to achieve automated detection.
[0006] Currently, the existing image - processing - based edge defect detection technologies for indexable inserts on the market mainly include methods based on template matching, methods based on edge detection, and methods based on machine learning, etc. Among them, the template matching method identifies defects by comparing the image to be detected with a standard template. This method is simple and intuitive, but it has poor flexibility when faced with defects of different shapes and sizes; the edge detection method locates the defect position by identifying the edge information in the image. Although it can capture details well, it is sensitive to complex backgrounds and light changes; while the method based on machine learning, especially the application of deep learning technology, can automatically learn defect patterns without the need for manual feature design, with high detection accuracy and robustness. However, due to the need for a large amount of labeled data for training and the high complexity of the model, the actual deployment cost is relatively large.
[0007] In summary, although the existing indexable insert edge defect detection technology based on image processing has many advantages, it still faces challenges in adaptability, flexibility and cost. Therefore, developing a more efficient, accurate and easy-to-implement indexable insert edge defect detection method has important theoretical significance and application value. Summary of the invention
[0008] The purpose of the present invention is to provide a method for detecting defects on the cutting edge of an indexable insert based on image processing, so as to strictly control the cutting edge quality during the production process of the indexable insert and reduce the labor cost during the detection process.
[0009] In order to solve the above technical problems, the present invention provides a method for detecting cutting edge defects of indexable inserts based on image processing, comprising: A method for detecting cutting edge defects of indexable inserts based on image processing comprises the following steps: Step 1: Build the acquisition system, including industrial CCD camera, industrial lens, ring light source and computer; Step 2: After receiving the image of the indexable insert edge captured by the camera in step 1, the computer starts to pre-process the image; Step 3: Based on step 3, the inner contour of the cutting edge is extracted from the preprocessed blade image as a binary mask image of the inner contour defect; Step 4: Perform a morphological closing operation on the inner contour defect binary mask image, and fill the possible edge defects in the defect binary mask image to obtain an inner contour standard binary mask image; Step 5: Compare the inner contour defect binary mask image with the inner contour standard binary mask image to obtain the defect area of the target image; Step 6: Determine whether the defect area is within the area threshold range. If the defect area is smaller than the area threshold, the blade is considered to be free of defects; if the defect area is larger than the area threshold, the blade is considered to be defective.
[0010] In step 2, the specific steps include: The blade image captured by the industrial camera is limited by its sensor, and the edge of the image is relatively blurred. A detail enhancement algorithm is used to enhance the detail information of the edge of the indexable blade. This algorithm is based on the OpenCV open source library and developed in the C++ programming language.
[0011] In step 3, the specific steps include: Use the contour search function in OpenCV to find the second largest contour according to the area of the found contour. This contour is the inner contour of the cutting edge. Convert the image surrounded by the inner contour into a binary mask image to obtain the binary mask image of the inner contour defect.
[0012] In step 4, the specific steps include: For the obtained inner contour defect binary mask image, based on the OpenCV open source library, the morphological closing operation is used to first expand and then erode to remove the possible defect gaps on the edge of the cutting edge and obtain the inner contour standard binary mask image.
[0013] In step 5, the specific steps include: Based on the principle of image difference, the pixel values of the corresponding coordinates of the inner contour standard binary mask image and the inner contour defect binary mask image are subtracted to obtain the defect area of the target image.
[0014] In step 6, the specific steps include: Determine whether the defect area is within the area threshold range, where the area threshold is set by determining the edge images of several indexable inserts with existing defects. If the defect area is less than the area threshold, the insert is considered to be defect-free; if the defect area is greater than the area threshold, the insert is considered to be defective.
[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. The image processing method used in the present invention can replace manual detection of indexable insert edge defects, has high speed and high detection accuracy, reduces detection costs, and can also achieve automated detection.
[0016] 2. The image difference method is used to locate the defect, which has high flexibility, fast detection speed, and does not require a large amount of data for training. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic flow chart of the method for detecting defects on the cutting edge of an indexable insert based on image processing described in an embodiment of the present invention.
[0018] Figure 2 This is a blade image collected in an embodiment of the present invention.
[0019] Figure 3 4 is a diagram of the cutting edge defects of the indexable insert detected in the embodiment of the present invention. DETAILED DESCRIPTION
[0020] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of 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.
[0021] Refer to the attached Figure 1As shown, in order to solve the above technical problems, the present invention provides a method for detecting cutting edge defects of indexable inserts based on image processing, comprising: A method for detecting cutting edge defects of indexable inserts based on image processing comprises the following steps: Step 1: Build an image acquisition system, including an industrial CCD camera, industrial lens, ring light source and computer; The specific steps are as follows: build an image acquisition system, including an industrial CCD camera, an industrial lens, a ring light source and a computer; the main function of the image acquisition system is to obtain high-quality indexable insert edge images and transmit the image data to the computer for further processing.
[0022] Step 2: After receiving the image of the indexable insert edge captured by the camera in step 1, the computer starts to pre-process the image; The specific steps are as follows: After receiving the image of the indexable insert edge captured by the camera in step 1, the computer starts to pre-process the image. The image of the blade captured by the industrial camera, such as Figure 2 As shown in the figure, due to the limitation of the sensor, the edge of the collected image is relatively blurred. The unsharp mask algorithm is selected to enhance the blade detail features. The principle of this algorithm is to obtain low-frequency information through a low-pass filter on the original image, and then subtract the low-frequency information from the original image to obtain high-frequency information. The high-frequency information is amplified by the gain coefficient and superimposed on the original image, thus generating an image with enhanced edges. Its mathematical expression is as follows: ;
[0023] is the input image; is the enhanced image; is the gain coefficient; is the output information of the low-pass filter; the low-pass filter uses Gaussian filtering, and the window size is The mathematical expression of Gaussian filtering is: ; ; (i, j) is a two-dimensional coordinate, which represents the value of each element in the coordinate value G (i, j) window of the current pixel in the image; σ is the standard deviation, which is generally 1 / 3 of the filter window size.
[0024] The USM sharpening method can remove some small interfering details and noise, and the image sharpening result is more realistic and credible than directly using the convolution sharpening operator.
[0025] Step 3: Based on step 3, the inner contour of the cutting edge is extracted from the preprocessed blade image as a binary mask image of the inner contour defect.
[0026] The specific steps are as follows: by calling cv::findcontours() in OpenCV, find the second largest contour according to the area of the found contour, and this contour is the inner contour of the blade edge. Convert the image surrounded by the inner contour into a binary mask image, that is, create a mask image with the same size as the original image, where the pixel value in the area where the inner contour is located is 255, and the pixel value outside the area where the inner contour is located is 0, so as to obtain the binary mask image of the inner contour defect.
[0027] Step 4: Perform a morphological closing operation on the inner contour defect binary mask image, and fill the possible edge defects in the defect binary mask image to obtain the inner contour standard binary mask image.
[0028] The specific steps are as follows: copy a new image with the inner contour defect binary mask image, call the cv::morphologyEx() function in the OpenCV open source library, use the morphological closing operation, first expand and then erode, remove the defect gaps that may exist on the edge of the blade, and thus obtain the inner contour standard binary mask image.
[0029] Step 5: Compare the inner contour defect binary mask image with the inner contour standard binary mask image to obtain the defect area of the target image.
[0030] The specific steps are as follows: based on the principle of image difference, the pixel values of the corresponding coordinates of the inner contour standard binary mask image and the inner contour defect binary mask image are subtracted to obtain the defect area of the target image; Step 6: Determine whether the defect area is within the area threshold range. If the defect area is smaller than the area threshold, the blade is considered to be free of defects; if the defect area is larger than the area threshold, the blade is considered to be defective.
[0031] The specific steps are as follows: determine whether the defect area is within the area threshold range, where the area threshold is set by determining the edge images of several indexable inserts with existing defects. If the defect area is smaller than the area threshold, the insert is considered to be defect-free; if the defect area is larger than the area threshold, the insert is considered to be defective; Figure 3 This is the detection result of a defect in the insert, where the specific location of the defect is pointed out by a circle, and "Indexable insert edge defect detected" is displayed on the edge image.
[0032] The main innovative features of the present invention are: 1) Use the unsharp mask algorithm to enhance the image details, which can remove the fine interference details and noise on the edge image.
[0033] 2) Use image difference to locate the defect, which has high flexibility, fast detection speed, and does not require a large amount of data for training.
Claims
1. A method for detecting cutting edge defects of indexable inserts based on image processing, characterized in that: The steps include: Step 1: Build an image acquisition system, including an industrial CCD camera, industrial lens, ring light source and computer; Step 2: After receiving the image of the indexable insert edge captured by the camera in step 1, the computer starts to pre-process the image; Step 3: Based on step 3, the inner contour of the cutting edge is extracted from the preprocessed blade image as a binary mask image of the inner contour defect; Step 4: Perform a morphological closing operation on the inner contour defect binary mask image, and fill the possible edge defects in the defect binary mask image to obtain an inner contour standard binary mask image; Step 5: Compare the inner contour defect binary mask image with the inner contour standard binary mask image to obtain the defect area of the target image; Step 6: Determine whether the defect area is within the area threshold range. If the defect area is smaller than the area threshold, the blade is considered to be free of defects. If the defect area is greater than the area threshold, the blade is considered defective.
2. The method for detecting cutting edge defects of indexable inserts based on image processing according to claim 1, characterized in that: In step 2, the specific steps include: The blade image captured by the industrial camera is limited by its sensor, so the edge of the image is relatively blurred; Use the detail enhancement algorithm to enhance the detail information of the edge of the indexable insert. This algorithm is based on the OpenCV open source library and is developed in the C++ programming language.
3. The method for detecting cutting edge defects of indexable inserts based on image processing according to claim 2, characterized in that: In step 3, the specific steps include: Use the contour search function cv::findcontours() in OpenCV to find the second largest contour according to the area of the found contour. This contour is the inner contour of the cutting edge. Convert the image surrounded by the inner contour into a binary mask image to obtain the binary mask image of the inner contour defect.
4. The method for detecting cutting edge defects of indexable inserts based on image processing according to claim 2, characterized in that: In step 4, the specific steps include: For the obtained inner contour defect binary mask image, based on the OpenCV open source library, the morphological closing operation is used. The function is to first expand and then erode to remove the possible defect gaps on the edge of the cutting edge and obtain the inner contour standard binary mask image.
5. The method for detecting cutting edge defects of indexable inserts based on image processing according to claim 2, characterized in that: In step 5, the specific steps include: Based on the principle of image difference, the pixel values of the corresponding coordinates of the inner contour standard binary mask image and the inner contour defect binary mask image are subtracted to obtain the defect area of the target image.
6. The method for detecting cutting edge defects of indexable inserts based on image processing according to claim 2, characterized in that: In step 6, the specific steps include: Determine whether the defect area is within the area threshold range, where the area threshold is set by determining the edge images of several indexable inserts with existing defects. If the defect area is less than the area threshold, the insert is considered to be defect-free; if the defect area is greater than the area threshold, the insert is considered to be defective.