Industrial part alignment method and system based on visual analysis and storage medium

By using a three-view camera and gradient magnitude local contrast enhancement technology, combined with hierarchical feature extraction and dynamic attitude moment compensation algorithm, the problem of insufficient spatial information and attitude adjustment error that cannot be obtained in the existing technology is solved, and high-precision and stable part alignment is achieved.

CN121073994AActive Publication Date: 2025-12-05BEIJING TIANYUAN 3D TECH CO LTD

Patent Information

Application Number
CN202511250829.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-03
Publication Date
2025-12-05
Estimated Expiration
2045-09-03

AI Technical Summary

Technical Problem

Existing industrial part alignment methods cannot obtain complete spatial information, lack dedicated recognition algorithms for the geometric features of industrial parts, and suffer from multi-dimensional coupling errors during the posture adjustment process, resulting in insufficient alignment accuracy and stability.

Method used

Image acquisition is performed using a three-view camera. Gradient amplitude local contrast enhancement processing is used to extract and identify the edges of parts and key control points through hierarchical feature extraction. A dynamic reference coordinate system is established, and attitude compensation is performed through Z-axis offset and rotation coupling error analysis. The attitude adjustment process is decomposed and the alignment trajectory is optimized.

Benefits of technology

It improves the accuracy and stability of industrial part alignment, effectively acquires multi-dimensional features of parts under complex lighting and environments, accurately compensates for posture errors, and achieves high-precision part alignment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121073994A_ABST
    Figure CN121073994A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses an industrial part alignment method and system based on visual analysis and a storage medium. The method comprises the steps that a three-view camera collects an industrial part image, and preprocessing is carried out through gradient magnitude local contrast enhancement to obtain an enhanced image; performing hierarchical feature extraction to identify edge contours and key control points to form a multi-dimensional feature set; and establishing a dynamic reference coordinate system based on the feature set to obtain a part space attitude matrix. And the attitude deviation is compensated through Z-axis offset and rotation coupling error analysis. Posture adjustment is decomposed into a plurality of sub-stages, an alignment track is optimized by adopting a variable speed planning strategy, and accurate alignment of the parts is achieved. The problems that multi-view visual information fusion is insufficient, a special recognition algorithm for geometrical characteristics of the industrial parts is lacked, and Z-axis offset and rotation coupling error compensation is inaccurate in the posture adjustment process are solved, and the precision and stability of alignment of the industrial parts are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to an industrial part alignment method and system based on visual analysis and a storage medium. BACKGROUND

[0002] The existing industrial part alignment method mainly adopts image processing technology based on single view or fixed binocular vision, extracts features and identifies positions by obtaining two-dimensional image information of the part. The traditional method usually uses a standard edge detection algorithm such as Canny operator to extract the part contour, then calculates the deviation of the part from the target position by template matching or geometric fitting, and finally realizes part alignment through simple position compensation. These methods can achieve certain alignment accuracy when dealing with parts with regular shape and good surface quality.

[0003] However, single view or fixed binocular configuration cannot obtain complete spatial information of the part, resulting in limited recognition ability for complex three-dimensional poses; secondly, the traditional image preprocessing method is sensitive to light changes and surface reflections, and is prone to feature extraction errors in industrial environments; thirdly, the existing feature extraction method lacks special optimization for regular geometric features of industrial parts, and has insufficient recognition accuracy of key features such as corner points and line intersections; finally, the traditional method ignores the multi-dimensional coupling errors generated in the end effector pose adjustment process, especially the complex coupling relationship between Z-axis offset and rotation motion.

[0004] Based on the above analysis, the existing technology faces progressive technical challenges in handling precise industrial part alignment: how to obtain more complete part spatial information through multi-view vision fusion, how to design a special feature extraction algorithm for the geometric features of industrial parts, how to establish a dynamic coordinate system that adapts to the geometric characteristics of the part, and how to effectively compensate for the multi-dimensional coupling errors in the pose adjustment process. These problems are interrelated and progressively deepen, and simply solving one problem cannot meet the overall demand for high-precision alignment, requiring systematic technological innovation to achieve the organic combination of multi-view information fusion, special feature extraction, dynamic coordinate establishment, and coupling error compensation. SUMMARY

[0005] The present application provides an industrial part alignment method and system based on visual analysis and a storage medium, which solves the problems of insufficient multi-view visual information fusion, lack of special recognition algorithm for geometric features of industrial parts, and inaccurate compensation of Z-axis offset and rotation coupling errors in the pose adjustment process, and improves the precision and stability of industrial part alignment.

[0006] In a first aspect, the present application provides an industrial part alignment method based on visual analysis, which comprises: The image of the industrial part is collected and processed by a three-view camera, and the collected image is preprocessed by gradient amplitude local contrast enhancement to obtain a part enhanced image. According to the part enhanced image, the part edge contour and the key control point are identified and processed by hierarchical feature extraction to obtain a part multi-dimensional feature set. Based on the part multi-dimensional feature set, the geometric center of the part is set as the coordinate origin and a dynamic reference coordinate system is established to obtain a part space posture matrix. According to the difference between the part space posture matrix and the target posture, the posture deviation is compensated by Z-axis offset and rotation coupling error analysis to obtain a compensated posture parameter. Based on the compensated posture parameter, the posture adjustment process is decomposed into multiple sub-stages and the alignment trajectory is optimized by a variable speed planning strategy to obtain a part alignment state.

[0007] In a second aspect, the application provides an industrial part alignment system based on visual analysis, comprising: The acquisition module is configured to collect and process the image of the industrial part by a three-view camera, and pre-process the collected image by gradient amplitude local contrast enhancement to obtain a part enhanced image. The identification module is configured to identify and process the part edge contour and the key control point according to the part enhanced image by hierarchical feature extraction to obtain a part multi-dimensional feature set. The setting module is configured to set the geometric center of the part as the coordinate origin and establish a dynamic reference coordinate system based on the part multi-dimensional feature set to obtain a part space posture matrix. The compensation module is configured to compensate the posture deviation according to the difference between the part space posture matrix and the target posture by Z-axis offset and rotation coupling error analysis to obtain a compensated posture parameter. The optimization module is configured to decompose the posture adjustment process into multiple sub-stages and optimize the alignment trajectory by a variable speed planning strategy based on the compensated posture parameter to obtain a part alignment state.

[0008] In a third aspect, an industrial part alignment device based on visual analysis is provided, comprising a memory and at least one processor, the memory storing instructions; the at least one processor invokes the instructions in the memory to make the industrial part alignment device based on visual analysis execute the above-mentioned industrial part alignment method based on visual analysis.

[0009] In a fourth aspect, a computer readable storage medium is provided, in which instructions are stored, when executed on a computer, cause the computer to perform the above-mentioned visual analysis-based industrial part alignment method.

[0010] In the technical scheme provided in the present application, the technical features of image acquisition and processing of the industrial part by the three-view camera and the pre-processing of the acquired image by the gradient amplitude local contrast enhancement effectively solve the problem that the traditional single-view or fixed binocular configuration cannot obtain complete spatial information. The three-view camera configuration can simultaneously obtain the front view, side view and overhead view of the part, providing more abundant geometric constraint conditions for subsequent three-dimensional pose calculation. The gradient amplitude local contrast enhancement technique is specially optimized for the metal reflection characteristics of the surface of the industrial part. The edge region is automatically identified by calculating the gradient direction consistency index of the 8-neighborhood of the pixel point, and different contrast enhancement strategies are used for different regions, which significantly improves the problem of unstable feature extraction of the traditional method under complex lighting conditions. The technical features of the hierarchical feature extraction for identifying and processing the part edge contour and key control points to obtain the part multi-dimensional feature set establish a three-level feature system of pixel-level edge, feature-level key point and geometric-level topological structure. The improved SURF algorithm designs a special descriptor for the corner points, straight line intersection points and curvature change points of the industrial part, and the feature consistency verification algorithm effectively eliminates the pseudo features by checking the associated constraint relationship between the three levels of features. This multi-level feature extraction and verification mechanism has higher reliability and accuracy than the traditional single feature extraction method. The technical features of setting the geometric center of the part as the coordinate origin and establishing a dynamic reference coordinate system based on the part multi-dimensional feature set to obtain the part space pose matrix overcome the limitations of the traditional fixed coordinate system that cannot adapt to different part geometric characteristics. The dynamic coordinate system can be self-adaptively adjusted according to the actual geometric characteristics of the part, making the pose representation more accurate and stable.

