A multi-dimensional small cutter visual detection method and system
By employing a multi-dimensional visual inspection method for small cutting tools, utilizing optimized illumination light sources and an embedded platform, and combining two-dimensional and three-dimensional cameras for comprehensive measurement, the problem of existing systems being unable to fully capture geometric features and having bloated integration is solved, thus achieving high-precision and miniaturized cutting tool inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DALIAN UNIV OF TECH
- Filing Date
- 2026-05-12
- Publication Date
- 2026-06-09
AI Technical Summary
Existing tool vision inspection systems cannot fully capture geometric features, the lighting cannot be adapted to the local geometric features of the tool, and the system integration is cumbersome, making it difficult to meet the needs of high-end equipment for small integration and flexible deployment.
A multi-dimensional visual inspection method for small cutting tools is adopted. By optimizing the illumination light source, high-contrast and uniform illumination images are obtained. Comprehensive measurement is carried out by combining two-dimensional and three-dimensional cameras, and the system is miniaturized by integrating an embedded platform.
It enables comprehensive and high-precision measurement of tool geometry parameters, improves the compactness and flexibility of the inspection system, generates engineering decision-making suggestions, and meets the inspection needs of high-end equipment.
Smart Images

Figure CN122175982A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision inspection technology, and in particular to a multi-dimensional visual inspection method and system for small cutting tools. Background Technology
[0002] With the rapid development of industries such as aerospace and automotive transportation, high-end equipment has placed high demands on the efficient and high-quality processing of its key components. As the core tool for processing key components, the geometric accuracy of the cutting tool directly determines the processing quality and efficiency of the component. However, with the development of material systems and the improvement of process requirements, the types of cutting tools are becoming increasingly diverse. Moreover, special-purpose machining tools, such as stepped micro-tooth drills, have complex surface morphologies and severe structural mutual occlusion, making it difficult for traditional visual inspection equipment to accurately measure all their geometric parameters. In addition, existing cutting tool inspection instruments generally use industrial control computers or general-purpose computers as the core control unit, and the system architecture is distributed, resulting in structural redundancy and large size, which makes it difficult to adapt to the industrial needs of small-scale integration, flexible deployment, and rapid response of equipment in the production site.
[0003] To address the challenge of measuring tool geometry parameters, "A Tool Magazine Tool Inspection Device and Method" (patent number CN118682565A) provides an efficient method for detecting various types of tools integrated into a tool magazine. It utilizes two-dimensional vision inspection modules in both axial and lateral directions, combined with rotation around the tool axis, to acquire images of the tool's end face and side surface. However, novel and complex tools such as stepped micro-tooth drills have micro-tooth and micro-edge structures, leading to structural occlusion issues and the need to measure parameters such as the rake angle and other parameters in a spatially orthogonal plane. Therefore, two-dimensional measurement alone cannot meet the measurement requirements of all tool parameters, necessitating further reconstruction of the tool's three-dimensional morphology. Furthermore, the two vision inspection systems have identical functions, resulting in system module redundancy. This can be addressed by optimizing the design of the tool fixture to increase the system's degrees of freedom and thus optimize redundant modules.
[0004] Appropriate lighting conditions enable cameras to obtain high-contrast images in complex lighting environments, avoiding image processing difficulties caused by image blur. The "Automatic Tool Detection Device" (patent number CN223037841U) installs two white light illuminators on either side of the camera to illuminate the tool. However, this single-direction, fixed-point illumination method cannot meet the differentiated illumination requirements of the planar geometric features of complex tools, and it is difficult to individually illuminate the local details of the tool's geometric features. Summary of the Invention
[0005] This invention addresses the problems of incomplete geometric feature capture, inadequate illumination for local tool geometry, and cumbersome system integration in existing tool vision inspection systems. It designs a multi-dimensional small-scale tool vision inspection method and system. By optimizing the illuminance light source, it ensures the acquisition of high-contrast images before 2D parameter measurement and a sequence of images with uniform illumination before 3D parameter measurement. Combining 2D and 3D cameras enables comprehensive measurement of the tool's planar and spatial geometric parameters. Integrating a large-scale engineering language model with prompt words transforms measurement data into standardized scores and confidence levels, generating engineering decision suggestions. By rationally allocating system degrees of freedom and integrating multiple module functions through an embedded platform, it achieves compact and miniaturized integration.
[0006] The technical solution of the present invention is as follows: A multi-dimensional visual inspection method for small cutting tools, the specific steps of which are as follows: The first step is to acquire high-contrast images and a sequence of images with uniform illumination; The second step involves measuring the tool end face parameters and tool side face parameters based on the high-contrast image using a sub-pixel edge extraction algorithm. The third step involves measuring parameters in the orthogonal plane of the tool space using the focusing depth method based on a sequence of images with uniform illumination. The fourth step is to evaluate the tool parameter measurement results based on the semantic model. Based on the tool end face parameters, tool side surface parameters, and parameters in the orthogonal plane of tool space, the tool state is evaluated through a parameter-state correlation evaluation function. The tool condition assessment results are converted into maintenance instructions, and a maintenance priority score is calculated. K And normalize to the [0,100] interval: in, It is the overall health index of cutting tools D The normalized value, ; U Indicates the urgency of the current working condition of the cutting tool. ; The evaluation results are structured into semantic data according to the JSON-LD standard. Through a large language model of prompt words customized for device scenarios, the semantic data is semantically parsed and organized to output clear interpretation analysis and engineering decision suggestions.
[0007] The high-contrast image acquisition is as follows: the two-dimensional camera and tool control system are adjusted so that the two-dimensional camera can capture the geometric features of the tool end face and the geometric features of the tool side face; Adjust the LED light source so that its light is perpendicular to the plane to be measured by the cutting tool. The LED light source... i The luminous flux incident on a unit receiving area by a single LED bead With observation angle θ It is proportional to the cosine function. i =1,2,…, n , n The total number of LED beads: in, For the first i The normal luminous intensity of each LED is constrained between 0 and the maximum illuminance. Within the interval, r The spatial distance between the measured point and the LED bead; To address the imaging requirements of different geometric features of the cutting tool, an imaging optimization lighting control strategy based on convex optimization is employed to find the optimal lighting combination of LED light sources. Under this optimal lighting combination, high-contrast images of the geometric features of the tool end face and the tool side face are acquired. in, I It is the optimal combination of light sources to be solved. It is the distribution of light reflected from the surface of an actual object into a two-dimensional camera. It is based on the target reflectance distribution preset in the measurement scene. It is the minimum value.
[0008] The sequence of images of the uniform illumination is acquired as follows: the three-dimensional camera and the tool control system are adjusted so that the imaging focus of the three-dimensional camera is located below the geometric feature to be measured on the tool, and is in a defocused state; Under the uniform diffused illumination provided by the dome light source, the sliding electric cylinder a is controlled to maintain a fixed step size. d Moving, 3D camera acquisition c The sequence of images; during the acquisition process, the 3D camera image passes through different positions of the geometric features to be measured on the tool, defocusing, refocusing and then defocusing again; the acquisition ends after the 3D camera defocuses again, completing the acquisition of a sequence of images of uniform illumination of the geometric features of the orthogonal plane in the tool space.
[0009] The second step is specifically: based on the local gray area effect fitting, a sub-pixel edge extraction algorithm is implemented to extract the geometric feature edges of the tool end face and the geometric feature edges of the tool side face where the two-dimensional parameters to be measured of the tool are located; Using a linear function Fit the edge of an ideal straight line, where It is the slope of an ideal straight line. It is the y-intercept of the ideal straight line; in p × qThe calculation window establishes a mathematical model and divides the calculation window into three regions: Left region: Middle area: Right region: ,in p It calculates the number of pixels in the height direction of the window. q It calculates the number of pixels in the width direction of the window. h The width of each region is evenly divided into pixels. The geometric areas of the three regions are: in, It is a constant used to translate the origin of the coordinate system of the calculation window to the center of the calculation window; The area of the left region is... The area of the middle region. The area of the right region; Set the background grayscale value to B Foreground grayscale value A The relationship between the sum of the actual gray values of the three regions and their geometric areas is established as follows: in, This represents the integral gray area of the left region. The integral gray area representing the middle region. The integral gray area of the right region is represented by the above calculations. coefficients in and ; For complex curved edges of the cutting tool, a quadratic curve model is adopted. The fitting process is the same as the solution process for the edge of an ideal straight line. , , All are fitting coefficients; The continuous, smooth edges of both the tool end face geometry and the tool side geometry are extracted to obtain a sub-pixel precision edge point sequence. s Represents sub-pixel edge points, s =1,2,3,…; Identify and locate edge inflection points in the edge point sequence: in, Represents subpixel edge points s The gradient direction angle, Indicates the first s+ Gradient direction angle at one edge point Indicates the first s+ Gradient direction angles at two edge points; Indicates the first Vertical gradient values at sub-pixel edge points Indicates the first The horizontal gradient value at each sub-pixel edge point, where T is an empirical threshold; Based on the geometric definitions of the end face parameters and side face parameters of the tool under test, the required edge inflection points are located in the edge point sequence. The parameter values of the end face parameters and side face parameters of the tool under test are calculated in the pixel coordinates of the high-contrast image through coordinate operations. By establishing a direct correspondence between the image pixel coordinates and the actual physical dimensions, the true measured values of the tool's two-dimensional parameters are obtained.
[0010] The third step, the depth-of-focus method, specifically involves: after acquiring a sequence of images with uniform illumination using a 3D camera, calculating the focus evaluation value of each pixel in each image sequence using the improved Tenengrad focus evaluation function; the convolution kernel of the improved Tenengrad focus evaluation function is: in for x Convolution kernel in the direction, for y Convolution kernel in the direction; the combined gradient value of the pixels is: The improved Tenengrad focus evaluation function is as follows: in, It is the side length of the square calculation window. The gradient mean is calculated within a square calculation window; The improved Tenengrad focus evaluation function is used to obtain the focus evaluation value of each pixel. Then, based on the extreme value search method, the position of the sequence image corresponding to the maximum focus evaluation value is obtained. This position represents the depth information of the pixel. in, Here, represents the 3D depth position corresponding to the pixel, and g represents the frame number with the highest focus evaluation value. Indicates the first g Focus evaluation value of frame sequence images, Indicates the first g+ Focus evaluation value of a 1-frame image sequence. Indicates the first g- Focus evaluation value of a 1-frame image sequence. Indicates the first g The depth position corresponding to the frame. Indicates the first g+The depth position corresponding to 1 frame Indicates the first g- The depth position corresponding to 1 frame Distance between adjacent sequences; Based on the depth position information of each pixel, a three-dimensional point cloud of the tool surface is generated. After Gaussian filtering to optimize the three-dimensional point cloud data of the tool surface, the three-dimensional shape of the tool surface is restored. Based on the three-dimensional point cloud shape of the tool surface, the geometric parameters of the tool in the orthogonal plane in space are calculated.
[0011] The parameter-state correlation evaluation function is: in, D It is the overall health index of the cutting tool. l Indicates the measured number of l One parameter, N It is the total number of evaluation parameters; H It is a built-in scoring function. Indicates the first l The actual values of each parameter Indicates the first l Standard values for each parameter Indicates the built-in tool's first l The allowable deviation threshold for each parameter; This indicates the reliability of the measurement results calculated based on image quality. Indicates the first l The relative importance of each parameter to the overall performance of the tool.
[0012] A multi-dimensional small cutting tool vision inspection system is provided, which applies a multi-dimensional small cutting tool vision inspection method; the multi-dimensional small cutting tool vision inspection system includes a vision measurement system and a tool control system. The vision measurement system and the tool control system are integrated inside a single housing, forming a closed detection unit; The visual measurement system includes a 2D camera, a 3D camera, a linear guide slide, dual telecentric lenses, a microscope lens, an LED light source, and a dome light source. The linear guide slide is fixed on an integrated housing, and the 2D camera and microscope lens are integrated onto the linear guide slide. The 2D camera and dual telecentric lenses are connected via a standard camera lens interface. The LED light source and dual telecentric lenses are placed coaxially. The 3D camera and microscope lens are connected via a standard camera lens interface. The dome light source and microscope lens are placed coaxially. A motor rotates to move the 2D camera, 3D camera, dual telecentric lenses, microscope lens, LED light source, and dome light source vertically along the linear guide slide. The tool control system includes a tool holder, a holder support, a rotary slide, a slide cylinder a, and a slide cylinder b. The tool holder is used to fix the tool and controls the tool to rotate along its own axis through a motor on it. The tool holder is connected to the holder support below, and the tool holder is controlled to rotate through a motor on the holder support. The rotary slide is connected to the holder support below, and the holder support is controlled to rotate through a motor on the rotary slide. Slide cylinders a and b are arranged vertically and guided by linear guide rails, respectively, driving the tool holder, holder support, and rotary slide to translate in two directions. The relative positions of the two-dimensional and three-dimensional cameras in the vision measurement system with the tool control system are fixed.
[0013] The LED light source provides adaptive illumination to a designated area by adjusting the light field distribution.
[0014] The beneficial effects of this invention are as follows: This system employs a multi-dimensional visual inspection method and system for small cutting tools, using multi-angle partitioned LED light sources and dome light sources to acquire high-quality two-dimensional high-contrast images and high-quality three-dimensional uniform illumination sequence images, respectively; it measures the tool end face parameters and tool side parameters through a sub-pixel edge extraction algorithm, and measures the parameters in the orthogonal plane of tool space through a focusing depth method, thereby improving the accuracy of tool parameter measurement while ensuring comprehensive measurement of tool end face parameters, tool side parameters, and parameters in the orthogonal plane of tool space; it evaluates the tool parameter measurement results through a semantic model; and it uses a single-board computer as a unified control core, achieving a highly integrated design with a compact structure and miniaturized system. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the assembly structure of a multi-dimensional small cutting tool vision inspection system.
[0016] Figure 2 This is a schematic diagram of the degree-of-freedom control of a multi-dimensional small cutting tool vision inspection system.
[0017] Figure 3 This is a measurement flowchart for a multi-dimensional visual inspection method for small cutting tools.
[0018] In the diagram: 1-Integrated housing, 2-2D camera, 3-3D camera, 4-Linear slide, 5-Dual telecentric lens, 6-Microscope lens, 7-LED light source, 8-Dome light source, 9-Tool fixture, 10-Fixture support, 11-Rotating slide, 12-Slide electric cylinder a, 13-Slide electric cylinder b. Detailed Implementation
[0019] To illustrate the technical content and specific implementation method of the present invention in detail, the following description is provided in conjunction with the accompanying drawings.
[0020] A multi-dimensional miniature cutting tool vision inspection system is proposed. This system utilizes an LED light source 7 with adjustable light distribution to individually illuminate local geometric features of the cutting tool, acquiring high-contrast images of the end face and side geometric features. A dome light source achieves uniform illumination, obtaining a sequence of images showing uniform illumination of the tool's three-dimensional morphology in a spatially orthogonal plane. A sub-pixel edge extraction algorithm for tool geometric features enables high-precision detection of the tool's two-dimensional parameters. A depth-focusing method is used to acquire a sequence of images of the tool tip, achieving stable reconstruction of the tool's three-dimensional morphology and accurately calculating its spatial angle parameters. An integrated engineering language model with prompt words transforms the final measurement data into standardized scores and confidence levels, generating interpretation analysis and engineering decision-making suggestions. By rationally arranging degrees of freedom, the system assigns five degrees of freedom to the tool control area, allowing small components to handle core attitude adjustment tasks, and one degree of freedom to the camera system for switching between two-dimensional and three-dimensional measurements. Simultaneously, image acquisition, data processing, and motor control functions are highly integrated into an embedded platform, solving the problems of large size, complex structure, and inflexible deployment of traditional inspection equipment, achieving system miniaturization and integration.
[0021] like Figure 1 The diagram shows the assembly structure of a multi-dimensional small tool vision inspection system. The integrated housing 1 integrates the vision measurement system and the tool control system. The vision measurement system has two cameras: a 2D camera 2 and a 3D camera 3. The 2D camera 2 is used to acquire high-contrast images of the tool end face geometry and the tool side geometry. The dual telecentric lens 5 has a magnification of 2. The 2D camera 2 and the dual telecentric lens 5 are coaxially fixed. The LED light source 7 is a self-made light source, coaxially fixed with the dual telecentric lens 5. The 3D camera 3 is a depth camera used to acquire sequential images related to spatial features. The microscope lens 6 has a focal length of 40mm and a depth of field of 14. The 3D camera 3 and microscope lens 6 are coaxially fixed. The dome light source 8 is coaxially fixed with the microscope lens 6. The vision control system is integrated on the linear guide slide 4.
[0022] Furthermore, the vision measurement system and the tool control system are all integrated into a single housing 1, forming a closed detection unit. The vision measurement system integrates a 2D camera 2 and a 3D camera 3. The 2D camera 2 is integrated onto the linear guide slide 4 via a camera adapter plate and secured with screws. The 2D camera 2 is connected to the dual telecentric lens 5 via a standard camera lens interface. The LED light source 7 is coaxially placed with the dual telecentric lens 5 and secured with screws. The 3D camera 3 is connected to the microscope lens 6 via a standard camera lens interface. The microscope lens 6 is fixed to the linear guide slide 4 with screws. The dome light source 8 is coaxially placed with the microscope lens 6 and secured with screws. The linear guide slide 4 is fixed to the single housing 1 with screws, and a motor rotates to move the 2D camera 2 and the 3D camera 3 vertically.
[0023] The tool control system is used to fix the tool. The tool holder 9 and the holder support 10 are both 3D printed products used to rotate the tool. The rotary slide 11 has a repeatability of less than 0.005°; the slide electric cylinder a12 has a repeatability of up to 10μm, both of which meet the requirements of high-precision control.
[0024] Tool holder 9 is used to fix the tool, and its motor controls the tool's rotation along its own axis. Tool holder 9 is connected to a fixture support 10, whose motor controls its rotation. Fixture support 10 is connected to a rotary slide 11, whose motor controls its rotation. Slide cylinders a12 and b13 are arranged vertically and guided by linear guides, driving tool holder 9, fixture support 10, and rotary slide 11 to translate in two directions. This achieves five degrees of freedom motion for the small-volume tool control system.
[0025] The above describes how motor control enables flexible and precise movement of the vision control system and the tool control system. This achieves vertical translation of the vision control system and three-directional rotation and two-directional translation of the tool control system. The tool control system occupies a smaller space and is given five degrees of freedom, while the vision control system occupies a larger space and is given one degree of freedom, primarily used for switching between 2D and 3D cameras.
[0026] In summary, by using the vertical translation of the vision control system and the three-directional rotation and horizontal movement of the tool control system, comprehensive capture of images of the tool from different perspectives can be achieved.
[0027] By using an embedded platform as the unified control core, motion control for switching between a five-degree-of-freedom positioning clamping device and a camera is achieved without relying on external servers and complex power supply systems, ultimately simplifying the system architecture.
[0028] The specific steps of the multi-dimensional small cutting tool visual inspection method are as follows: The first step is to acquire high-contrast images and a sequence of images with uniform illumination; To achieve high-precision and efficient detection of the geometric features of the tool end face and tool side, high-contrast images need to be acquired, requiring the determination of the optimal illumination angle for each geometric feature. First, the 2D camera 2 and the tool control system are adjusted so that the 2D camera 2 can capture images of the plane containing the tool's geometric features.
[0029] Typically, the LED beads in an LED light source 7 can be approximated as a Lambertian light source, and in far-field lighting scenarios, it can be regarded as a directional point light source. i The luminous flux incident on a unit receiving area by a single LED bead With observation angle θ It is proportional to the cosine function. i=1,2,…, n , n The total number of LED beads: in, For the first i The normal luminous intensity of each LED is constrained between 0 and the maximum illuminance. Within the interval, r This refers to the spatial distance between the measured point and the LED bead.
[0030] To address the imaging requirements of different geometric features of the cutting tool, an optimal light source combination is found through an imaging optimization illumination control strategy based on convex optimization. in, I It is the optimal combination of light sources to be solved. It is the distribution of light reflected from the surface of an actual object into a two-dimensional camera. It is based on the target reflectance distribution preset in the measurement scene.
[0031] Luminous intensity of each LED bead Constrained to 0 to the maximum value Within the interval, n represents the total number of LED beads that participate in forming the multi-zone light source.
[0032] To achieve high-precision and efficient detection of parameters within the orthogonal plane of the tool space, images under uniform illumination are required. Therefore, a dome light source 8 is selected to cover the complex curved surface of the tool and reduce local highlights or shadows. By adjusting the 3D camera 3 and the tool, combined with the uniform illumination of the dome light source 8, a sequence of images of the geometric features of the orthogonal plane of the tool space under uniform illumination is acquired.
[0033] The following explanation uses the measurement of the chisel edge characteristics of a stepped micro-tooth drill as an example.
[0034] First, the cutting tool is fixed on the tool holder 9, and the type of feature to be measured is determined. The movement of the tool control system is uniformly controlled, and the 2D camera 2 is moved to the appropriate position along the linear guide slide 4, allowing a clear image to be seen through the dual telecentric lenses 5. The optimal lighting combination is calculated to acquire a high-quality, high-contrast image.
[0035] If the geometric parameters are geometric features within an orthogonal plane in space, adjust the dome light source 8 to a suitable illumination level, control the sliding stage electric cylinder a12 to move with a fixed step size, and the 3D camera 3 acquires a sequence of images. The 3D camera 3 goes from defocusing, then focusing, and then defocusing again to complete the acquisition task.
[0036] The second step involves measuring the tool end face parameters and tool side face parameters based on the high-contrast image using a sub-pixel edge extraction algorithm. Because the LED light source 7 is designed with localized illumination, high-contrast images can be acquired using the 2D camera 2. The geometric feature edges are further extracted using a sub-pixel edge extraction algorithm based on local gray-scale area effect fitting. For ideal straight edges, a linear function is used. Fit the edge of an ideal straight line, where It is the slope of the straight line. It is the y-intercept of the line; in p × q The calculation window establishes a mathematical model and divides the calculation window into three regions: Left region: Middle area: Right region: ,in p It calculates the number of pixels in the height direction of the window. q It calculates the number of pixels in the width direction of the window. h Given pixel dimensions, the width of each region is evenly divided; the geometric areas of the three regions are: in, It is a constant used to translate the origin of the coordinate system of the calculation window to the center of the calculation window; The area of the left region is... The area of the middle region. The area of the right region; Set the background grayscale value to B Foreground grayscale value A The relationship between the sum of the actual gray values of the three regions and their geometric areas is established as follows: in, This represents the integral gray area of the left region. The integral gray area representing the middle region. The integral gray area of the right region is represented by the above calculations. coefficients in and ; For complex curved edges of the cutting tool, a quadratic curve model is adopted. The fitting process is the same as the solution process for the edge of an ideal straight line. , , All are fitting coefficients; The continuous, smooth edges of both the tool end face geometry and the side geometry are extracted to obtain a sub-pixel precision edge point sequence. s Represents sub-pixel edge points, s =1, 2, 3, ...; Identify and locate edge inflection points: in, Represents subpixel edge points s The gradient direction angle, Indicates the first s+ Gradient direction angle at one edge point Indicates the first s+ Gradient direction angles at two edge points; Indicates the first Vertical gradient values at sub-pixel edge points Indicates the first The horizontal gradient value at each sub-pixel edge point, where T is an empirical threshold; Based on the geometric definitions of the end face parameters and side face parameters of the tool under test, the required edge inflection points are located in the edge point sequence. The parameter values of the end face parameters and side face parameters of the tool under test are calculated in the pixel coordinates of the high-contrast image through coordinate operations. By establishing a direct correspondence between the image pixel coordinates and the actual physical dimensions, the true measured values of the tool's two-dimensional parameters are obtained.
[0037] To detect the chisel edge length of a stepped micro-tooth drill, a high-contrast image of the tool end face containing the chisel edge is obtained. Then, a sub-pixel edge extraction algorithm is used to extract continuous, smooth edges of the tool end face geometry, resulting in a sub-pixel precision edge point sequence. The inflection points at both ends of the chisel edge are located within this edge point sequence. After calculating the parameter values of the chisel edge in the pixel coordinates of the high-contrast image through coordinate operations, the direct correspondence between the image pixel coordinates and the actual physical dimensions is calculated. Finally, the true value of the chisel edge length can be measured.
[0038] The third step involves measuring parameters in the orthogonal plane of the tool space using the focusing depth method based on a sequence of images with uniform illumination. After acquiring a sequence of images with uniform illumination using a 2D camera, the improved Tenengrad focus evaluation function is used to calculate the focus evaluation value of each pixel in each image sequence. A higher focus evaluation value indicates that the pixel is sharper in the image. The convolution kernel of the improved Tenengrad focus evaluation function is: in for x Convolution kernel in the direction, for y Convolution kernel with specific orientation. To effectively suppress noise, an edge gradient orientation angle is introduced, resulting in the pixel's overall gradient value: The improved Tenengrad focus evaluation function is as follows: in, It calculates the window size. This represents the mean gradient within the window.
[0039] After obtaining the focus evaluation value of each pixel using the improved Tenengrad focus evaluation function, the position of the sequence image corresponding to the maximum focus evaluation value can be obtained using the extreme value search method. The position of the sequence image represents the depth information of the pixel. in, Here, represents the 3D depth position corresponding to the pixel, and g represents the frame number with the highest focus evaluation value. Indicates the first g Focus evaluation value of frame sequence images, Indicates the first g+ Focus evaluation value of a 1-frame image sequence. Indicates the first g- Focus evaluation value of a 1-frame image sequence. Indicates the first g The depth position corresponding to the frame. Indicates the first g+ The depth position corresponding to 1 frame Indicates the first g- The depth position corresponding to 1 frame This represents the distance between adjacent sequences.
[0040] Based on the depth position information of each pixel, the three-dimensional point cloud of the tool surface is reconstructed. After further Gaussian filtering to optimize the point cloud quality, the geometric parameters in the orthogonal plane of the tool space can be calculated using the reconstructed three-dimensional shape of the tool surface.
[0041] To detect the rake angle of the main cutting edge in a stepped micro-tooth drill, after obtaining a sequence of images of the main cutting edge rake angle under uniform illumination, an improved Tenengrad focus evaluation function is used to calculate the focus evaluation value of each pixel in each sequence of images. Then, based on the extreme value search method, the position of the sequence image corresponding to the maximum focus evaluation value of each pixel is obtained. A three-dimensional point cloud is generated based on the sequence image position corresponding to each pixel, and the quality of the three-dimensional point cloud is optimized using Gaussian filtering to restore the three-dimensional morphology of the main cutting edge rake angle. The angle of the main cutting edge rake angle is then calculated within the three-dimensional morphology. The fourth step is to evaluate the tool parameter measurement results based on a semantic model. Based on tool face parameters, tool side parameters, and parameters in the orthogonal plane of tool space, the tool state is evaluated using a parameter-state correlation evaluation function. in, D It is the overall health index of the cutting tool. l Indicates the measured number ofl One parameter, N It is the total number of evaluation parameters; H It is a built-in scoring function. Indicates the first l The actual values of each parameter Indicates the first l Standard values for each parameter Indicates the built-in tool's first l The allowable deviation threshold for each parameter; This indicates the reliability of the measurement results calculated based on image quality. Indicates the first l The relative importance of each parameter to the overall performance of the tool.
[0042] The tool condition assessment results are converted into executable maintenance instructions, and a maintenance priority score is calculated. K And normalize to the [0,100] interval: in, It is the overall health index of cutting tools D The normalized value, ; U Indicates the urgency of the current working condition of the cutting tool. ; The evaluation results are structured into semantic data according to the JSON-LD standard. Through a large language model of prompt words customized for device scenarios, the semantic data structure is semantically parsed and organized to output clear interpretation analysis and engineering decision suggestions.
[0043] It should be noted that the above descriptions are merely embodiments of the present invention. The scope of protection of the present invention is not limited to equivalent system structures or equivalent process changes described above. For those in the field or related fields, any local structural optimizations or functional module upgrades made based on the present invention are similarly included within the patent protection scope of the present invention.
Claims
1. A multi-dimensional visual inspection method for small cutting tools, characterized in that, The specific steps are as follows: The first step is to acquire high-contrast images and a sequence of images with uniform illumination; The second step involves measuring the tool end face parameters and tool side face parameters based on the high-contrast image using a sub-pixel edge extraction algorithm. The third step involves measuring parameters in the orthogonal plane of the tool space using the focusing depth method based on a sequence of images with uniform illumination. The fourth step is to evaluate the tool parameter measurement results based on the semantic model. Based on the tool end face parameters, tool side surface parameters, and parameters in the orthogonal plane of tool space, the tool state is evaluated through a parameter-state correlation evaluation function. The tool condition assessment results are converted into maintenance instructions, and a maintenance priority score is calculated. K And normalize to the [0,100] interval: in, It is the overall health index of cutting tools D The normalized value, ; U Indicates the urgency of the current working condition of the cutting tool. ; The evaluation results are structured into semantic data according to the JSON-LD standard. Through a large language model of prompt words customized for device scenarios, the semantic data is semantically parsed and organized to output clear interpretation analysis and engineering decision suggestions.
2. The multi-dimensional visual inspection method for small cutting tools according to claim 1, characterized in that, The high-contrast image acquisition is as follows: Adjust the two-dimensional camera (2) and the tool control system so that the two-dimensional camera (2) can capture the geometric features of the tool end face and the geometric features of the tool side face; Adjust the LED light source (7) so that its light is perpendicular to the plane to be measured by the tool. The LED light source (7) is in the first position. i The luminous flux incident on a unit receiving area by a single LED bead With observation angle θ It is proportional to the cosine function. i =1,2,…, n , n The total number of LED beads: in, For the first i The normal luminous intensity of each LED is constrained between 0 and the maximum illuminance. Within the interval, r The spatial distance between the measured point and the LED bead; To meet the imaging requirements of different geometric features of the cutting tool, an optimal lighting combination of LED light source (7) is found through an imaging optimization lighting control strategy based on convex optimization. High-contrast images of the geometric features of the tool end face and the geometric features of the tool side face are acquired under the optimal lighting combination. in, I It is the optimal combination of light sources to be solved. It is the distribution of light reflected from the surface of an actual object into a two-dimensional camera. It is based on the target reflectance distribution preset in the measurement scene. It is the minimum value.
3. The multi-dimensional visual inspection method for small cutting tools according to claim 1, characterized in that, The sequence of images of uniform illumination is acquired as follows: the three-dimensional camera (3) and the tool control system are adjusted so that the imaging focus of the three-dimensional camera (3) is located below the geometric features to be measured on the tool and is in a defocused state; Under the uniform diffused illumination provided by the dome light source (8), the sliding table electric cylinder a (12) is controlled to maintain a fixed step size. d Moving, 3D camera (3) acquisition c Zhang sequence images; during the acquisition process, the three-dimensional camera (3) images through different positions of the geometric features to be measured by the tool, from defocusing to focusing and then defocusing again; the acquisition ends after the three-dimensional camera (3) defocuses again, thus completing the acquisition of sequence images of uniform illumination of the geometric features of the orthogonal plane in the space of the tool.
4. The multi-dimensional visual inspection method for small cutting tools according to claim 1, characterized in that, The second step is specifically: based on the local gray area effect fitting, a sub-pixel edge extraction algorithm is implemented to extract the geometric feature edges of the tool end face and the geometric feature edges of the tool side face where the two-dimensional parameters to be measured of the tool are located; Using a linear function Fit the edge of an ideal straight line, where It is the slope of an ideal straight line. It is the y-intercept of the ideal straight line; in p × q The calculation window establishes a mathematical model and divides the calculation window into three regions: Left region: Middle area: Right region: ,in p It calculates the number of pixels in the height direction of the window. q It calculates the number of pixels in the width direction of the window. h The width of each region is evenly divided into pixels. The geometric areas of the three regions are: in, It is a constant used to translate the origin of the coordinate system of the calculation window to the center of the calculation window; The area of the left region is... The area of the middle region. The area of the right region; Set the background grayscale value to B Foreground grayscale value A The relationship between the sum of the actual gray values of the three regions and their geometric areas is established as follows: in, This represents the integral gray area of the left region. The integral gray area representing the middle region. The integral gray area of the right region is represented by the above calculations. coefficients in and ; For complex curved edges of the cutting tool, a quadratic curve model is adopted. The fitting process is the same as the solution process for the edge of an ideal straight line. , , All are fitting coefficients; The continuous, smooth edges of both the tool end face geometry and the tool side geometry are extracted to obtain a sub-pixel precision edge point sequence. s Represents sub-pixel edge points, s =1,2,3,…; Identify and locate edge inflection points in the edge point sequence: in, Represents subpixel edge points s The gradient direction angle, Indicates the first s+ Gradient direction angle at one edge point Indicates the first s+ Gradient direction angles at two edge points; Indicates the first Vertical gradient values at sub-pixel edge points Indicates the first The horizontal gradient value at each sub-pixel edge point, where T is an empirical threshold; Based on the geometric definitions of the end face parameters and side face parameters of the tool under test, the required edge inflection points are located in the edge point sequence. The parameter values of the end face parameters and side face parameters of the tool under test are calculated in the pixel coordinates of the high-contrast image through coordinate operations. By establishing a direct correspondence between the image pixel coordinates and the actual physical dimensions, the true measured values of the tool's two-dimensional parameters are obtained.
5. The multi-dimensional visual inspection method for small cutting tools according to claim 1, characterized in that, The third step of the focusing depth method specifically involves: after acquiring a sequence of images with uniform illumination using a 3D camera (3), calculating the focusing evaluation value of each pixel in each sequence image using the improved Tenengrad focusing evaluation function; the convolution kernel of the improved Tenengrad focusing evaluation function is: in for x Convolution kernel in the direction, for y Convolution kernel in the direction; the combined gradient value of the pixels is: The improved Tenengrad focus evaluation function is as follows: in, It is the side length of the square calculation window. The gradient mean is calculated within a square calculation window; The improved Tenengrad focus evaluation function is used to obtain the focus evaluation value of each pixel. Then, based on the extreme value search method, the position of the sequence image corresponding to the maximum focus evaluation value is obtained. This position represents the depth information of the pixel. in, Here, represents the 3D depth position corresponding to the pixel, and g represents the frame number with the highest focus evaluation value. Indicates the first g Focus evaluation value of frame sequence images, Indicates the first g+ Focus evaluation value of a 1-frame image sequence. Indicates the first g- Focus evaluation value of a 1-frame image sequence. Indicates the first g The depth position corresponding to the frame. Indicates the first g+ The depth position corresponding to 1 frame Indicates the first g- The depth position corresponding to 1 frame Distance between adjacent sequences; Based on the depth position information of each pixel, a three-dimensional point cloud of the tool surface is generated. After Gaussian filtering to optimize the three-dimensional point cloud data of the tool surface, the three-dimensional shape of the tool surface is restored. Based on the three-dimensional shape of the tool surface, the geometric parameters of the tool in the orthogonal plane in space are calculated.
6. The multi-dimensional visual inspection method for small cutting tools according to claim 1, characterized in that, The parameter-state correlation evaluation function is: in, D It is the overall health index of the cutting tool. l Indicates the measured number of l One parameter, N It is the total number of evaluation parameters; H It is a built-in scoring function. Indicates the first l The actual values of each parameter Indicates the first l Standard values for each parameter Indicates the built-in tool's first l The allowable deviation threshold for each parameter; This indicates the reliability of the measurement results calculated based on image quality. Indicates the first l The relative importance of each parameter to the overall performance of the tool.
7. A multi-dimensional vision inspection system for small cutting tools, characterized in that, The multi-dimensional small cutting tool visual inspection method according to any one of claims 1-6 is applied; the multi-dimensional small cutting tool visual inspection system includes a visual measurement system and a tool control system; The vision measurement system and the tool control system are integrated inside an integrated housing (1) to form a closed detection unit; The visual measurement system includes a two-dimensional camera (2), a three-dimensional camera (3), a linear guide slide (4), a dual telecentric lens (5), a microscope lens (6), an LED light source (7), and a dome light source (8); the linear guide slide (4) is fixed on an integrated housing (1), and the two-dimensional camera (2) and the microscope lens (6) are integrated on the linear guide slide (4); the two-dimensional camera (2) and the dual telecentric lens (5) are connected through a standard camera lens interface; the LED light source (7) and the dual telecentric lens (5) are placed coaxially; the three-dimensional camera (3) and the microscope lens (6) are connected through a standard camera lens interface; the dome light source (8) and the microscope lens (6) are placed coaxially; the two-dimensional camera (2), the three-dimensional camera (3), the dual telecentric lens (5), the microscope lens (6), the LED light source (7), and the dome light source (8) are moved vertically along the linear guide slide (4) by the rotation of a motor; The tool control system includes a tool holder (9), a holder support (10), a rotary slide (11), a slide cylinder a (12), and a slide cylinder b (13). The tool holder (9) is used to fix the tool and controls the tool to rotate along its own axis through a motor on it. The tool holder (9) is connected to the holder support (10) below, and the tool holder (9) is controlled to rotate through a motor on the holder support (10). The holder support (10) is connected to the rotary slide (11) below, and the holder support (10) is controlled to rotate through a motor on the rotary slide (11). The slide cylinder a (12) and slide cylinder b (13) are arranged vertically and guided by linear guide rails to drive the tool holder (9), the holder support (10), and the rotary slide (11) to translate in two directions. The relative positions of the two-dimensional camera (2) and the three-dimensional camera (3) in the vision measurement system with the tool control system are fixed.
8. The multi-dimensional small cutting tool vision inspection system according to claim 7, characterized in that, The LED light source (7) provides adaptive illumination to a designated area by adjusting the light field distribution.