Intelligent electric wrench-oriented micro screw hole position high-precision visual positioning method
By using a closed-loop control system based on image quality feedback and a lightweight multi-task network, combined with a dynamic detection head and teachless hand-eye calibration, the problems of low efficiency and poor accuracy in the assembly of miniature screws are solved, achieving high-precision and low-cost positioning of miniature screw holes, which is suitable for real-time fastening operations of intelligent electric screwdrivers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGSHU INSTITUTE OF TECHNOLOGY
- Filing Date
- 2026-05-08
- Publication Date
- 2026-07-24
Smart Images

Figure CN122142742B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a high-precision visual positioning method for miniature screw holes in intelligent electric screwdrivers, belonging to the field of image point positioning. Background Technology
[0002] Miniature screws have wide applications in high-end manufacturing fields such as 3C electronics, medical devices, and aerospace. In particular, with the development of smart devices in recent years, the integration of electronic information technology is becoming increasingly sophisticated, leading to higher demands and requirements for miniaturization and micro-screws. For example, a VR headset requires dozens of miniature screws with a diameter of only 0.8mm for precise fastening, and the diameter of the micro-screw holes on a smartphone motherboard is less than 2mm.
[0003] However, the assembly of a large number of miniature screws still relies on manual assembly, which suffers from low efficiency, poor precision, and high defect rate. Although assembly solutions based on traditional machine vision and robotics technologies have effectively improved assembly efficiency, the small size of miniature screws and their sensitivity to light still present drawbacks such as low detection accuracy, poor adaptability, and great susceptibility to environmental influences. This makes it difficult for electric screwdriver mechanisms to accurately complete positioning and alignment, thus affecting assembly efficiency. The positioning and detection of miniature screws has become a bottleneck in precision assembly.
[0004] To address the aforementioned challenges, this invention proposes a high-precision visual positioning method for miniature screw holes on intelligent electric screwdrivers. It introduces a closed-loop control system based on image quality feedback, constructs a lightweight multi-task network, and applies non-destructive downsampling and dynamic detection heads to achieve efficient and high-precision multi-task joint prediction of position, category, and angle. Furthermore, it employs automatic feature point acquisition and affine transformation hand-eye matrix methods to achieve teachless hand-eye calibration, ultimately realizing a high-precision, high-stability, and low-cost intelligent solution with broad application market potential and economic value. Summary of the Invention
[0005] The present invention provides a high-precision visual positioning method for miniature screw holes in intelligent electric screwdrivers to solve the problems existing in the prior art.
[0006] The technical solutions adopted in this invention are as follows:
[0007] A high-precision visual positioning method for miniature screw holes on intelligent electric screwdrivers, applied to assembly systems including intelligent electric screwdrivers and multi-axis robots, includes the following steps:
[0008] An initial image of the workpiece to be inspected, including the micro screw holes, is acquired by a dynamic active light source control system, and an image quality evaluation function is calculated.
[0009] The light source parameters of the dynamic active light source control system are adjusted according to the image quality evaluation function to obtain an optimized image;
[0010] The optimized image is input into a lightweight multi-task neural network model. Multi-scale features are extracted through a backbone network based on lossless downsampling. Feature fusion is performed through a multi-scale feature fusion network. Boundary box regression and angle regression are performed through a dynamic detection head to obtain the pixel coordinates and angle information of the micro screw hole.
[0011] The affine transformation matrix is obtained by a teachless hand-eye calibration method. The teachless hand-eye calibration method uses the tip of the electric screwdriver as a calibration feature, controls the multi-axis manipulator to move the tip of the electric screwdriver to three non-collinear positions within the camera's field of view, records the three-dimensional coordinates of the tip of the electric screwdriver in the multi-axis manipulator's base coordinate system and its corresponding image coordinates, and solves the affine transformation matrix based on the correspondence between the three-dimensional coordinates and the image coordinates.
[0012] Based on spatial vector mapping, the pixel coordinates are transformed to the multi-axis manipulator base coordinate system using the affine transformation matrix to obtain the positioning coordinates of the micro screw hole for intelligent electric screwdriver attachment.
[0013] Furthermore, the dynamic active light source control system includes a coaxially arranged multi-angle ring light source module, a light source driving and adjustment module, and an image acquisition and quality evaluation module;
[0014] The multi-angle ring light source module includes an outer ring LED, a middle ring LED, and an inner ring LED arranged radially from the outside to the inside; the outer ring LED points to the center of the optical axis at a 45° tilt angle, the middle ring LED points to the center of the optical axis at a 30° tilt angle, and the inner ring LED points to the center of the optical axis at a 15° tilt angle, with a ring diffuser plate installed in front of the light-emitting face.
[0015] Furthermore, the image quality evaluation function is the gradient energy of the effective edge region, and its calculation formula is as follows:
[0016] ,
[0017] in, For image, and These are the height and width of the image, respectively. and pixel coordinates The transverse and longitudinal gradients at the location To comprehensively consider edge strength and , and These represent the low and high thresholds for gradient energy, respectively. This is an indicator function used to exclude overexposed and flat areas.
[0018] Furthermore, adjusting the light source parameters of the dynamic active light source control system according to the image quality evaluation function includes:
[0019] With the goal of maximizing the image quality evaluation function, gradient descent with momentum is used to iteratively update the light source parameters; the light source parameters include illumination tilt angle and / or light intensity; the parameter update formula is:
[0020] ,
[0021] in, For the number of iterations, , The first sequence The light source parameter vector of the next iteration , The first sequence The momentum vector of the next iteration. For learning rate, The momentum decay coefficient, For gradient, For the first The quality score of the next iteration.
[0022] Furthermore, the backbone network based on lossless downsampling includes 4 sets of lossless downsampling modules and 8 residual blocks;
[0023] The lossless downsampling module divides the input feature map into 2×2 blocks and assigns 4 pixels in each block to the same position in 4 different sub-feature maps;
[0024] The multi-scale feature fusion network includes a top-down path and a bottom-up path. The top-down path is upsampled through a feature pyramid, and the bottom-up path is downsampled through a path aggregation network.
[0025] Furthermore, the dynamic detection head includes a scale-aware attention module, a spatial-aware attention module, and a task-aware attention module connected in sequence, wherein:
[0026] The scale-aware attention module learns channel weights through global average pooling and feature compression.
[0027] The spatial awareness attention module learns spatial offsets through deformable convolutions. The deformable convolutions generate two-dimensional spatial offsets of sampling points through parallel offset prediction branches. The two-dimensional spatial offsets include horizontal offset components and vertical offset components.
[0028] The task-aware attention module learns the parameters of a dynamic activation function through a fully connected layer, generating different activation characteristics for classification and regression tasks.
[0029] Furthermore, the loss function of the lightweight multi-task neural network model includes classification loss, bounding box regression loss, and angle regression loss, wherein:
[0030] The classification loss uses FocalLoss, the bounding box regression loss uses CIoULoss, and the angle regression loss uses Smooth-L1Loss; the weight coefficients of the classification loss, bounding box regression loss, and angle regression loss are 1.0, 2.0, and 0.5, respectively.
[0031] Furthermore, the angle regression loss is calculated by cyclical angle processing to determine the angle difference, which is defined as:
[0032] ,
[0033] in, For the prediction angle, For the true perspective; Pi For the angle difference;
[0034] The angle regression loss is calculated based on the angle difference, and the calculation formula is as follows:
[0035] .
[0036] Furthermore, obtaining the affine transformation matrix through the teaching-free hand-eye calibration method includes:
[0037] The multi-axis robotic arm is controlled to move the tip of the electric screwdriver shaft to a first position, a second position, and a third position within the camera's field of view, wherein the first position, the second position, and the third position are not collinear;
[0038] The sub-pixel center of the electric screwdriver tip at each position is identified by a visual algorithm to obtain the corresponding image coordinates;
[0039] Record the three-dimensional coordinates of the electric screwdriver tip in the multi-axis robot's base coordinate system when the multi-axis robot is in various positions;
[0040] A matrix equation is constructed based on the correspondence between 3D coordinates and image coordinates, and the affine transformation matrix is solved by the least squares method.
[0041] Furthermore, based on spatial vector mapping, transforming the pixel coordinates to the multi-axis manipulator base coordinate system using an affine transformation matrix includes:
[0042] Depth information of micro screw holes is obtained by laser ranging;
[0043] Based on the depth information, the pixel coordinates are converted into three-dimensional coordinates in the camera coordinate system using an inverse projection function;
[0044] Based on the hand-eye matrix and the pose matrix of the multi-axis manipulator end effector in the multi-axis manipulator base coordinate system, the three-dimensional coordinates in the camera coordinate system are transformed to the multi-axis manipulator base coordinate system.
[0045] The present invention has the following beneficial effects:
[0046] (1) By constructing a closed-loop light source control system based on image quality evaluation function, the tilt angle and light intensity of the three-layer ring LED light source are adaptively adjusted for highly reflective metal surfaces and structures such as deep holes and blind holes. This effectively suppresses specular reflection and hard shadows, ensures that the edge features of screw holes are clearly distinguishable, and reduces the probability of imaging failure caused by changes in lighting conditions.
[0047] (2) A backbone network based on lossless downsampling is adopted to retain the detailed information of small targets while reducing the spatial dimension of the feature map; combined with multi-scale feature fusion and dynamic detection head, pixel-level localization of micro screw hole positions is achieved. While maintaining high detection accuracy, the number of model parameters is small and the processing speed meets the real-time requirements, achieving a good balance between accuracy and speed.
[0048] (3) By using the physical characteristics of the electric screwdriver tip itself as the calibration reference, automatic calibration can be completed by controlling the multi-axis robot to move to three non-collinear positions. There is no need for manual teaching to align multiple calibration points, which shortens the debugging time during production line changeover and reduces the skill requirements for operators.
[0049] (4) By using a lightweight multi-task neural network to synchronously complete bounding box regression and angle regression, and combining spatial vector mapping to directly transform pixel coordinates to the multi-axis manipulator base coordinate system, a complete closed loop from image acquisition to robot motion control is formed, which is suitable for real-time locking operations of intelligent electric screwdrivers. Attached Figure Description
[0050] Figure 1 This is a schematic diagram of the overall system structure on which the method of the present invention is based.
[0051] Figure 2 This is a schematic diagram of a multi-angle ring light source module.
[0052] Figure 3 This is a schematic diagram of the LED tilt adjustment mechanism.
[0053] Figure 4 This is a schematic diagram of the overall architecture of a lightweight multi-task neural network model.
[0054] Figure 5This is a schematic diagram illustrating the principle of lossless downsampling.
[0055] Figure 6 This is a schematic diagram of the internal structure of the residual block.
[0056] Figure 7 This is a schematic diagram of the structure of a multi-scale feature fusion network.
[0057] Figure 8 This is a schematic diagram of the internal structure of the dynamic detection head.
[0058] in:
[0059] 1. Outer ring LED chip; 2. Middle ring LED chip; 3. Inner ring LED chip; 4. Diffuser plate. Detailed Implementation
[0060] The invention will now be further described with reference to the accompanying drawings.
[0061] like Figure 1 As shown, this invention provides a high-precision visual positioning method for miniature screw holes on intelligent electric screwdrivers. It is applied to an assembly system that includes an intelligent electric screwdriver and a multi-axis robot, achieving integrated intelligent control of "imaging-computation-control". The system consists of three parts: a dynamic active light source control system at the hardware layer, a lightweight multi-task neural network model at the algorithm layer, and a spatial vector mapping and teach-free coordinate transformation at the control layer.
[0062] The dynamic active light source control system adopts an integrated coaxial design, which is installed at the front end of the locking axis of the intelligent electric screwdriver. With the locking axis of the electric screwdriver as the optical axis center, a multi-angle ring light source module, a light source driving and adjustment module, and an image acquisition and quality evaluation module are arranged sequentially from top to bottom along the axis. The industrial camera is coaxially arranged with the light source system. The multi-axis robot arm drives the intelligent electric screwdriver to complete the displacement movement and locking action. The host computer loads a neural network model to complete image detection and coordinate transformation, and finally outputs the positioning coordinates of the micro screw hole position in the multi-axis robot arm base coordinate system for precise locking of the intelligent electric screwdriver.
[0063] As shown in Figure 2, the multi-angle ring light source module of the dynamic active light source control system consists of three layers of LED chips. Each layer of LED chips independently forms a controllable light source ring, and each group contains 6-12 high color rendering white LEDs that are evenly arranged along the circumference.
[0064] The outer ring LED chip 1 is tilted at a large angle of 45°±5° towards the center of the optical axis, and the resulting illumination light is obliquely incident on the workpiece surface at a high angle, which is used to highlight the edge features and thread details of the screw hole, and is especially suitable for detecting fine geometric features on highly reflective metal surfaces.
[0065] The middle LED chip 2 is tilted at a medium angle of 30°±5° towards the center of the optical axis. The resulting illumination light is incident on the workpiece surface at a near-vertical angle, which can clearly show the hole outline on the flat surface and is used for the initial positioning of screw holes and extraction of center coordinates.
[0066] The inner LED chip 3 is tilted at a small angle of 15°±5° towards the center of the optical axis, and a ring-shaped diffuser plate 4 is installed in front of the LED light source. The diffuser plate converts the light emitted by the point light source into a uniform surface light source, which is scattered to the workpiece surface in a wide angle range (about 30°-60°), thereby effectively suppressing specular reflection and hard shadows, achieving uniform illumination. It is used for areas that are difficult to illuminate directly, such as deep holes, blind holes, and grooves, to ensure that the internal features of the hole are clearly visible.
[0067] like Figure 3 Each LED light source is powered by an independent driving circuit, enabling high-precision light intensity control. To adapt to different workpiece surface characteristics and varying mounting heights, the illumination tilt angle of the outer and middle LED groups can be dynamically adjusted via a stepper motor drive mechanism. Each LED group is independently mounted on a bracket that can rotate around a horizontal axis. The bracket is connected to a sliding displacement block via a connecting rod. The stepper motor drives the lead screw to rotate, causing the sliding displacement block to move vertically. The vertical displacement is converted into the rotation angle of the LED bracket via the connecting rod.
[0068] The system acquires the first frame of the initial image using default lighting parameters. Image quality evaluation function To evaluate imaging performance, this function is calculated based on the gradient energy of the effective edge region, as shown in the following formula:
[0069] ,
[0070] In the formula, For the image to be evaluated, and These are the height and width of the image, respectively. For pixel coordinates, and These represent the horizontal and vertical gradients of a pixel, respectively. and These are the gradient energy thresholds, with values of 20 and 230, used to distinguish between overexposed and flat areas. This is an indicator function used to remove invalid gradient information from overexposed and flat areas. To comprehensively consider edge strength and ,when Indicates the overexposed area, when Indicates a flat area.
[0071] The imaging states corresponding to the image quality evaluation function values are shown in Table 1 below:
[0072] Table 1. Meaning of Image Quality Evaluation Function Values
[0073]
[0074] The core objective of light source adjustment is to find the optimal light source parameters that maximize the image quality score. ,Right now:
[0075] ,
[0076] Transform it into a minimization problem:
[0077] ,
[0078] Iterative formulas using standard gradient descent:
[0079] ,
[0080] In the formula, For the first The light source parameter vector of the next iteration The learning rate controls the step size for each update; This represents the gradient of the quality fraction with respect to the light source parameters.
[0081] To accelerate convergence and avoid local optima, a momentum term is introduced. The parameter update formula is:
[0082] ,
[0083] in, As a momentum vector, it accumulates historical gradient information; The momentum decay coefficient (0.9 in this invention) controls the influence of historical gradients. After parameter updates, the light source is readjusted and images are acquired, iterating repeatedly until the image quality reaches an excellent standard.
[0084] The optimized image is input into a lightweight multi-task neural network model, such as Figure 4 As shown, the model is a single-stage detection architecture, consisting of a backbone network, a multi-scale feature fusion network, and a dynamic detection head connected in series, which can simultaneously complete target detection, pose regression, and classification tasks.
[0085] Combination Figure 5The backbone network comprises four sets of lossless downsampling convolutional modules and eight residual blocks, transferring spatial dimension information to the channel dimension. This solves the problem of feature loss in small targets caused by traditional convolution and pooling operations, especially for small target scenarios such as micro screws. The computational principle of lossless downsampling is as follows:
[0086] ,
[0087] In the formula, , , , , The feature map is divided into height and width, respectively, using lossless downsampling. The residual block assigns pixels to the same location in the four sub-feature maps, preserving feature information completely, as shown in Figure 6. The residual block is placed at the end of the backbone network, employing channel-wise and point-wise convolutional structures to alleviate the gradient vanishing problem and achieve feature reuse and enhancement. The calculation principle is as follows:
[0088] ,
[0089] in, Output results for the module. Indicates input feature data, It is a 3×3 channel convolution. for Pointwise convolution, BN for batch normalization, and ReLU for activation function. This is the forward propagation function.
[0090] like Figure 7 As shown, the multi-scale feature fusion network includes two paths, top-down and bottom-up, to achieve bidirectional fusion of multi-scale features and improve the detection performance of small targets.
[0091] The top-down approach employs a feature pyramid structure, injecting deep semantic information into shallow features to enhance their semantic expressive power. The calculation method is as follows:
[0092] ,
[0093] In the formula, It is the backbone network. The output feature map of the layer, It is the first feature pyramid Layer fusion feature map It is a bilinear interpolation upsampling method that magnifies the feature map by a factor of 2. This indicates element-wise addition. yes Convolution is used to pass all feature maps through... Convolution is standardized to 256 channels.
[0094] The bottom-up path employs a path aggregation network to enhance the location accuracy of deep features. The calculation method is as follows:
[0095] ,
[0096] In the formula, It is the first feature pyramid The output of the layer, It is the path aggregation network. Layer fusion feature map It has a step size of 2. Convolution shrinks the feature map by a factor of 2.
[0097] As shown in Figure 8, the dynamic detection head consists of a three-layer attention sequence of scale perception, spatial perception, and task perception, and the overall calculation is as follows:
[0098] ,
[0099] in, For scale-aware attention. For spatial perception attention, For task-aware attention, For the input feature map, This is the feature map generated after processing by a three-layer attention mechanism.
[0100] The purpose of the scale-aware attention module is to learn the weights of each channel, enabling the network to adaptively focus on the feature layers most important to the current detection task. It first performs global average pooling on the input feature map, then performs feature compression and excitation, and finally completes normalization and feature weighting. Its calculation is shown in the following formula:
[0101] ,
[0102] In the formula, For global average pooling, This is the Sigmoid activation function.
[0103] The core of the spatial awareness attention module is deformable convolution. Deformable convolution learns offsets to allow the sampling grid to conform to the actual shape of the target. Traditional convolution has a receptive field of a regular rectangular grid, which cannot adapt to irregularly shaped targets. For example, the shape of a micro screw hole may be an irregular ellipse due to processing errors or lighting angles. Therefore, this invention introduces deformable convolution to improve adaptability. Its calculation method is as follows:
[0104] ,
[0105] in, It is the Sigmoid activation function. Calculate the mean for the channel dimension. This is a deformable convolution operation. For the output feature map... The deformable convolution at a given position is calculated as follows:
[0106] ,
[0107] In the formula, Indicates the input feature map, The total number of sampling points (e.g., for) convolution, ), For the first The convolution kernel weights for each sampling point For example, the sampling grid offset in a standard convolution operation, such as for Convolution has ,and The improvement of deformable convolution compared to traditional convolution is that it learns the offset from the input feature map.
[0108] offset Through an additional convolutional layer The result is obtained by convolving the input feature map, i.e.:
[0109] ,
[0110] This convolutional layer has the same spatial resolution as the main convolutional layer, and the number of output channels is... This corresponds to the horizontal and vertical offsets for each sampling point. Task-aware attention uses dynamic ReLU to generate suitable activation parameters for classification and regression tasks, calculated as follows:
[0111] ,
[0112] in, This is a global average pooling operation. and These are two fully connected operations used to learn the parameters of a dynamic activation function from the feature data. The dynamic activation function is defined as follows:
[0113] ,
[0114] in, As parameters, through and This was learned from two fully connected networks.
[0115] The output feature map is processed by three parallel... The convolutional layers output the results of the three task branches: classification, bounding box regression, and angle regression. Therefore, the loss function of the multi-scale fusion network in this invention is:
[0116] ,
[0117] in, , , These are the loss functions for the three tasks: classification, bounding box regression, and angle regression. , and These are three weighting coefficients, with values of 1.0, 2.0, and 0.5 respectively.
[0118] Focal Loss is used to address the imbalance problem in classification.
[0119] ,
[0120] in, The predicted probability for each category reflects how closely the predicted result approximates the actual result. , The parameter takes values of 0.25 and 2.0 respectively.
[0121] The bounding box regression loss uses CIoU Loss, which comprehensively considers the overlapping area, center point distance, and aspect ratio.
[0122] ,
[0123] in, The square of the Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. The length of the diagonal of the minimum bounding rectangle. As a measure of aspect ratio consistency, This is a weighting factor.
[0124] In the task of miniature screw inspection, the goal of angle regression is to predict the orientation angle of the screw hole. Because angles are periodic, directly using a conventional regression loss function will lead to gradient discontinuity issues. Therefore, this invention introduces angle cyclicity processing, defining the angle difference as:
[0125] ,
[0126] The angle regression loss uses the Smooth-L1 loss, and its calculation formula is as follows:
[0127] ,
[0128] The loss function is defined as:
[0129] ,
[0130] in, As the independent variable, This is a threshold parameter, typically set to 1.
[0131] After the pixel coordinates and angle information of the micro screw hole position are detected by a lightweight multi-task neural network model, the detection results in the image coordinate system need to be converted to the multi-axis manipulator base coordinate system to drive the multi-axis manipulator to drive the intelligent electric screwdriver to complete the precise locking. This invention achieves precise coordinate conversion by combining spatial vector mapping with teachless hand-eye calibration.
[0132] Let the homogeneous coordinates of the image feature points be... The pose matrix of the multi-axis manipulator end effector in the base coordinate system is: The camera is mounted at the end, and its hand-eye matrix is as follows: The coordinates of the target point in the multi-axis manipulator base coordinate system are then... for:
[0133] ,
[0134] in, It is the inverse projection function. This refers to depth information obtained through a laser rangefinder.
[0135] Traditional calibration methods require manual alignment of multiple points. This invention utilizes the physical characteristics of the electric screwdriver spindle itself for automatic calibration, controlling a multi-axis robotic arm to move the screwdriver spindle tip to any three non-collinear positions within the camera's field of view. These three positions are sequentially designated as the first position. Second position Third position Record readings of multi-axis robotic arms .
[0136] The corresponding image point is obtained by identifying the sub-pixel center of the axis tip using a visual algorithm. Then solve for the affine transformation matrix. ,satisfy Construct matrix equations ,in and It is composed of corresponding points. Solving the matrix using the least squares method The affine transformation matrix can then be obtained. This allows for rapid calibration.
[0137] To verify the detection performance of the multi-scale feature fusion network proposed in this invention, a comparison was made with commonly used detection models in the scenario of visual inspection of micro screws. The results are shown in Table 2. As can be seen from the table, the method proposed in this invention has higher accuracy and faster running speed.
[0138] Table 2 Comparison of Visual Inspection Methods for Miniature Screws
[0139]
[0140] This method optimizes imaging quality through dynamic light source closed-loop optimization, achieves high-precision multi-task detection of micro screw hole positions using lightweight neural networks, simplifies the deployment process of multi-axis robot assembly systems by eliminating the need for teaching calibration, and ultimately achieves high-precision and high-stability visual positioning of micro screw holes, meeting the industrial application requirements of intelligent electric screwdriver automated fastening.
[0141] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements without departing from the principle of the present invention, and these improvements should also be considered within the scope of protection of the present invention.
Claims
1. A high-precision visual positioning method for miniature screw holes on intelligent electric screwdrivers, applied to an assembly system including intelligent electric screwdrivers and multi-axis robotic arms, characterized in that: Includes the following steps: An initial image of the workpiece to be inspected, including the micro screw holes, is acquired by a dynamic active light source control system, and an image quality evaluation function is calculated. The light source parameters of the dynamic active light source control system are adjusted according to the image quality evaluation function to obtain an optimized image; The optimized image is input into a lightweight multi-task neural network model. Multi-scale features are extracted through a backbone network based on lossless downsampling. Feature fusion is performed through a multi-scale feature fusion network. Boundary box regression and angle regression are performed through a dynamic detection head to obtain the pixel coordinates and angle information of the micro screw hole. The affine transformation matrix is obtained by a teachless hand-eye calibration method. The teachless hand-eye calibration method uses the tip of the electric screwdriver as a calibration feature, controls the multi-axis manipulator to move the tip of the electric screwdriver to three non-collinear positions within the camera's field of view, records the three-dimensional coordinates of the tip of the electric screwdriver in the multi-axis manipulator's base coordinate system and its corresponding image coordinates, and solves the affine transformation matrix based on the correspondence between the three-dimensional coordinates and the image coordinates. Based on spatial vector mapping, the pixel coordinates are transformed to the multi-axis manipulator base coordinate system using the affine transformation matrix to obtain the positioning coordinates of the micro screw hole for intelligent electric screwdriver attachment. The image quality evaluation function is the gradient energy of the effective edge region, and its calculation formula is as follows: , in, For image, and These are the height and width of the image, respectively. and pixel coordinates The transverse and longitudinal gradients at the location To comprehensively consider edge strength and , and These represent the low and high thresholds for gradient energy, respectively. This is an indicator function used to exclude overexposed and flat areas; Adjusting the light source parameters of the dynamic active light source control system according to the image quality evaluation function includes: With the goal of maximizing the image quality evaluation function, gradient descent with momentum is used to iteratively update the light source parameters; the light source parameters include illumination tilt angle and / or light intensity; the parameter update formula is: , in, For the number of iterations, , The first sequence The light source parameter vector of the next iteration , The first sequence The momentum vector of the next iteration. For learning rate, The momentum decay coefficient, For gradient, For the first The quality score of the next iteration.
2. The high-precision visual positioning method for miniature screw holes of intelligent electric screwdrivers as described in claim 1, characterized in that: The dynamic active light source control system includes a coaxially arranged multi-angle ring light source module, a light source driving and adjustment module, and an image acquisition and quality evaluation module. The multi-angle ring light source module includes an outer ring LED, a middle ring LED, and an inner ring LED arranged radially from the outside to the inside; the outer ring LED points to the center of the optical axis at a 45° tilt angle, the middle ring LED points to the center of the optical axis at a 30° tilt angle, and the inner ring LED points to the center of the optical axis at a 15° tilt angle, with a ring diffuser plate installed in front of the light-emitting face.
3. The high-precision visual positioning method for miniature screw holes in intelligent electric screwdrivers as described in claim 1, characterized in that: The backbone network based on lossless downsampling consists of 4 sets of lossless downsampling modules and 8 residual blocks; The lossless downsampling module divides the input feature map into 2×2 blocks and assigns the 4 pixels in each block to the same position in 4 different sub-feature maps; The multi-scale feature fusion network includes a top-down path and a bottom-up path. The top-down path is upsampled through a feature pyramid, and the bottom-up path is downsampled through a path aggregation network.
4. The high-precision visual positioning method for miniature screw holes of intelligent electric screwdrivers as described in claim 1, characterized in that: The dynamic detection head includes a scale-aware attention module, a spatial-aware attention module, and a task-aware attention module connected in sequence, wherein: The scale-aware attention module learns channel weights through global average pooling and feature compression. The spatial awareness attention module learns spatial offsets through deformable convolutions. The deformable convolutions generate two-dimensional spatial offsets of sampling points through parallel offset prediction branches. The two-dimensional spatial offsets include horizontal offset components and vertical offset components. The task-aware attention module learns the parameters of a dynamic activation function through a fully connected layer, generating different activation characteristics for classification and regression tasks.
5. The high-precision visual positioning method for miniature screw holes of intelligent electric screwdrivers as described in claim 1, characterized in that: The loss function of the lightweight multi-task neural network model includes classification loss, bounding box regression loss, and angle regression loss, where: The classification loss uses FocalLoss, the bounding box regression loss uses CIoULoss, and the angle regression loss uses Smooth-L1Loss; the weight coefficients of the classification loss, bounding box regression loss, and angle regression loss are 1.0, 2.0, and 0.5, respectively.
6. The high-precision visual positioning method for miniature screw holes of intelligent electric screwdrivers as described in claim 5, characterized in that: The angle regression loss is calculated by cyclically processing the angles to determine the angle difference, which is defined as: , in, For the prediction angle, From a realistic perspective; Pi For the angle difference; The angle regression loss is calculated based on the angle difference, and the calculation formula is as follows: 。 7. The high-precision visual positioning method for miniature screw holes of intelligent electric screwdrivers as described in claim 1, characterized in that: Obtaining affine transformation matrices through a teaching-free hand-eye calibration method includes: The multi-axis robotic arm is controlled to move the tip of the electric screwdriver shaft to a first position, a second position, and a third position within the camera's field of view, wherein the first position, the second position, and the third position are not collinear; The sub-pixel center of the electric screwdriver tip at each position is identified by a visual algorithm to obtain the corresponding image coordinates; Record the three-dimensional coordinates of the electric screwdriver tip in the multi-axis robot's base coordinate system when the multi-axis robot is in various positions; A matrix equation is constructed based on the correspondence between 3D coordinates and image coordinates, and the affine transformation matrix is solved by the least squares method.
8. The high-precision visual positioning method for miniature screw holes of intelligent electric screwdrivers as described in claim 1, characterized in that: Based on spatial vector mapping, the pixel coordinates are transformed to the multi-axis manipulator base coordinate system using an affine transformation matrix, including: Depth information of micro screw holes is obtained by laser ranging; Based on the depth information, the pixel coordinates are converted into three-dimensional coordinates in the camera coordinate system using an inverse projection function; Based on the hand-eye matrix and the pose matrix of the multi-axis manipulator end effector in the multi-axis manipulator base coordinate system, the three-dimensional coordinates in the camera coordinate system are transformed to the multi-axis manipulator base coordinate system.