[0011] The technical feature of compensating the attitude deviation by Z-axis offset and rotation coupling error analysis to obtain the compensated attitude parameter, the complex error coupling relationship generated in the end effector attitude adjustment process is analyzed in depth, the mathematical model between the attitude parameter change and the alignment error is established by the Jacobian matrix calculation, and the kinematics inverse solution algorithm can predict the position offset in the attitude adjustment process and generate the corresponding compensation trajectory. This kind of feedforward compensation mechanism effectively solves the problem of alignment accuracy decline caused by ignoring multi-dimensional coupling error in traditional methods, especially in dealing with the coupling relationship between Z-axis offset and rotation motion. The technical feature of decomposing the attitude adjustment process into multiple sub-stages and optimizing the alignment trajectory by variable speed planning strategy to obtain the part alignment state, the piecewise linear interpolation method is used to ensure the smoothness and continuity of the motion trajectory, and the variable speed planning strategy realizes the best balance between efficiency and accuracy by automatically reducing the motion speed when approaching the target position. The closed-loop feedback control mechanism can monitor the part position and attitude change in real time and adjust the trajectory. This multi-level trajectory optimization and control strategy has higher robustness and adaptability than the traditional open-loop control method, and can stably realize high-precision part alignment in complex industrial environment. BRIEF DESCRIPTION OF DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative labor.

[0013] Figure 1 An embodiment of the industrial part alignment method based on visual analysis in the embodiments of the present application; Figure 2 An embodiment of the industrial part alignment system based on visual analysis in the embodiments of the present application; Figure 3 The structural schematic diagram of the industrial part alignment device based on visual analysis in the embodiments of the present application. DETAILED DESCRIPTION

[0014] The embodiment of the present application provides a kind of industrial parts alignment method, system and storage medium based on visual analysis.The terms "first", "second", "third", "fourth" and the like (if exist) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence.It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.In addition, the terms "include" or "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0015] For ease of understanding, the specific process of the embodiment of the present application is described below, please refer to Figure 1 One embodiment of the industrial part alignment method based on visual analysis in the embodiment of the present application includes: Step S101, image acquisition and processing of industrial parts are carried out by three-view cameras, and the collected images are preprocessed by gradient amplitude local contrast enhancement to obtain part enhanced images; Step S102, according to the part enhanced image, the part edge contour and key control point are identified and processed by hierarchical feature extraction to obtain a part multi-dimensional feature set; Step S103, based on the part multi-dimensional feature set, the part geometric center is set as the coordinate origin and a dynamic reference coordinate system is established to obtain a part space posture matrix; Step S104, according to the difference between the part space posture matrix and the target posture, the posture deviation is compensated by Z-axis offset and rotation coupling error analysis to obtain compensated posture parameters; Step S105, based on the compensated posture parameters, the posture adjustment process is decomposed into multiple sub-stages, and the alignment trajectory is optimized by variable speed planning strategy to obtain the part alignment state.

[0016] It can be understood that the execution subject of the present application can be an industrial part alignment system based on visual analysis, and can also be a terminal or a server, and the specific place is not limited.The embodiment of the present application takes the server as the execution subject for example.

[0017] Specifically, image acquisition is performed by a three-view camera configuration, in which two cameras are installed at a 45-degree angle to form a binocular stereo vision configuration, and the third camera is installed vertically downward as a top-down monitoring. This asymmetric three-view configuration can simultaneously obtain the front, side and top view image information of the part, and has more comprehensive spatial information acquisition capability compared with the traditional fixed binocular configuration. After image acquisition, the brightness distribution of the LED ring light source is adjusted by a regional light intensity control algorithm, which automatically adjusts the illumination intensity of different regions according to the surface reflection characteristics of the part, and eliminates the interference of the metal surface reflection. Subsequently, gradient amplitude local contrast enhancement processing is performed, which first calculates the gradient direction consistency index of the 8-neighborhood of the pixel point, and identifies the part edge region by comparing the gradient direction difference of adjacent pixels. Gradient direction consistency index calculation involves similarity analysis of the gradient vectors of the 8-neighborhood pixels around each pixel point. When the gradient direction difference of adjacent pixels is less than the set threshold, it is considered to belong to the same region, and when the difference is larger, it is identified as an edge region. Based on the edge region identification data, gradient amplitude calculation is used to differentiate the contrast enhancement of different regions. The edge region uses strong enhancement parameters to highlight the contour features, and the smooth region uses weak enhancement parameters to maintain the naturalness of the image. Finally, multi-scale denoising processing is performed by wavelet transform denoising algorithm. Wavelet transform can decompose image signals at different frequency scales, selectively remove high-frequency noise while retaining low-frequency part geometric features.

[0018] The part edge contour and key control points are identified by hierarchical feature extraction. Firstly, the enhanced image is input into the improved Canny edge detection algorithm, which adopts a double-threshold adaptive adjustment mechanism to dynamically set the high and low threshold parameters according to the material and surface roughness characteristics of the part. The double-threshold mechanism sets a strong edge threshold and a weak edge threshold, and the strong edge pixels are directly marked as edge points, while the weak edge pixels need to be connected with the strong edge pixels to be confirmed as edge points. This mechanism effectively reduces noise misjudgment while maintaining edge continuity. Based on the edge contour data, the key point detection is performed by improving the SURF algorithm. The algorithm first calculates the Hessian matrix response value of the part edge pixel points. The Hessian matrix contains the second-order partial derivative information of the image at that point, which can detect the local extreme points of the image. The non-maximum suppression algorithm filters the response value by comparing the response value of each pixel point with its neighborhood pixels, and only the local maximum points are retained as candidate key points. For the regular geometric features of industrial parts, a special descriptor for straight line segments and circular arc segments is designed. The descriptor analyzes the gradient distribution pattern around the key points to determine whether the point belongs to a straight line feature or a curve feature. The curvature change detection algorithm identifies the curvature mutation position by calculating the curvature value of each point on the part contour. The curvature calculation involves local fitting of the contour line and calculation of the second derivative. The Hough transform detects the geometric features of the part, such as straight lines and circles, and establishes the geometric topology of the part, which describes the spatial relationship between the geometric elements of the part. The feature consistency verification algorithm verifies the correlation constraints of the three hierarchical features by checking the consistency between the pixel-level edge, feature-level key point, and geometric-level topology to eliminate false features. The weighted voting mechanism assigns weight coefficients according to the stability and repeatability of the feature points under different viewing angles, and fuses to generate a multi-dimensional feature set of the part containing position, direction, and scale information.

[0019] A dynamic reference coordinate system is established based on the multi-dimensional feature set of the part. The least squares fitting method determines the main geometric contour of the part by minimizing the sum of squares of the distances from the part contour points to the fitted curve, thereby calculating the geometric center coordinates of the part. The principal component analysis method calculates the principal axis direction of the feature set by constructing the covariance matrix of the feature points and performing eigenvalue decomposition to determine the main variation direction of the part. The covariance matrix reflects the distribution characteristics of the feature points in different directions, and the feature vector corresponding to the maximum eigenvalue represents the direction of the maximum data variation, i.e., the principal axis direction of the part. The feature vector corresponding to the maximum eigenvalue is set as the X-axis direction, the feature vector corresponding to the second largest eigenvalue is set as the Y-axis direction, and the Z-axis direction is determined by the right-hand rule to form a three-dimensional coordinate system. The multi-view geometric constraint pose solving algorithm constructs an overdetermined equation system using the feature correspondence of the three views, and solves the rotation matrix and translation vector of the part by singular value decomposition method to obtain the spatial pose matrix of the part containing complete spatial pose information.

[0020] The pose deviation is compensated by Z-axis offset and rotation coupling error analysis. The pose deviation matrix is obtained by calculating the difference between the current part space pose matrix and the target pose matrix, which contains both rotation error and displacement error information. The Jacobian matrix calculates the partial derivative of the part pose parameters to the alignment error, establishing a mathematical model of error propagation, which describes the influence of small changes in pose parameters on alignment accuracy. Z-axis offset and rotation coupling analysis is specifically aimed at the complex error coupling relationship generated during the end effector pose adjustment process. When the effector is adjusted in rotation, the offset of the rotation center and the center of gravity of the part will cause additional positional offset. The kinematic inverse solution algorithm calculates the required joint angle change based on the target pose and the current pose, while predicting the positional offset of each intermediate state during the adjustment process. The feedforward compensation mechanism calculates the compensation trajectory in advance before executing the pose adjustment instruction, dynamically adjusts the control parameters to offset the expected error influence, and generates the compensated pose parameters containing static compensation parameters and dynamic compensation parameters.

