Band saw blade sawing path detection method and apparatus
By directly detecting the sawing path using image analysis methods, the problems of high cost and low sensitivity in existing technologies are solved. This enables low-cost, high-precision detection and real-time monitoring of the sawing path, simplifies equipment modification, improves detection efficiency, and reduces material waste.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies for sawing path detection suffer from high cost and low sensitivity, especially in the sawing of large metal materials. Traditional displacement sensor detection methods require high-precision equipment and are costly, requiring significant modifications to the sawing machine. Existing image processing methods are computationally complex and costly, failing to meet the requirements of low cost and high precision.
Image analysis methods are used to directly detect the sawing path. Through image enhancement, denoising, and smoothing, image binarization and line fitting are used, combined with machine vision for real-time monitoring, to realize remote monitoring of the sawing path of multiple sawing machines on site. The angle and length of the saw kerf to the horizontal line are judged to determine whether the sawing path is normal.
It enables low-cost, high-precision detection of sawing paths, allows real-time monitoring of multiple sawing machines, simplifies equipment modification, reduces detection costs, improves detection efficiency, and reduces material waste.
Smart Images

Figure CN117974783B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of sawing machine cutting skew detection, and in particular to a band saw blade sawing path detection method and device. BACKGROUND
[0002] In the sawing process of large metal materials, especially for the sawing of large die steel, high-temperature alloy and titanium alloy, if the material is skewed during sawing, it may cause serious cost loss. Therefore, in order to ensure the machining precision, it is crucial to strictly control the sawing path. The traditional control method often relies on manual inspection, that is, manual operation is used to check whether the sawing path is normal, which is not only inefficient, but also prone to errors.
[0003] In order to solve this problem, the sawing machine (the structure of the sawing machine is specifically referred to in Maxwell T. Harris, Band saw blade sensor and control system [P]. U.S. patent, application number: US20160303669A1, application date: 2015-4-20, as shown in Figure 2 The manufacturer uses an indirect measurement method, that is, a displacement sensor 8 is installed between the band saw blade clamp 10 and the material to be cut 6, as shown in FIG. 3(A) and FIG. 3(B). When the sawing direction changes during sawing, the relative position of the surface of the band saw blade 7 and the displacement sensor 8 will also change, and this change can be captured by the displacement sensor 8, thereby indirectly detecting the change of the sawing seam 11 position, and detecting the position change of the band saw blade 7 in front of the sawing seam 11, as shown in FIG. 3(C).
[0004] Although this method can monitor the sawing process in real time and ensure the stability of the machining precision, it still has certain limitations. Since the position detection is carried out outside the sawing gap 11 and is limited by the position of the sawing machine clamp and the tension of the guide wheel, it means that the change in the position of the band saw blade 7 is significantly reduced relative to the deformation of the sawing gap 11. Specifically, when the sawing gap 11 has undergone a large deformation, if the displacement sensor 8 is used to detect the change of the band saw blade 7, the deformation and displacement of the band saw blade 7 will not be very obvious due to the sawing machine clamp 10, and in actual application, such change is usually only between 0.15-1mm, as shown in FIG. 4(A) and FIG. 4(B). This leads to extremely high requirements for the sensitivity of the displacement sensor 8, and the detection cost is relatively high. For the sawing machine that is already in use, if this method is used to detect the sawing path, the guide arm 5 needs to be reprocessed, and the original control system of the sawing machine also needs to be greatly adjusted; in addition, high-precision displacement sensors 8 are often expensive, generally around 20,000 yuan, and the detection sensitivity of the reformed displacement sensor 8 is also limited by the sawing machine electric control system, and it is difficult to adjust flexibly. Therefore, this method which depends on high-precision displacement sensors 8 not only has high economic cost and cannot meet market demand, but also has many inconveniences in actual operation, which leads to the fact that this device has not been widely accepted and applied in the existing market.
[0005] Although the displacement sensor 8 and the control system can provide more accurate measurement results in theory, in actual application, their high price and complex operation have become the main obstacles to their popularization, and further research and optimization are still needed in actual production.
[0006] In view of the above problems, the Chinese invention patent application with the application number CN202010944327.X provides a band saw blade welding quality detection method, which sequentially processes the image through gray threshold segmentation method, morphological processing and region screening processing; the region after region screening processing is subtracted from the region after gray threshold segmentation method processing, and the largest particle region is screened out by screening the area; then the target contour is extracted by edge detection algorithm; finally, the target contour is subjected to straight line fitting processing and circle fitting processing to obtain the detection result, and the detection result is compared with the preset value to judge whether the quality of the detection target is qualified. If this method is applied in the field of band saw blade sawing path detection, first, in the application scenario of this method, the gray difference between the target and the non-target is not large, so a better industrial camera needs to be used, and a large amount of calculation is needed to identify the detection target, and the running time is too long when extracting the gray scale. If this method is used to detect the sawing seam, the cost may exceed 50,000 yuan, the industrial practicability is not strong, and there is a very obvious gray difference between the sawing seam and the cut material. In theory, shorter time can be used to exclude interference elements; second, this method must position the edge very clearly, because the edge position is related to the fusion of the two metals, but in the field of sawing bed cutting detection, the thickness of the sawing seam itself does not affect the final judgment result. If this method is used to detect the sawing seam, a large amount of unnecessary calculation is needed, which occupies too much computing resource.
[0007] Therefore, there is an urgent need for a band saw blade sawing path detection method and device that can realize real-time remote monitoring of the sawing path of multiple sawing beds on site, while meeting the requirements of low cost and high precision. SUMMARY
[0008] The purpose of the present application is to provide a band saw blade sawing path detection method and device that can realize real-time remote monitoring of the sawing path of multiple sawing beds on site, while meeting the requirements of low cost and high precision, in view of the shortcomings of the prior art.
[0009] To solve the above technical problems, the technical solution adopted by the present application is:
[0010] A band saw blade sawing path detection method, comprising the following steps:
[0011] S1, acquiring the original image of the band saw blade sawing path, and converting the original image into a first gray scale image;
[0012] S2, enhancing the image contrast of the first gray scale image and performing denoising and smoothing processing to obtain a second gray scale image;
[0013] S3, binarizing the second gray scale image to obtain a binary image that retains the edge information of the sawing seam;
[0014] S4, performing straight line fitting on the binary image to obtain a contour map;
[0015] S5, extracting the included angle θ of the fitted straight line and the corrected horizontal line and the length of the straight line in the image to determine whether the band saw blade cutting path is normal, the determination process comprising: when the length is greater than or equal to a preset value and θ∈[90°-Δδ, 90°+Δδ], it is determined that the band saw blade cutting path is normal; when the length is less than the preset value or θ∈(0, 90°-Δδ)∪(90°+Δδ, 180°), it is determined that the band saw blade cutting path is abnormal and the material is cut obliquely; wherein Δδ is a set allowable tolerance.
[0016] Compared with the traditional band saw cutting oblique monitoring mode, the present application directly detects the cutting path by image analysis, fully considers that the gray scale at the saw joint is obviously different from other areas, and through image enhancement, denoising and smoothing, the rest of the non-characteristic image is excluded in a shorter time, and the saw joint is screened out; after the image is binarized, straight line fitting is performed on the binary image to remove small connected areas irrelevant to the saw joint and connect small areas relevant to the saw joint; through the fitted straight line, the included angle of the saw joint and the horizontal line and the length information of the saw joint in the image are obtained to determine whether the material is severely cut obliquely, realize remote monitoring of the real-time cutting path of multiple sawing machines on site, and meet the requirements of low cost and high precision.
[0017] Further, in step S2, the gain value alpha of the image contrast of the first gray scale image is set to N by the convertScaleAbs function through contrast adjustment command, and then the enhanced image is denoised and smoothed by using an adaptive median filtering method to obtain a second gray scale image.
[0018] Further, in step S3, the second gray scale image is binarized by using the OSTU method; the input of the OSTU method is the second gray scale image, and the output is a binary image retaining the edge information of the saw joint, and the binarization threshold is automatically determined by the THRESH_OTSU flag.
[0019] Further, in step S3, the binary image is flipped.
[0020] Step S4 is replaced by: performing straight line fitting on the flipped binary image to obtain a contour map.
[0021] Further, in step S4, the HoughLinesP function is used to perform straight line fitting on the binary image, and maxgap is set to a value greater than the cutting width, the input of the HoughLinesP function is the binary image, and the output is a contour map after fitting the straight line.
[0022] Further, in step S4, the approxPolyDP function is used to correct the straight line fitted in the contour graph, the input of the approxPolyDP function is the contour graph, and the output is the corrected contour graph.
[0023] In step S5, the angle θ between the corrected straight line and the corrected horizontal line and the length of the straight line in the image are extracted, and it is determined whether the band saw blade cutting path is normal, the determination process comprising: when the length is greater than or equal to a preset value and θ∈[90°-Δδ, 90°+Δδ], it is determined that the band saw blade cutting path is normal; when the length is less than the preset value or θ∈(0, 90°-Δδ)∪(90°+Δδ, 180°), it is determined that the band saw blade cutting path is abnormal, and the material is cut obliquely; wherein Δδ is a set allowable tolerance.
[0024] Based on the same inventive concept, the application also provides a band saw blade cutting path detection device, comprising:
[0025] An industrial camera is used to acquire an original image of the band saw blade cutting path.
[0026] A first image processing module is used to pre-process the original image, and the pre-processing includes image enhancement, image denoising, and image smoothing.
[0027] A second image processing module is used to perform binaryzation processing on the pre-processed image.
[0028] A first calculation module is used to perform straight line fitting on the binary image.
[0029] A determination module is used to determine whether the band saw blade cutting path is normal according to the angle θ between the fitted straight line and the corrected horizontal line and the length of the straight line in the image.
[0030] The specific implementation process of the determination module for determining whether the band saw blade cutting path is normal comprises: when the length is greater than or equal to a preset value and θ∈[90°-Δδ, 90°+Δδ], it is determined that the band saw blade cutting path is normal; when the length is less than the preset value or θ∈(0, 90°-Δδ)∪(90°+Δδ, 180°), it is determined that the band saw blade cutting path is abnormal, and the material is cut obliquely; wherein Δδ is a set allowable tolerance.
[0031] After the industrial camera acquires the image required for sawing path detection, the first image processing module can effectively improve the gray scale of the non-joint related image element by image enhancement, image denoising and image smoothing processing, and increase the contrast of the joint and non-joint area. The second image processing module binarizes the image processed by the first image processing module to obtain a binary image that retains the edge information of the joint. The first calculation module performs straight line fitting on the binary image. The judging module judges whether the band saw blade sawing path is normal according to the angle and length of the fitted straight line.
[0032] Further, it further comprises a second calculation module for correcting the fitted straight line.
[0033] Compared with the prior art, the present application has the beneficial effects that:
[0034] 1. The present application adopts a combination of machine vision detection and real-time monitoring to monitor the cutting skew of the material, which replaces the traditional band saw blade position deviation monitoring method. This method can be effectively applied to existing band sawing machines, realizing real-time remote monitoring of the sawing path of multiple sawing machines on site, without the need for large-scale modification of the mechanical and electrical systems of the band sawing machine, and has high feasibility, simplicity, accuracy and economy, while meeting the requirements of low cost and high precision.
[0035] 2. The present application fully considers that the target shape of the joint image and the gray scale of the feature map have obvious characteristics. By image enhancement, denoising and smoothing, the remaining non-feature images are excluded in a shorter time, and the joint is screened out. By straight line fitting, small connected regions unrelated to the joint are removed, and small regions related to the joint are connected, to solve the problem of chip affecting the integrity of the joint, without consuming a large amount of computing power, greatly improving the running speed. The present application does not need to position the joint contour very clearly, but can judge whether the material is severely skewed by the angle between the joint and the horizontal line and the length of the joint in the image, which can significantly reduce the material loss caused by material skewing. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 The present application is a band saw blade sawing path detection method flow chart;
[0037] Figure 2 The present application is a band saw blade sawing path detection method flow chart;
[0038] Figure 3(A) is a schematic diagram of the existing clamp clamping the band saw blade, Figure 3(B) is an example diagram of the existing guide arm and the material to be cut, and Figure 3(C) is an example diagram of the band saw blade and the joint;
[0039] Fig. 4(A) is a schematic diagram of the normal position of the band saw blade in the fixture, and Fig. 4(B) is a schematic diagram of the position of the band saw blade in the fixture when cutting is slanted;
[0040] Fig. 5(A) is an original image of the normal sawing path in an embodiment of the present application;
[0041] Fig. 5(B) is an enhanced image after adjusting the contrast of the normal sawing path in an embodiment of the present application;
[0042] Fig. 5(C) is a filtered image after denoising and smoothing of the normal sawing path in an embodiment of the present application;
[0043] Fig. 5(D) is a binary image after flipping of the normal sawing path in an embodiment of the present application;
[0044] Fig. 5(E) is an image after straight line fitting of the normal sawing path in an embodiment of the present application;
[0045] Fig. 5(F) is a corrected contour image of the normal sawing path in an embodiment of the present application;
[0046] Fig. 6(A) is an original image of the abnormal sawing path in an embodiment of the present application;
[0047] Fig. 6(B) is an enhanced image after adjusting the contrast of the abnormal sawing path in an embodiment of the present application;
[0048] Fig. 6(C) is a filtered image after denoising and smoothing of the abnormal sawing path in an embodiment of the present application;
[0049] Fig. 6(D) is a binary image after flipping of the abnormal sawing path in an embodiment of the present application;
[0050] Fig. 6(E) is an image after straight line fitting of the abnormal sawing path in an embodiment of the present application;
[0051] Fig. 6(F) is a corrected contour image of the abnormal sawing path in an embodiment of the present application;
[0052] In the above figures: 1 - saw wheel; 2 - saw frame; 3 - stand column; 4 - bed; 5 - guide arm; 6 - material to be cut; 7 - band saw blade; 8 - displacement sensor; 9 - industrial camera; 10 - fixture; 11 - sawing path (kerf). DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application, and are not intended to limit the protection scope of the present application.
[0054] The hardware configuration of the embodiment includes a Rasperry Pi Pico module, an HJ-KFB relay module, and an IMX317 industrial camera with a USB plug.
[0055] The Raspberry Pi Pico is a low-cost, high-performance microcontroller development board with flexible digital interfaces. In the embodiment, the Rasperry Pi Pico module is connected and communicated with the computer, and the module is programmed using the python RPi.GPIO module. The input signals of the module include a work start signal, a work end input saw cutting start signal, and a stop signal. The output signals include an abnormal fault stop signal and an alarm output signal after an abnormality is found.
[0056] Specifically, the output signals of the Rasperry Pi Pico module are connected to the circuit system of the sawing machine through the HJ-KFB relay module, and the sawing machine performs corresponding actions according to the received output signals. When installing the industrial camera, the installation axis of the industrial camera needs to be aligned with the saw joint as much as possible to ensure that when the magnification of the picture changes due to the distance, the picture content that needs to be paid special attention to and analyzed is usually concentrated in a certain area of the picture, and there is no need to repeatedly adjust the camera position. When sawing materials of different shapes, the way of observing the saw joint will be different. Specifically, when sawing square rods, the saw joint width on the photo is fixed. However, when sawing round rods, since the saw joint of the round rod has a certain angle with the observation direction (i.e. the angle of view of the camera), the display size of the saw joint on the photo will change with the distance between the saw joint and the lens, but as long as the saw joint is always located at the center position of the photo, the angle of the saw joint can be accurately measured, and the size change of the saw joint will not affect the angle change.
[0057] The program running platform of the embodiment is a 64-bit windows system, and the image processing library is OpenCV.
[0058] As shown in Figure 1 The embodiment provides a band saw blade sawing path detection method, which includes the following steps:
[0059] S1, collect the original image of the band saw blade sawing path, i.e. the original image of the saw joint, and convert the original image into a grayscale image to obtain a first grayscale image.
[0060] The embodiment operates the industrial camera by the instruction of VidoCapture to capture the image of the sawing seam, converts the image into a grayscale image, and uses the matrix clipping function of the numpy module to appropriately clip the image matrix of the grayscale image, removes the unnecessary part, and leaves the image matrix to be analyzed, so as to reduce the calculation power in subsequent calculation. The clipped image is shown in FIG. 5(A) and FIG. 6(A), and it can be seen that after normal sawing, the sawing seam passes through the whole picture. After graying, it can be seen that the grayscale of the sawing seam of the picture is obviously different from other areas, but a few areas are affected by the cutting chips, and the grayscale is high. From the data, the grayscale is lower than 50, and if not affected by the cutting chips, about 6-12 gray scales are obviously low. However, due to the influence of surface texture and light and a small amount of cutting chips clamped in the sawing seam, the shape of the sawing seam in the image is missing, and there are certain holes in other parts, which affects the identification of the feature image. In order to exclude other non-feature images, the clipped image needs to be preprocessed.
[0061] S2, enhancing the image contrast of the grayscale image, and denoising and smoothing the grayscale image to obtain a second grayscale image.
[0062] The convertScaleAbs function of the contrast adjustment command is used to set the gain value alpha of the image contrast of the grayscale image to 3.0 times, which can effectively improve the grayscale of the image element irrelevant to the sawing seam and increase the contrast between the sawing seam and the non-sawing seam area. The grayscale image after image enhancement is shown in FIG. 5(B) and FIG. 6(B). The adaptive median filtering method is used to remove noise and smooth the image to obtain the images shown in FIG. 5(C) and FIG. 6(C).
[0063] S3, binarizing and inverting the second grayscale image.
[0064] When binarizing the second grayscale image, the threshold function of OpenCV is used, and the THRESH_OTSU flag of OpenCV is used to let the function automatically calculate the best binarization threshold according to the OSTU method, so as to realize the binarization conversion of the image.
[0065] The Otsu method is an adaptive binarization method, which aims to select the best binarization threshold by maximizing the inter-class variance. Its steps include:
[0066] ① Calculate the histogram: calculate the histogram of the input second grayscale image to obtain the number of pixels of each grayscale level.
[0067] ② Normalize the histogram: normalize the histogram to calculate the cumulative probability distribution.
[0068] ③ Calculate cumulative probability distribution and mean: Calculate the cumulative probability distribution and mean at each gray level.
[0069] ④ Traverse gray levels: For each possible threshold (from the minimum gray level to the maximum gray level), calculate the inter-class variance of the two classes (background and foreground).
[0070] ⑤ Select the best threshold: Select the threshold that maximizes the inter-class variance. The inter-class variance is defined as the probability of the two classes multiplied by the square of the difference in their means.
[0071] ⑥ Apply the threshold: Binarize the image according to the selected best threshold.
[0072] The key idea of Otsu's method is to find a threshold that divides the image into two classes (foreground and background) so that the variance between the two classes is maximized, while the variance within the classes is minimized. In this way, a binary image with high contrast can be obtained.
[0073] Using Otsu's method, an appropriate threshold can be automatically selected without prior knowledge of the brightness distribution of the image, which makes Otsu's method particularly suitable for image segmentation under various brightness conditions. Since the saw bed often has brightness changes during operation, this method is used to binarize the obtained second gray-scale image.
[0074] After completing the binarization of the image, a black and white flip operation is performed again to obtain a binary image opposite to the original image as shown in Figure 5(D) and Figure 6(D).
[0075] S4, straight line fitting is performed on the flipped binary image to remove small areas unrelated to the feature map and connect small areas related to the feature map to obtain a contour map to solve the problem of the influence of the cutting chip on the integrity of the saw joint.
[0076] There are still some small areas unrelated to the feature map in Figs. 5(D) and 6(D), and the gray scale of these small areas is similar to that of the feature map (saw kerf); however, the scattered areas related to the feature map are located on straight lines or curves, while the other small areas are randomly distributed. Therefore, the HoughLinesP function of OpenCV is used to perform straight line fitting on the flipped binary image in this embodiment, and the maxgap is set to a value greater than the cutting width. The fitted straight line is thickened and widened. When performing straight line fitting using HoughLines, three conditions need to be met: a certain number of points, a certain length, and a gap less than a certain value, so that the straight line can be successfully detected and fitted. Due to the limitation of the number of points, length, and gap, the points of the other small areas located in the feature map area (small areas formed due to the interference of the cutting chip) will not be fitted into a certain straight line. After straight line fitting of the graph, the high gray scale points with small area are excluded, and then the shape in Figs. 5(E) and 6(E) is formed, only the saw kerf related area is kept white.
[0077] In this embodiment, the input of the HoughLinesP function is a binary image, and the output is a contour graph after fitting the straight line. The number of points is 50, the length is 50, and the gap is 50.
[0078] S5, correcting the straight line fitted in the contour graph.
[0079] After detecting and fitting the straight line, the straight line is drawn on the image to obtain the contour graph of the saw kerf, and then the approxPolyDP function is used for correction. The function structure is as follows: cv2.approxPolyDP(curve, epsilon, closed), wherein:
[0080] curve: input contour.
[0081] epsilon: approximation accuracy. It is a percentage of the contour perimeter, which is used to control the degree of approximation. The smaller the value, the more accurate the approximation.
[0082] closed: a Boolean value that specifies whether the contour is closed.
[0083] In this embodiment, the input of the approxPolyDP function is a contour graph, and the output is a corrected contour graph. The approximation accuracy is 0.01.
[0084] The approximation process is based on the Douglas-Peucker algorithm. The Douglas-Peucker algorithm is an algorithm for curve simplification and generalization, which aims to approximate a curve by reducing the number of points while preserving the shape characteristics of the curve as much as possible. The basic idea of the algorithm is to find the point with the maximum distance on the curve, check whether the approximation error of this point to the whole curve is within the set threshold. If it is within the threshold, then the segment of the curve can be approximated by a straight line segment; otherwise, the point is taken as a key point, and the same processing is recursively performed on the two sub-curves. The algorithm approximates the contour by eliminating unnecessary points. A larger epsilon precision will result in a greater degree of approximation, while a smaller epsilon precision value will result in a more accurate approximation. The epsilon used in this embodiment is 0.02, and after its use, the approximated straight line is similar to the original trajectory.
[0085] The final obtained corrected graph is shown in FIG. 5(F) and FIG. 6(F).
[0086] S6, according to the angle θ between the straight line and the corrected horizontal line, the length of the straight line in the image, whether the sawing path 11 of the band saw blade 7 is normal is analyzed.
[0087] First, the angle is corrected by using a standard vertical sawing seam without chip interference, and a corrected horizontal line that is 90° to the vertical sawing seam is obtained.
[0088] Then, the analyzed long straight line is analyzed: when the length is greater than or equal to the preset value and θ∈[90°-Δδ, 90°+Δδ], it is judged that the sawing path 11 of the band saw blade 7 is normal; when the length is less than the preset value or θ∈(0, 90°-Δδ)∪(90°+Δδ, 180°), it is judged that the sawing path 11 of the band saw blade 7 is abnormal, and the material is cut obliquely.
[0089] Wherein, Δδ is the allowable tolerance, and the allowable tolerance Δδ of this embodiment is 3°.
[0090] As shown in the contour line in FIG. 5(F), the characteristics of each straight line in the contour line need to be analyzed: it can be known that the length is 289 pixels, which is almost the height of the whole picture, and the angle θ between the straight line and the horizontal line is 90°, so it is judged that the sawing path is normal.
[0091] However, the angle between the straight line and the horizontal line in FIG. 6(F) is 108 degrees, and the length is less than 280 pixels, so it is judged that the sawing path is abnormal, and the material is severely cut obliquely. At this time, the controller sets both the alarm output signal and the stop signal to high level, and the sawing machine is discharged.
[0092] It should be noted that in the finally formed approximate figure 5(F) or figure 6(F), the straight line is thicker than the original sawing seam track, which is to connect all the pixels related to the sawing seam, and the thickness of the straight line itself does not affect the judgment of the angle and length of the straight line.
[0093] As shown in Figure 2 The embodiment also provides a band saw blade sawing path detection device for realizing the detection method, which comprises an industrial camera 9 installed on the guide arm 5 and a microcontroller.
[0094] The industrial camera 9 is used to acquire the original image of the band saw blade sawing path.
[0095] The microcontroller comprises a first image processing module, a second image processing module, a first calculation module, a second calculation module and a judgment module.
[0096] The first image processing module is used to pre-process the original image, and the pre-processing comprises image enhancement, image denoising and image smoothing.
[0097] The second image processing module is used to perform binary processing on the pre-processed image.
[0098] The first calculation module is used to perform straight line fitting on the binary image.
[0099] The second calculation module is used to correct the fitted straight line.
[0100] The judgment module is used to judge whether the sawing path 11 of the band saw blade 7 is normal according to the included angle θ of the fitted straight line and the corrected horizontal line and the length of the straight line in the image.
[0101] The specific implementation process of the judgment module judging whether the sawing path 11 of the band saw blade 7 is normal comprises: when the length is greater than or equal to a preset value and θ∈[90°-Δδ, 90°+Δδ], it is judged that the sawing path 11 of the band saw blade 7 is normal; when the length is less than the preset value or θ∈(0, 90°-Δδ)∪(90°+Δδ, 180°), it is judged that the sawing path 11 of the band saw blade 7 is abnormal, and the cut material 6 is cut obliquely; wherein Δδ is a set allowable tolerance.
[0102] The band saw blade sawing path detection detection device works, first, the original image of the sawing path 11 is collected through the industrial camera 9, then image processing is carried out through the image processing module (including the first image processing module and the second image processing module), finally, calculation and judgment are carried out through the calculation judgment module (including the first calculation module, the second calculation module and the judgment module), if the sawing path 11 of the band saw blade 7 is normal and the sawing outlet reaches the input signal to be high, the detection of the next cut is entered; if the sawing path 11 of the band saw blade 7 is abnormal, an alarm is sent, the sawing machine is controlled to be discharged, and the material waste caused by cutting inclination is avoided.
[0103] The embodiments of the present application are described above in conjunction with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative but not limiting, and those skilled in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims, which all belong to the protection scope of the present application.
[0104] Although the preferred embodiments of the present application have been described, those skilled in the art can make further changes and modifications to the embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0105] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
Claims
1. A method for detecting the sawing path of a band saw blade, characterized in that, include: S1. Acquire the original image of the band saw blade cutting path and convert the original image into a first grayscale image; S2. Enhance the image contrast of the first grayscale image and perform noise reduction and smoothing processing to obtain the second grayscale image; S3. Binarize the second grayscale image to obtain a binary image that retains the saw kerf edge information; S4. Perform linear fitting on the binary image to obtain a contour map; S5. Extract the angle θ between the fitted straight line and the corrected horizontal line, and the length of the straight line in the image. Determine whether the band saw blade's cutting path is normal. The determination process includes: when the length is greater than or equal to a preset value and θ∈[90°-Δδ, 90°+Δδ], the band saw blade's cutting path is normal; when the length is less than the preset value or θ∈(0, 90°-Δδ)∪(90°+Δδ, 180°), the band saw blade's cutting path is abnormal, and the material is cut at an angle; where Δδ is a set allowable tolerance. In step S4, the HoughLinesP function is used to fit a straight line to the binary image, and maxgap is set to a value greater than the cutting width. The input of the HoughLinesP function is the binary image, and the output is the contour map after fitting the straight line. In the HoughLinesP function, the number of points is set to 50, the length is set to 50, and the gap is set to 50.
2. The band saw blade cutting path detection method according to claim 1, characterized in that: In step S2, the image contrast gain value alpha of the first grayscale image is set to N by using the contrast adjustment command convertScaleAbs function, and then the enhanced image is denoised and smoothed using the adaptive median filtering method to obtain the second grayscale image.
3. The band saw blade cutting path detection method according to claim 1, characterized in that: In step S3, the second grayscale image is binarized using the OTU method; the input of the OTU method is the second grayscale image, and the output is a binary image that retains the edge information of the saw cut. The binarization threshold is automatically determined by the THRESH_OTSU flag.
4. The band saw blade cutting path detection method according to claim 1, characterized in that: In step S3, the binary image is flipped; Step S4 is replaced by: performing line fitting on the flipped binary image to obtain a contour map.
5. The band saw blade cutting path detection method according to claim 1, characterized in that: In step S4, the approxPolyDP function is used to correct the straight line fitted in the contour map. The input of the approxPolyDP function is the contour map, and the output is the corrected contour map. Step S5 is replaced by: extracting the angle θ between the corrected straight line and the corrected horizontal line, and the length of the straight line in the image, and determining whether the band saw blade cutting path is normal. The determination process includes: when the length is greater than or equal to a preset value and θ∈[90°-Δδ, 90°+Δδ], the band saw blade cutting path is normal; when the length is less than the preset value or θ∈(0, 90°-Δδ)∪(90°+Δδ, 180°), the band saw blade cutting path is abnormal and the material is cut at an angle; where Δδ is the set allowable tolerance.
6. A band saw blade cutting path detection device, characterized in that, For implementing the band saw blade cutting path detection method according to any one of claims 1-5, the band saw blade cutting path detection device comprises: Industrial cameras are used to acquire raw images of the sawing path of a band saw blade; The first image processing module is used to preprocess the original image, the preprocessing including image enhancement, image denoising and image smoothing; The second image processing module is used to perform binarization processing on the preprocessed image; The first calculation module is used to perform linear fitting on the binary image; The judgment module is used to determine whether the band saw blade cutting path is normal based on the angle θ between the fitted straight line and the corrected horizontal line and the length of the straight line in the image. The specific implementation process of the judgment module in determining whether the band saw blade cutting path is normal includes: when the length is greater than or equal to a preset value and θ∈[90°-Δδ, 90°+Δδ], the band saw blade cutting path is judged to be normal; when the length is less than the preset value or θ∈(0, 90°-Δδ)∪(90°+Δδ, 180°), the band saw blade cutting path is judged to be abnormal and the material is cut at an angle; where Δδ is a set allowable tolerance. Specifically, the HoughLinesP function is used to fit a straight line to the binary image, and maxgap is set to a value greater than the cutting width. The input of the HoughLinesP function is the binary image, and the output is the contour map after fitting the straight line. In the HoughLinesP function, the number of points is set to 50, the length is set to 50, and the gap is set to 50.
7. The band saw blade cutting path detection device according to claim 6, characterized in that: It also includes a second calculation module, which is used to correct the fitted straight line.
Citation Information
Patent Citations
Band saw blade welding quality detection method and device
CN111811437A
Band saw blade sensor and control system
US20160303669A1
Cutter damage degree detection method based on numerically controlled machine tool visual inspection
CN107234488A
Substrate cutting method and system
CN114488595A
Image vectorization processing method and device and storage medium
CN116739887A