Tool calibration method and device, equipment and storage medium

By using a tool calibration board and coordinate association algorithm, precise alignment between the camera and the bit is achieved, solving the problems of cumbersome traditional calibration processes and repeated calibration after component replacement, thus improving production efficiency and equipment adaptability.

CN121746498APending Publication Date: 2026-03-27JIANGSU CHUANGYUAN ELECTRON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, tool calibration processes are cumbersome and time-consuming, and repeated calibration is required after component replacement, resulting in low production efficiency.

Method used

By acquiring the installation position data of the tool calibration plate, the bit is driven to insert into the positioning hole, the hole axis coordinates are collected, and the center distance is calculated by combining the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates. The precise alignment between the camera and the bit is achieved through a coordinate association algorithm.

Benefits of technology

It enables rapid and high-precision tool calibration, reduces equipment downtime, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746498A_ABST
    Figure CN121746498A_ABST
Patent Text Reader

Abstract

The invention discloses a tool calibration method and device, equipment and a storage medium. The method comprises the following steps: acquiring installation position data of a tool calibration plate installed in a target machine, inserting a bit into a positioning hole with an adaptive specification on the calibration plate, and acquiring a jack axis coordinate when the bit is aligned with the center of the hole; on the basis of the established mapping relation between the camera pixel coordinates and the actual mechanical coordinates, moving the camera to the position over the positioning hole, collecting image data of the positioning hole, extracting hole center pixel coordinates, and calculating the circle center distance on the basis of the hole center pixel coordinates and the center coordinates of images shot by the camera; adjusting the position of the camera shaft according to the circle center distance to obtain adjusted camera shaft coordinates; and calling the jack axis coordinate and the adjusted camera axis coordinate, performing matching processing on the bit center mechanical coordinate and the camera center mapping coordinate through a coordinate association algorithm to obtain an alignment parameter of the camera shooting axis center and the bit center, and completing calibration. And the technical effect of rapid and high-precision calibration is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine vision positioning guidance, and in particular to a tool calibration method, device, equipment and storage medium. BACKGROUND

[0002] In the field of machine vision positioning guidance in industrial production, the vision guidance device needs to realize high-precision screw locking and other operations through the cooperative positioning of a camera and an execution component (such as a chuck).

[0003] In the prior art, tool calibration usually needs to rely on an external movable calibration reference or manually set a temporary reference point, and the calibration process needs to complete the steps of camera coordinate system establishment, execution component positioning, center alignment calibration and the like in sequence, and the calibration reference position and the device posture need to be repeatedly adjusted during the calibration process. For production scenes that need to frequently replace different specifications of execution components (such as chucks), the complete calibration process needs to be restarted after each replacement, and through repeated collection of multiple sets of coordinate data, recalculation of mapping relationship and alignment parameters, it is ensured that the positioning accuracy meets the production requirements. Each calibration needs to repeatedly perform reference positioning, multiple coordinate collection, mapping relationship reconstruction and the like, especially after replacing the execution component, the whole process needs to be recalibrated, which occupies a large amount of device downtime and reduces the production efficiency. SUMMARY

[0004] The present application provides a tool calibration method, device, equipment and storage medium to realize accurate alignment of a camera and a chuck, solves the technical problems of traditional calibration process being complicated, time-consuming, and needing to be repeated after replacing the component, and achieves the technical effects of fast and high-precision calibration, shortening of device downtime and improvement of production efficiency.

[0005] According to an aspect of the present application, a tool calibration method is provided, which comprises:

[0006] Obtaining installation position data of a tool calibration plate installed in a target machine, driving a chuck to be inserted into a positioning hole of the tool calibration plate of an appropriate specification, and collecting the hole axis coordinates when the center of the alignment hole of the chuck is aligned;

[0007] Based on a pre-established mapping relationship between camera pixel coordinates and actual mechanical coordinates, driving the camera to move above the positioning hole, collecting image data of the positioning hole, extracting hole center pixel coordinates based on the image data, and calculating the distance between the center of the circle based on the hole center pixel coordinates and the center coordinates of the camera image;

[0008] Adjusting the camera axis position according to the distance between the center of the circle to obtain the adjusted camera axis coordinates;

[0009] The tool calibration module is configured to call the plug hole axis coordinates and the adjusted camera axis coordinates, and perform matching processing on the center mechanical coordinates of the tool head and the center mapping coordinates of the camera by using a coordinate association algorithm, so as to obtain alignment parameters of the center of the camera shooting axis and the center of the tool head, and complete tool calibration.

[0010] According to another aspect of the present application, a tool calibration device is provided, which comprises:

[0011] The installation position acquisition module is configured to acquire installation position data of a tool calibration plate installed in a target machine, drive a tool head to be inserted into a positioning hole of a suitable size on the tool calibration plate, and collect plug hole axis coordinates when the center of the alignment hole of the tool head is aligned.

[0012] The center distance calculation module is configured to drive a camera to be moved above the positioning hole based on a pre-established mapping relationship between camera pixel coordinates and actual mechanical coordinates, collect image data of the positioning hole, extract hole center pixel coordinates based on the image data, and calculate a center distance based on the hole center pixel coordinates and the center coordinates of the camera shooting image.

[0013] The camera axis adjustment module is configured to adjust the position of the camera axis according to the center distance, so as to obtain adjusted camera axis coordinates.

[0014] The tool calibration module is configured to call the plug hole axis coordinates and the adjusted camera axis coordinates, and perform matching processing on the center mechanical coordinates of the tool head and the center mapping coordinates of the camera by using a coordinate association algorithm, so as to obtain alignment parameters of the center of the camera shooting axis and the center of the tool head, and complete tool calibration.

[0015] According to another aspect of the present application, an electronic device is provided, which comprises:

[0016] at least one processor;

[0017] and a memory connected in communication with the at least one processor;

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the tool calibration method of any one of the embodiments of the present application.

[0019] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to execute the tool calibration method of any one of the embodiments of the present application when the processor executes the computer instructions.

[0020] The technical scheme of the embodiment of the present application realizes accurate alignment of the camera and the batch head through the tool calibration mode of fixing the tool calibration plate, collecting the jack plug shaft and the camera shaft coordinates and matching the alignment parameters through the correlation algorithm, solves the technical problems of the traditional calibration process being complicated, time-consuming, and needing to be repeated after the parts are replaced, and achieves the technical effects of fast and high-precision calibration, shortening of equipment downtime, and improvement of production efficiency.

[0021] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0023] Figure 1 A flowchart of a tool calibration method provided by the embodiment of the present application is provided.

[0024] Figure 2a A flowchart of another tool calibration method provided by the embodiment of the present application is provided.

[0025] Figure 2b A 9-point calibration schematic diagram of an optional example of a tool calibration method is provided.

[0026] Figure 2c A calibration plate sample schematic diagram of an optional example of a tool calibration method is provided.

[0027] Figure 3 A structural schematic diagram of a tool calibration device provided by the embodiment of the present application is provided.

[0028] Figure 4 A structural schematic diagram of an electronic device for implementing a tool calibration method of the embodiment of the present application is provided. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and in the above-described drawings are intended to distinguish similar objects and are not necessarily intended to describe a particular sequential or chronological order. It should be understood that the data thus used can be interchanged, where appropriate, so that the embodiments of the application described herein can be carried out in other than the order shown or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, processes, methods, systems, products, or devices that include a series of steps or units need not be limited to those steps or units that are clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0031] Figure 1 A flowchart of a tool calibration method provided for an embodiment of the present application, which can be applicable to the tool calibration case based on visual guidance technology, the method can be executed by a tool calibration device, which can be realized in the form of hardware and / or software, and can be configured in an electronic device. As shown in the figure, the method specifically includes the following steps: Figure 1

[0032] S110, obtaining installation position data of a tool calibration plate installed in a target machine, driving a batch head to insert into a positioning hole of a suitable specification on the tool calibration plate, and collecting the insertion hole shaft coordinates when the batch head is aligned with the hole center.

[0033] Wherein, the target machine can be understood as an automated device that needs to perform screw locking work. The tool calibration plate can be understood as a fixed reference plate with multiple specification positioning holes, which is installed in the target machine.

[0034] The installation position data can be understood as the specific installation coordinates, angles, and other parameters of the tool calibration plate in the target machine. The batch head can be understood as a special screwdriver bit for screwing the machine, which directly drives the screw to rotate and lock, and has different specifications to adapt to various screws. The positioning hole can be understood as a precise hole on the tool calibration plate, which has a hole diameter matched with the specification of the batch head, and is used for position calibration of the batch head and the camera. The insertion hole shaft coordinates can be understood as the specific position coordinates of the insertion hole shaft for controlling the movement of the batch head when the batch head is precisely inserted into the center of the positioning hole.

[0035] Specifically, the installation position data of the tool calibration plate installed in the target machine is obtained, then the batch head is driven to insert into the positioning hole of a suitable specification on the tool calibration plate, and after the batch head is precisely aligned with the hole center, the insertion hole shaft coordinates at this time are collected and recorded.

[0036] Preferably, the positioning hole diameter can be 0.5mm larger than the batch head diameter to avoid jamming when the batch head is inserted, while ensuring the alignment accuracy.