[0021] The trajectory optimization process is based on the compensated pose parameters. The axis-angle representation method converts the rotation matrix into a combination of rotation axis and rotation angle, which avoids the singularity problem in Euler angle representation. Three-dimensional coordinate decomposition decomposes the translation deviation into independent displacement in X, Y and Z directions, which facilitates subsequent trajectory planning processing. The piecewise linear interpolation method divides the entire alignment process into multiple continuous motion sub-stages, and maintains the linear change of motion parameters in each sub-stage to ensure the smoothness of the motion trajectory. The variable speed planning strategy dynamically adjusts the motion speed according to the distance between the current position and the target position of the part. When the distance is far, a higher speed is adopted to improve efficiency, and when the target position is approached, the speed is automatically reduced to improve accuracy. The closed-loop feedback control mechanism continuously monitors the real-time position and attitude change of the part, and automatically triggers the trajectory re-planning program when it detects deviation from the expected trajectory, achieving high-precision part alignment state.

[0022] In a specific embodiment, the process of step S101 can specifically include the following steps: The part multi-view original image is obtained by two cameras for binocular stereo vision acquisition with a 45-degree angle tilt, and a third camera for top-down image acquisition vertically downward; According to the part multi-view original image, the brightness distribution of the LED ring light source is adjusted by the regional light intensity control algorithm to obtain the part image without glare interference; Based on the gradient direction consistency index calculation of the 8-neighborhood of the pixel points in the part image, the edge region of the part is automatically identified to obtain edge region identification data; According to the edge region identification data, the contrast of different regions is differentially enhanced by gradient amplitude calculation to obtain a local contrast enhanced image; The local contrast enhanced image is input into a wavelet transform denoising algorithm for multi-scale denoising processing to obtain a part enhanced image.

[0023] Specifically, the binocular stereo vision acquisition is achieved by two cameras installed at an angle of 45 degrees to obtain three-dimensional space information, which is different from the traditional horizontal symmetrical binocular. The 45-degree angle installation can obtain the side profile information of the part, and a third camera is installed vertically downward to obtain a top view image, forming a complete view angle covering the front, side and top of the part. The three cameras are synchronously triggered to collect part multi-view original images with the same resolution but different view angles, each image containing the edge, texture and geometric feature information of the part at the view angle. The camera calibration parameters ensure that the images of the three view angles can be accurately geometrically corresponding and spatially converted.

[0024] The regional light intensity control algorithm adjusts the brightness distribution of the LED ring light source according to the material characteristics of the part surface. The algorithm first analyzes the brightness distribution histogram of different regions in the part multi-view original image to identify the positions of the over-bright and over-dark regions. The LED ring light source is composed of multiple independently controlled light-emitting units, each unit corresponding to a specific region of the part surface. The algorithm calculates the difference between the average brightness value of each region and the target brightness value, and adjusts the current intensity of the corresponding LED unit according to the difference value. The brightness of the over-bright region is reduced, and the brightness of the over-dark region is increased. The light intensity adjustment adopts closed-loop feedback control, which monitors the brightness distribution of the adjusted image in real time until the brightness of each region is uniformly distributed within the preset range, and the part image without glare interference is obtained.

[0025] The gradient direction consistency index calculation is based on 8-neighborhood edge region identification. The algorithm calculates the gradient direction difference of each pixel point in the part image with its 8-neighborhood pixels. The gradient direction is calculated by the Sobel operator, which includes horizontal and vertical gradient components. The gradient direction angle is calculated by the arctangent function of the ratio of the two components. The consistency index calculation involves comparing the angle difference of the center pixel with the 8-neighborhood pixels. When the angle difference is less than the set threshold, the direction is considered consistent, and the number of consistent pixels in the 8-neighborhood is counted as the consistency index. The pixels in the edge region have a significant difference in gradient direction with the neighborhood pixels due to the sharp change in gray value, and the consistency index is low. The gradient direction of the pixels in the smooth region is relatively consistent, and the consistency index is high. By setting a consistency threshold, the image is divided into edge region and smooth region to form edge region identification data.

[0026] The gradient amplitude calculation realizes the differential contrast enhancement by analyzing the gray level change intensity of the pixel points. The calculation process firstly performs Sobel gradient calculation on the part image to obtain the horizontal gradient component and the vertical gradient component of each pixel point. The gradient amplitude is obtained by calculating the square root of the sum of squares of the two components, which reflects the intensity of the gray level change of the pixel point. According to the edge region identification data, different contrast enhancement parameters are used for the edge region and the smooth region. The edge region has a larger gradient amplitude, and a stronger enhancement coefficient is used to amplify the gray level contrast to highlight the part contour and the detail features. The smooth region has a smaller gradient amplitude, and a weaker enhancement coefficient is used to avoid noise amplification. The contrast enhancement is realized by linear transformation, that is, the original pixel value is multiplied by the corresponding enhancement coefficient and added by an offset to ensure that the enhanced pixel value is within the effective range, and a local contrast enhanced image is obtained.

[0027] The wavelet transform denoising algorithm realizes noise removal while preserving the part geometric features through multi-scale decomposition. The algorithm decomposes the local contrast enhanced image into sub-band signals of different frequency scales. The wavelet decomposition process uses discrete wavelet transform, which convolves the image through a low-pass filter and a high-pass filter. The low-pass filter output contains the low-frequency information of the image, i.e., the main geometric features, and the high-pass filter output contains the high-frequency information of the image, i.e., the edge details and noise. Multi-scale decomposition is realized by recursively decomposing the low-frequency sub-band, forming a multi-level frequency representation. The denoising process is performed on the high-frequency sub-band, and the high-frequency coefficients with an amplitude less than the threshold are set to zero to remove noise components while preserving useful edge information. The wavelet reconstruction process combines the processed sub-band signals of each scale into a complete image through inverse wavelet transform, obtaining a part enhanced image that has removed noise and preserved part geometric features.

[0028] In a specific embodiment, the process of performing step S102 can specifically include the following steps: inputting the part enhanced image into an improved Canny edge detection algorithm for double-threshold adaptive adjustment processing to obtain part edge contour data; According to the part edge contour data, performing key point detection processing on the part corner points, straight line intersection points and curvature change points by an improved SURF algorithm to obtain part feature control points; Based on the part feature control points, performing geometric detection processing on the part straight line and circular features by a Hough transform to obtain part geometric topology; According to the part geometric topology, performing verification processing on the correlation constraint relationship between the three hierarchical features by a feature consistency verification algorithm to obtain a reliable feature point set; inputting the reliable feature point set into a weighted voting mechanism for feature fusion processing to obtain a part multi-dimensional feature set containing position, direction and scale information.

[0029] Specifically, the improved Canny edge detection algorithm processes the part-enhanced image through a double-threshold adaptive adjustment mechanism. The algorithm first applies Gaussian filtering to the image to remove noise, and then calculates the gradient magnitude and direction of each pixel. The double-threshold adaptive adjustment dynamically sets the high and low threshold parameters according to the material and surface roughness characteristics of the part. The high threshold is used to identify strong edge pixels, and the low threshold is used to identify weak edge pixels. The algorithm determines the threshold range by analyzing the histogram distribution of the image gradient magnitude. Pixels with a gradient magnitude higher than the high threshold are directly marked as edge points. Pixels with a gradient magnitude between the high and low thresholds need to check their neighborhood connectivity. Only weak edge pixels that are connected to strong edge pixels are retained. The edge connection process is implemented through an eight-connected domain search. Starting from a strong edge pixel, the algorithm expands to adjacent weak edge pixels to form a continuous edge chain, obtaining the part edge contour data. This adaptive mechanism solves the problem of unstable performance of traditional fixed threshold methods on different material parts.

[0030] The improved SURF algorithm detects key points based on the part edge contour data. This algorithm is specifically optimized for the regular geometric features of industrial parts. The algorithm first calculates the Hessian matrix response value of the edge pixel points. The Hessian matrix contains the second-order partial derivative information of the image at that point. The determinant value of the matrix is used to evaluate the likelihood of the point as a key point. The non-maximum suppression algorithm is performed in three-dimensional space, comparing not only the response values of the pixel points and their spatial neighbors but also their response values at different scales, ensuring that the detected key points have scale invariance. For the corner points, straight line intersection points, and curvature change points of the part, the algorithm designs a special descriptor calculation method. Corner point detection analyzes the gradient distribution pattern around the key point. When the gradient direction changes sharply around the point, it is identified as a corner point. Straight line intersection point detection counts the number and direction of straight line segments in the key point neighborhood. When there are two or more straight line segments of different directions intersecting, it is identified as an intersection point. Curvature change point detection calculates the local curvature of the edge contour. When the curvature value exceeds the set threshold, it is marked as a curvature change point, forming part feature control points containing different types of geometric features.

