Calibration method, device and equipment for suspension function module of mechanical arm and mechanical arm system
Through image recognition technology, the pixel and world coordinates of the robotic arm suspension function module are calculated, and the offset is automatically calibrated, which solves the problems of low and inaccurate calibration of traditional calibration efficiency and realizes efficient and accurate calibration of the robotic arm suspension function module.
Patent Information
- Application Number
- CN202411519383.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2024-12-06
AI Technical Summary
The calibration efficiency of the traditional robotic arm suspension function module is low and inaccurate, which is mainly due to the reliance on manual operation and naked eye judgment, resulting in large calibration errors.
Image recognition technology is used to obtain the calibration image of the calibration plate of the functional module calibration needle touching the calibration plate, calculate the pixel coordinates of the calibration needle and the marking point, calculate the world coordinates of the touch point through the mapping relationship between the pixel coordinates and the world coordinates, and calculate the calibration offset. Automatic calibration of the robot arm.
It realizes efficient and accurate calibration of the robotic arm suspension function module, reduces manual errors, and improves calibration accuracy and efficiency.
Smart Images

Figure CN119077748A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot arm positioning technology, and in particular to a calibration method, device, computer equipment, storage medium and computer program product for a robot arm suspension function module, and also to a robot arm system. Background Art
[0002] In traditional technology, the calibration of the suspension function module of the robot arm is generally to place a positioning block with calibration points in the movement area of the robot arm and install a calibration tool on the Z-axis robot arm. Conventional calibration points and calibration tools are both cylindrical edge protrusion structures, and both are the same size. The robot arm with the suspension function module here is mainly used in the field of pipetting equipment, and the function modules include pipette guns, grippers, lid openers, etc.
[0003] When performing position calibration, the calibration tool set on the functional module is moved slowly by manually controlling the mechanical arm to reach the top of the calibration point, and the Z-axis mechanical axis is controlled to slowly descend so that it fits closely with the calibration point to determine the Z-axis coordinate. Then, the edge of the cylinder of the calibration tool is made to coincide with the edge of the cylinder of the calibration point by controlling the mechanical arm to move slowly in the horizontal direction to determine the horizontal coordinate.
[0004] Conventional calibration methods generally use manual methods, which are very inefficient, and there will be certain errors in judging the degree of fit by naked eyes. It can be seen that the calibration of the mechanical arm suspension function module in traditional technology has the defects of inefficiency and inaccuracy. Summary of the invention
[0005] Based on this, it is necessary to provide an efficient and accurate calibration method, device, computer equipment, storage medium and computer program product for a robotic arm suspension functional module in order to solve the above technical problems, and also provide a robotic arm system.
[0006] In a first aspect, the present application provides a calibration method for a mechanical arm suspension function module. The method comprises:
[0007] Acquire a calibration image of a calibration pin of a functional module touching a calibration plate, wherein a marking point with known world coordinates is arranged on the calibration plate;
[0008] Calculating the pixel coordinates of the point where the calibration needle touches the calibration plate in the calibration image;
[0009] Acquire the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates;
[0010] Calculating a calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system;
[0011] The functional module is calibrated according to the calibration offset.
[0012] In one embodiment, the calibration plate is provided with a marking point with known world coordinates; and obtaining the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates includes:
[0013] Calculating the pixel coordinates of the marked points in the calibration image;
[0014] Based on the pixel coordinates of the marking point and the world coordinates of the marking point, a coordinate transposition matrix is calculated by fitting using a preset algorithm, wherein the coordinate transposition matrix represents a mapping relationship between a pixel coordinate system and a world coordinate system;
[0015] The touch coordinates of the touch point in the world coordinate system are calculated according to the transposed matrix and the pixel coordinates of the touch point.
[0016] In one embodiment, calculating the pixel coordinates of the touch point where the calibration needle touches the calibration plate in the calibration image includes:
[0017] Extracting an area image of a touch point where the calibration needle touches the calibration plate in the calibration image;
[0018] The contour of the area image is extracted and calculated to obtain the pixel coordinates of the point where the center of the calibration needle tip touches the calibration plate.
[0019] In one embodiment, obtaining a calibration image of a calibration needle of a functional module touching a calibration plate includes:
[0020] Acquire an original calibration image of the calibration pin of the functional module touching the calibration plate acquired by the image acquisition device;
[0021] The original calibration image is subjected to distortion correction, and the contrast and brightness of the image are dynamically adjusted according to lighting conditions to obtain a calibration image.
[0022] In one embodiment, the number of the marking points is at least three;
[0023] The calculating of the pixel coordinates of the touch point where the calibration needle touches the calibration plate and the pixel coordinates of the marking point in the calibration image comprises:
[0024] Performing feature extraction on the calibration image to obtain pixel coordinates of the marking points;
[0025] Calculating the pixel distance between the touch point of the calibration needle touching the calibration plate and the pixel coordinates of the marking point;
[0026] The pixel coordinates of the touch point are calculated according to the pixel distance and the pixel coordinates of the marking point.
[0027] In one embodiment, the number of the marking points is 4N, and every 4 marking points are arranged in a field shape, and N is a positive integer.
[0028] In one embodiment, after calibrating the functional module according to the calibration offset, the method further includes:
[0029] Collect an image of the calibration needle of the functional module touching the calibration plate after the first calibration process to obtain an initial calibration image;
[0030] Determine whether a touch point on the calibration plate touched by a calibration needle of the functional module in the initial calibration image coincides with an origin of the calibration plate;
[0031] If they have overlapped, the push calibration is completed;
[0032] If they do not overlap, the initial calibration image is used as the calibration image again, and the step of returning to calculate the pixel coordinates of the touch point where the calibration needle touches the calibration plate in the calibration image and the pixel coordinates of the marking point is performed.
[0033] In one embodiment, the calibration method of the mechanical arm suspension function module further includes:
[0034] The function module calibration needle is controlled to descend along the Z-axis direction; when the function module calibration needle touches the calibration plate, a calibration image of the function module calibration needle touching the calibration plate is acquired.
[0035] In a second aspect, the present application also provides a calibration device for a mechanical arm suspension function module. The device comprises:
[0036] An image acquisition module, used to acquire a calibration image of a calibration needle of a functional module touching a calibration plate;
[0037] A pixel coordinate calculation module, used to calculate the pixel coordinates of the touch point where the calibration needle touches the calibration plate in the calibration image;
[0038] A coordinate conversion module, used for acquiring the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates;
[0039] An offset calculation module, used to calculate a calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system;
[0040] The calibration module is used to calibrate the functional module according to the calibration offset.
[0041] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0042] Acquire a calibration image of the calibration pin of the functional module touching the calibration plate;
[0043] Calculating the pixel coordinates of the point where the calibration needle touches the calibration plate and the pixel coordinates of the marking point in the calibration image;
[0044] A coordinate transposition matrix based on the pixel coordinates of the touch point and the pixel coordinates and the world coordinates;
[0045] Calculating a calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system;
[0046] The functional module is calibrated according to the calibration offset.
[0047] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0048] Acquire a calibration image of the calibration pin of the functional module touching the calibration plate;
[0049] Calculating the pixel coordinates of the point where the calibration needle touches the calibration plate and the pixel coordinates of the marking point in the calibration image;
[0050] Acquire the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates;
[0051] Calculating a calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system;
[0052] The functional module is calibrated according to the calibration offset.
[0053] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0054] Acquire a calibration image of the calibration pin of the functional module touching the calibration plate;
[0055] Calculating the pixel coordinates of the point where the calibration needle touches the calibration plate and the pixel coordinates of the marking point in the calibration image;
[0056] Acquire the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates;
[0057] Calculating a calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system;
[0058] The functional module is calibrated according to the calibration offset.
[0059] In a sixth aspect, the present application further provides a robotic arm system, which includes a robotic arm, a functional module, and a controller, wherein the functional module is suspended at the end of the robotic arm, and the controller calibrates the robotic arm using the calibration method of the robotic arm suspended functional module.
[0060] The calibration method, device, computer equipment, storage medium, computer program product and robot system of the above-mentioned robot arm suspension function module obtain the calibration image of the function module calibration needle touching the calibration plate, and the calibration plate is provided with a marking point with known world coordinates; calculate the pixel coordinates of the touch point on the calibration plate touched by the calibration needle in the calibration image and the pixel coordinates of the marking point; based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates, obtain the touch coordinates of the touch point in the world coordinate system; calculate the calibration offset according to the touch coordinates in the world coordinate system and the calibration origin coordinates on the calibration plate in the world coordinate system; calibrate the robot arm according to the calibration offset. In the whole process, the image recognition and positioning method is adopted to automatically calculate the pixel coordinates of the marking point and the pixel coordinates of the touch point, and then the coordinate mapping is performed through the mapping relationship between the pixel coordinates and the world coordinates to accurately determine the touch coordinates, and finally the robot arm is calibrated based on the offset between the touch coordinates and the calibration origin coordinates, so as to realize efficient and accurate calibration of the robot arm suspension function module. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] FIG1 is an application environment diagram of a calibration method for a mechanical arm suspension function module in one embodiment;
[0062] FIG2 is a schematic flow chart of a calibration method for a mechanical arm suspension function module in one embodiment;
[0063] FIG3 is a flow chart of a calibration method for a mechanical arm suspension function module in another embodiment;
[0064] FIG4 is a schematic diagram of the positions of the marking points and the calibration origin on the calibration plate;
[0065] FIG5 is a flow chart of a calibration method for a mechanical arm suspension function module in an application example;
[0066] FIG6 is a structural block diagram of a calibration device for a mechanical arm suspension function module in one embodiment;
[0067] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0069] The calibration method of the mechanical arm suspension function module provided in the embodiment of the present application can be applied to the mechanical arm system application environment as shown in FIG1 . The entire mechanical arm system includes a mechanical arm 102 and a controller 104 . A function module is installed at the arm end of the mechanical arm 102 . A calibration needle is installed under the function module. When the function module calibration is required, the mechanical arm 102 drives the calibration needle of the function module to move slowly downward until a signal is fed back when the calibration plate on the corresponding plane is lightly touched, and the Z coordinate of the upper and lower lifting positions is positioned. At this time, only the calibration of the XY coordinates needs to be performed. The camera acquisition function module calibrates the needle touching the calibration plate of the calibration image, and sends the calibration image to the controller 104. A plurality of marking points are arranged on the calibration plate, and the world coordinates of these marking points are known. The controller 104 calculates the pixel coordinates of the touch point on the calibration plate touched by the calibration needle in the calibration image and the pixel coordinates of the marking point; based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinate and the world coordinate, obtains the touch coordinates of the touch point in the world coordinate system; calculates the calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system; and calibrates the robot arm according to the calibration offset.
[0070] In one embodiment, as shown in FIG. 2 , a calibration method for a mechanical arm suspension function module is provided, which is described by taking the method applied to the controller 104 in FIG. 1 as an example, and includes the following steps:
[0071] S100: Acquire a calibration image of a calibration needle of a functional module touching a calibration plate.
[0072] Here, the robotic arm specifically refers to the mechanical structure between the bracket and the functional module. The functional module is suspended at the end of the robotic arm. The functional modules suspended by the robotic arm mainly include pipettes, grippers, cover openers, etc. For different types of functional modules, calibration needles of corresponding types can be selected and installed on the functional modules. The calibration needle of the functional module can be controlled to descend along the Z-axis direction first; when the calibration needle of the functional module touches the calibration plate, a calibration image of the calibration needle of the functional module touching the calibration plate is obtained.
[0073] The calibration needle of the control function module gently touches a position on the calibration board. Marking points are preset on the calibration board. These points are used as references to help determine the precise coordinates of the calibration needle touch points. In addition, a calibration origin is set on the calibration board. The calibration origin refers to the point where the calibration needle should touch when the calibration is completed. In practical applications, the calibration board should be designed to be flat and sturdy to ensure that it will not deform or move when the calibration needle of the functional module touches it. Multiple marking points with known world coordinates should be set on the board. These points can be circular, square or other easily recognizable shapes with precise coordinate information. The marking points should be evenly distributed on the calibration board so that their positions can be accurately identified and calculated during image processing. At the same time, the number and distribution of marking points should meet the requirements of calibration accuracy. The specific number of marking points can be at least 3, and the coordinates of the calibration needle touch point can be determined in subsequent processing based on the three points with known coordinates. Further, the number of marking points can be 4N, where N is a positive integer, and the 4N marking points are arranged in a field shape, and the calibration origin is set at the center of the field. Specifically, the robotic arm here can be a robotic arm equipped with a pipette gun head. That is, in the specific application example, the present application is applicable to the calibration of the suspension function module of the robotic arm equipped with the pipette gun head.
[0074] It should be pointed out that the calibration process of this application is mainly for position calibration on the XY plane. For the Z-axis direction, the calibration needle of the functional module can be controlled to descend along the Z-axis direction; when the calibration needle of the functional module touches the calibration board, a calibration image of the calibration needle of the functional module touching the calibration board is obtained. Here, judging whether the calibration needle of the functional module touches the calibration board can be realized based on the sensor signal fed back by the touch sensor set on the calibration needle.
[0075] Here, a high-definition camera is used to collect the calibration image of the calibration pin of the functional module touching the calibration plate. Specifically, a high-precision camera (or visual sensor) can be installed on a robotic arm or a fixed bracket to ensure that it can clearly capture the calibration plate and the calibration pin of the functional module. Perform a preliminary calibration of the camera, including the calibration of the intrinsic and extrinsic matrix, to ensure that the camera can accurately convert image coordinates into world coordinates. Write a program through the control system of the robotic arm to control the calibration pin of the functional module to gently touch a certain position on the calibration plate with appropriate speed and force. Avoid excessive impact force when touching to avoid damaging the calibration plate or the robotic arm. During the movement of the robotic arm, the distance and position relationship between the calibration pin and the calibration plate are monitored in real time through the visual system to ensure the accuracy of the touch. After the calibration pin touches the calibration plate, the calibration image is captured by the camera immediately. The image should clearly show the specific position where the calibration pin touches the calibration plate and the surrounding marking points. Record the image data of the touch point for subsequent image processing and analysis.
[0076] S200: Calculate the pixel coordinates of the point where the calibration needle touches the calibration plate in the calibration image.
[0077] The captured calibration image is processed using image processing software or algorithms to extract feature information (such as edges, contours, etc.) of the calibration needle touch point and the marking point. Based on the extracted feature information, the pixel coordinates of the calibration needle touch point are calculated. Furthermore, after obtaining the calibration image, the position of the calibration needle in the image can be identified by object recognition, and then the pixel coordinates of the touch point on the calibration plate where the calibration needle touches in the calibration image are calculated.
[0078] S300: Acquire the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates.
[0079] Using the camera calibration results (intrinsic matrix and extrinsic matrix), the coordinate transposition matrix of pixel coordinates and world coordinates is determined, and the pixel coordinates of the calibration needle touch point are converted to coordinates in the world coordinate system. Through coordinate conversion, the precise coordinates of the calibration needle touch point in the world coordinate system are obtained. Specifically, the coordinate transposition matrix of pixel coordinates and world coordinates can be obtained through calibration based on the known positional relationship between the manipulator and the calibration plate.
[0080] S400: Calculate a calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system.
[0081] According to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate, the deviation (calibration offset) between the current position of the functional module and the ideal position (calibration origin) is calculated. The calibration offset should include two elements, direction and distance, to indicate the specific direction and distance that the functional module needs to adjust.
[0082] S500: Calibrate the robot arm according to the calibration offset.
[0083] According to the calibration offset, the control system of the robot arm is adjusted to adjust parameters, including joint angles, position parameters, etc., to eliminate deviations. Furthermore, after adjusting the parameters, repeat the steps of touching the calibration board and image processing to verify the calibration effect. If there is still a deviation, continue to adjust the parameters and repeat the calibration process until the predetermined calibration accuracy is achieved. Furthermore, the calibration offset calculated in the world coordinate system can be directly used to calculate the posture adjustment parameters of the robot arm calibration, or the calibration offset can be first converted again to obtain the offset data in the actual application environment, and then the posture adjustment parameters of the robot arm calibration can be calculated based on the offset data in the actual application environment.
[0084] The calibration method of the above-mentioned mechanical arm suspension functional module obtains a calibration image of the calibration needle of the functional module touching the calibration plate, and the calibration plate is provided with a marking point with known world coordinates; calculates the pixel coordinates of the touch point on the calibration plate touched by the calibration needle in the calibration image and the pixel coordinates of the marking point; obtains the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates; calculates the calibration offset according to the touch coordinates in the world coordinate system and the calibration origin coordinates on the calibration plate in the world coordinate system; calibrates the mechanical arm according to the calibration offset. In the whole process, the image recognition and positioning method is adopted to automatically calculate the pixel coordinates of the marking point and the pixel coordinates of the touch point, and then the coordinate mapping is performed through the mapping relationship between the pixel coordinates and the world coordinates to accurately determine the touch coordinates, and finally the mechanical arm is calibrated based on the offset between the touch coordinates and the calibration origin coordinates, so as to realize efficient and accurate calibration of the mechanical arm suspension functional module.
[0085] As shown in FIG. 3 , in one embodiment, a marking point with known world coordinates is set on the calibration plate; S300 includes:
[0086] S320: Calculate the pixel coordinates of the marked points in the calibration image;
[0087] S340: Based on the pixel coordinates of the marking point and the world coordinates of the marking point, a coordinate transposition matrix is calculated by fitting using a preset algorithm, where the coordinate transposition matrix represents a mapping relationship between the pixel coordinate system and the world coordinate system.
[0088] First, place multiple markers with known world coordinates in the scene (such as AR markers, QR codes, or specific patterns). Use a camera to capture images of these markers and record the pixel coordinates of each marker in the image. For each marker, its coordinates in the world coordinate system need to be known accurately (for example, by precise measurement or using a predefined coordinate system). Further, create an empty matrix or array to store the correspondence between the pixel coordinates and the world coordinates of all markers. For each marker, according to its coordinates in the pixel coordinate system (u i , v i ) and the coordinates in the world coordinate system (X i , Y i , Z i ), a system of linear equations can be constructed to estimate the coordinate transpose matrix (usually including the rotation matrix R, the translation vector t, and possible scaling factors). Here the Z coordinate has been determined, and only the simplified two-dimensional case is considered (that is, all the markers are on the same plane, Z i can be regarded as a constant), that is, the coordinates in the world coordinate system (X i , Y i), the entire problem of solution is simplified to solving a two-dimensional affine transformation matrix. The least squares method is used to fit the collected data points to find the coordinate transpose matrix with the best fit. This matrix will be able to minimize the error in the conversion from pixel coordinates to world coordinates. Specifically, the preset algorithm here can be the least squares method. Further, the marked points and the calibration plate origin belong to different points on the calibration plate, and the world coordinates of the marked points are known. For example, 4 marked points can be set, and the 4 marked points are arranged in a "field" shape, and the calibration plate origin is set at the middle position of the "field".
[0089] S360: Calculate the touch coordinates of the touch point in the world coordinate system according to the transpose matrix and the pixel coordinates of the touch point.
[0090] Obtain the pixel coordinates (u t , v t ) of the touch point, and transform the pixel coordinates (u t , v t ) of the touch point into the world coordinate system through the previously calculated transpose matrix. This step involves matrix multiplication and coordinate transformation (such as transformation from homogeneous coordinates to ordinary coordinates), and here the affine transformation matrix can be directly used for transformation to output the coordinates (X t , Y t ) of the touch point in the world coordinate system.
[0091] In this embodiment, the accurate conversion between pixel coordinates and world coordinates is achieved through the transpose matrix, and the accurate coordinates of the touch point in the world coordinate system can be obtained.
[0092] In one of the embodiments, calculating the pixel coordinates of the calibration needle touching the touch point on the calibration plate in the calibration image includes: extracting the regional image of the calibration needle touching the touch point on the calibration plate in the calibration image; performing contour extraction and contour calculation on the regional image to obtain the pixel coordinates of the center of the calibration needle tip touching the touch point on the calibration plate.
[0093] Preprocess the input calibration image, including operations such as grayscale conversion, denoising (such as using Gaussian filtering or median filtering), and contrast enhancement, to improve the accuracy and efficiency of subsequent processing. Use methods such as color segmentation, edge detection, or template matching to locate the approximate area where the calibration needle touches the calibration plate. Here, some conditions can be preset according to the actual application scenario, such as color thresholds, shape templates, or edge features, so as to screen out a small-range regional image containing the touch point from the entire image. According to the positioning result, crop the small regional image containing the touch point from the original calibration image. This small area should be large enough to contain the complete touch area while avoiding introducing too much background noise.
[0094] The cropped region image is subjected to contour extraction. This typically involves the application of an edge detection algorithm, such as the Canny edge detector, to identify boundary lines in the image. The result of edge detection is a set of pixel points that form the contour of the object in the image. Since there may be multiple contours in the image (e.g., the contour of the calibration pin, other edges on the calibration plate, etc.), it is necessary to filter out the contours associated with the calibration pin touch point. This can be achieved by analyzing the shape, size, position, or relative relationship of the contours to other features. For example, the longest contour, the contour closest to the center of the calibration plate, or the contour with specific geometric features can be found. The filtered contours are thinned to reduce the pixel width of the contour to make it closer to a line of a single pixel width. This helps to locate the touch point more accurately. The thinned contours are analyzed to find the exact location of the center of the calibration pin tip. This involves calculating the endpoints, intersection points, or specific curvature change points of the contours. In the case of a calibration pin touch, the touch point may be the farthest endpoint of the contour or the point with the largest curvature change. Finally, based on the results of the contour analysis, the pixel coordinates of the point where the center of the calibration needle tip touches the calibration plate are calculated.
[0095] In this embodiment, during the calculation of the pixel coordinates of the calibration needle touch point, considering that the size of the calibration needle itself will affect the calculation accuracy of the pixel coordinates of the final touch point, the contour extraction method is used to further accurately confirm the pixel coordinates of the touch point of the center of the calibration needle tip, so as to support the subsequent accurate calibration of the robotic arm suspension function module.
[0096] In one embodiment, obtaining a calibration image of a calibration needle of a functional module touching a calibration plate includes:
[0097] The original calibration image of the calibration pin of the functional module touching the calibration plate acquired by the image acquisition device is obtained; the distortion of the original calibration image is corrected, and the contrast and brightness of the image are dynamically adjusted according to the lighting conditions to obtain the calibration image.
[0098] Here, you can choose a suitable high-resolution, low-noise image acquisition device (such as an industrial camera) and install it in a position where it can clearly capture the interaction between the functional module calibration pin and the calibration plate. Make sure that the camera's parameters such as viewing angle, focal length, and exposure are set reasonably to obtain high-quality original images. In order to ensure that the image is captured at the moment when the functional module calibration pin accurately touches the calibration plate, a synchronous trigger mechanism can be used. This can be achieved through a signal line or wireless communication connected to the robot control system. When the robot reaches the specified position and triggers a touch event, a shooting instruction is automatically sent to the image acquisition device. At the moment when the functional module calibration pin touches the calibration plate, the image acquisition device captures the original calibration image containing the touch scene and saves it to the storage device.
[0099] Before distortion correction, the image acquisition device needs to be calibrated. This usually involves taking a set of calibration patterns with known geometric characteristics (such as a chessboard, a dot array, etc.) and using a calibration algorithm (such as Zhang Zhengyou calibration method) to calculate the camera's intrinsic parameter matrix (focal length, optical center, etc.) and distortion coefficients (radial distortion, tangential distortion, etc.). Using the distortion coefficients obtained by calibration, the distortion correction model is applied to the original calibration image. This process usually involves reverse mapping each pixel in the image to compensate for the image distortion caused by the camera lens distortion. After distortion correction, a corrected image that more realistically reflects the geometric characteristics of the scene is generated. This image will be used as input for subsequent processing. Based on the obtained corrected image, the image's lighting conditions are further analyzed. This can be achieved by calculating the image's brightness histogram, detecting highlight areas or shadow areas, etc. Based on the lighting detection results, the image's contrast and brightness are dynamically adjusted. For areas that are too dark or too bright, strategies for enhancing or reducing brightness can be adopted respectively, while maintaining the overall naturalness and detail richness of the image. The adjustment process can use algorithms such as histogram equalization, gamma correction or local contrast enhancement. After adjusting the lighting conditions, the final calibration image is generated. This image not only has a low distortion error, but also can clearly show the contact details between the calibration needle of the functional module and the calibration plate, providing a reliable data basis for subsequent image processing and analysis.
[0100] In one embodiment, the number of marking points is at least three; as shown in FIG3 , S200 includes:
[0101] S220: Extract features from the calibration image to obtain pixel coordinates of the marking points.
[0102] First, the calibration image is preprocessed, including grayscale, filtering and denoising, and possible image enhancement steps to improve the accuracy and efficiency of feature extraction. Feature detection algorithms (such as SIFT, SURF, ORB, etc.) are used to extract features from the markers in the calibration image. These algorithms can identify key points (i.e., markers) in the image and calculate their descriptors for subsequent matching and positioning. The detected features are matched with the preset marker templates, and the exact position of each marker in the calibration image is determined by the matching results, and its pixel coordinates are recorded.
[0103] S240: Calculate the pixel distance between the touch point on the calibration plate touched by the calibration needle and the pixel coordinates of the marking point.
[0104] The touch point area where the calibration needle touches the calibration plate is preliminarily located through image processing techniques (such as edge detection, template matching, or color-based segmentation). This step may result in an approximate pixel range containing the touch point rather than precise coordinates. For the preliminarily located touch point area, calculate the pixel distance between it and each marked point. This can be achieved by calculating the Euclidean distance between the center of the area (or some form of representative point) and the pixel coordinates of the marked point. Specifically, the pixel distance here can be a vector distance, which can specifically represent data in two dimensions: distance size and direction.
[0105] S260: Calculate the pixel coordinates of the touch point according to the pixel distance and the pixel coordinates of the marking point.
[0106] The number of markers is at least three, and at least three markers can determine an accurate plane coordinate. Here, the geometric constraints formed by these points can be used to more accurately calculate the pixel coordinates of the touch point. For example, if the markers are distributed on a plane and their world coordinates are known, the precise position of the touch point in the image can be estimated by a perspective transformation or an affine transformation model. An optimization algorithm (such as the least squares method, the iterative closest point algorithm ICP, etc.) is used to minimize the error between the predicted position of the touch point and the actual detected position. This usually involves constructing an objective function that measures the difference between the predicted position and the possible position calculated based on the pixel distance and the marker coordinates, and finding the touch point coordinates that minimize the objective function through iterative optimization. After optimization calculation, the precise pixel coordinates of the touch point in the calibration image are obtained. This coordinate not only takes into account the relative position relationship with the marker point, but also reduces the error introduced by the preliminary positioning through the optimization algorithm.
[0107] In one embodiment, the number of marking points is 4N, and every 4 marking points are arranged in a field shape.
[0108] As shown in Figure 4, there are 4N marking points (Figure 4 only shows a partial area), and every 4 marking points are arranged in a field shape. The center position of any field shape can be used as the origin position of the calibration plate. The specific selection and determination can be made according to the actual situation.
[0109] In one embodiment, after calibrating the robot arm according to the calibration offset, the method further includes:
[0110] Collect the image of the calibration needle of the functional module touching the calibration plate after the first calibration process to obtain the initial calibration image; determine whether the touch point of the calibration needle of the functional module touching the calibration plate in the initial calibration image coincides with the origin of the calibration plate; if so, push the calibration to end; if not, use the initial calibration image as the calibration image again, and return to the step of calculating the pixel coordinates of the touch point of the calibration needle touching the calibration plate in the calibration image and the pixel coordinates of the marking point.
[0111] After the calibration offset is applied to the robot control system, the calibration pin of the functional module is re-controlled to touch the calibration plate, and the image acquisition device is used to capture the image at this moment to obtain the initial calibration image. The initial calibration image is processed and analyzed to extract the position of the calibration pin of the functional module and the position of the origin of the calibration plate. This usually involves edge detection, contour extraction, and feature matching. The extracted calibration pin position and the calibration plate origin position are compared to determine whether they are at the same pixel point or meet the preset overlap threshold. If they are overlapped: it means that the calibration offset has been successfully applied to the robot, and the calibration pin at the end of the arm can accurately touch the origin of the calibration plate. At this time, the system should push a prompt message that the calibration is completed to inform the operator that the calibration process has been successfully completed. If it is not overlapped: it means that the calibration offset may not be accurate enough, or there are other unconsidered error factors in the movement of the robot. At this time, it is necessary to use the initial calibration image again as the calibration image and return to the previous calibration process.
[0112] As shown in FIG5 , in one of the application examples, the calibration method of the mechanical arm suspension function module of the present application includes the following steps:
[0113] 1. The robotic arm equipment of the entire suspension function module is powered on and initialized, and the corresponding image acquisition equipment (industrial camera) is installed.
[0114] 2. The robot arm device master obtains the module configuration.
[0115] 3. The robot and the module hanging on it move to the initial origin. It should be noted that this can be used for the calibration of multiple robots, multiple modules, and multiple stations. The calibration of a pipetting module at a certain station is a special case.
[0116] 4. Manually install the calibration needle on the pipetting module.
[0117] 5. Place the calibration plate at the station to be calibrated.
[0118] 6. The device moves the pipetting module to the pre-calibrated position above the calibration plate.
[0119] 7. The module moves to the limit in the negative direction of Z. If successful, an error message will be given: calibration abnormality, check the device data and operating status. If unsuccessful, proceed to the next step.
[0120] 8. The sensor feedback touches the calibration plate. If not, return to step 7 and continue moving in the negative Z direction. If yes, proceed to the next step.
[0121] 9. Record the current Z direction position as the workstation Z coordinate.
[0122] 10. Move the camera to a suitable viewing angle (to capture the complete calibration needle and calibration plate pattern) and take a photo.
[0123] 11. Solve the transposed matrix based on the XY coordinates of a series of feature points on the calibration plate and the corresponding pixel coordinates in the photo.
[0124] 12. Identify the coordinates of the calibration pin in the photo.
[0125] 13. Use the transposed matrix to calculate the three-dimensional coordinates of the calibration needle and the position difference from the calibration origin.
[0126] 14. Control the calibration needle to move to the calibration origin.
[0127] 15. Take a photo to identify whether the calibration pin coincides with the calibration origin. If not, return to step 12; if yes, proceed to the next step.
[0128] 16. Record the current XYZ coordinates of the calibration needle as the coordinates after calibration.
[0129] 17. Determine whether there are other workstations that need calibration; if so, return to step 5; if not, proceed to the next step.
[0130] 18. Determine whether there are other pipetting modules that need to be calibrated. If so, return to step 4; if not, end this calibration.
[0131] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0132] Based on the same inventive concept, the embodiment of the present application also provides a calibration device for a mechanical arm suspension function module for implementing the calibration method for the mechanical arm suspension function module involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the calibration device for one or more mechanical arm suspension function modules provided below can refer to the limitations of the calibration method for the mechanical arm suspension function module above, and will not be repeated here.
[0133] In one embodiment, as shown in FIG6 , a calibration device for a mechanical arm suspension function module is provided, comprising:
[0134] An image acquisition module 100 is used to acquire a calibration image of a calibration needle of a functional module touching a calibration plate;
[0135] A pixel coordinate calculation module 200 is used to calculate the pixel coordinates of the touch point of the calibration needle touching the calibration plate in the calibration image;
[0136] A coordinate conversion module 300, for acquiring the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates;
[0137] An offset calculation module 400 is used to calculate a calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system;
[0138] The calibration module 500 is used to calibrate the robot arm according to the calibration offset.
[0139] In one of the embodiments, a marking point with known world coordinates is set on the calibration plate; the coordinate conversion module 300 is also used to calculate the pixel coordinates of the marking point in the calibration image; based on the pixel coordinates of the marking point and the world coordinates of the marking point, a preset algorithm is used to fit and calculate the coordinate transposition matrix, and the coordinate transposition matrix represents the mapping relationship between the pixel coordinate system and the world coordinate system; according to the transposition matrix and the pixel coordinates of the touch point, the touch coordinates of the touch point in the world coordinate system are calculated.
[0140] In one embodiment, the pixel coordinate calculation module 200 is also used to extract the regional image of the touch point on the calibration plate where the calibration needle touches in the calibration image; perform contour extraction and contour calculation on the regional image to obtain the pixel coordinates of the touch point on the calibration plate where the center of the calibration needle tip touches.
[0141] In one of the embodiments, the image acquisition module 100 is also used to acquire an original calibration image of the functional module calibration needle touching the calibration plate captured by the image acquisition device; perform distortion correction on the original calibration image, and dynamically adjust the contrast and brightness of the image according to the lighting conditions to obtain a calibration image.
[0142] In one embodiment, the number of marking points is at least three; the pixel coordinate calculation module 200 is also used to extract features from the calibration image to obtain the pixel coordinates of the marking points; calculate the pixel distance between the touch point on the calibration plate touched by the calibration needle and the pixel coordinates of the marking points; and calculate the pixel coordinates of the touch point based on the pixel distance and the pixel coordinates of the marking points.
[0143] In one embodiment, the number of marking points is 4N, and every 4 marking points are arranged in a field shape.
[0144] In one of the embodiments, the calibration module 500 is also used to collect an image of the calibration needle of the functional module touching the calibration plate after the first calibration process to obtain an initial calibration image; determine whether the touch point on the calibration plate touched by the calibration needle of the functional module in the initial calibration image coincides with the origin of the calibration plate; if so, push the calibration to end; if not, use the initial calibration image as the calibration image again, and control the pixel coordinate calculation module 200 to perform the operation of calculating the pixel coordinates of the touch point on the calibration plate touched by the calibration needle in the calibration image and the pixel coordinates of the marking point.
[0145] In one embodiment, the image acquisition module 100 is further used to control the functional module calibration needle to descend along the Z-axis direction; when the functional module calibration needle touches the calibration plate, a calibration image of the functional module calibration needle touching the calibration plate is acquired.
[0146] Each module in the calibration device of the above-mentioned mechanical arm suspension functional module can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0147] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a calibration method for a mechanical arm suspension function module is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, a trackball or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0148] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0149] In one embodiment, a robotic arm system is provided. The robotic arm system includes a robotic arm and a controller. The controller uses the above-mentioned calibration method of the robotic arm suspension function module to calibrate the robotic arm.
[0150] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the calibration method of the above-mentioned robot arm suspension function module when executing the computer program.
[0151] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the calibration method of the above-mentioned robot arm suspension function module is implemented.
[0152] In one embodiment, a computer program product is provided, including a computer program, which implements the calibration method of the above-mentioned robot arm suspension function module when executed by a processor.
[0153] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0154] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0155] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A calibration method for a mechanical arm suspension function module, characterized in that: The method comprises: Acquire a calibration image of the calibration pin of the functional module touching the calibration plate; Calculating the pixel coordinates of the point where the calibration needle touches the calibration plate in the calibration image; Based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates, Acquire the touch coordinates of the touch point in the world coordinate system; Calculating a calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system; The functional module is calibrated according to the calibration offset.
2. The method according to claim 1, characterized in that: The calibration plate is provided with marking points with known world coordinates; The acquiring the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates comprises: Calculating the pixel coordinates of the marked points in the calibration image; Based on the pixel coordinates of the marking point and the world coordinates of the marking point, a coordinate transposition matrix is calculated by fitting using a preset algorithm, wherein the coordinate transposition matrix represents a mapping relationship between a pixel coordinate system and a world coordinate system; The touch coordinates of the touch point in the world coordinate system are calculated according to the transposed matrix and the pixel coordinates of the touch point.
3. The method according to claim 1, characterized in that: Calculating the pixel coordinates of the point where the calibration needle touches the calibration plate in the calibration image includes: Extracting an area image of a touch point where the calibration needle touches the calibration plate in the calibration image; The contour of the area image is extracted and calculated to obtain the pixel coordinates of the point where the center of the calibration needle tip touches the calibration plate.
4. The method according to claim 1, characterized in that The step of obtaining a calibration image of a calibration needle of a functional module touching a calibration plate comprises: Acquire an original calibration image of the calibration pin of the functional module touching the calibration plate acquired by the image acquisition device; The original calibration image is subjected to distortion correction, and the contrast and brightness of the original calibration image are dynamically adjusted according to lighting conditions to obtain a calibration image.
5. The method according to claim 2, characterized in that: The number of the marking points is at least three; The calculating of the pixel coordinates of the touch point where the calibration needle touches the calibration plate and the pixel coordinates of the marking point in the calibration image comprises: Performing feature extraction on the calibration image to obtain pixel coordinates of the marking points; Calculating the pixel distance between the touch point of the calibration needle touching the calibration plate and the pixel coordinates of the marking point; The pixel coordinates of the touch point are calculated according to the pixel distance and the pixel coordinates of the marking point.
6. The method according to claim 2, characterized in that The number of the marking points is 4N, and every 4 marking points are arranged in a field shape, and N is a positive integer.
7. The method according to claim 1, characterized in that After calibrating the functional module according to the calibration offset, the method further includes: Collect an image of the calibration needle of the functional module touching the calibration plate after the first calibration process to obtain an initial calibration image; Determine whether a touch point on the calibration plate touched by a calibration needle of the functional module in the initial calibration image coincides with an origin of the calibration plate; If they have overlapped, the push calibration is completed; If they do not overlap, the initial calibration image is used as the calibration image again, and the step of returning to calculate the pixel coordinates of the touch point where the calibration needle touches the calibration plate in the calibration image and the pixel coordinates of the marking point is performed.
8. The method according to claim 1, characterized in that Also includes: The calibration needle of the control function module descends along the Z-axis direction; When the function module calibration needle touches the calibration plate, a calibration image of the function module calibration needle touching the calibration plate is acquired.
9. A calibration device for a mechanical arm suspension function module, characterized in that: The device comprises: An image acquisition module, used to acquire a calibration image of a calibration needle of a functional module touching a calibration plate; A pixel coordinate calculation module, used to calculate the pixel coordinates of the touch point where the calibration needle touches the calibration plate in the calibration image; A coordinate conversion module, used for acquiring the touch coordinates of the touch point in the world coordinate system based on the pixel coordinates of the touch point and the coordinate transposition matrix of the pixel coordinates and the world coordinates; An offset calculation module, used to calculate a calibration offset according to the touch coordinates in the world coordinate system and the coordinates of the calibration origin on the calibration plate in the world coordinate system; The calibration module is used to calibrate the functional module according to the calibration offset.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A robotic arm system, characterized in that: It comprises a mechanical arm, a functional module and a controller, wherein the functional module is suspended at the arm end of the mechanical arm, and the controller calibrates the functional module using the method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Hand and eye calibration method and system based on calibration point extraction and computer storage medium
CN109015630A
Needle point position detection method, system and apparatus for robot automatic liquid preparation
CN113487510A
Single-image camera calibration method based on multiple calibration board types
CN117456009A
Calibration method, calibration device and calibration system
CN117754591A
Method for calibrating positions of pipetting mechanical arm and pore plate rack
CN118089617A
Cited By
Telescopic workpiece positioning actuator calibration method, system, equipment and medium
CN120680532A
Robot visual servo control method for operating biochemical instrument
CN122077657A