[0037] ​Optionally, after the installation position data of the tool calibration plate installed in the target machine is acquired, it further comprises: verifying whether the installation position data meets preset installation conditions, the preset installation conditions comprising that the calibration plate is within the camera shooting range and is perpendicular to the batch head; and in the case that the installation position data does not meet the preset installation conditions, adjusting the installation position of the tool calibration plate until the preset installation conditions are met.

[0038] The preset installation conditions can be understood as core requirements that need to be met when the tool calibration plate is installed, ensuring that the calibration is effective.

[0039] Specifically, after the installation position data of the tool calibration plate is acquired, it is verified whether the position data meets the preset installation conditions, for example, the calibration plate is within the range that can be clearly shot by the camera and is perpendicular to the batch head; if the installation position data does not meet the preset conditions, the installation position of the tool calibration plate is adjusted until the conditions are met, and then the subsequent steps of batch head insertion and coordinate collection are performed.

[0040] Preferably, whether the installation position meets the requirements can be quickly judged by shooting the calibration plate image by the camera or detecting by the built-in sensor of the device.

[0041] S120, based on the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates established in advance, driving the camera to move to directly above the positioning hole, collecting image data of the positioning hole, extracting the hole center pixel coordinates based on the image data, and calculating the center distance based on the hole center pixel coordinates and the center coordinates of the camera shot image.

[0042] The camera pixel coordinates can be understood as the pixel position data of the target point on the image in the camera shot image, such as the pixel position data of the positioning hole center on the image. The actual mechanical coordinates can be understood as the physical position coordinates of the components (such as the camera and the batch head) on the target machine. The mapping relationship can be understood as the conversion rule between the camera pixel coordinates and the actual mechanical coordinates, which can convert the pixel position on the image into the physical position on the machine. The image data can be understood as the image file obtained after the camera shoots the positioning hole, containing the shape and position of the positioning hole. The hole center pixel coordinates can be understood as the pixel position of the positioning hole center on the image extracted from the image data. The center coordinates of the camera shot image can be understood as the geometric center pixel position of the camera shot picture. The center distance can be understood as the straight line distance between the pixel coordinates of the positioning hole center and the center coordinates of the image.

[0043] Specifically, according to the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates established in advance, the camera is controlled to move to directly above the positioning hole, and the image data of the positioning hole is shot; the pixel coordinates of the hole center are extracted from the image data, and the center distance between the two is calculated in combination with the preset image center coordinates.

[0044] Preferably, precise step control is adopted when the camera moves to ensure that the deviation of the shooting position from directly above the positioning hole is within 0.1 mm.

[0045] Optionally, before driving the camera to move to directly above the positioning hole based on the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates established in advance, it further includes: obtaining the camera pixel coordinates of multiple fixed points within the camera collection area and the actual mechanical coordinates of the target machine, and establishing the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates.

[0046] Specifically, before driving the camera to move to directly above the positioning hole through the mapping relationship, it is necessary to first collect the camera pixel coordinates of multiple fixed points within the camera collection area, as well as the actual mechanical coordinates of the target machine corresponding to these fixed points, and establish the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates through these coordinate data, providing a basis for subsequent camera movement and coordinate conversion.

[0047] Exemplarily, first perform a 9-point calibration on the 2D camera. Find a fixed and distinct Mark point within the camera's field of view, move the camera position and sequentially take pictures to obtain the pixel coordinates of the Mark point, and at the same time obtain the mechanical position coordinates of each point when taking pictures. Put the pixel coordinates and mechanical coordinates into the calibration tool to complete the 9-point calibration. The camera moves the same distance up, down, left, and right, and the overall movement is in a "field" shape.

[0048] Optionally, the obtaining the camera pixel coordinates of multiple fixed points within the camera collection area and the actual mechanical coordinates of the target machine, and establishing the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates includes: controlling the camera to move according to a preset trajectory, recording the camera pixel coordinates and the actual mechanical coordinates of the target machine when each fixed point is photographed, and performing fitting processing on multiple groups of the coordinates through a calibration algorithm to establish the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates.

[0049] Among them, the fixed point can be understood as a reference point with unchanged position and distinct features within the camera collection area, such as the equipment body identification or a special mark. The calibration algorithm can be understood as a mathematical operation method for processing multiple groups of coordinate data to establish the mapping relationship between pixel coordinates and mechanical coordinates.

[0050] Specifically, control the camera to move according to a preset trajectory (such as a "field" shape), photograph each fixed point during the movement, and synchronously record the camera pixel coordinates of each fixed point when it is photographed and the corresponding actual mechanical coordinates of the target machine; input the multiple groups of collected coordinate data into the calibration algorithm, and perform fitting processing on the data through the algorithm to establish an accurate mapping relationship between the camera pixel coordinates and the actual mechanical coordinates.