[0031] The Hough transform is based on part feature control points for geometric detection of linear and circular features. The transform converts points in image space to parameter space for feature detection. Linear detection uses the standard Hough transform, which maps each edge point in the image to a sinusoidal curve in parameter space. The intersection of multiple sinusoidal curves corresponds to a linear feature in the image. The parameter space uses polar coordinates, containing a distance parameter and an angle parameter. The parameters of a line are determined by finding local maxima in the parameter space. Circular detection uses the circular Hough transform, which maps each edge point in the image to a three-dimensional parameter space containing the center coordinates and radius parameter. The algorithm finds peaks in the parameter space by using a voting mechanism. The peak position corresponds to the detected circular feature parameters. A minimum vote threshold is set during the detection process to filter noise and false features. Only parameter combinations with a vote count above the threshold are considered valid geometric features. By analyzing the spatial relationships between the detected linear and circular features, a topological relationship graph is established to describe the geometric structure of the part. The graph contains parameter information and mutual connection relationships for each geometric element, forming the geometric topology of the part.

[0032] The feature consistency verification algorithm performs correlation constraint verification on three levels of features: pixel-level edges, feature-level keypoints, and geometric-level topology. The algorithm identifies and eliminates false features by checking the spatial correspondence between different levels of features. The consistency verification between the pixel level and the feature level checks whether each feature control point is located on the corresponding edge contour. By calculating the distance from the feature point to the nearest edge pixel, feature points with a distance exceeding the threshold are marked as inconsistent. The consistency verification between the feature level and the geometric level checks whether the feature control points conform to the detected geometric features. Corner points should be located at the intersection of straight lines, and curvature change points should be located at specific positions on circular arcs. The internal consistency verification of the geometric level checks the logical relationships between different geometric features. Intersecting lines should have corresponding corner point features at the intersection point, and tangent lines and circles should have corresponding feature points at the tangent point. The verification process uses a voting mechanism. Each feature point is evaluated based on its consistency score at three levels. Only feature points with a score above the set threshold are retained in the reliable feature point set. This multi-level verification mechanism effectively solves the problems of inaccurate feature extraction and false feature interference in traditional methods.

[0033] The weighted voting mechanism performs feature fusion processing on the reliable feature point set. The mechanism assigns a weight coefficient according to the stability and repeatability of the feature points under different viewing angles. The stability evaluation measures the position deviation of the feature points in multiple detections, and the feature points with small position deviation obtain a higher stability weight. The repeatability evaluation measures the correspondence of the feature points in different viewing angle images, and the feature points that can be consistently detected in multiple viewing angles obtain a higher repeatability weight. The weight calculation considers the stability weight and the repeatability weight, and obtains the comprehensive weight coefficient of each feature point through weighted averaging. The feature fusion process performs weighted averaging on the corresponding feature points from the three viewing angles. The position information is calculated through weighted averaging to obtain the three-dimensional coordinates, the direction information is calculated through weighted averaging to obtain the main direction angle, and the scale information is calculated through weighted averaging to obtain the feature scale size. The fused feature description vector contains the three-dimensional position coordinates, the main direction angle and the feature scale of each feature point, forming a multi-dimensional feature set of the part.

[0034] In a specific embodiment, the execution step can specifically include the following steps by improving the process of the SURF algorithm for key point detection and processing of part corner points, straight line intersection points and curvature change points: The part edge contour data is input into the Hessian matrix calculation for response value calculation and processing, and the Hessian response value of the part edge pixel point is obtained. According to the Hessian response value, the local extreme value of the response value is screened and processed by the non-maximum suppression algorithm, and the candidate key point position coordinates are obtained. Based on the candidate key point position coordinates, the regular geometric features of the part are described and processed by the straight line segment and circular arc segment special descriptor calculation, and the key point feature descriptor is obtained. According to the key point feature descriptor, the curvature mutation position of the part contour is identified and processed by the curvature change detection algorithm, and the curvature change feature point is obtained. The curvature change feature point is matched and processed with the candidate key point position coordinates, and the part feature control point containing the corner point, the straight line intersection point and the curvature change point is obtained.

[0035] Specifically, the Hessian matrix computation evaluates the local geometric property of each edge pixel by performing second-order partial derivative operation on the part edge contour data, which contains the second-order partial derivative information of the image in horizontal, vertical and cross direction at the point. The Hessian matrix computation process first performs Gaussian filtering on the edge contour data, and then calculates the second-order partial derivative of the image in the horizontal direction, the second-order partial derivative in the vertical direction and the second-order partial derivative in the horizontal and vertical cross direction respectively. The second-order partial derivative is obtained by taking the derivative of the first-order gradient information again, which reflects the acceleration characteristics of the image gray scale change. The determinant value of the Hessian matrix is used as the response value to evaluate the candidate strength of the pixel point as a key point, and the larger the determinant value is, the more significant the local geometric feature of the point is. The response value calculation is performed by the matrix determinant formula, that is, the product of the horizontal second-order partial derivative and the vertical second-order partial derivative minus the square of the cross second-order partial derivative, which reflects the curvature characteristics of the gray scale distribution around the pixel point, and the Hessian response value corresponding to each edge pixel point is obtained.

[0036] The non-maximum suppression algorithm performs local extremum screening based on the Hessian response value, which identifies the local maximum value point by comparing the response value of each pixel point with that of its neighborhood pixels. The algorithm is executed in a three-dimensional space, which contains the two-dimensional space coordinates and the scale space coordinates of the image, ensuring that the detected key points have spatial and scale dual stability. The suppression process first sets a neighborhood window size, usually a three-by-three or five-by-five square window, and then compares the response values of the center pixel and all neighborhood pixels in the window. Only the pixel points with response values greater than all neighborhood pixels and exceeding the set threshold are retained as candidate key points, and the response values of other pixel points are suppressed to zero. The non-maximum suppression of the scale space also needs to compare the response values of the pixel points on adjacent scale layers, to ensure that the point is also a local maximum value in the scale dimension. After three-dimensional non-maximum suppression, the remaining pixel points constitute a candidate key point set, each candidate key point contains its two-dimensional coordinate position in the image and the corresponding scale information, forming candidate key point position coordinate data.

[0037] The straight line segment and circular arc segment special descriptor calculates the regular geometric features of industrial parts, which determines the geometric feature type of the key point by analyzing the gradient distribution pattern around the candidate key point. The straight line segment descriptor calculation process first establishes a circular neighborhood around the key point, divides the neighborhood into multiple sector regions, and then counts the consistency of gradient direction in each sector region. When the gradient in a certain direction dominates and is relatively concentrated, it is determined that the key point is located on the straight line segment. The circular arc segment descriptor calculation analyzes the continuous variation characteristics of the gradient direction, which should present a continuous gradient distribution pattern on the circular arc segment. The descriptor calculation also includes the main direction determination, which finds the main peak value of the gradient direction histogram distribution in the key point neighborhood as the main direction of the key point. The descriptor vector construction divides the neighborhood into multiple sub-regions, calculates the gradient amplitude and direction statistics of each sub-region relative to the main direction, and forms a feature descriptor with rotation invariance. This descriptor can distinguish different geometric features such as straight edges, circular arc edges and corner points on the part, and obtain the key point feature descriptor corresponding to each candidate key point.

[0038] The curvature change detection algorithm identifies the curvature mutation position on the part contour based on the key point feature descriptor, which detects the sharp change point of geometric shape by calculating the local curvature of the contour line. The curvature calculation process first parameterizes the part edge contour, represents each point on the contour with arc length parameter, and then calculates the first and second derivatives of the contour line at that point. The curvature value is calculated by the vector cross product of the first and second derivatives, which reflects the bending degree of the contour line at that point. The algorithm calculates the curvature value point by point along the contour line to form a curvature function curve, and then identifies the curvature mutation position by analyzing the change rate of the curvature function. The curvature mutation detection is performed by setting a curvature change threshold, and when the curvature difference between adjacent points exceeds the threshold, it is marked as a curvature mutation point. Especially for the corner points and circular arc connection points of the part, these positions usually have significant curvature mutation characteristics. The algorithm also considers the directionality of curvature change, positive curvature mutation corresponds to convex corner point, negative curvature mutation corresponds to concave corner point, and identifies all geometric feature points with curvature change characteristics.

