A method and system for automatic calibration of animal ultrasonic mechanical arm
Through the automatic calibration method of the robot arm, combining ultrasonic images and white light images, the probe position is calculated and calibrated, which solves the problem of inaccurate probe positioning and improves the ultrasonic imaging quality.
Patent Information
- Application Number
- CN202411443381.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The positioning of the probe in the existing animal ultrasound imaging system is not accurate enough, and is affected by manual operation, which affects the quality of ultrasound imaging.
The automatic calibration method of the robot arm is adopted to construct a target recognition model, combine ultrasonic images and white light images, calculate the movement amount of the robot arm assembly, set the movement threshold, and iterative calibration to ensure accurate positioning of the probe.
Improve the positioning accuracy of the probe, ensure the quality of ultrasonic imaging, and reduce the technical requirements for operators.
Smart Images

Figure CN118952230B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mechanical arms, and in particular to an automatic calibration method and system for an animal ultrasonic mechanical arm. Background Art
[0002] The animal ultrasound imaging system is an ultrasound imaging device specially used in the field of experimental animals. Its function and principle are exactly the same as those of clinical ultrasound equipment. Animal ultrasound equipment requires a set of operating tables and probes to fix the animals. Existing animal ultrasound equipment mainly includes two parts. One part is the animal fixing table, which is divided into two specifications for rats and mice. The rats or mice need to be fixed on the table. There are four copper electrodes on the table. The limbs of the rats or mice need to be connected to the four copper electrodes to measure the temperature and electrocardiogram of the rats or mice. The other part is the ultrasound probe fixing frame and the probe. The ultrasound probe fixing frame is used to clamp the probe and also to drive the probe to move horizontally and vertically.
[0003] The probes in existing animal ultrasound equipment are mostly manually operated by the ultrasound probe fixing frame to adjust and move the probe to the target organ position of the animal to be tested. Since the quality of ultrasound imaging will directly affect the accuracy of the test results, the technical requirements for the operator are relatively high. The probe needs to be accurately moved to the target organ position of the animal to be tested. However, due to the influence of manual operation, the positioning of the probe may not be accurate enough, which will affect the quality of ultrasound imaging.
[0004] Therefore, there is an urgent need to provide an automatic calibration method and system for an animal ultrasound manipulator, which can improve the accuracy of probe positioning and ensure the quality of ultrasound imaging compared to the existing technology. Summary of the invention
[0005] The present invention solves the technical problems existing in the prior art and provides an automatic calibration method and system for an animal ultrasonic mechanical arm.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0007] An automatic calibration method for an animal ultrasonic mechanical arm comprises the following steps:
[0008] S1, build target recognition model;
[0009] S2, placing the robotic arm assembly in an initial state, fixing the animal to be tested on a fixed table, starting the ultrasound probe and the micro camera, taking a picture of the animal to be tested, obtaining an initial ultrasound image and an initial white light image, determining the type of the target organ, and marking the determined target organ on the initial white light image;
[0010] S3, inputting the initial ultrasound image, the marked initial white light image, and the determined target organ into the target recognition model constructed in step S1 to obtain an output result, and obtaining the initial movement amount of the robotic arm assembly according to the output result, the initial movement amount including the initial X-direction movement amount, the initial Y-direction movement amount, and the initial Z-direction movement amount;
[0011] S4, controlling the robot arm assembly through the controller to move the robot arm assembly in the X direction of the world coordinate by an initial X direction movement amount, in the Y direction of the world coordinate by an initial Y direction movement amount, and in the Z direction of the world coordinate by an initial Z direction movement amount, in a direction close to the detected animal, and the position of the robot arm assembly after movement is recorded as the first movement position;
[0012] S5. The robotic arm component is located at the first moving position. The method in steps S2-S3 is used to obtain the re-movement amount of the robotic arm component. The re-movement amount includes the re-movement amount in the X direction, the re-movement amount in the Y direction and the re-movement amount in the Z direction. The movement threshold in the X direction, the movement threshold in the Y direction and the movement threshold in the Z direction of the robotic arm component are set. The re-movement amount in the X direction, the re-movement amount in the Y direction and the re-movement amount in the Z direction are judged with the movement threshold in the X direction, the movement threshold in the Y direction and the movement threshold in the Z direction respectively to judge whether the robotic arm component moves in the X direction, the Y direction and the Z direction. After the judgment, when the robotic arm component does not need to move in the X direction, the Y direction and the Z direction, the robotic arm component completes the calibration. Otherwise, iterate steps S4-S5.
[0013] Furthermore, S3 specifically includes the following steps:
[0014] S31, inputting the initial ultrasound image, the marked initial white light image, and the determined target organ into the target recognition model constructed in step S1, and obtaining an output result, wherein the output result includes a first initial pixel coordinate and a first initial confidence of the determined target organ in the initial ultrasound image, and a second initial pixel coordinate and a second initial confidence of the determined target organ in the marked initial white light image;
[0015] S32, converting the first initial pixel coordinate and the second initial pixel coordinate obtained in step S31 into a first initial world coordinate and a second initial world coordinate;
[0016] S33, calculating the distance between the ultrasound probe and the micro camera in the X direction, the Y direction, and the Z direction in the world coordinates;
[0017] S34, calculating the auxiliary world coordinates of the second initial world coordinates according to the distances in the X direction, the Y direction, and the Z direction between the ultrasound probe and the micro camera in the world coordinates;
[0018] S35, calculating the total initial world coordinates of the determined target organ according to the auxiliary world coordinates and the first initial world coordinates;
[0019] S36. Calculate the initial X-direction movement, initial Y-direction movement, and initial Z-direction movement of the robot assembly according to the total initial world coordinates.
[0020] Furthermore, the total initial world coordinates in step S35 are specifically calculated by the following formula:
[0021] ;
[0022] ;
[0023] ;
[0024] In the above formula, Indicates the coordinate value of the total initial world coordinate in the X direction, Indicates the coordinate value of the total initial world coordinate in the Y direction, Indicates the coordinate value of the total initial world coordinate in the Z direction; represents the first weight value, represents the second weight value; Represents the coordinate value of the first initial world coordinate in the X direction, Represents the coordinate value of the first initial world coordinate in the Y direction, Represents the coordinate value of the first initial world coordinate in the Z direction; Indicates the coordinate value of the X direction of the auxiliary world coordinate. Indicates the coordinate value of the auxiliary world coordinate in the Y direction. Represents the coordinate value in the Z direction of the auxiliary world coordinate.
[0025] Furthermore, the first weight value and the second weight value are calculated according to the following formula:
[0026] ;
[0027] ;
[0028] In the above formula, represents the first initial confidence, Represents the second initial confidence.
[0029] Furthermore, the initial X-direction movement amount, the initial Y-direction movement amount, and the initial Z-direction movement amount in step S36 are specifically calculated by the following formula:
[0030] ;
[0031] ;
[0032] ;
[0033] In the above formula, Indicates the initial X-direction movement of the robot assembly. Indicates the initial Y-direction movement, Indicates the initial Z-direction movement; represents the coordinate value of the X direction of the initial world coordinate of the ultrasound probe, Represents the Y-direction coordinate value of the initial world coordinate of the ultrasound probe, Indicates the coordinate value of the initial world coordinate of the ultrasound probe in the Z direction.
[0034] Furthermore, the specific method of step S33 is: when the mechanical arm assembly is set at the initial position, the initial world coordinates of the ultrasonic probe are , the initial world coordinates of the micro camera are , the distances in the X direction, Y direction, and Z direction between the ultrasound probe and the micro camera in the world coordinates are calculated by the following formula:
[0035] ;
[0036] ;
[0037] ;
[0038] In the above formula, represents the distance between the ultrasound probe and the micro camera in the X direction in the world coordinates, represents the distance between the ultrasound probe and the micro camera in the Y direction in the world coordinates, represents the distance between the ultrasound probe and the micro camera in the Z direction in the world coordinates; Indicates the coordinate value of the X direction of the initial world coordinate of the micro camera, Indicates the coordinate value of the initial world coordinate of the micro camera in the Y direction, Indicates the coordinate value of the Z direction of the initial world coordinate of the micro camera.
[0039] Furthermore, the auxiliary world coordinates in step S34 are specifically calculated by the following formula:
[0040] ;
[0041] ;
[0042] ;
[0043] In the above formula, Indicates the coordinate value of the second initial world coordinate in the X direction, Represents the Y-direction coordinate value of the second initial world coordinate, Indicates the coordinate value of the second initial world coordinate in the Z direction.
[0044] Furthermore, in step S5, the method for determining whether the robot arm assembly moves in the X direction, the Y direction, and the Z direction is as follows:
[0045] The X-direction movement amount is compared with the movement threshold of the robot assembly in the X-direction. When the X-direction movement amount is greater than the movement threshold of the robot assembly in the X-direction, the controller controls the robot assembly to move in the X-direction by the X-direction movement amount; when the X-direction movement amount is less than or equal to the movement threshold of the robot assembly in the X-direction, the controller does not control the robot assembly to move in the X-direction.
[0046] The second Y-direction movement amount is compared with the movement threshold of the robot arm assembly in the Y direction. When the second Y-direction movement amount is greater than the movement threshold of the robot arm assembly in the Y direction, the controller controls the robot arm assembly to move in the Y direction by the second Y-direction movement amount; when the second Y-direction movement amount is less than or equal to the movement threshold of the robot arm assembly in the Y direction, the controller does not control the robot arm assembly to move in the Y direction;
[0047] The second Z-direction movement amount is compared with the movement threshold of the robotic arm assembly in the Z direction. When the second Z-direction movement amount is greater than the movement threshold of the robotic arm assembly in the Z direction, the controller controls the robotic arm assembly to move in the Z direction by the second Z-direction movement amount; when the second Z-direction movement amount is less than or equal to the movement threshold of the robotic arm assembly in the Z direction, the controller does not control the robotic arm assembly to move in the Z direction.
[0048] Furthermore, S1 specifically includes the following steps:
[0049] S11, acquiring a plurality of historical ultrasound images and a plurality of historical white light images, each of the historical ultrasound images and each of the historical white light images containing an animal to be detected;
[0050] S12, marking target organs on the animal to be detected in each historical white light image, wherein the target organs include multiple ones;
[0051] S13. Based on the multiple historical ultrasound images obtained in step S11 and the multiple historical white light images processed in step S12, a target recognition model is trained using the YOLOv8 algorithm.
[0052] An animal ultrasonic mechanical arm automatic calibration system executes an animal ultrasonic mechanical arm automatic calibration method, comprising a base, a mechanical arm assembly, a fixing platform, a control device, an ultrasonic probe and a miniature camera, wherein the mechanical arm assembly and the fixing platform are connected to the base, the end of the mechanical arm assembly away from the base is connected to the ultrasonic probe and the miniature camera, the relative positions of the ultrasonic probe and the miniature camera are fixed, the control device is electrically connected to the mechanical arm assembly, the ultrasonic probe and the miniature camera respectively, the ultrasonic probe is used to take an ultrasonic image containing an animal to be detected, and the miniature camera is used to take a white light image containing an animal to be detected.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] The present invention simultaneously inputs the ultrasound image and the white light image into the target recognition algorithm, sorts and calculates the output results of the target recognition algorithm, obtains the movement amount that the robot arm component needs to move, and performs joint calibration based on the ultrasound image and the white light image, which can effectively improve the accuracy of calibration and positioning of the robot arm component; at the same time, after each movement of the robot arm component, the movement amount must be calculated and a movement threshold is set. Through the judgment method, it is judged whether the robot arm component needs to move again, which can further improve the accuracy of calibration and positioning of the robot arm component, ensure the quality of ultrasonic imaging, and can also be used in teaching. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a flow chart of the method of the present invention.
[0056] Figure 2 It is a schematic diagram of the structure of the system of the present invention.
[0057] Description of reference numerals:
[0058] 1. Base; 2. Robotic arm assembly; 3. Fixed table; 4. Ultrasonic probe; 5. Miniature camera. DETAILED DESCRIPTION
[0059] The technical solution of the present invention will be clearly described below in conjunction with the accompanying drawings. Obviously, the described embodiments are not all embodiments of the present invention. All other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention. It should be noted that the orientation or position relationship indicated by the terms "center", "up", "down", "left", "right", "vertical", "horizontal", etc. is based on the orientation or position relationship shown in the accompanying drawings. It is only for the convenience of describing the present invention and simplifying the description. It does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0060] like Figure 1 As shown, the present invention also provides an automatic calibration method for an animal ultrasonic mechanical arm, comprising the following steps:
[0061] S1. Build a target recognition model, which specifically includes the following steps:
[0062] S11. Acquire multiple historical ultrasound images and multiple historical white light images, each of the historical ultrasound images and each of the historical white light images contains an animal to be detected.
[0063] S12. Mark the target organs on the animal to be detected in each historical white light image. Use a rectangular frame to mark the target organs on the animal to be detected according to the position of the target organs in the body of the animal to be detected and the normal proportion of the target organs in the animal to be detected. The target organs include but are not limited to the heart.
[0064] S13. Based on the multiple historical ultrasound images obtained in step S11 and the multiple historical white light images processed in step S12, a target recognition model is trained using the YOLOv8 algorithm, so that when the real-time ultrasound image, the real-time white light image and the target organ are subsequently input into the trained target recognition model, the pixel coordinates and confidence of the target organ in the ultrasound image and the white light image can be respectively identified.
[0065] S2, place the robot arm assembly 2 in the initial state, fix the animal to be tested on the fixing table 3, start the ultrasound probe 4 and the micro camera 5 to take pictures of the animal to be tested, obtain an initial ultrasound image and an initial white light image, and determine the type of the target organ. The type of the target organ determined in this step is one of all the target organ types trained in step S1, and use a rectangular frame to mark the determined target organ on the initial white light image to obtain a marked initial white light image.
[0066] S3, inputting the initial ultrasound image, the marked initial white light image, and the determined target organ into the target recognition model constructed in step S1, obtaining the output result of the target recognition model, and obtaining the initial movement amount of the robot arm assembly 2 according to the output result of the target recognition model, the initial movement amount includes the initial X-direction movement amount, the initial Y-direction movement amount, and the initial Z-direction movement amount. Specifically, the following steps are included:
[0067] S31. Input the initial ultrasound image, the marked initial white light image, and the determined target organ into the target recognition model constructed in step S1. The output result of the target recognition model is: the first initial pixel coordinates and the first initial confidence of the determined target organ in the initial ultrasound image, and the second initial pixel coordinates and the second initial confidence of the determined target organ in the marked initial white light image.
[0068] S32, converting the first initial pixel coordinates and the second initial pixel coordinates obtained in step S31 into the first initial world coordinates and the second initial world coordinates, specifically using the YOLOv8 algorithm to convert the pixel coordinates into world coordinates. The specific conversion process can refer to the following program:
[0069] import numpy as np
[0070] # Assumed micro camera internal parameters
[0071] fx = 1000# focal length
[0072] cx = 320 # principal point x coordinate
[0073] fy = 1000# focal length (usually the same as fx)
[0074] cy = 240 # principal point y coordinate
[0075] # Pixel coordinates of a single bounding box [x, y, width, height];
[0076] bbox_pixel = [200, 150, 100, 80]
[0077] # Convert pixel coordinates to coordinates relative to the center of the image
[0078] bbox_relative = np.array(bbox_pixel)
[0079] bbox_relative[0] -= cx
[0080] bbox_relative[1] -= cy
[0081] # Assume the width and height of the object are in meters
[0082] object_width_meters = 0.1 # Example units
[0083] object_height_meters = 0.1 # Example units
[0084] # Convert to world coordinates
[0085] bbox_world = bbox_relative * np.array([fx, fy, fx, fy])
[0086] bbox_world / = np.array([object_width_meters, object_height_meters,object_width_meters, object_height_meters])
[0087] # Output world coordinates
[0088] print("World Coordinates:", bbox_world)
[0089] S33, calculate the distance between the ultrasound probe 4 and the micro camera 5 in the X direction, the Y direction and the Z direction in the world coordinates; when the mechanical arm assembly 2 is set to the initial position, the initial world coordinates of the ultrasound probe 4 are , the initial world coordinates of the micro camera 5 are , the distances in the X direction, the Y direction, and the Z direction between the ultrasonic probe 4 and the micro camera 5 in the world coordinates are calculated by the following formula:
[0090] ;
[0091] ;
[0092] ;
[0093] In the above formula, represents the distance between the ultrasound probe 4 and the micro camera 5 in the X direction in the world coordinates, represents the distance between the ultrasound probe 4 and the micro camera 5 in the Y direction in the world coordinates, represents the distance between the ultrasound probe 4 and the micro camera 5 in the Z direction in the world coordinates; represents the coordinate value of the initial world coordinate of the ultrasound probe 4 in the X direction, represents the coordinate value of the Y direction of the initial world coordinate of the ultrasonic probe 4, represents the coordinate value of the initial world coordinate of the ultrasonic probe 4 in the Z direction; represents the coordinate value of the initial world coordinate of the micro camera 5 in the X direction, represents the coordinate value of the initial world coordinate of the micro camera 5 in the Y direction, Indicates the coordinate value of the Z direction of the initial world coordinate of the micro camera 5.
[0094] S34, calculate the auxiliary world coordinates of the second initial world coordinates, recorded as ; It is calculated by the following formula:
[0095] ;
[0096] ;
[0097] ;
[0098] In the above formula, Indicates the coordinate value of the X direction of the auxiliary world coordinate. Indicates the coordinate value of the auxiliary world coordinate in the Y direction. Represents the coordinate value of the Z direction of the auxiliary world coordinate; Indicates the coordinate value of the second initial world coordinate in the X direction, Represents the Y-direction coordinate value of the second initial world coordinate, Indicates the coordinate value of the second initial world coordinate in the Z direction.
[0099] S35. Calculate the total initial world coordinates of the determined target organ, recorded as , which is calculated by the following formula:
[0100] ;
[0101] ;
[0102] ;
[0103] In the above formula, Indicates the coordinate value of the total initial world coordinate in the X direction, Indicates the coordinate value of the total initial world coordinate in the Y direction, Indicates the coordinate value of the total initial world coordinate in the Z direction; represents the first weight value, represents the second weight value; Represents the coordinate value of the first initial world coordinate in the X direction, Represents the coordinate value of the first initial world coordinate in the Y direction, Indicates the coordinate value of the first initial world coordinate in the Z direction.
[0104] The first weight value and the second weight value are calculated according to the following formula:
[0105] ;
[0106] ;
[0107] In the above formula, represents the first initial confidence, Represents the second initial confidence.
[0108] S36, calculating the initial movement amount of the robot arm assembly 2, that is, the initial X-direction movement amount, the initial Y-direction movement amount and the initial Z-direction movement amount of the robot arm assembly 2:
[0109] ;
[0110] ;
[0111] ;
[0112] In the above formula, Indicates the initial X-direction movement of the robot component 2, Indicates the initial Y-direction movement, Indicates the initial Z-direction movement.
[0113] S4. Control the robot arm assembly 2 through the controller to move the robot arm assembly 2 in the X direction by the initial X direction movement amount, in the Y direction by the initial Y direction movement amount, and in the Z direction by the initial Z direction movement amount, toward the direction of the animal to be detected. The position of the robot arm assembly 2 after movement is recorded as the first movement position, and the world coordinates of the ultrasound probe 4 at the first movement position are obtained.
[0114] S5. Use the method in steps S2-S3, and replace the initial world coordinates of the ultrasonic probe 4 in step S36 with the world coordinates of the ultrasonic probe 4 obtained at the first moving position, and calculate the re-movement amount of the robot arm assembly 2, the re-movement amount includes the re-movement amount in the X direction, the re-movement amount in the Y direction, and the re-movement amount in the Z direction; set the movement threshold of the robot arm assembly 2 in the X direction, the movement threshold in the Y direction, and the movement threshold in the Z direction, which are respectively recorded as , , , determine whether the robotic arm assembly 2 moves in the X direction, Y direction, and Z direction. After the determination, when the robotic arm assembly 2 does not need to move in the X direction, Y direction, and Z direction, the robotic arm assembly 2 completes the calibration and performs ultrasonic detection on the animal to be detected; otherwise, iterate steps S4-S5 until the robotic arm assembly 2 does not need to move in the X direction, Y direction, and Z direction.
[0115] The judgment method is:
[0116] The amount of movement in the X direction again is compared with the movement threshold of the robot arm assembly 2 in the X direction. When the amount of movement in the X direction again is greater than the movement threshold of the robot arm assembly 2 in the X direction, the controller controls the robot arm assembly 2 to move in the X direction by the amount of movement in the X direction again; when the amount of movement in the X direction again is less than or equal to the movement threshold of the robot arm assembly 2 in the X direction, the controller does not control the robot arm assembly 2 to move in the X direction.
[0117] The amount of movement in the Y direction again is compared with the movement threshold of the robot arm assembly 2 in the Y direction. When the amount of movement in the Y direction again is greater than the movement threshold of the robot arm assembly 2 in the Y direction, the controller controls the robot arm assembly 2 to move in the Y direction by the amount of movement in the Y direction again; when the amount of movement in the Y direction again is less than or equal to the movement threshold of the robot arm assembly 2 in the Y direction, the controller does not control the robot arm assembly 2 to move in the Y direction.
[0118] The Z-direction movement amount is compared with the movement threshold of the robot arm assembly 2 in the Z direction. When the Z-direction movement amount is greater than the movement threshold of the robot arm assembly 2 in the Z direction, the controller controls the robot arm assembly 2 to move in the Z direction by the Z-direction movement amount; when the Z-direction movement amount is less than or equal to the movement threshold of the robot arm assembly 2 in the Z direction, the controller does not control the robot arm assembly 2 to move in the Z direction.
[0119] like Figure 2 As shown, the present invention also provides an animal ultrasonic manipulator automatic calibration system, including a base 1, a manipulator assembly 2, a fixing platform 3, a control device, an ultrasonic probe 4 and a micro camera 5, the manipulator assembly 2 and the fixing platform 3 are connected to the base 1, the end of the manipulator assembly 2 away from the base 1 is connected to the ultrasonic probe 4 and the micro camera 5, the relative positions of the ultrasonic probe 4 and the micro camera 5 are fixed, the control device is electrically connected to the manipulator assembly 2, the ultrasonic probe 4 and the micro camera 5 respectively, the ultrasonic probe 4 is used to take an ultrasonic image containing an animal to be detected, and the micro camera 5 is used to take a white light image containing an animal to be detected. The manipulator assembly 2 adopts a six-axis manipulator.
[0120] The control device includes a controller, an image acquisition module, and a calculation module. The image acquisition module is used to acquire an ultrasonic image taken by an ultrasonic probe 4 and a white light image taken by a micro camera 5. The calculation module processes the ultrasonic image and the white light image acquired by the image acquisition module to obtain the X-coordinate, Y-coordinate, and Z-coordinate required for the mechanical arm assembly 2 to move. The calculation module inputs the calculated X-coordinate, Y-coordinate, and Z-coordinate required for the mechanical arm assembly 2 to move into the controller. The controller controls the mechanical arm assembly 2 to move the corresponding coordinate value distance in the X direction, the Y direction, and the Z direction based on the input X-coordinate, the Y coordinate, and the Z coordinate.
[0121] The present invention simultaneously inputs the ultrasound image and the white light image into the target recognition algorithm, organizes and calculates the output results of the target recognition algorithm, obtains the amount of movement that the robot arm assembly 2 needs to move, and performs joint calibration based on the ultrasound image and the white light image. This can effectively improve the accuracy of calibration and positioning of the robot arm assembly 2. At the same time, after each movement of the robot arm assembly 2, the movement amount must be calculated and a movement threshold is set. Through the judgment method, it is determined whether the robot arm assembly 2 needs to move again, which can further improve the accuracy of calibration and positioning of the robot arm assembly 2, ensure the quality of ultrasonic imaging, and can also be used in teaching.
[0122] Finally, it should be noted that the above content is only used to illustrate the technical solution of the present invention, rather than to limit the scope of protection of the present invention. Simple modifications or equivalent substitutions of the technical solution of the present invention by ordinary technicians in this field do not deviate from the essence and scope of the technical solution of the present invention.
Claims
1. A method for automatic calibration of an animal ultrasonic manipulator, characterized in that: The following steps are involved: S1, build target recognition model; S2, placing the robotic arm assembly in an initial state, fixing the animal to be tested on a fixed table, starting the ultrasound probe and the micro camera, taking a picture of the animal to be tested, obtaining an initial ultrasound image and an initial white light image, determining the type of the target organ, and marking the determined target organ on the initial white light image; S3, inputting the initial ultrasound image, the marked initial white light image, and the determined target organ into the target recognition model constructed in step S1, obtaining an output result, and obtaining the initial movement amount of the robotic arm assembly according to the output result, the initial movement amount including the initial X-direction movement amount, the initial Y-direction movement amount, and the initial Z-direction movement amount; S3 specifically includes the following steps: S31, inputting the initial ultrasound image, the marked initial white light image, and the determined target organ into the target recognition model constructed in step S1, and obtaining an output result, wherein the output result includes a first initial pixel coordinate and a first initial confidence of the determined target organ in the initial ultrasound image, and a second initial pixel coordinate and a second initial confidence of the determined target organ in the marked initial white light image; S32, converting the first initial pixel coordinate and the second initial pixel coordinate obtained in step S31 into a first initial world coordinate and a second initial world coordinate; S33, when the robotic arm assembly is set to the initial position, the initial world coordinates of the ultrasonic probe are , the initial world coordinates of the micro camera are , the distances in the X direction, Y direction, and Z direction between the ultrasound probe and the micro camera in the world coordinates are calculated by the following formula: ; ; ; In the above formula, represents the distance between the ultrasound probe and the micro camera in the X direction in the world coordinates, represents the distance between the ultrasound probe and the micro camera in the Y direction in the world coordinates, represents the distance between the ultrasound probe and the micro camera in the Z direction in the world coordinates; Indicates the coordinate value of the X direction of the initial world coordinate of the micro camera, Indicates the coordinate value of the Y direction of the initial world coordinate of the micro camera, Represents the coordinate value of the Z direction of the initial world coordinate of the micro camera; S34, according to the distance between the ultrasound probe and the micro camera in the X direction, the distance in the Y direction, and the distance in the Z direction in the world coordinate, the auxiliary world coordinate of the second initial world coordinate is calculated by the following formula: ; ; ; In the above formula, Indicates the coordinate value of the second initial world coordinate in the X direction, Represents the Y-direction coordinate value of the second initial world coordinate, Represents the coordinate value of the second initial world coordinate in the Z direction; S35. Calculate the total initial world coordinates of the determined target organ according to the auxiliary world coordinates and the first initial world coordinates; the total initial world coordinates are specifically calculated by the following formula: ; ; ; ; ; In the above formula, Indicates the coordinate value of the total initial world coordinate in the X direction, Indicates the coordinate value of the total initial world coordinate in the Y direction, Indicates the coordinate value of the total initial world coordinate in the Z direction; represents the first weight value, represents the second weight value; Represents the coordinate value of the first initial world coordinate in the X direction, Represents the coordinate value of the first initial world coordinate in the Y direction, Represents the coordinate value of the first initial world coordinate in the Z direction; Indicates the coordinate value of the X direction of the auxiliary world coordinate. Indicates the coordinate value of the auxiliary world coordinate in the Y direction. Represents the coordinate value of the Z direction of the auxiliary world coordinate; S36. Calculate the initial X-direction movement, initial Y-direction movement, and initial Z-direction movement of the robot assembly according to the total initial world coordinates; specifically, the calculation is performed by the following formula: ; ; ; In the above formula, Indicates the initial X-direction movement of the robot assembly. Indicates the initial Y-direction movement, Indicates the initial Z-direction movement; represents the coordinate value of the X direction of the initial world coordinate of the ultrasound probe, Represents the Y-direction coordinate value of the initial world coordinate of the ultrasound probe, The coordinate value of the initial world coordinate of the ultrasonic probe in the Z direction; S4, controlling the robot arm assembly through the controller to move the robot arm assembly in the X direction of the world coordinate by an initial X direction movement amount, in the Y direction of the world coordinate by an initial Y direction movement amount, and in the Z direction of the world coordinate by an initial Z direction movement amount, in a direction close to the detected animal, and the position of the robot arm assembly after movement is recorded as the first movement position; S5. The robotic arm component is located at the first moving position. The method in steps S2-S3 is used to obtain the re-movement amount of the robotic arm component. The re-movement amount includes the re-movement amount in the X direction, the re-movement amount in the Y direction and the re-movement amount in the Z direction. The movement threshold in the X direction, the movement threshold in the Y direction and the movement threshold in the Z direction of the robotic arm component are set. The re-movement amount in the X direction, the re-movement amount in the Y direction and the re-movement amount in the Z direction are judged with the movement threshold in the X direction, the movement threshold in the Y direction and the movement threshold in the Z direction respectively to judge whether the robotic arm component moves in the X direction, the Y direction and the Z direction. After the judgment, when the robotic arm component does not need to move in the X direction, the Y direction and the Z direction, the robotic arm component completes the calibration. Otherwise, iterate steps S4-S5.
2. The method for automatic calibration of an animal ultrasonic mechanical arm according to claim 1, characterized in that: In step S5, the method for determining whether the robot arm assembly moves in the X direction, the Y direction, and the Z direction is as follows: The X-direction movement amount is compared with the movement threshold of the robot arm assembly in the X-direction. When the X-direction movement amount is greater than the movement threshold of the robot arm assembly in the X-direction, the controller controls the robot arm assembly to move in the X-direction by the X-direction movement amount; When the X-direction movement amount is less than or equal to the movement threshold of the robot assembly in the X-direction, the controller does not control the robot assembly to move in the X-direction; The second Y-direction movement amount is compared with the movement threshold of the robot arm assembly in the Y direction. When the second Y-direction movement amount is greater than the movement threshold of the robot arm assembly in the Y direction, the controller controls the robot arm assembly to move in the Y direction by the second Y-direction movement amount; when the second Y-direction movement amount is less than or equal to the movement threshold of the robot arm assembly in the Y direction, the controller does not control the robot arm assembly to move in the Y direction; The Z-direction movement amount is compared with the movement threshold of the robot arm assembly in the Z direction. When the Z-direction movement amount is greater than the movement threshold of the robot arm assembly in the Z direction, the controller controls the robot arm assembly to move in the Z direction by the Z-direction movement amount; When the Z-direction movement amount is less than or equal to the movement threshold of the robot arm assembly in the Z direction, the controller does not control the robot arm assembly to move in the Z direction.
3. The method for automatic calibration of an animal ultrasonic mechanical arm according to claim 1, characterized in that: S1 specifically includes the following steps: S11, acquiring a plurality of historical ultrasound images and a plurality of historical white light images, each of the historical ultrasound images and each of the historical white light images containing an animal to be detected; S12, marking target organs on the animal to be detected in each historical white light image, wherein the target organs include multiple ones; S13. Based on the multiple historical ultrasound images obtained in step S11 and the multiple historical white light images processed in step S12, a target recognition model is trained using the YOLOv8 algorithm.
4. An automatic calibration system for animal ultrasonic manipulators, characterized in that: A method for automatically calibrating an ultrasonic robotic arm for an animal according to any one of claims 1 to 3, comprising a base, a robotic arm assembly, a fixing platform, a control device, an ultrasonic probe and a miniature camera, wherein the robotic arm assembly and the fixing platform are connected to the base, the end of the robotic arm assembly away from the base is connected to the ultrasonic probe and the miniature camera, the relative positions of the ultrasonic probe and the miniature camera are fixed, the control device is electrically connected to the robotic arm assembly, the ultrasonic probe and the miniature camera respectively, the ultrasonic probe is used to take an ultrasonic image containing an animal to be detected, and the miniature camera is used to take a white light image containing an animal to be detected.
Citation Information
Patent Citations
Controlling activation of an ultrasonic surgical instrument according to the presence of tissue
CN111526817A
Ultrasonic robot state normalization method and system based on human body characteristics
CN112132805A