[0051] Preferably, the preset trajectory can be adjusted according to the camera acquisition range to ensure that each fixed point can be clearly photographed, and the number of groups of coordinate data is at least 9, so as to improve the stability of the mapping relationship.

[0052] Optionally, the pixel coordinates of the hole center are extracted based on the image data, including: performing filtering denoising and edge detection processing on the collected positioning hole image data, removing image noise interference and strengthening the edge features of the positioning hole; and performing operation based on a circle center fitting algorithm and the processed positioning hole image data to extract the pixel coordinates of the hole center.

[0053] The filtering denoising processing can be understood as optimizing the image data to remove interference noise during shooting. The edge detection processing can be understood as strengthening the edge features of the positioning hole in the image, so that the outline of the hole is clearer and the center coordinates are easier to extract. The circle center fitting algorithm can be understood as a mathematical method for accurately calculating the center position of the hole based on the edge data of the positioning hole in the image.

[0054] Specifically, the collected positioning hole image data is subjected to filtering denoising and edge detection processing to filter out interference noise in the image and make the edge features of the positioning hole clearer. Then, the circle center fitting algorithm is used to operate on the processed image data to accurately extract the pixel coordinates of the center of the positioning hole, thereby providing accurate data for subsequent circle center distance calculation.

[0055] Preferably, the filtering denoising can use a Gaussian filtering algorithm, and the edge detection can use a Canny algorithm to improve the efficiency and accuracy of image processing.

[0056] S130, adjusting the camera axis position according to the circle center distance to obtain an adjusted camera axis coordinate.

[0057] The adjusted camera axis coordinate can be understood as the final position coordinate of the camera axis after adjusting the position of the camera axis to make the circle center distance meet the accuracy requirement.

[0058] Specifically, the position of the camera axis is adjusted according to the calculated circle center distance until the circle center distance meets the preset accuracy requirement, and the adjusted camera axis coordinate is recorded.

[0059] Preferably, the preset accuracy threshold is that the circle center distance is less than or equal to 0.003 mm, so as to ensure that the camera shooting center is accurately aligned with the center of the positioning hole.

[0060] S140, calling the socket axis coordinate and the adjusted camera axis coordinate, performing matching processing on the center mechanical coordinate of the bit and the camera center mapping coordinate through a coordinate association algorithm to obtain the alignment parameter of the camera shooting axis center and the center of the bit, and completing tool calibration.

[0061] The coordinate correlation algorithm can be understood as a mathematical operation method for matching and calculating the relationship between the head center and the camera center position. The head center mechanical coordinate can be understood as the actual mechanical coordinate of the physical center of the head. The camera center mapping coordinate can be understood as the actual mechanical coordinate corresponding to the physical center of the camera after conversion through the mapping relationship. The alignment parameter can be understood as data for ensuring the accurate alignment of the camera shooting center and the head center.

[0062] Specifically, the previously collected jack axis coordinates and the adjusted camera axis coordinates are called, and the head center mechanical coordinate and the camera center mapping coordinate are matched and calculated through the coordinate correlation algorithm, and finally the alignment parameter that can align the camera shooting axis center and the head center is obtained, and the tool calibration process is completed.

[0063] Preferably, after matching and calculation, a trial calibration verification can be performed, and if the alignment accuracy is not up to standard, the parameters are adjusted again.

[0064] Optionally, the head center mechanical coordinate and the camera center mapping coordinate are matched and processed through the coordinate correlation algorithm to obtain the alignment parameter of the camera shooting axis center and the head center, including: mapping the jack axis coordinates to the head center mechanical coordinate, and mapping the hole center pixel coordinates to the hole center mechanical coordinate; combining the adjusted camera axis coordinates and the hole center mechanical coordinate to obtain the camera center mapping coordinate, and calculating the deviation value of the head center mechanical coordinate and the camera center mapping coordinate; generating a compensation parameter based on the deviation value, combining the compensation parameter with the mapping relationship to obtain the alignment parameter of the camera shooting axis center and the head center.

[0065] The deviation value can be understood as the positional difference between the head center mechanical coordinate and the camera center mapping coordinate. The compensation parameter can be understood as an adjustment data for correcting the deviation value.

[0066] Specifically, the collected jack axis coordinates are converted into head center mechanical coordinates, and the hole center pixel coordinates are converted into hole center mechanical coordinates; the adjusted camera axis coordinates are combined with the hole center mechanical coordinates to obtain the camera center mapping coordinates, and the deviation value between the head center mechanical coordinates and the camera center mapping coordinates is calculated; a compensation parameter is generated according to the deviation value, and the compensation parameter is combined with the previously established mapping relationship to finally obtain the alignment parameter that can accurately align the camera shooting axis center and the head center.