[0039] The fusion matching process spatially corresponds the curvature change feature points to the candidate key point position coordinates and fuses the features. The process establishes a correspondence by calculating the spatial distance and feature similarity between the two sets of feature points. Spatial matching is performed by calculating the Euclidean distance between the curvature change feature points and the candidate key points. Points with a distance less than a set threshold are considered to be spatially corresponding. Feature matching is performed by comparing the geometric properties of the curvature change feature points with the feature descriptors of the candidate key points, including consistency of the main direction and matching of the geometric feature type. Corner point matching requires the curvature change feature points to have a significant curvature mutation and the feature descriptors of the candidate key points to show a straight line intersection feature. Straight line intersection matching requires two or more straight line segments to intersect at the position and have corresponding corner point features. Curvature change point matching requires the contour curvature to change continuously at the position and the candidate key point to be located on an arc or curve segment. The successfully matched feature point pairs are fused to integrate the curvature information and the key point descriptor information into a unified feature representation, obtaining a part feature control point set containing three types of features: corner points, straight line intersection points, and curvature change points.

[0040] In a specific embodiment, the process of performing step S103 can specifically include the following steps: Inputting the part multi-dimension feature set into a least square fitting method for part main geometric contour fitting processing, obtaining part geometric center coordinates; According to the part geometric center coordinates, performing principal component analysis method on the part multi-dimension feature set for principal axis direction calculation processing, obtaining part principal axis feature vector; Based on the part principal axis feature vector, setting the feature vector corresponding to the maximum eigenvalue as the X-axis direction and the feature vector corresponding to the second largest eigenvalue as the Y-axis direction, obtaining part coordinate axis direction vector; According to the part coordinate axis direction vector, determining the Z-axis direction by the right-hand rule, and taking the part geometric center coordinates as the coordinate origin, obtaining a dynamic reference coordinate system; Inputting the dynamic reference coordinate system into a multi-view geometric constraint pose solving algorithm for part current pose calculation processing, obtaining a part space pose matrix containing a rotation matrix and a translation vector.

[0041] Specifically, the least squares fitting method determines the main geometric profile of a part by minimizing the sum of squared distances of feature points in the part's multi-dimensional feature set to the fitted curve. This method first selects an appropriate fitting model based on the part's geometric characteristics. For circular parts, a circular fitting model is used, for rectangular parts, a polygon fitting model is used, and for complex-shaped parts, a spline curve fitting model is used. The fitting process establishes an objective function, taking the sum of squared perpendicular distances of all feature points to the fitted profile as the optimization goal, and determines the optimal fitting parameters by solving the minimum value of the objective function. The circular fitting calculates the center coordinates and radius parameters, the rectangular fitting calculates the equation parameters of each side line, and the complex profile fitting calculates the control point coordinates and curve parameters. The fitting algorithm uses an iterative optimization method, starting from the initial parameters and gradually adjusting the fitting parameters until converging to the optimal solution. The fitting quality is evaluated by calculating the fitting error and correlation coefficient to ensure the reliability of the fitting results. Based on the geometric profile obtained by fitting, the centroid position of the profile is calculated as the geometric center coordinates of the part. This coordinate is calculated by weighted average of all points on the fitted profile, and the weight is determined according to the importance of each point on the profile.

[0042] The principal component analysis method calculates the principal axis direction of the part's multi-dimensional feature set based on the part's geometric center coordinates. This method determines the main variation direction of the part by analyzing the spatial distribution of feature points. The analysis process first translates the coordinates of all feature points to a coordinate system with the geometric center as the origin, eliminating the influence of positional bias. Then, a covariance matrix of feature point coordinates is constructed, which reflects the distribution characteristics and correlation of feature points in different coordinate axis directions. Covariance matrix calculation involves statistical analysis of translated feature point coordinates, calculating the covariance values between different coordinate axes. Next, the covariance matrix is decomposed into eigenvalues and corresponding eigenvectors. Eigenvalue decomposition is achieved by numerical methods, including Jacobi iteration or QR decomposition. Eigenvalues represent the distribution variance of feature points in the direction of corresponding eigenvectors, and the larger the eigenvalue, the more significant the data variation in that direction. Eigenvectors represent the main variation direction of the covariance matrix, i.e., the principal axis direction of the part's feature point distribution. The eigenvectors obtained by eigenvalue decomposition constitute the part's principal axis eigenvector set, which describes the main geometric directions of the part in three-dimensional space.

[0043] The part coordinate axis direction vector is established based on the ordering and direction setting of the part principal axis characteristic vector. The process first sorts the characteristic values from large to small to determine the priority of the main change direction. The characteristic vector corresponding to the maximum characteristic value represents the direction with the largest change in the distribution of the part feature points, which is set as the X-axis direction. This direction usually corresponds to the long axis or the main geometric direction of the part. The characteristic vector corresponding to the second largest characteristic value represents the direction with the second largest change in the distribution of the part feature points, which is set as the Y-axis direction. This direction usually corresponds to the wide axis or the secondary geometric direction of the part. The selection of the X-axis and Y-axis ensures that the coordinate system can best describe the geometric characteristics of the part, making the representation of the part in the new coordinate system the most concise. The direction of the characteristic vector needs to be standardized to ensure that the vector length is unit length, which is convenient for subsequent coordinate transformation calculations. At the same time, the orthogonality of the X-axis and Y-axis vectors needs to be checked. Although the characteristic vectors obtained by principal component analysis are theoretically orthogonal, the errors that may exist in numerical calculations need to be verified and corrected. The correction process is achieved by the Schmidt orthogonalization method to ensure that the X-axis and Y-axis are strictly orthogonal, and finally the standardized part coordinate axis direction vector is obtained.

[0044] The dynamic reference coordinate system is established by determining the Z-axis direction according to the right-hand rule and taking the part geometric center as the coordinate origin. This coordinate system is dynamically adjusted according to the actual geometric characteristics of the part, which is different from the traditional fixed coordinate system. The process of determining the Z-axis direction by the right-hand rule is achieved by calculating the vector cross product of the X-axis vector and the Y-axis vector. The direction of the cross product result is the positive direction of the Z-axis. The vector cross product calculation involves the three components of the X-axis vector and the Y-axis vector, and the three components of the Z-axis vector are calculated by the cross product formula. The determination of the Z-axis direction ensures that the coordinate system satisfies the convention of the right-hand coordinate system, i.e. the X-axis, Y-axis and Z-axis form a right-hand screw relationship. The coordinate origin is set as the part geometric center coordinate calculated before, which can best represent the spatial position of the part. The establishment process of the dynamic reference coordinate system also includes the consistency check of the coordinate system direction to ensure that the direction of the coordinate system conforms to the geometric characteristics of the part. Especially for parts with obvious directionality, it is necessary to ensure that the X-axis points to the main direction of the part and the Y-axis points to the secondary direction of the part. After the coordinate system is established, all feature point coordinates are converted to the new dynamic reference coordinate system, forming a standardized representation based on the geometric characteristics of the part.

[0045] The multi-view geometric constraint pose solving algorithm calculates the current spatial pose of the part based on the dynamic reference coordinate system. The algorithm uses the correspondence relationship of features in three views to establish a geometric constraint equation set. The algorithm first establishes the correspondence relationship of feature points between three view images, and determines the projection position of the same spatial point in different view images through feature matching. The correspondence relationship establishment process adopts a method combining feature descriptor matching and geometric consistency verification to ensure the accuracy and reliability of the matching. Based on the feature point correspondence relationship, a multi-view geometric constraint equation set is established, which describes the geometric relationship between spatial points, camera parameters and image projections. The constraint equation uses the perspective projection model to project the three-dimensional spatial point to the mathematical relationship of the two-dimensional image plane. Due to the existence of three view observation data, an over-determined equation set is formed, and the number of equations is more than the number of unknown parameters. The pose solving is obtained by solving the over-determined equation set to obtain the rotation matrix and translation vector of the part. The rotation matrix describes the directional change of the part relative to the reference coordinate system, and the translation vector describes the positional change of the part relative to the reference coordinate system. The solving process adopts the singular value decomposition method, which can process the over-determined equation set and obtain the optimal solution in the least square sense. The solving result contains six-degree-of-freedom pose information, forming a part spatial pose matrix containing a rotation matrix and a translation vector.

[0046] In a specific embodiment, the process of performing step S104 can specifically include the following steps: The part spatial pose matrix is subtracted from the target pose matrix to obtain a pose deviation matrix containing rotation error and displacement error; According to the pose deviation matrix, the partial derivative of the part pose parameter with respect to the Jacobian matrix is calculated to obtain error sensitivity analysis data; Based on the error sensitivity analysis data, the position offset caused by the end effector pose adjustment is calculated by Z-axis offset and rotation coupling analysis to obtain a coupling error influence coefficient; According to the coupling error influence coefficient, the position offset in the pose adjustment process is predicted by the kinematics inverse algorithm to obtain a predicted compensation trajectory; The predicted compensation trajectory is input into the feedforward compensation mechanism for dynamic error compensation processing to obtain a compensated pose parameter containing static compensation parameters and dynamic compensation parameters.

