A tool runout detection method and system
By using a visual positioning tool inspection device and method, the drill tip runout value of the tool is automatically calculated, which solves the problems of low detection accuracy and high error rate in the existing technology and realizes efficient and accurate automated inspection.
Patent Information
- Application Number
- CN202211477030.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2042-11-23
AI Technical Summary
Existing technologies have low accuracy and high error rate in detecting the runout of the drill tip, and their reliance on manual operation leads to subjective and unfair testing standards, which is also labor-intensive.
A vision-based tool inspection device is adopted, including a rotating clamping component and a vision inspection component. The tool tip runout value is calculated through image processing and affine transformation. The automated inspection process includes image acquisition, grayscale processing, angle fitting and diameter comparison.
It achieves high-precision, low-error detection of tool drill tip runout, automates and reduces manpower consumption, and improves detection efficiency.
Smart Images

Figure CN116255921B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of visual detection of cutters, in particular to a detection method and system for cutter runout. BACKGROUND
[0002] In existing automated production and processing, cutters are increasingly widely used, and in the process of using the cutter, cutter drill tip runout can cause large processing errors, so it is extremely important to detect the runout value of the cutter drill tip.
[0003] At present, the runout value of the cutter drill tip is mostly screened by manually operating a microscope, and the detection standard depends entirely on the individual's point of view, so the inspection standard is not objective and fair, and in addition, people's concentration and attention will be greatly reduced after a long time of work, so the possibility of detection error is high when detecting the drill bit by manually operating the tool microscope. SUMMARY
[0004] Therefore, the technical problem to be solved by the present application is to overcome the technical defects of low detection precision, high error rate and labor consumption of the runout value of the cutter drill tip in the prior art.
[0005] To solve the above technical problems, the present application provides a detection method for cutter runout and a cutter detection device based on visual positioning, which comprises:
[0006] A rotating clamping assembly capable of clamping a vertically placed cutter and driving the cutter to rotate around the central axis thereof;
[0007] A visual detection assembly located directly above the cutter to collect images of the cutter;
[0008] The detection method for cutter runout comprises the following steps:
[0009] S1, the rotating clamping assembly clamps the vertically placed cutter, and the visual detection assembly collects images of the cutter in the initial state;
[0010] S2, the images in the initial state are subjected to gray scale processing to obtain a gray scale image, a white area with a gray scale value range of 200-255 is selected from the gray scale image, and the center point position of the white area is calculated;
[0011] S3, the white area is reduced, and a black area with a gray scale value range of 20-100 is screened, wherein the black area includes two rotationally symmetrical sub-black areas, one of the sub-black areas is fixed, and the center point position of one of the sub-black areas is calculated and obtained;
[0012] S4, a straight line where the center point position of the white region and the center point position of the sub-black region are located is calculated, a fitting straight line is obtained according to the obtained straight line fitting, the fitting straight line is angle measured with the X axis, and the angle measurement result is converted into an angle value, wherein the fitting straight line is a fitting line in the gray image at the transition from the white region to the black region;
[0013] S5, according to the affine matrix and the obtained angle value, the cutter in the gray image is rotated to the horizontal direction, and the diameters of the cutter are obtained according to the fitting of the center point position of the white region on both sides of the cutter;
[0014] S6, the rotation operation of the rotating clamping assembly is angle compensated according to the angle value, on the basis of compensation, the rotating clamping assembly drives the cutter to rotate 180°, the image obtained by the visual detection assembly again collecting the image, the cutter diameter in the rotated image is obtained by processing the rotated image;
[0015] S7, the cutter diameter in the rotated image is compared with the cutter diameter in the initial image, and the cutter drill point runout value is obtained.
[0016] As preferred, in the S2, the center point position of the white region is obtained by the operator area_center.
[0017] As preferred, in the S3, the white region is reduced by using the operator erosion_circle.
[0018] As preferred, in the S5, the affine matrix is affine_trans_image.
[0019] As preferred, in the S5, the diameter of the cutter is obtained by the operator distance_cc.
[0020] As preferred, in the S4, the angle value is obtained by finding the straight side in the black region and obtaining the inclination by the operator angle_ll, and the inclination is obtained by the tuple_deg.
[0021] As preferred, the visual detection assembly is a face array camera.
[0022] As preferred, the rotating clamping assembly comprises a pneumatic clamping jaw and a motor, the pneumatic clamping jaw can clamp the cutter, and the motor drives the pneumatic clamping jaw to rotate.
[0023] As preferred, the cutter detection device further comprises a dome light source, and the dome light source is shadowless light.
[0024] The application discloses a cutter runout detection system based on the above cutter runout detection method.
[0025] an image acquisition module, which is configured to acquire an image of the tool in an initial state;
[0026] a center point position calculation module, which is configured to perform gray scale processing on the image in the initial state to obtain a gray scale image, select a white region with a gray scale value ranging from 200 to 255 from the gray scale image, calculate a center point position of the white region, reduce the white region, and screen a black region with a gray scale value ranging from 20 to 100, wherein the black region includes two sub-black regions that are rotationally symmetrical, one of the sub-black regions is fixed, and a center point position of the one sub-black region is calculated and obtained;
[0027] an angle value calculation module, which is configured to calculate a straight line on which the center point position of the white region and the center point position of the sub-black region are located, obtain a fitting straight line according to the acquired straight line, perform angle measurement on the fitting straight line and the X axis, and convert a result of the angle measurement into an angle value, wherein the fitting straight line is a fitting line in the gray scale image at a position where the white region transitions to the black region;
[0028] a tool diameter calculation module, which is configured to rotate the tool in the gray scale image to a horizontal direction according to an affine matrix and the obtained angle value, fit both sides of the tool according to the center point position of the white region, and obtain a diameter of the tool;
[0029] a secondary image acquisition and calculation module, which is configured to perform angle compensation on a rotation operation of a rotating clamping assembly according to the angle value, rotate the tool by 180° by the rotating clamping assembly on the basis of the compensation, acquire an image by the vision detection assembly again to obtain a rotated image, and process the rotated image to obtain a diameter of the tool in the rotated image;
[0030] a drill tip runout value calculation module, which is configured to compare the diameter of the tool in the rotated image with the diameter of the tool in the initial image to obtain a drill tip runout value of the tool.
[0031] The above technical solution of the present application has the following advantages over the prior art:
[0032] 1. The present application can automatically detect the tool, obtain the drill tip runout value of the tool by the vision detection method, has high detection precision, and saves manpower.
[0033] 2. The tool runout value detection error of the present application is small, and the efficiency is high. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 a flowchart of the tool runout detection method in the present application;
[0035] Figure 2 is the image of the drill bit of the tool;
[0036] Figure 3 is the image after the white region is reduced. DETAILED DESCRIPTION
[0037] The present application will be further described below in conjunction with the drawings and specific embodiments so that those skilled in the art can better understand and implement the present application, but the embodiments are not intended to limit the present application.
[0038] Referring to Figure 1 The present application discloses a tool runout detection method and a tool detection device based on visual positioning. The tool detection device comprises a rotating clamping assembly and a visual detection assembly.
[0039] The rotating clamping assembly can clamp a vertically placed tool and drive the tool to rotate around the central axis thereof.
[0040] The visual detection assembly is located directly above the tool to collect the image of the tool.
[0041] The tool runout detection method comprises the following steps:
[0042] S1, the rotating clamping assembly clamps a vertically placed tool, and the visual detection assembly collects the image of the tool in the initial state. Referring to Figure 2 Fig. 1 is a photo of the drill bit of the tool in the present application.
[0043] S2, the image in the initial state is subjected to gray scale processing to obtain a gray scale image, a white region with a gray scale value range of 200-255 is selected from the gray scale image, and the center point position of the white region is calculated. The center point position of the white region is obtained by using the operator area_center.
[0044] S3, the white region is reduced, and a black region with a gray scale value range of 20-100 is selected, wherein the black region comprises two rotationally symmetrical sub-black regions, one of the sub-black regions is fixed, and the center point position of one sub-black region is calculated. The white region is reduced by using the operator erosion_circle. Referring to Figure 3 Fig. 2 is the image after the white region is reduced.
[0045] S4, a straight line passing through the center point position of the white region and the center point position of the sub-black region is calculated, a fitting straight line is obtained according to the obtained straight line, the fitting straight line is subjected to angle measurement with the X-axis, and the result of the angle measurement is converted into an angle value. The fitting straight line is a fitting line in the gray scale image at the transition from the white region to the black region.
[0046] Specifically, the angle value is obtained by finding the straight side in the black region and obtaining the tilt by the operator angle_ll, and obtaining the fitting straight line according to the tuple_deg.
[0047] S5, according to the affine matrix and the obtained angle value, the cutter in the gray image is rotated to the horizontal direction, and the center point of the white region is fitted to obtain the diameter of the cutter. The affine matrix is affine_trans_image. The diameter of the cutter is obtained by the operator distance_cc.
[0048] S6, according to the angle value, the rotation operation of the rotating clamping assembly is angle compensated, and on the basis of the compensation, the rotating clamping assembly drives the cutter to rotate 180°, the image acquired by the visual detection assembly again, the image after rotation is obtained, and the diameter of the cutter in the image after rotation is obtained;
[0049] S7, the diameter of the cutter in the image after rotation is compared with the diameter of the cutter in the initial image, and the cutter drill point runout value is obtained.
[0050] Further, in the present application, the visual detection assembly is a face array camera. The rotating clamping assembly includes a pneumatic clamp jaw and a motor, the pneumatic clamp jaw can clamp the cutter, and the motor drives the pneumatic clamp jaw to rotate. The cutter detection device further includes a dome light source, the dome light source is shadowless light, so that the imaging quality can be improved.
[0051] The present application discloses a kind of detection system of cutter runout, it is characterized in that based on the detection method of cutter runout described above, including image acquisition module, center point position calculation module, angle value calculation module, cutter diameter calculation module, secondary image acquisition and calculation module and drill point runout value calculation module.
[0052] Image acquisition module is used to acquire the image of cutter in initial state.
[0053] The center point position calculation module carries out gray processing to the image in initial state, obtains gray image, selects the white region with gray value range of 200-255 from the gray image, calculates the center point position of the white region, reduces the white region, filters the black region with gray value range of 20-100, wherein the black region includes two blocks of rotationally symmetric sub-black regions, one of the sub-black regions is fixed, and the center point position of one of the sub-black regions is calculated.
[0054] The angle value calculation module is used to calculate the straight line where the center point position of the white region and the center point position of the sub-black region are located, obtain the fitting straight line according to the obtained straight line, measure the angle between the fitting straight line and the X-axis, and convert the result of the angle measurement into an angle value, wherein the fitting straight line is a fitting line in the gray image where the white region transitions to the black region.
[0055] The tool diameter calculation module rotates the tool in the gray-scale image to the horizontal direction according to the affine matrix and the obtained angle value, and fits the two sides of the tool according to the center point of the white region to obtain the diameter of the tool.
[0056] The secondary image acquisition and calculation module compensates the rotation operation of the rotating and clamping assembly according to the angle value, rotates the rotating and clamping assembly to drive the tool by 180° on the basis of the compensation, and acquires the image after rotation by the visual detection assembly, to obtain the tool diameter in the image after rotation.
[0057] The drill tip runout value calculation module compares the tool diameter in the image after rotation with the tool diameter in the initial image to obtain the drill tip runout value of the tool.
[0058] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt a computer program product in the form of being implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.
[0059] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks. Figure 1 The means for implementing the functions specified in one or more flows and / or blocks.
[0060] These computer program instructions can also be stored in a computer readable storage medium capable of guiding the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer readable storage medium produce a product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks. Figure 1 The means for implementing the functions specified in one or more flows and / or blocks.
[0061] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate a computer implemented process, so that the instructions executed on the computer or other programmable data processing devices provide steps for implementing the function specified in the flowchart Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0062] Obviously, the above-mentioned embodiments are only examples for clearly illustrating the present application, and are not intended to limit the embodiments. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, all the embodiments are not required to be exhausted, and the obvious changes or variations derived therefrom are still within the protection scope of the present application.
Claims
1. A method of detecting tool runout, comprising: A tool detection device based on visual positioning, the tool detection device comprising: a rotating clamping assembly capable of clamping a vertically placed tool and rotating the tool around its axis; a visual detection assembly located directly above the tool to collect an image of the tool; the tool run-out detection method comprising the following steps: S1, the rotating clamping assembly clamps a vertically placed tool, and the visual detection assembly collects an image of the tool in an initial state; S2, the image in the initial state is subjected to grayscale processing to obtain a grayscale image, a white region with a grayscale value range of 200-255 is selected from the grayscale image, and the center point position of the white region is calculated; S3, the white region is reduced, and a black region with a grayscale value range of 20-100 is screened, wherein the black region includes two rotationally symmetrical sub-black regions, one of the sub-black regions is fixed, and the center point position of one sub-black region is calculated; S4, a straight line passing through the center point positions of the white region and the sub-black region is calculated, a fitting straight line is obtained based on the obtained straight line, the fitting straight line is angle-measured with the X-axis, and the angle measurement result is converted into an angle value, wherein the fitting straight line is a fitting line in the grayscale image at a transition from the white region to the black region; S5, the tool in the grayscale image is rotated to a horizontal direction based on an affine matrix and the obtained angle value, the center point position of the white region is used to fit the two sides of the tool to obtain the diameter of the tool; S6, the rotation operation of the rotating clamping assembly is angle-compensated based on the angle value, the rotating clamping assembly drives the tool to rotate 180° based on the compensation, the visual detection assembly collects an image again to obtain a rotated image, and the rotated image is processed to obtain the diameter of the tool in the rotated image; S7, the diameter of the tool in the rotated image is compared with the diameter of the tool in the initial image to obtain a tool tip run-out value.
2. The method of claim 1, wherein In S2, the center point position of the white region is obtained by an operator area_center.
3. The method of claim 1, wherein In S3, the white region is reduced using an operator erosion_circile.
4. The method of claim 1, wherein In S5, the affine matrix is affine_trans_image.
5. The method of claim 1, wherein In S5, the diameter of the tool is obtained by an operator distance_cc.
6. The method of claim 1, wherein In S4, the angle value is obtained by finding a straight side in the black region and obtaining an inclination by an operator angle_ll, and then obtaining tuple_deg.
7. The method of claim 1, wherein The visual detection assembly is a face array camera.
8. The method of claim 1, wherein The rotating clamping assembly includes a pneumatic clamping jaw capable of clamping the tool and a motor driving the pneumatic clamping jaw to rotate.
9. The method of claim 1, wherein The tool detection device further comprises a dome light source, and the dome light source is shadowless light.
10. A system for detecting tool runout, comprising: The tool run-out detection method based on any one of claims 1-9, comprising: an image collection module for collecting an image of the tool in an initial state; The center point position calculation module performs gray scale processing on the image in the initial state, obtains a gray scale image, selects a white area with a gray scale value range of 200-255 from the gray scale image, calculates the center point position of the white area, reduces the white area, and screens a black area with a gray scale value range of 20-100, wherein the black area includes two rotationally symmetrical sub-black areas, one of the sub-black areas is fixed, and the center point position of one sub-black area is obtained by calculation; The angle value calculation module is configured to calculate a straight line on which the center point position of the white area and the center point position of the sub-black area are located, obtain a fitting straight line according to the obtained straight line fitting, perform angle measurement on the fitting straight line and the X axis, and convert the result of the angle measurement into an angle value, wherein the fitting straight line is a fitting line in the gray scale image at a position where the white area transitions to the black area; The tool diameter calculation module is configured to rotate the tool in the gray scale image to the horizontal direction according to the affine matrix and the obtained angle value, fit the two sides of the tool according to the center point position of the white area, and obtain the diameter of the tool; The secondary image acquisition and calculation module is configured to perform angle compensation on the rotation operation of the rotating clamping assembly according to the angle value, rotate the tool by 180° on the basis of the compensation, and obtain a rotated image by the visual detection assembly again, process the rotated image, and obtain the diameter of the tool in the rotated image; The drill tip runout value calculation module is configured to compare the diameter of the tool in the rotated image with the diameter of the tool in the initial image, and obtain the drill tip runout value of the tool.
Citation Information
Patent Citations
Rotational cutting tool state multiple parameter overall assessment method based on image identification
CN101758423A
Method for positioning and monitoring wear of ball nose end mill cutter
CN102501140A