[0067] Preferably, the deviation value calculation uses a two-point distance formula, and the compensation parameter can be dynamically adjusted according to the actual production scene.

[0068] Further, after completing the initial calibration, the camera can automatically take pictures of the positioning hole of the tool calibration plate every preset period (such as every 50 screws are locked), recalculate the deviation value of the center distance and the alignment parameter, and if the deviation exceeds the preset deviation threshold, based on the historical calibration data and the real-time collected hole center coordinates, automatically execute the compensation parameter update without manual intervention to complete the dynamic self-calibration. The positioning deviation caused by factors such as mechanical wear and temperature drift during long-term operation of the equipment can be offset, the stability of the long-term calibration accuracy is maintained, the production interruption caused by periodic shutdown and recalibration is avoided, and the continuous operation capability of the equipment is further improved.

[0069] The technical scheme of the embodiment of the application realizes the accurate alignment of the camera and the batch head by the tool calibration method of fixing the tool calibration plate, collecting the hole axis coordinates and the camera axis coordinates and matching the alignment parameters by the correlation algorithm, solves the technical problems of the traditional calibration process being complicated, time-consuming, and needing to be repeated after replacing parts, and achieves the technical effects of fast and high-precision calibration, shortening the equipment downtime, and improving the production efficiency.

[0070] Figure 2a The flowchart of another tool calibration method provided by the embodiment of the application is based on the above-mentioned embodiment, and the embodiment is a further optimization of the above-mentioned embodiment, and the specific implementation can be referred to the technical scheme of the embodiment. Among them, the same or corresponding technical terms as the above-mentioned embodiment will not be described here. As shown in the figure, the method specifically includes the following steps: Figure 2a

[0071] S210, acquiring the installation position data of the tool calibration plate installed in the target machine, driving the batch head to be inserted into the positioning hole of the tool calibration plate with an appropriate specification, and collecting the hole axis coordinates when the batch head is aligned with the hole center.

[0072] It is worth noting that the number of holes in the calibration plate itself is not limited, the hole size is designed according to the batch head specification of the on-site equipment, and the material can be selected to be relatively soft to avoid damage to the batch head.

[0073] Further, on the basis of the positioning hole of the tool calibration plate, a micro elastic hole diameter adjusting structure can be additionally provided, which can automatically adapt the hole diameter according to the diameter of the inserted batch head, and the adjusting range can cover commonly used batch head specifications.

[0074] S220, based on the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates, driving the camera to move to above the positioning hole, collecting the image data of the positioning hole, extracting the hole center pixel coordinates based on the image data, and calculating the center distance based on the hole center pixel coordinates and the center coordinates of the camera image.

[0075] S230, adjusting the camera axis position according to the center distance to obtain the adjusted camera axis coordinates.​

[0076] S240. Call the socket axis coordinates and the adjusted camera axis coordinates, and perform matching processing on the mechanical coordinates of the bit center and the mapped coordinates of the camera center through a coordinate association algorithm to obtain the alignment parameters between the camera shooting axis center and the bit center, and complete the tool calibration.

[0077] Preferably, the alignment threshold is <0.003mm, and in step S220, a center distance <0.003mm indicates alignment. If the accuracy is not up to standard, if the difference is fixed, it can be manually compensated; if the difference is not fixed, it is necessary to check whether the captured product feature points in the image are stable and whether the bit is loose.

[0078] S250. After the tool calibration is completed and the bit is replaced, the established mapping relationship between the camera pixel coordinates and the actual mechanical coordinates is kept unchanged. The new bit is driven to be inserted into the positioning hole of the appropriate specification on the tool calibration plate, and the new insertion hole axis coordinates when the new bit is aligned with the center of the hole are collected.

[0079] Here, "new bit" can be understood as a different specification or model of bit that is replaced due to production needs after the tool has been calibrated. "New socket axis coordinates" can be understood as the specific position coordinates of the socket axis when the new bit is accurately inserted into the center of the positioning hole.

[0080] Specifically, after the tool calibration is completed, if it is necessary to change the bit, keep the previously established mapping relationship between camera pixel coordinates and actual mechanical coordinates unchanged, drive the new bit to insert into the positioning hole of the appropriate specification on the tool calibration plate, and after the new bit is aligned with the center of the hole, collect the new insertion hole axis coordinates at this time.

[0081] Preferably, the new bit size should be within the range of the positioning holes on the tool calibration plate, without needing to adjust the position of the calibration plate.

[0082] S260. Call the new socket axis coordinates and the adjusted camera axis coordinates, and perform the matching process of the coordinate association algorithm to generate new alignment parameters and complete the recalibration.