[0047] Specifically, the pose deviation matrix is calculated by the difference between the part space pose matrix and the target pose matrix, which separately handles the deviation of the rotation part and the translation part. The rotation error calculation uses the relative operation of the rotation matrix, which calculates the relative rotation between the current rotation matrix and the target rotation matrix, and obtains the relative rotation matrix by matrix multiplication, which describes the rotation transformation required from the current pose to the target pose. The calculation formula of the relative rotation matrix is the target rotation matrix multiplied by the transpose matrix of the current rotation matrix, and the non-diagonal elements of the result matrix reflect the size and direction of the rotation error. The displacement error is obtained by directly subtracting the current position vector from the target position vector, and the displacement deviation in the X, Y, and Z directions in the three-dimensional space is obtained. Each component of the displacement error vector represents the distance that needs to be adjusted in the corresponding coordinate axis direction. The pose deviation matrix integrates the rotation error and the displacement error into a unified four-by-four homogeneous transformation matrix form, with the three-by-three submatrix in the upper left corner of the matrix being the rotation error matrix, and the three-by-one subvector in the upper right corner being the displacement error vector. This matrix completely describes the six-degree-of-freedom deviation between the current pose and the target pose of the part.

[0048] The Jacobian matrix calculation is based on the partial derivative operation of the part pose parameters based on the pose deviation matrix, which describes the influence of small changes in the pose parameters on the final alignment error. The construction process of the Jacobian matrix first converts the pose deviation matrix into a six-dimensional vector representation, which contains three rotation angle parameters and three displacement parameters. The rotation angle parameters are obtained by converting the rotation matrix to the axis angle representation, which includes the rotation angles around the X, Y, and Z axes. The partial derivative calculation uses the numerical differentiation method to perturb each pose parameter slightly, calculates the change in the alignment error before and after the perturbation, and obtains the partial derivative value by the ratio of the change to the perturbation. Each row of the Jacobian matrix corresponds to an error component, and each column corresponds to a pose parameter, and the matrix element represents the sensitivity of the corresponding pose parameter to the corresponding error component. The matrix calculation also considers the coupling relationship between the parameters, especially the mutual influence between the rotation parameters and the displacement parameters. The sensitivity analysis evaluates the stability of the system by calculating the condition number and singular values of the Jacobian matrix. The direction with a larger condition number indicates higher error sensitivity, which requires more accurate control. The complete error sensitivity analysis data is finally obtained.

[0049] The Z-axis offset and rotation coupling analysis is specifically designed to calculate the complex error coupling relationships generated during the end effector pose adjustment process. This analysis is based on error sensitivity analysis data to identify key coupling error sources. The coupling analysis process first establishes a kinematics model of the end effector, describing the mathematical relationship between the joint angles of the effector and the position and orientation of the end effector. The Z-axis offset analysis focuses on the impact of vertical position changes on rotational adjustments. When the effector performs a rotational adjustment, due to the offset between the rotation center and the center of gravity of the part, it will cause unintended position changes in the Z-axis direction. The coupling error calculation analyzes the distance vector between the rotation center and the center of gravity of the part, as well as the geometric relationship between the rotation angle and the Z-axis displacement. The calculation process uses rigid body kinematics principles to decompose the rotational motion into rotational components around different axes, and the contribution of each rotational component to the Z-axis displacement is calculated through geometric projection. The influence coefficient calculation establishes a linear relationship model between the rotation angle and the Z-axis displacement, and the coefficient size reflects the degree of influence of rotational adjustment on Z-axis displacement. The coupling analysis also considers the case of multi-axis simultaneous rotation, and calculates the total coupling error influence through the superposition principle, finally obtaining the coupling error influence coefficient matrix describing various coupling relationships.

[0050] The inverse kinematics algorithm is based on the coupling error influence coefficients to predict the position offset during the pose adjustment process. This algorithm determines the required joint motion trajectory by solving the inverse kinematics equation of the effector. The inverse solution algorithm first calculates the required pose adjustment quantity based on the target pose and the current pose, which includes the rotational adjustment quantity and the displacement adjustment quantity. Then the pose adjustment quantity is converted into the target position and direction of the effector end, and the target angles of each joint are determined through inverse kinematics calculation. The inverse solution calculation process uses a numerical iterative method to gradually adjust from the current joint angle until the end pose requirements are met. The prediction process uses the coupling error influence coefficients to predict the possible position offset at each iteration step of the inverse solution calculation. The position offset prediction is obtained by multiplying the joint angle change quantity by the influence coefficient matrix, and the result vector describes the expected displacement deviation in each direction. The prediction algorithm also considers the influence of the dynamics characteristics of the effector, including inertia, friction and flexibility, on the position accuracy. Trajectory optimization reduces the predicted position offset by adjusting the time allocation and speed distribution of joint motion, forming a predicted compensation trajectory that meets the pose adjustment requirements and minimizes the position offset.

[0051] The feedforward compensation mechanism performs dynamic error compensation based on predicted compensation trajectories. The mechanism calculates and applies compensation amounts in advance to offset anticipated errors before executing posture adjustment instructions. Static compensation parameters are obtained through offline calibration, including inherent error parameters of the actuator such as joint clearance, transmission error, and structural deformation, among other systematic errors. A static compensation lookup table is established by conducting repetitive tests at different postures, and the error distribution under various conditions is statistically analyzed to form a compensation parameter table based on posture and load. Dynamic compensation parameters are adjusted according to real-time motion states and environmental conditions, including speed-related dynamic errors, inertia errors caused by acceleration, and thermal deformation errors caused by temperature changes. The feedforward controller design uses a predictive control algorithm to calculate compensation instructions based on the predicted trajectory before the actuator starts moving. The calculation of compensation instructions considers the contributions of static and dynamic compensation, and the total compensation amount is obtained by weighted superposition. The compensation execution process superimposes the compensation instructions on the original control instructions to form the corrected actuator control instructions. The compensation effect is evaluated by monitoring the deviation between the actual trajectory and the expected trajectory in real time, and the compensation parameters are automatically adjusted when the deviation exceeds the allowed range. The final output of the compensated posture parameters includes the rotation and displacement parameters corrected by static and dynamic compensation, ensuring that the actuator can accurately achieve the expected posture adjustment.

[0052] In a specific embodiment, the process of performing step S105 can specifically include the following steps: The compensated posture parameters are input into the axis-angle representation method for rotation deviation decomposition processing to obtain rotation deviation data containing rotation axes and rotation angles; According to the rotation deviation data, the translation deviation is decomposed into X, Y, and Z direction displacement amounts through three-dimensional coordinate decomposition to obtain three-dimensional displacement deviation data; Based on the three-dimensional displacement deviation data, the part alignment process is decomposed into multiple motion sub-stages through piecewise linear interpolation method to obtain stage-by-stage motion parameters; According to the stage-by-stage motion parameters, the motion speed when approaching the target position is automatically reduced through the variable speed planning strategy to obtain the optimized alignment trajectory; The optimized alignment trajectory is input into the closed-loop feedback control mechanism for real-time trajectory adjustment processing to obtain the part alignment state containing position accuracy and angle accuracy.

[0053] Specifically, the axis-angle representation converts the rotation matrix in the compensated pose parameters into a combination of rotation axis and rotation angle, which avoids the singularity problem in Euler angle representation. The conversion process first extracts the rotation angle from the rotation matrix, and determines the size of the rotation angle by calculating the trace of the rotation matrix. The rotation angle is equal to the result of the inverse cosine function acting on the matrix trace minus one divided by two. The calculation of the rotation axis is obtained by analyzing the skew-symmetric part of the rotation matrix, and the three components of the rotation axis vector are equal to the difference between the specific elements in the rotation matrix divided by the sine value of the rotation angle. Special processing methods are used when the rotation angle is close to zero, and Taylor expansion is used to avoid the singularity problem of numerical calculation. The rotation axis vector needs to be normalized to ensure its length is unit length, and the normalization process is achieved by multiplying the original vector by the inverse of the vector length. The advantage of axis-angle representation is that its geometric meaning is clear, the rotation axis indicates the direction of rotation, and the rotation angle indicates the size of rotation, which is convenient for subsequent trajectory planning and control. The decomposition process also includes the determination of the rotation direction, which is determined by the right-hand rule, and the positive direction of the rotation axis corresponds to the positive and negative signs of the rotation angle. Finally, the rotation deviation data containing the three-dimensional rotation axis vector and the scalar rotation angle is obtained.

