Automatic tool setting method of inspection machine based on visual identification
Through visual recognition and multi-sensor technology, a high-precision three-dimensional tool model is formed, wear characteristics are identified and automatic compensation is performed, which solves the problems of insufficient tool adjustment accuracy and inaccurate wear recognition in the existing technology, and achieves efficient tool adjustment and wear compensate.
Patent Information
- Application Number
- CN202411341136.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-11-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing automatic tool adjustment technology has problems such as insufficient accuracy, inaccurate wear feature recognition and inability to achieve automatic compensation in tool status recognition and adjustment, which affects the processing effect.
The automatic tool adjustment method of the product inspection machine based on visual recognition is adopted. The initial state data and image data are collected through multiple sensors, a three-dimensional model is formed, the tool position error is analyzed, and the wear characteristics are identified using deep learning algorithms to perform automatic compensation.
Accurate evaluation of tool three-dimensional position, angle and wear characteristics is achieved, providing efficient tool adjustment and wear compensation, ensuring machining accuracy and efficiency.
Smart Images

Figure CN118977137A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of automated processing, in particular to an automatic tool adjustment method for a product inspection machine based on visual recognition. Background Art
[0002] As modern manufacturing industry continues to improve its requirements for product quality and processing accuracy, automated processing technology has been widely used, especially in high-precision and high-efficiency manufacturing processes, where the status and performance of the tool directly affect the processing quality and production efficiency. In traditional mechanical processing, manual inspection of tool status and adjustment of tool position are common means, but these methods have obvious limitations, such as manual operation errors, low efficiency, and limitations on operator experience.
[0003] Although the existing automatic tool adjustment technology has made certain progress, there are still some problems that need to be solved urgently. First, many existing technologies rely on a single sensor or camera data in the process of identifying and adjusting the tool status, resulting in insufficient data integrity and accuracy, making it difficult to achieve a comprehensive assessment of the tool status. Secondly, the existing automatic tool adjustment technology generally lacks in-depth analysis of tool wear characteristics, and it is difficult to deal with the problem of reduced cutting accuracy caused by tool wear by simply adjusting the position information. Moreover, traditional tool adjustment methods often ignore the automatic compensation for tool wear, resulting in the inability to adjust the tool in a timely manner when it is worn, affecting the processing effect. Summary of the invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides an automatic tool adjustment method for an inspection machine based on visual recognition to solve the problems of insufficient precision, inaccurate identification of wear characteristics and inability to achieve automatic compensation in the tool adjustment process in the prior art.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides a method for automatic tool adjustment of a product inspection machine based on visual recognition, which includes collecting initial state data and image data of a tool;
[0008] Fusing the initial state of the tool and the image data to form a reconstructed 3D model;
[0009] Based on the 3D model, the error between the current spatial position of the tool and the expected position is analyzed;
[0010] Automatically adjust the position and angle of the tool based on the analysis results;
[0011] Use deep learning algorithms to identify the adjusted tool wear characteristics and output wear assessment results;
[0012] Based on the wear assessment results, determine whether the tool wear needs to be compensated.
[0013] As a preferred solution of the automatic tool adjustment method of the inspection machine based on visual recognition of the present invention, wherein: the starting of the multi-sensor and collecting the initial state data of the tool includes the following steps:
[0014] The visual sensor uses an edge detection algorithm to extract the shape contour of the tool;
[0015] The laser displacement sensor collects the spatial distance data between the tool and the sensor and performs smoothing processing;
[0016] The vibration sensor monitors the vibration of the tool in real time and performs a fast Fourier transform to convert the time domain signal into a frequency domain signal;
[0017] The torque sensor detects the cutting torque generated when the tool contacts the workpiece, removes noise through Fourier transform filtering, extracts effective low-frequency signals, combines frequency analysis of vibration signals, and fused multi-dimensional data to obtain the tool's initial three-dimensional position, angle, cutting force, and vibration state.
[0018] As a preferred solution of the automatic tool adjustment method of the inspection machine based on visual recognition of the present invention, wherein: the activation of the multi-angle camera array to collect image data of the tool from multiple viewing angles includes the following steps:
[0019] Based on the initial three-dimensional position, angle, cutting force and vibration state information of the tool, the multi-angle camera array is activated to capture the image data of the tool from different angles and record them as a two-dimensional matrix;
[0020] By extracting key feature points from the image data, and using the SIFT algorithm to match the corresponding feature points in images at different angles.
[0021] As a preferred solution of the automatic tool adjustment method for a product inspection machine based on visual recognition of the present invention, the fusing of the initial state of the tool and the image data to form a reconstructed three-dimensional model includes the following steps:
[0022] Based on the initial state data of the tool, align the camera's viewing angle and position with the initial state data, and calibrate the camera's internal and external parameters;
[0023] By matching feature points of two cameras in a three-dimensional geometric layout, the Z coordinate of the point in three-dimensional space is calculated;
[0024] Use the camera's intrinsic parameters and the pixel coordinates of the matched feature points to calculate the X and Y coordinates of the point in three-dimensional space;
[0025] The weighted average method is used to fuse the 3D coordinate data from different perspectives to form a 3D point cloud model of the tool and perform post-processing.
[0026] As a preferred solution of the automatic tool adjustment method of the inspection machine based on visual recognition of the present invention, wherein: based on the three-dimensional model, analyzing the error between the current spatial position of the tool and the expected position includes the following steps:
[0027] The geometric data of the tool in its original state is obtained through a laser scanner, and a standard tool model is generated according to the design specifications;
[0028] By calculating the Euclidean distance point by point, the position deviation of each feature point in the reconstructed model and the standard model is analyzed;
[0029] Using a point-by-point comparison method, each feature point in the 3D model is compared with the corresponding feature point in the standard model to evaluate the deviation between the two.
[0030] Set the allowable deviation threshold according to the functional requirements and manufacturing tolerance range of the tool, and conduct a comprehensive evaluation of the deviations of all feature points based on the deviation calculation results of each feature point;
[0031] According to the comprehensive evaluation results of the deviation, a deviation heat map and a deviation vector map are established;
[0032] The deviation value of each feature point is mapped to a color, and the deviation vector of each feature point is displayed on the 3D model.
[0033] As a preferred solution of the automatic tool adjustment method of the inspection machine based on visual recognition described in the present invention, wherein: according to the analysis result, automatically adjusting the position and angle of the tool includes the following steps:
[0034] According to the deviation results between the three-dimensional model of the tool and the standard model, the translation and rotation angle errors of the tool are calculated;
[0035] According to the calculated translation and rotation angle errors, the displacement and rotation parameters that need to be adjusted for the tool are obtained and adjustment suggestions are generated;
[0036] The translation error is calculated according to the translation amount of the tool, and the translation error is transmitted to the servo system to adjust the XY plane position of the tool;
[0037] The pitch angle, rotation angle of the tool and the cutting distance between the tool and the workpiece are adjusted according to the error data.
[0038] As a preferred solution of the automatic tool adjustment method for a product inspection machine based on visual recognition described in the present invention, the following steps are included: using a deep learning algorithm to identify the wear characteristics of the adjusted tool and outputting the wear assessment results:
[0039] The adjusted tool surface is imaged at multiple angles and resolutions using a camera;
[0040] Based on the deep learning model, it can identify the areas where material wear occurs on the tool surface, the tiny cracks on the tool surface, and the areas where the tool edge gradually becomes blunt.
[0041] Classify the identified features and output the area, location and severity of each type of feature;
[0042] According to the classification results, the wear degree of the tool is scored, and the expression is:
[0043]
[0044] Among them, S wear A is the wear score of the tool. w is the area of the wear region, L c is the total crack length, L total is the total length of the tool, A b is the area of the passivation region, A total is the total area of the tool;
[0045] Combining the tool wear score results, translation error and angular error, the overall health status of the tool is comprehensively evaluated, and the expression is:
[0046]
[0047] Among them, S total Score the overall health of the tool, T xy is the translation error of the tool, T max is the maximum allowable error, θ P is the pitch angle of the tool, θ R is the tool rotation angle error, θ max is the maximum permissible angular error.
[0048] As a preferred solution of the automatic tool adjustment method of the inspection machine based on visual recognition described in the present invention, wherein: judging whether it is necessary to compensate for the wear of the tool according to the wear evaluation result includes the following steps:
[0049] Set the overall health status score threshold. When the overall health status score is greater than the threshold, it indicates that tool wear and geometric errors have affected the cutting accuracy, and compensation and correction are required.
[0050] Recalculate the tool's motion path for the tool's translation error and angle error;
[0051] Adjust the cutting depth of the tool for wear and passivation on the tool surface;
[0052] Based on the wear assessment results, the cutting angle of the tool is adjusted and the corrected tool status data is output.
[0053] In a second aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the method for automatic tool adjustment of an inspection machine based on visual recognition as described in the first aspect of the present invention is implemented.
[0054] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the method for automatic tool adjustment of an inspection machine based on visual recognition as described in the first aspect of the present invention is implemented.
[0055] The beneficial effects of the present invention are as follows: by collecting the initial state data of the tool through multiple sensors, and combining with visual sensors, laser displacement sensors and vibration sensors, etc., accurate evaluation of the three-dimensional position, angle, cutting force and vibration state of the tool is achieved; the multi-angle camera array is activated to collect multi-view image data of the tool, and the SIFT algorithm is used to match feature points, thereby solving the problem of incomplete information under a single view; by fusing the initial state data with the multi-angle image data, a high-precision three-dimensional model of the tool is reconstructed, laying the foundation for subsequent error analysis; the system analyzes the error between the spatial position and the standard position of the tool point by point, generates a deviation heat map and a vector map, intuitively displays the deviation of the tool, provides accurate error data, provides a basis for automatic tool adjustment, and ensures efficient adjustment and wear compensation of the tool. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0057] Figure 1 This is a flow chart of the automatic tool adjustment method of the inspection machine based on visual recognition in Example 1.
[0058] Figure 2 This is the decision diagram for tool health status assessment in Example 1. DETAILED DESCRIPTION
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0060] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0061] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0062] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides an automatic tool adjustment method for an inspection machine based on visual recognition, comprising the following steps:
[0063] S1. Start the multi-sensor and collect the initial state data of the tool, including the following steps:
[0064] The visual sensor uses an edge detection algorithm to extract the shape contour of the tool; the laser displacement sensor collects the spatial distance data between the tool and the sensor and performs smoothing; the vibration sensor monitors the vibration of the tool in real time and performs fast Fourier transform to convert the time domain signal into a frequency domain signal; the torque sensor detects the cutting torque generated when the tool contacts the workpiece, removes noise through Fourier transform filtering, extracts effective low-frequency signals, combines the frequency analysis of the vibration signal, and uses multi-dimensional data fusion to derive the initial three-dimensional position, angle, cutting force and vibration state of the tool.
[0065] S2, activating the multi-angle camera array to collect image data of the tool from multiple perspectives includes the following steps:
[0066] Based on the initial three-dimensional position, angle, cutting force and vibration state information of the tool, the multi-angle camera array is activated to capture the image data of the tool from different angles (for example, the front, side, top) and record it as a two-dimensional matrix; by extracting key feature points in the image data (such as the edge of the tool, the position of the blade, etc.), and using the SIFT (Scale-Invariant Feature Transform) algorithm to match the corresponding feature points in images at different angles.
[0067] Furthermore, based on the tool’s initial three-dimensional position, angle, cutting force, and vibration status information, the system selects the appropriate multi-angle camera array to determine which cameras can capture the tool’s image from the best angle.
[0068] Furthermore, a global synchronization mechanism is adopted to enable all cameras to obtain multi-angle images of the tool within the same time frame; the automatic exposure control algorithm is enabled to automatically adjust the exposure time according to the light intensity in the camera's field of view, and by calculating the brightness histogram of the current image, it is determined whether the exposure is too high or too low, and the exposure time is adjusted in real time to optimize the image brightness; the automatic white balance algorithm is used to analyze the color distribution in the image, and the gain coefficients of the red, green, and blue channels are automatically adjusted to make the white objects in the image close to the natural white, avoiding color distortion caused by the difference in color temperature of the light source; the image is processed at multiple scales through the Gaussian pyramid to generate image pyramids of different scales; in images of different scales, the system identifies potential feature points by detecting local extreme points of the image; each potential feature point is accurately located, and points with strong edge response but weak features are filtered out. By calculating the principal curvature of the Hessian matrix, the system can determine whether the point is located at the edge and filter it by setting a threshold; for the retained feature points, the orientation histogram of the gradient around it is calculated. Histogram) generates feature descriptors. The descriptor of each feature point is composed of the gradient direction and intensity in its neighborhood, forming a 128-dimensional feature vector. The Euclidean distance between feature descriptors is used as the matching criterion to calculate the Euclidean distance between adjacent feature point descriptors. Image registration is performed by minimizing the Euclidean distance error of corresponding feature points in different images.
[0069] Furthermore, the multi-angle camera array is arranged in a surround layout, combining multi-perspective distribution of horizontal perspective, vertical perspective and oblique perspective. Cameras in different directions such as front, side and top ensure all-round capture of tool surface features. There is enough overlapping area between the field of view of each camera to match key feature points in the image. The angle difference and baseline distance between cameras need to be appropriate to ensure stereoscopic visual effect and the accuracy of the three-dimensional point cloud model.
[0070] S3, fusing the initial state of the tool and the image data to form a reconstructed three-dimensional model includes the following steps:
[0071] Based on the initial state data of the tool, the camera's viewing angle and position are aligned with the initial state data, and the camera's internal and external parameters are calibrated. The Z coordinate of the point in three-dimensional space is calculated by matching feature points of two cameras in a three-dimensional geometric layout. The X and Y coordinates of the point in three-dimensional space are calculated using the camera's internal parameters and the pixel coordinates of the matched feature points. The weighted average method is used to fuse the three-dimensional coordinate data from different viewing angles to form a three-dimensional point cloud model of the tool and perform post-processing.
[0072] Furthermore, the camera intrinsic parameters mainly describe the internal optical properties of the camera, including the focal length in the x-axis and y-axis directions, the coordinates of the intersection of the optical axis and the image coordinate system on the image plane, and the pixel scaling factor; the camera extrinsic parameters mainly describe the position and orientation of the camera in three-dimensional space, including the rotation matrix and translation vector.
[0073] The post-processing operations are as follows:
[0074] Use Gaussian filters to smooth the point cloud data and remove discrete points caused by measurement noise. When the point cloud data is too dense, it is thinned out through voxelization and other methods to reduce redundant points while maintaining the geometric structure of the model. The normal vector is calculated for each point through the geometric relationship of the local neighborhood of the point cloud. Based on the point cloud data, a variety of algorithms (such as Poisson surface reconstruction, Delaunay triangulation, etc.) can be used to reconstruct the three-dimensional surface model of the tool to provide high-precision geometry for subsequent error comparison.
[0075] Furthermore, stereo geometry layout refers to appropriate baseline distance, appropriate view difference, accurate camera calibration, sufficient field of view overlap, avoidance of occlusion, and reasonable working distance between the camera and the tool.
[0076] An appropriate baseline distance means that the physical distance between the two cameras should not be too small or too large. A too small baseline distance will result in unclear stereoscopic visual effects and difficulty in accurately calculating the depth (Z coordinate); while a too large baseline distance may make it difficult to match feature points and affect the accuracy of 3D reconstruction. For small tools (e.g., less than 10 cm in length), the baseline distance should be set to 5 cm to 15 cm; for medium-sized tools (e.g., between 10 cm and 50 cm in length), the baseline distance can be set to 15 cm to 40 cm; for large tools (greater than 50 cm in length), the baseline distance can be set to 40 cm to 80 cm.
[0077] Appropriate perspective difference means that the distance between the camera and the tool needs to be adjusted according to the size of the tool and the resolution of the camera. A distance that is too close may cause the camera's field of view to be too small and unable to capture the full picture of the tool; a distance that is too far may result in insufficient image resolution, affecting the extraction and matching of feature points. The recommended range of perspective difference: generally 5° to 30°. For small tools, the angle difference can be set to 15° to 30° to ensure that sufficient parallax can still be obtained at a short baseline distance. For medium-sized tools, the angle difference can be set to 10° to 20°. For large tools, the angle difference can be set to 5° to 15°, because when the baseline distance is large, excessive perspective difference may cause the overlapping area of feature points to be too small.
[0078] Accurate camera calibration refers to determining their intrinsic parameters (such as focal length, optical center position, distortion coefficient) and extrinsic parameters (such as relative position and rotation relationship between cameras). The intrinsic parameters of the camera determine the optical characteristics of each camera itself, while the extrinsic parameters are used to describe the relative position and posture between two cameras. Through calibration, it is ensured that the image data of the two cameras can accurately correspond to points in three-dimensional space. According to the specifications of the camera, the typical focal length ranges from 8mm to 50mm. For medium working distances and common industrial cameras, the focal length is generally set to 12mm to 25mm. The optical center position is usually located at the center of the sensor. Assuming the resolution of the sensor is 1920x1080, the optical center position can be set to (960,540). The typical distortion coefficient can be obtained through calibration, usually in the range of -0.5 to 0.5, depending on the quality of the lens. The rotation matrix is set according to the relative angle of the camera, and the displacement vector is directly determined by the baseline distance. For example, if the baseline distance is 20cm, the displacement vector can be set to (0.2,0,0), depending on the specific coordinate system definition.
[0079] Sufficient field of view overlap means that in order to ensure the success rate of feature point matching, the overlap ratio of the field of view should be greater than 50%, and the camera's field of view should cover key areas of the tool, such as the cutting edge and contour. For small tools, the field of view overlap area should cover 60% to 70% of the tool surface, for medium-sized tools, the field of view overlap area should cover 50% to 60%, and for large tools, the field of view overlap area should cover about 50%.
[0080] Avoiding occlusion means that when arranging the cameras, objects that block key parts of the tool (such as the cutting edge or tool surface features) should be avoided as much as possible. For small tools, the viewing angle should be kept above and to the side of the tool to avoid frontal occlusion. For large tools, more cameras can be arranged to capture different parts of the tool from different angles to ensure that key surfaces are not blocked.
[0081] The reasonable working distance between the camera and the tool means that the distance between the camera and the tool should be adjusted according to the size of the specific tool and the resolution of the camera to ensure that both the overall picture of the tool and sufficient detail features can be captured. For small tools, the working distance can be set to 15cm to 30cm, for medium-sized tools, the working distance can be set to 30cm to 60cm, and for large tools, the working distance can be set to 60cm to 100cm. The resolution should be at least 1920x1080, and higher-precision applications can use 4K (3840x2160) and above resolutions.
[0082] S4. Analyzing the error between the current spatial position of the tool and the desired position based on the three-dimensional model includes the following steps:
[0083] The geometric data of the tool in its original state is acquired through a laser scanner, and a standard tool model is generated according to the design specifications; the position deviation of each feature point in the reconstructed model and the standard model is analyzed by calculating the Euclidean distance point by point; each feature point in the 3D model is compared with the corresponding feature point in the standard model by a point-by-point comparison method to evaluate the deviation between the two; the allowable deviation threshold is set according to the functional requirements and manufacturing tolerance range of the tool, and the deviation of all feature points is comprehensively evaluated based on the deviation calculation result of each feature point; based on the comprehensive evaluation result of the deviation, a deviation heat map and a deviation vector map are established; the deviation value of each feature point is mapped to a color, and the deviation vector of each feature point is displayed on the 3D model.
[0084] Furthermore, the deviation includes spatial deviation, average deviation and maximum deviation.
[0085] The spatial deviation is calculated by the three-dimensional Euclidean distance formula, which is expressed as:
[0086]
[0087] Where ΔP j is the spatial error of the jth feature point, (X j , Y j , Z j ) is the coordinate of the jth feature point in the reconstructed model, (X std,j , Y std,j , Z std,j ) are the coordinates of the corresponding feature points in the standard model.
[0088] The average deviation represents the average value of the spatial deviations of all feature points and is used to evaluate the overall error distribution. The expression is:
[0089]
[0090] Where n is the total number of feature points, ΔP avg is the average deviation, which reflects the deviation of the overall geometry of the tool. If ΔP avg If it is larger, it means that the overall position or shape of the tool may have been significantly offset or deformed.
[0091] If the average deviation is within the allowable error range, it indicates that the overall condition of the tool meets the requirements, and the system can determine that the geometry of the tool is within an acceptable range; if the average deviation exceeds the allowable error threshold, it indicates that the shape or position deviation of the tool is large, and the system needs to issue a warning to prompt the operator to conduct further inspection or adjustment.
[0092] The maximum deviation indicates the point with the largest deviation among all feature points. It is usually used to identify the area where large deformation or wear occurs locally on the tool. The expression is:
[0093] ΔP max =max(ΔP1,ΔP2,...,ΔP n );
[0094] Among them, ΔP max It is the maximum error of the tool in a certain local area. If the value is too large, it means that the tool has been severely worn or damaged in this area and needs special attention.
[0095] S5. According to the analysis results, the position and angle of the tool are automatically adjusted, including the following steps:
[0096] Based on the deviation results between the tool 3D model and the standard model, the tool's translation and rotation angle errors are calculated; based on the calculated translation and rotation angle errors, the displacement and rotation parameters that need to be adjusted for the tool are obtained and adjustment suggestions are generated; based on the tool's translation, the translation error is calculated and the translation error is transmitted to the servo system to adjust the tool's XY plane position; based on the error data, the tool's pitch angle, rotation angle and cutting distance between the tool and the workpiece are adjusted.
[0097] S6. Using the deep learning algorithm to identify the adjusted tool wear characteristics and output the wear assessment results includes the following steps:
[0098] The camera is used to collect images of the adjusted tool surface at multiple angles and resolutions. Based on the deep learning model, the areas where material wear occurs on the tool surface, the tiny cracks on the tool surface, and the areas where the tool edge gradually becomes blunt are identified. The identified features are classified and the area, location, and severity of each type of feature are output. Based on the classification results, the wear degree of the tool is scored, and the expression is:
[0099]
[0100] Among them, S wear A is the wear score of the tool. w is the area of the wear region, L c is the total crack length, L total is the total length of the tool, A b is the area of the passivation region, A total is the total area of the tool;
[0101] Combining the tool wear score results, translation error and angular error, the overall health status of the tool is comprehensively evaluated, and the expression is:
[0102]
[0103] Among them, S total Score the overall health of the tool, Txy is the translation error of the tool, T max is the maximum allowable error, θ P is the pitch angle of the tool, θ R is the tool rotation angle error, θ max is the maximum permissible angular error.
[0104] Furthermore, by analyzing the historical distribution of tool wear scores and overall health status scores, the comprehensive health status score threshold is defined as S based on the tool life and performance in actual use. th , when S total th When S total >S th When the system issues a warning, the operator is prompted to make additional tool adjustments.
[0105] S7. According to the wear assessment result, judging whether it is necessary to compensate for the wear of the tool includes the following steps:
[0106] Set an overall health status score threshold. When the overall health status score is greater than the threshold, it indicates that tool wear and geometric errors have affected the cutting accuracy, and compensation and correction are performed. For the translation error and angle error of the tool, recalculate the tool's motion path. For wear and passivation on the tool surface, adjust the tool's cutting depth. Based on the wear assessment results, adjust the tool's cutting angle and output the corrected tool status data.
[0107] This embodiment also provides a computer device, which is suitable for the automatic tool adjustment method of a product inspection machine based on visual recognition, and includes: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the automatic tool adjustment method of a product inspection machine based on visual recognition as proposed in the above embodiment.
[0108] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0109] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for automatically adjusting the tool of an inspection machine based on visual recognition proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0110] In summary, the present invention collects the initial state data of the tool through multiple sensors, and combines visual sensors, laser displacement sensors and vibration sensors, etc., to achieve accurate evaluation of the three-dimensional position, angle, cutting force and vibration state of the tool; activates the multi-angle camera array, collects multi-view image data of the tool, and uses the SIFT algorithm to match feature points, thereby solving the problem of incomplete information under a single view; by fusing the initial state data with the multi-angle image data, a high-precision three-dimensional model of the tool is reconstructed, laying the foundation for subsequent error analysis; the system analyzes the error between the spatial position and the standard position of the tool point by point, generates a deviation heat map and a vector map, intuitively displays the deviation of the tool, provides accurate error data, provides a basis for automatic tool adjustment, and ensures efficient adjustment and wear compensation of the tool.
[0111] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for automatic tool adjustment of a product inspection machine based on visual recognition, characterized in that: include, Collect the initial state data and image data of the tool; Fusing the initial state of the tool and the image data to form a reconstructed 3D model; Based on the 3D model, the error between the current spatial position of the tool and the expected position is analyzed; Automatically adjust the position and angle of the tool based on the analysis results; Use deep learning algorithms to identify the adjusted tool wear characteristics and output wear assessment results; Based on the wear assessment results, determine whether the tool wear needs to be compensated.
2. The automatic tool adjustment method for a product inspection machine based on visual recognition as claimed in claim 1, characterized in that: The method of starting the multi-sensor and collecting the initial state data of the tool includes the following steps: The visual sensor uses an edge detection algorithm to extract the shape contour of the tool; The laser displacement sensor collects the spatial distance data between the tool and the sensor and performs smoothing processing; The vibration sensor monitors the vibration of the tool in real time and performs a fast Fourier transform to convert the time domain signal into a frequency domain signal; The torque sensor detects the cutting torque generated when the tool contacts the workpiece, removes noise through Fourier transform filtering, extracts effective low-frequency signals, combines frequency analysis of vibration signals, and fused multi-dimensional data to obtain the tool's initial three-dimensional position, angle, cutting force, and vibration state.
3. The automatic tool adjustment method for a product inspection machine based on visual recognition as claimed in claim 2, characterized in that: The method of activating the multi-angle camera array to collect image data of the tool from multiple viewing angles comprises the following steps: Based on the initial three-dimensional position, angle, cutting force and vibration state information of the tool, the multi-angle camera array is activated to capture the image data of the tool from different angles and record them as a two-dimensional matrix; By extracting key feature points from the image data, and using the SIFT algorithm to match the corresponding feature points in images at different angles.
4. The automatic tool adjustment method for a product inspection machine based on visual recognition as claimed in claim 3, characterized in that: The fusing of the initial state of the tool and the image data to form a reconstructed three-dimensional model comprises the following steps: Based on the initial state data of the tool, align the camera's viewing angle and position with the initial state data, and calibrate the camera's internal and external parameters; By matching feature points of two cameras in a three-dimensional geometric layout, the Z coordinate of the point in three-dimensional space is calculated, and the X and Y coordinates of the point in three-dimensional space are calculated using the intrinsic parameters of the camera and the pixel coordinates of the matched feature points; The weighted average method is used to fuse the 3D coordinate data from different perspectives to form a 3D point cloud model of the tool and perform post-processing.
5. The automatic tool adjustment method for a product inspection machine based on visual recognition as claimed in claim 4, characterized in that: Based on the 3D model, analyzing the error between the current spatial position of the tool and the expected position includes the following steps: The geometric data of the tool in its original state is obtained through a laser scanner, and a standard tool model is generated according to the design specifications; By calculating the Euclidean distance point by point, the position deviation of each feature point in the reconstructed model and the standard model is analyzed; Using a point-by-point comparison method, each feature point in the 3D model is compared with the corresponding feature point in the standard model to evaluate the deviation between the two. Set the allowable deviation threshold according to the functional requirements and manufacturing tolerance range of the tool, and conduct a comprehensive evaluation of the deviations of all feature points based on the deviation calculation results of each feature point; According to the comprehensive evaluation results of the deviation, a deviation heat map and a deviation vector map are established; The deviation value of each feature point is mapped to a color, and the deviation vector of each feature point is displayed on the 3D model.
6. The automatic tool adjustment method for a product inspection machine based on visual recognition as claimed in claim 5, characterized in that: According to the analysis results, the automatic adjustment of the tool position and angle includes the following steps: According to the deviation results between the three-dimensional model of the tool and the standard model, the translation and rotation angle errors of the tool are calculated; According to the calculated translation and rotation angle errors, the displacement and rotation parameters that need to be adjusted for the tool are obtained and adjustment suggestions are generated; The translation error is calculated according to the translation amount of the tool, and the translation error is transmitted to the servo system to adjust the XY plane position of the tool; The pitch angle, rotation angle of the tool and the cutting distance between the tool and the workpiece are adjusted according to the error data.
7. The automatic tool adjustment method for a product inspection machine based on visual recognition as claimed in claim 6, characterized in that: Using deep learning algorithms to identify the adjusted tool wear characteristics and output wear assessment results includes the following steps: The adjusted tool surface is imaged at multiple angles and resolutions using a camera; Based on the deep learning model, it can identify the areas where material wear occurs on the tool surface, the tiny cracks on the tool surface, and the areas where the tool edge gradually becomes blunt. Classify the identified features and output the area, location and severity of each type of feature; According to the classification results, the wear degree of the tool is scored, and the expression is: Among them, S wear A is the wear score of the tool. w is the area of the wear region, L c is the total crack length, L total is the total length of the tool, A b is the area of the passivation region, A total is the total area of the tool; Combining the tool wear score results, translation error and angular error, the overall health status of the tool is comprehensively evaluated, and the expression is: Among them, S total Score the overall health of the tool, T xy is the translation error of the tool, T max is the maximum allowable error, θ P is the pitch angle of the tool, θ R is the tool rotation angle error, θ max is the maximum permissible angular error.
8. The automatic tool adjustment method for a product inspection machine based on visual recognition as claimed in claim 7, characterized in that: Based on the wear assessment results, judging whether it is necessary to compensate for tool wear includes the following steps: Set the overall health status score threshold. When the overall health status score is greater than the threshold, it indicates that tool wear and geometric errors have affected the cutting accuracy, and compensation and correction are required. Recalculate the tool's motion path for the tool's translation error and angle error; Adjust the cutting depth of the tool for wear and passivation on the tool surface; Based on the wear assessment results, the cutting angle of the tool is adjusted and the corrected tool status data is output.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for automatic tool adjustment of an inspection machine based on visual recognition according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for automatic tool adjustment of an inspection machine based on visual recognition according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Dynamic production line measurement and control method and system based on visual identification
CN119169010A
Production system and method for high-energy-efficiency three-cylinder compressor parts
CN120190624A
Sole wear degree detection system based on image recognition
CN120260028A
Suturing scalpel packaging quality detection method based on optic nerves
CN120510129A
System and method for dynamically adjusting rigidity of grooving machine based on material image recognition
CN120861941A