[0083] Recalibration can be understood as a rapid calibration that is completed by updating only some data after changing the bit, without having to repeat the complete calibration process.

[0084] Specifically, the newly acquired jack axis coordinates and the previously recorded adjusted camera axis coordinates are called, and the coordinate association algorithm is executed again to generate new alignment parameters, thus quickly completing the recalibration without repeating the entire calibration process.

[0085] The technical solution of the embodiment of the present invention can quickly generate new alignment parameters by only updating the coordinates of the new jackshaft without repeating the complete calibration process after replacing the bit head, greatly shortening the time for re-calibration and the downtime of the equipment, and improving the production efficiency and the flexibility of equipment adaptation.

[0086] As an optional example of Embodiment 1 of the present invention, the tool calibration method of this embodiment specifically includes the following steps:

[0087] Step 1. Perform 9-point calibration on the 2D camera first.

[0088] Specifically, Figure 2b A schematic diagram of 9-point calibration of an optional example of a tool calibration method is provided. As Figure 2b shown, find a fixed and distinct Mark point within the camera's field of view, move the camera position and sequentially take pictures to obtain the pixel coordinates of the Mark point, and at the same time obtain the mechanical position coordinates of each point when taking pictures. Put the pixel coordinates and the mechanical coordinates into the calibration tool to complete the 9-point calibration. The camera moves the same distance up, down, left, and right, and moves in a "field" shape as a whole.

[0089] Step 2. Install the tool calibration board inside the equipment, and the calibration board can be fixed here without moving in the following. Figure 2c A schematic diagram of a calibration board sample of an optional example of a tool calibration method is provided. As Figure 2c shown, the tool calibration board includes multiple positioning holes and can be compatible with different specifications of suction nozzles and bit heads.

[0090] Specifically, the specific installation position of the calibration board is fixed at a place where the upper camera can clearly photograph, perpendicular to the bit head. The structural parameters of the calibration board: several different specifications of holes can be drilled in the calibration board to be compatible with different specifications of bit heads on site. The hole size is 0.5 mm larger than the diameter of the bit head, and the number of holes does not need to be specified, as long as it can be compatible with the bit head sizes on site.

[0091] Step 3. The moving axis inserts the bit head into the hole of the calibration board. This position can be saved and directly used later, and the position is input into the software interface for the algorithm to call.

[0092] It can be understood that the insertion depth is not particularly fixed, as long as it can be inserted into the hole.

[0093] Step 4. Move the camera directly above this hole (select the hole closest to the bit head size of this equipment), take a picture and calculate the distance between the center of the hole and the center of the image, and adjust the camera axis to control the center distance within 0.003. This position can be saved and directly used later, and the position is input into the software interface for the algorithm to call.

[0094] Wherein, the image center: X = image length / 2; Y = image width / 2; The center distance = the distance between the center coordinates of the hole in the image and the image center. The center distance is calculated by the coordinates between two points, and only needs to be measured once during calibration, and the center distance is controlled within 0.003 to ensure high-precision calibration.

[0095] The technical scheme of the embodiment of the application uses the calibration block as a reference point to realize the alignment of the camera center and the center point of the head, thereby realizing rapid calibration, improving guiding accuracy and reducing equipment downtime. Based on the actual application scenario, the method can be applied to the field of industrial production to realize efficient production.

[0096] Figure 3 A tool calibration device provided by the embodiment of the application is shown in a structural schematic view. Figure 3 As shown in the figure, the device comprises: an installation position acquisition module 310, a center distance calculation module 320, a camera axis adjustment module 330 and a tool calibration module 340.

[0097] The installation position acquisition module 310 is configured to acquire installation position data of a tool calibration plate installed in a target machine, drive a head to be inserted into a positioning hole of an appropriate size on the tool calibration plate, and collect the axis coordinates of the insertion hole when the center of the alignment hole of the head is aligned. The center distance calculation module 320 is configured to drive a camera to move above the positioning hole based on a pre-established mapping relationship between camera pixel coordinates and actual mechanical coordinates, collect image data of the positioning hole, extract hole center pixel coordinates based on the image data, and calculate the center distance based on the hole center pixel coordinates and the center coordinates of the camera image. The camera axis adjustment module 330 is configured to adjust the axis position of the camera according to the center distance to obtain adjusted camera axis coordinates. The tool calibration module 340 is configured to call the axis coordinates of the insertion hole and the adjusted camera axis coordinates, perform matching processing on the center mechanical coordinates of the head and the center mapping coordinates of the camera by a coordinate correlation algorithm, obtain alignment parameters of the center of the camera shooting axis and the center of the head, and complete tool calibration.