[0054] The three-dimensional coordinate decomposition is based on the directional analysis of the translation deviation based on the rotation deviation data. This decomposition process decomposes the complex spatial displacement into independent displacement components along the X, Y, Z coordinate axes. The decomposition calculation first establishes a displacement analysis model related to the rotation adjustment, considering the coupling effect of the rotation motion on the translation position. When a part rotates around a specific axis, the position of each point on the part will change accordingly, and the change is related to the distance of the point to the rotation axis and the rotation angle. The displacement decomposition is realized by vector projection method, which projects the total displacement vector onto X, Y, Z coordinate axes to obtain the displacement component in each axis direction. The projection calculation uses dot product operation, and the dot product of displacement vector and unit coordinate axis vector is the displacement component in that direction. The decomposition process also considers the selection of coordinate system, and uses the coordinate system matching the geometric characteristics of the part to ensure the physical meaning of the decomposition result. The X-direction displacement usually corresponds to the length direction adjustment of the part, the Y-direction displacement corresponds to the width direction adjustment, and the Z-direction displacement corresponds to the height direction adjustment. The decomposition result forms the three-dimensional displacement deviation data, which clearly describes the displacement adjustment amount of the part in each direction, providing detailed motion requirement information for subsequent trajectory planning.

[0055] The piecewise linear interpolation method decomposes the part alignment process into multiple continuous motion sub-stages based on the three-dimensional displacement deviation data. This method achieves a smooth motion trajectory by inserting several intermediate positions between the starting position and the target position. The interpolation process first determines the number and position of the segments. The number of segments is determined according to the total adjustment distance and the accuracy requirement. When the adjustment distance is large, more segments are used to ensure the smoothness of the motion. The calculation of the intermediate position uses the equal division or variable step strategy. The equal division strategy evenly distributes the total adjustment amount to each sub-stage, and the variable step strategy dynamically adjusts the length of each segment according to the complexity of the motion. Linear interpolation calculation is achieved by establishing a linear relationship between adjacent position points. The positions within each sub-stage change according to a linear function. The interpolation parameters include the continuity constraints of position, velocity and acceleration, ensuring smooth transition of motion parameters between sub-stages. The segmentation process also considers the coordination of rotational and translational motion, ensuring the consistency of rotational adjustment and displacement adjustment in time. Each motion sub-stage contains the starting position, ending position, motion time and velocity parameters of the stage, forming a complete set of motion parameters for the sub-stages. The division of motion sub-stages also considers the dynamics constraints of the actuators, including maximum speed, maximum acceleration and joint angle limitations, etc. physical constraints.

[0056] The variable speed planning strategy adaptively adjusts the motion speed of the part when approaching the target position based on the sub-stage motion parameters. This strategy balances alignment efficiency and alignment accuracy by dynamically adjusting the motion speed of each stage. The speed planning uses trapezoidal or S-shaped velocity curves. The trapezoidal curve contains three stages of acceleration, constant speed and deceleration, and the S-shaped curve adds an acceleration change process to the acceleration and deceleration stages to achieve smoother motion. The planning process dynamically determines the motion speed according to the distance between the current position and the target position. A higher speed is used when the distance is far to improve efficiency, and a lower speed is used when the distance is close to improve accuracy. The speed adjustment function uses an exponential decay or a polynomial function, and the function parameters are adjusted according to the weight, inertia and accuracy requirements of the part. Automatic reduction processing is achieved by setting a speed threshold and a distance threshold. When the distance between the part and the target position is less than the set threshold, the speed is automatically reduced to the precision adjustment speed. The speed planning also considers the coordination of motion in different directions, ensuring that the motion speed in X, Y and Z directions matches each other, avoiding unnecessary coupling errors. The optimization process finds the optimal combination of speed parameters through iterative calculation to minimize the total alignment time while meeting the accuracy requirements. The final optimized alignment trajectory contains position, velocity and acceleration information at each time, forming a complete motion planning data.

[0057] The closed-loop feedback control mechanism is based on real-time trajectory adjustment of the optimized alignment trajectory, which detects and corrects trajectory deviations by continuously monitoring the actual position and attitude of the part. The feedback control system consists of three main components: position sensors, attitude sensors, and controllers. Position sensors provide real-time three-dimensional coordinate information of the part, and attitude sensors provide real-time rotation angle information of the part. The controller uses a PID control algorithm or more advanced adaptive control algorithm to calculate the correction control amount by comparing the deviation between the actual trajectory and the expected trajectory. The deviation calculation includes position deviation and attitude deviation. Position deviation is obtained by vector difference between actual position and expected position, and attitude deviation is obtained by relative transformation between actual attitude matrix and expected attitude matrix. The control algorithm calculates the corresponding correction amount according to the deviation size and trend, which includes the contribution of proportional, integral and differential terms. Real-time adjustment processing adds the correction amount to the original control command to form the real-time updated actuator control command. Trajectory adjustment also includes an abnormality detection function that automatically triggers an emergency stop or re-plans the program when the deviation exceeds the safety range. Precision evaluation is achieved by calculating the deviation between the final alignment result and the target state. Position accuracy is obtained by calculating the root mean square value of the position deviation, and angle accuracy is obtained by calculating the root mean square value of the angle deviation. The final evaluation of the part alignment state includes the judgment of alignment success or failure, the assessment of precision level and the statistics of repeatability index, forming a complete alignment quality report.

[0058] The above describes the industrial part alignment method based on visual analysis in the embodiments of the present application. The industrial part alignment system based on visual analysis in the embodiments of the present application is described below. Please refer to Figure 2 An embodiment of the industrial part alignment system based on visual analysis in the embodiments of the present application includes: The acquisition module is configured to perform image acquisition processing on the industrial part through a three-view camera, and to perform preprocessing on the acquired image through gradient amplitude local contrast enhancement to obtain a part enhanced image. The recognition module is configured to identify the part edge contour and key control points through hierarchical feature extraction based on the part enhanced image to obtain a part multi-dimensional feature set. The setting module is configured to set the part geometric center as the coordinate origin and establish a dynamic reference coordinate system based on the part multi-dimensional feature set to obtain a part space attitude matrix. The compensation module is configured to compensate the attitude deviation through Z-axis offset and rotation coupling error analysis based on the difference between the part space attitude matrix and the target attitude to obtain a compensated attitude parameter. The optimization module is configured to decompose the attitude adjustment process into multiple sub-stages based on the compensated attitude parameter and optimize the alignment trajectory through a variable speed planning strategy to obtain a part alignment state.

[0059] The above Figure 2 The vision analysis-based industrial part alignment system in the embodiment of the application is described in detail from the perspective of a modular functional entity, and the vision analysis-based industrial part alignment device in the embodiment of the application is described in detail from the perspective of hardware processing.

[0060] With reference to Figure 3 The embodiment of the application also provides a vision analysis-based industrial part alignment device, which can be a server, and the internal structure of the vision analysis-based industrial part alignment device can be as shown in Figure 3 The vision analysis-based industrial part alignment device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. The processor of the computer is used to provide computing and control capabilities. The memory of the vision analysis-based industrial part alignment device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium. The database of the vision analysis-based industrial part alignment device is used to store corresponding data in the embodiment. The network interface of the vision analysis-based industrial part alignment device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the above method.

[0061] Those skilled in the art can understand Figure 3 The structure shown in the embodiment is only a block diagram of part of the structure related to the scheme of the application, and does not constitute a limitation on the vision analysis-based industrial part alignment device to which the scheme of the application is applied.

[0062] The application also provides a computer readable storage medium, which can be a non-volatile computer readable storage medium or a volatile computer readable storage medium. The computer readable storage medium stores instructions, and when the instructions are run on a computer, the computer executes the steps of the vision analysis-based industrial part alignment method.

[0063] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, the system and the unit described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein.

[0064] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the entire or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a visual analysis-based industrial part alignment device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0065] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for aligning industrial parts based on visual analysis, characterized in that, The method includes: The images of industrial parts are acquired and processed by a three-view camera, and the acquired images are preprocessed by gradient amplitude local contrast enhancement to obtain enhanced images of the parts. Based on the enhanced image of the part, the edge contour and key control points of the part are identified and processed by hierarchical feature extraction to obtain a multi-dimensional feature set of the part; Based on the multi-dimensional feature set of the part, the geometric center of the part is set as the origin of the coordinate system and a dynamic reference coordinate system is established to obtain the spatial posture matrix of the part. Based on the difference between the spatial attitude matrix of the part and the target attitude, the attitude deviation is compensated by Z-axis offset and rotation coupling error analysis to obtain the compensated attitude parameters. Based on the compensated attitude parameters, the attitude adjustment process is decomposed into multiple sub-stages and the alignment trajectory is optimized using a variable speed planning strategy to obtain the part alignment state.