[0098] The technical scheme of the embodiment of the application realizes the accurate alignment of the camera and the head by the tool calibration method of fixing the tool calibration plate, collecting the axis coordinates of the insertion hole and the camera, and obtaining the alignment parameters through the correlation algorithm, solves the technical problems of the traditional calibration process being complicated, time-consuming, and needing to be repeated after replacing parts, and achieves the technical effects of rapid high-precision calibration, shortening of equipment downtime, and improvement of production efficiency.

[0099] In some optional embodiments, the device further comprises:

[0100] The mapping relationship establishing module is configured to, before driving the camera to move to the top of the positioning hole based on a pre-established mapping relationship between camera pixel coordinates and actual mechanical coordinates, acquire camera pixel coordinates of a plurality of fixed points in a camera acquisition region and actual mechanical coordinates of the target machine, and establish the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates.

[0101] In some optional embodiments, the mapping relationship establishing module is specifically configured to:

[0102] control the camera to move along a preset trajectory, record camera pixel coordinates of each fixed point when the fixed point is photographed and actual mechanical coordinates of the target machine, perform fitting processing on a plurality of groups of the coordinates through a calibration algorithm, and establish the mapping relationship between the camera pixel coordinates and the actual mechanical coordinates.

[0103] In some optional embodiments, the device further includes:

[0104] The data verifying module is configured to, after acquiring the installation position data of the tool calibration plate installed in the target machine, verify whether the installation position data satisfies a preset installation condition, the preset installation condition including that the calibration plate is in a camera shooting range and is perpendicular to the batch head.

[0105] The position adjusting module is configured to, in a case where the installation position data does not satisfy the preset installation condition, adjust the installation position of the tool calibration plate until the preset installation condition is satisfied.

[0106] In some optional embodiments, the center distance calculating module includes:

[0107] The image data processing unit is configured to perform filtering noise reduction and edge detection processing on the acquired positioning hole image data, remove image noise interference, and strengthen edge features of the positioning hole.

[0108] The coordinate extracting unit is configured to perform operation based on a circle center fitting algorithm and the processed positioning hole image data, and extract hole center pixel coordinates.

[0109] In some optional embodiments, the tool calibration module includes:

[0110] The coordinate mapping unit is configured to map the jack hole axis coordinates into batch head center mechanical coordinates and map the hole center pixel coordinates into hole center mechanical coordinates.

[0111] The deviation calculating unit is configured to combine the adjusted camera axis coordinates and the hole center mechanical coordinates, convert to obtain camera center mapping coordinates, and calculate a deviation value between the batch head center mechanical coordinates and the camera center mapping coordinates.

[0112] An alignment parameter acquisition unit is configured to generate a compensation parameter based on the deviation value, and combine the compensation parameter with the mapping relationship to obtain an alignment parameter of a camera shooting axis center and the head center.

[0113] In some optional embodiments, the device further comprises:

[0114] A new coordinate acquisition module is configured to, in the case of replacing the head after tool calibration is completed, maintain the established mapping relationship between the camera pixel coordinates and the actual mechanical coordinates unchanged, drive a new head to be inserted into a positioning hole of a suitable specification on the tool calibration plate, and acquire a new insertion hole axis coordinate of a center of an alignment hole of the new head;

[0115] A recalibration module is configured to call the new insertion hole axis coordinate and the adjusted camera axis coordinate, perform matching processing of the coordinate correlation algorithm, generate a new alignment parameter, and complete recalibration.

[0116] The tool calibration device provided in the embodiments of the present application can execute the tool calibration method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0117] Figure 4 A structural schematic diagram of an electronic device for implementing the tool calibration method of the embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections, and their functions, as well as their implementation, are merely examples and are not intended to limit the implementations of the present application described and / or claimed herein.

[0118] As shown in Figure 4 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11, wherein the memory stores a computer program that can be executed by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0119] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0120] The processor 11 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the method tool calibration.

[0121] In some embodiments, the method tool calibration can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of the method tool calibration described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the method tool calibration by any other appropriate means, such as by means of firmware.

[0122] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0123] Computer programs for implementing the methods of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, enables the functions / acts specified in the flowcharts and / or block diagrams to be implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package and partially on a remote machine or entirely on a remote machine or server.

[0124] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0126] The systems and techniques described herein can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0127] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0128] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in different orders, as long as the desired results of the technical solutions of the present disclosure can be achieved, and the present disclosure is not limited herein.

[0129] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A tool calibration method, characterized in that, include: Obtain the installation position data of the tool calibration plate that has been installed in the target machine, drive the bit to insert into the positioning hole of the appropriate specification on the tool calibration plate, and collect the insertion hole axis coordinate when the bit is aligned with the center of the hole; Based on the pre-established mapping relationship between camera pixel coordinates and actual mechanical coordinates, the camera is driven to move directly above the positioning hole, and image data of the positioning hole is acquired. The center pixel coordinates of the hole are extracted based on the image data, and the center distance is calculated based on the center pixel coordinates of the hole and the center coordinates of the image captured by the camera. Adjust the camera axis position according to the center distance to obtain the adjusted camera axis coordinates; The tool calibration is completed by calling the socket axis coordinates and the adjusted camera axis coordinates, and performing matching processing between the mechanical coordinates of the bit center and the mapped coordinates of the camera center through a coordinate association algorithm to obtain the alignment parameters between the camera shooting axis center and the bit center.

2. The method according to claim 1, characterized in that, Before driving the camera to move directly above the positioning hole based on a pre-established mapping relationship between camera pixel coordinates and actual mechanical coordinates, the process also includes: Obtain the camera pixel coordinates and the actual mechanical coordinates of the target machine at multiple fixed points within the camera acquisition area, and establish a mapping relationship between the camera pixel coordinates and the actual mechanical coordinates.

3. The method according to claim 2, characterized in that, The process of acquiring the camera pixel coordinates of multiple fixed points within the camera's acquisition area and the actual mechanical coordinates of the target machine, and establishing a mapping relationship between the camera pixel coordinates and the actual mechanical coordinates, includes: The camera is controlled to move along a preset trajectory, and the camera pixel coordinates and the actual mechanical coordinates of the target machine are recorded when each fixed point is photographed. Multiple sets of coordinates are fitted using a calibration algorithm to establish a mapping relationship between the camera pixel coordinates and the actual mechanical coordinates.

4. The method according to claim 1, characterized in that, After obtaining the installation location data of the tool calibration board already installed in the target machine, the method further includes: Verify whether the installation position data meets the preset installation conditions, which include the calibration plate being within the camera's field of view and perpendicular to the bit. If the installation position data does not meet the preset installation conditions, adjust the installation position of the tool calibration plate until the preset installation conditions are met.

5. The method according to claim 1, characterized in that, The extraction of the hole center pixel coordinates based on the image data includes: The acquired positioning hole image data is subjected to filtering, noise reduction, and edge detection processing to remove image noise interference and enhance the edge features of the positioning hole; The center pixel coordinates of the hole are extracted by performing calculations based on the circle center fitting algorithm and the processed positioning hole image data.

6. The method according to claim 1, characterized in that, The process of matching the mechanical coordinates of the bit center with the mapped coordinates of the camera center using a coordinate association algorithm to obtain the alignment parameters between the camera's shooting axis center and the bit center includes: The jack axis coordinates are mapped to the bit center mechanical coordinates, and the hole center pixel coordinates are mapped to the hole center mechanical coordinates. The adjusted camera axis coordinates are combined with the hole center mechanical coordinates to obtain the camera center mapped coordinates, and the deviation between the bit center mechanical coordinates and the camera center mapped coordinates is calculated. Compensation parameters are generated based on the deviation value, and the compensation parameters are combined with the mapping relationship to obtain the alignment parameters between the camera shooting axis center and the bit center.

7. The method according to claim 1, characterized in that, Also includes: When the bit is replaced after tool calibration, the established mapping relationship between the camera pixel coordinates and the actual mechanical coordinates is kept unchanged. The new bit is driven to be inserted into the positioning hole of the appropriate specification on the tool calibration plate, and the new insertion hole axis coordinates are collected when the new bit is aligned with the center of the hole. The new jack axis coordinates and the adjusted camera axis coordinates are called, and the coordinate association algorithm is used to perform matching processing to generate new alignment parameters and complete the recalibration.

8. A tool calibration device, characterized in that, include: The installation position acquisition module is used to acquire the installation position data of the tool calibration plate that has been installed in the target machine, drive the bit to insert into the positioning hole of the appropriate specification on the tool calibration plate, and collect the insertion hole axis coordinate when the bit is aligned with the center of the hole. The center distance calculation module is used to drive the camera to move directly above the positioning hole based on a pre-established mapping relationship between camera pixel coordinates and actual mechanical coordinates, collect image data of the positioning hole, extract the center pixel coordinates of the hole based on the image data, and calculate the center distance based on the center pixel coordinates of the hole and the center coordinates of the image captured by the camera. A camera axis adjustment module is used to adjust the position of the camera axis according to the center distance to obtain the adjusted camera axis coordinates; The tool calibration module is used to call the socket axis coordinates and the adjusted camera axis coordinates, and perform matching processing on the mechanical coordinates of the bit center and the mapped coordinates of the camera center through a coordinate association algorithm to obtain the alignment parameters between the camera shooting axis center and the bit center, thereby completing the tool calibration.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the tool calibration method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the tool calibration method according to any one of claims 1-7.