2. The vision analysis based industrial part alignment method of claim 1, wherein, The process involves acquiring and processing images of industrial parts using a three-view camera, and preprocessing the acquired images using gradient magnitude local contrast enhancement to obtain enhanced images of the parts, including: Two cameras are installed at a 45-degree angle for binocular stereo vision acquisition, and a third camera is used to capture top-down images vertically downwards, resulting in original images of the parts from multiple perspectives. Based on the original multi-view images of the part, the brightness distribution of the LED ring light source is adjusted by a regional light intensity control algorithm to obtain a part image that eliminates reflective interference. Based on the gradient direction consistency index of the 8-neighborhood of the pixel in the part image, the edge region of the part is automatically identified to obtain edge region identification data. Based on the edge region identification data, the contrast of different regions is differentially enhanced by calculating the gradient magnitude to obtain a locally contrast-enhanced image; The local contrast-enhanced image is input into a wavelet transform denoising algorithm for multi-scale denoising processing to obtain the enhanced image of the part.

3. The vision analysis based industrial part alignment method of claim 1, wherein, The process involves identifying and processing the edge contours and key control points of the part based on the enhanced image of the part through hierarchical feature extraction, resulting in a multi-dimensional feature set of the part, including: The enhanced image of the part is input into the improved Canny edge detection algorithm for dual threshold adaptive adjustment processing to obtain the edge contour data of the part. Based on the edge contour data of the part, the improved SURF algorithm is used to perform key point detection processing on the corner points, straight line intersections and curvature change points of the part to obtain the feature control points of the part. Based on the control points of the part features, the straight and circular features of the part are geometrically detected by Hough transform to obtain the geometric topology of the part. Based on the geometric topology of the part, the correlation constraint relationship between the three levels of features is verified by the feature consistency verification algorithm to obtain a reliable feature point set; The reliable feature point set is input into a weighted voting mechanism for feature fusion processing to obtain a multi-dimensional feature set of the part that includes position, orientation, and scale information.

4. The vision analysis based industrial part alignment method of claim 3, wherein, The step involves using the improved SURF algorithm to perform key point detection processing on the corner points, line intersections, and curvature change points of the part based on the part edge contour data, to obtain the part feature control points, including: The part edge contour data is input into a Hessian matrix calculation for response value calculation processing, to obtain a Hessian response value of a part edge pixel point; According to the Hessian response value, a local extreme value of the response value is screened and processed through a non-maximum suppression algorithm, to obtain a candidate key point position coordinate; Based on the candidate key point position coordinate, a part regular geometric feature is described and processed through a straight line segment and a circular arc segment special descriptor calculation, to obtain a key point feature descriptor; According to the key point feature descriptor, a curvature mutation position of a part contour is identified and processed through a curvature change detection algorithm, to obtain a curvature change feature point; The curvature change feature point is fused and matched with the candidate key point position coordinate, to obtain the part feature control point containing an angle point, a straight line intersection point and a curvature change point.

5. The vision analysis based industrial part alignment method of claim 1, wherein, The part multi-dimensional feature set is input into a least square fitting for part main geometric contour fitting processing, to obtain a part geometric center coordinate; According to the part geometric center coordinate, a principal component analysis method is used to calculate and process a principal axis direction of the part multi-dimensional feature set, to obtain a part principal axis feature vector; Based on the part principal axis feature vector, a feature vector corresponding to a maximum eigenvalue is set as an X-axis direction and a feature vector corresponding to a second maximum eigenvalue is set as a Y-axis direction, to obtain a part coordinate axis direction vector; According to the part coordinate axis direction vector, a Z-axis direction is determined through a right-hand rule, and a dynamic reference coordinate system is obtained with the part geometric center coordinate as a coordinate origin; The dynamic reference coordinate system is input into a multi-view geometric constraint pose solving algorithm for part current pose calculation processing, to obtain the part space pose matrix containing a rotation matrix and a translation vector. According to the difference between the part space pose matrix and a target pose, a pose deviation is compensated through Z-axis offset and rotation coupling error analysis, to obtain a compensated pose parameter, including:

6. The vision analysis based industrial part alignment method of claim 1, wherein, The part space pose matrix and the target pose matrix are subjected to difference calculation processing, to obtain a pose deviation matrix containing a rotation error and a displacement error; According to the pose deviation matrix, partial derivatives of part pose parameters are calculated through a Jacobian matrix, to obtain error sensitivity analysis data; Based on the error sensitivity analysis data, a position offset caused by end effector pose adjustment is calculated through Z-axis offset and rotation coupling analysis, to obtain a coupling error influence coefficient; According to the coupling error influence coefficient, a position offset amount in the pose adjustment process is predicted through a kinematics inverse solution algorithm, to obtain a predicted compensation trajectory; The predicted compensation trajectory is input into a feedforward compensation mechanism for dynamic error compensation processing, to obtain the compensated pose parameter containing a static compensation parameter and a dynamic compensation parameter. ​ 7. The vision analysis based industrial part alignment method of claim 1, wherein, Based on the compensated attitude parameters, the attitude adjustment process is decomposed into multiple sub-stages, and the alignment trajectory is optimized using a variable velocity planning strategy to obtain the part alignment state, including: The compensated attitude parameters are converted into the axis angle representation and then subjected to rotational deviation decomposition to obtain rotational deviation data containing the rotation axis and rotation angle. Based on the rotational deviation data, the translational deviation is decomposed into displacements in the X, Y, and Z directions through three-dimensional coordinate decomposition to obtain three-dimensional displacement deviation data. Based on the three-dimensional displacement deviation data, the part alignment process is decomposed into multiple motion sub-stages using a piecewise linear interpolation method to obtain the staged motion parameters. Based on the phased motion parameters, the motion speed when approaching the target position is automatically reduced by a variable speed planning strategy to obtain an optimized alignment trajectory. The optimized alignment trajectory is input into a closed-loop feedback control mechanism for real-time trajectory adjustment to obtain the part alignment state, which includes positional and angular accuracy.

8. A vision analysis based industrial part alignment system, characterized by, For implementing the vision analysis-based industrial part alignment method as described in any one of claims 1-7, the vision analysis-based industrial part alignment system comprises: The acquisition module is used to acquire and process images of industrial parts through a three-view camera, and to preprocess the acquired images by gradient amplitude local contrast enhancement to obtain enhanced images of the parts. The recognition module is used to identify the edge contour and key control points of the part based on the enhanced image of the part through hierarchical feature extraction, so as to obtain a multi-dimensional feature set of the part. The setting module is used to set the geometric center of the part as the origin of the coordinate system and establish a dynamic reference coordinate system based on the multi-dimensional feature set of the part, so as to obtain the spatial posture matrix of the part. The compensation module is used to compensate for the attitude deviation based on the difference between the part's spatial attitude matrix and the target attitude, through Z-axis offset and rotational coupling error analysis, to obtain the compensated attitude parameters. The optimization module is used to decompose the attitude adjustment process into multiple sub-stages based on the compensated attitude parameters and optimize the alignment trajectory through a variable speed planning strategy to obtain the part alignment state.

9. A vision analysis based industrial part alignment apparatus, characterized by, It includes a memory and a processor, the memory storing a computer program that can run on the processor, the processor executing the computer program to implement the visual analysis-based industrial part alignment method according to any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is run by the processor, it causes the processor to execute the visual analysis-based industrial part alignment method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Industrial part registration method based on machine vision

    CN119068030A

  • Rapid point cloud data processing system based on 3D vision

    CN120510606A

  • Multi-sensor combined calibration device and method

    JP2022039906A

  • System and method for positioning error compensation during manufacturing of complex-shaped gas turbine engine parts

    US20140257542A1

  • Digital twin modeling method oriented to mobile robot milling processing

    WO2022007753A1

Cited By

  • Four-direction shuttling robot positioning method based on machine vision

    CN121353415A

  • Uncertain visual perception enhancement method and system based on local contour

    CN121391693A

  • GIL through pipe auxiliary docking method and system based on machine vision

    CN121546479A

  • A machine vision-based method and system for assisted docking of GIL pipes

    CN121546479B

  • Multi-column image two-stage alignment method and system based on adaptive positioning points

    CN121564054A