A positioning method and apparatus
By acquiring multiple frames of working images and establishing a mathematical model, and using an existing interferometer to measure the gap for linear fitting, the positioning deviation problem caused by the gap between the tool and the workpiece was solved, achieving high-precision tool positioning and avoiding increased hardware costs and tool wear.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 张江国家实验室
- Filing Date
- 2025-01-17
- Publication Date
- 2026-07-17
Smart Images

Figure CN122408600A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and more particularly to a positioning method and apparatus. Background Technology
[0002] Currently, when a tool is working on a workpiece, its coordinates need to be determined by an imaging unit (such as a camera). However, due to process requirements or installation constraints, there is usually a certain distance between the bottom surface of the tool and the top surface of the workpiece; this distance is called the longitudinal clearance between the tool and the workpiece. Furthermore, due to installation space or other technical limitations, the imaging unit cannot be installed in a position completely perpendicular to the working plane. Both the longitudinal clearance between the tool and the workpiece, and the angle of the imaging unit, will cause a deviation between the apparent position and the actual position of the tool in the image. In this case, the tool coordinates in the image captured by the imaging unit are inaccurate, leading to deviations in the tool's operation on the workpiece.
[0003] Therefore, accurately locating the coordinates of tools in an image is a problem that urgently needs to be solved. Summary of the Invention
[0004] This invention provides a positioning method and apparatus for accurately locating the coordinates of an object in an image.
[0005] In a first aspect, the present invention provides a positioning method, the method comprising: acquiring N frames of working images of a tool on a workpiece, wherein the tool and the workpiece in the N frames of working images have different gaps, and N is an integer greater than or equal to 2; determining the coordinates of the tool in each frame of working images in a set coordinate system; and positioning the standard coordinates of the tool according to the coordinates of the tool in the N frames of working images and the N gaps corresponding to the N frames of working images, wherein the standard coordinates are the coordinates of the tool in the set coordinate system when the gap between the tool and the workpiece is 0.
[0006] This application acquires images corresponding to different gaps and, based on the gap values of multiple images and the corresponding tool position information (i.e., the tool's coordinates in a set coordinate system), can calculate the accurate coordinates of the tool when the gap between the tool and the workpiece is 0. Through this approach, the application has low hardware requirements and requires no additional hardware investment; the solution can be implemented simply by optimizing the process. Furthermore, it can improve the tool's positioning accuracy, effectively correct visual errors, and avoid direct contact between the tool and the workpiece throughout the process, thus preventing damage caused by contact.
[0007] Optionally, the tool's coordinates in the set coordinate system are the coordinates of the tool's center point in the set coordinate system. In this way, a clear and stable positioning reference point can be obtained, which helps to improve the accuracy and reliability of visual positioning.
[0008] Optionally, the standard coordinates of the tool are located based on the coordinates of the tool in the N frames of working images and the N gaps corresponding to the N frames of working images. This includes: modeling the N tool coordinates and N gaps corresponding to the N frames of working images, and determining the standard coordinates of the tool based on the modeling results.
[0009] The above approach, based on the linear relationship between parallax error and gap, allows for the modeling of the relationship between tool coordinates and gap size by collecting tool coordinates under different gaps. By establishing a mathematical model and fitting the data, the tool coordinates when the gap is 0 can be predicted, thereby improving the accuracy of visual positioning.
[0010] Optionally, model the N tool coordinates and N gaps corresponding to the N frames of working images, and determine the standard coordinates of the tools based on the modeling results, including: constructing the correlation between the standard coordinates, tool coordinates and gaps; substituting the tool coordinates and gaps corresponding to each frame of working images into the correlation, and performing linear fitting on the substituted correlation to obtain the values of the standard coordinates.
[0011] Optionally, the association relationship must satisfy the following conditions:
[0012] R i =R0+KH i
[0013] Among them, R i Let R0 be the coordinates of the tool corresponding to the i-th frame image, K be a constant coefficient, and H be the coordinates of the tool. i Let represent the gap corresponding to the i-th frame of the image, where i is a positive integer less than or equal to N.
[0014] By constructing the relationship between standard coordinates, tool coordinates, and clearance using the above scheme, the standard coordinates of the tool can be calculated using the tool coordinates and the clearance between the tool and the workpiece, thereby correcting the workpiece parallax.
[0015] Optionally, a linear fit can be performed on the substituted correlation, including using the least squares method to perform a linear fit on the substituted correlation. This allows for handling cases with multiple data points, providing more stable results compared to solving equations at two points, and effectively reducing the impact of measurement errors and noise, thereby improving positioning accuracy.
[0016] Optionally, the N frames of working images are captured facing the tool's working plane, and the coordinate system is set to a two-dimensional coordinate system. The tool's coordinates include coordinates in a first direction and coordinates in a second direction. The first and second directions are two mutually perpendicular directions on the working plane. In this way, by using two mutually perpendicular directions as references, the coordinates of the tool's center point can be determined more accurately.
[0017] In a second aspect, the present invention provides a positioning device, the device comprising:
[0018] The acquisition module is used to acquire N frames of working images of the tool on the workpiece. The tool and the workpiece have different gaps in the N frames of working images, and N is an integer greater than or equal to 2.
[0019] The determination module is used to determine the coordinates of the tool in the set coordinate system in each frame of the working image;
[0020] The positioning module is used to locate the standard coordinates of the tool based on the coordinates of the tool in N frames of working images and the N gaps corresponding to the N frames of working images. The standard coordinates are the coordinates of the tool in the set coordinate system when the gap between the tool and the workpiece is 0.
[0021] In one possible implementation, the coordinates of the tool in the set coordinate system are the coordinates of the center point of the tool in the set coordinate system.
[0022] In one possible implementation, the positioning module is specifically used to: model the N tool coordinates and N gaps corresponding to the N frames of working images, and determine the standard coordinates of the tool based on the modeling results.
[0023] In one possible implementation, the positioning module is specifically used to: construct the association between standard coordinates, tool coordinates, and gaps; substitute the tool coordinates and gaps corresponding to each frame of the working image into the association, and perform linear fitting on the substituted association to obtain the values of the standard coordinates.
[0024] In one possible implementation, the association satisfies the following condition:
[0025] R i =R0+KH i
[0026] Among them, R i Let R0 be the coordinates of the tool corresponding to the i-th frame image, K be a constant coefficient, and H be the coordinates of the tool. i Let represent the gap corresponding to the i-th frame of the image, where i is a positive integer less than or equal to N.
[0027] In one possible implementation, the localization module is specifically used to: perform linear fitting on the substituted association relationship using the least squares method.
[0028] In one possible implementation, N frames of working images are captured facing the working plane of the tool. The coordinate system is set as a two-dimensional coordinate system. The coordinates of the tool include coordinates in a first direction and coordinates in a second direction. The first direction and the second direction are two mutually perpendicular directions on the working plane.
[0029] Thirdly, the present invention also provides a positioning device, the device including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the method described in various possible designs of the first aspect.
[0030] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program or instructions that, when executed by a processor, implement the method described in various possible designs of the first aspect.
[0031] Fifthly, the present invention also provides a computer program product that, when run on a computer, causes the computer to perform any of the methods described in the first aspect above.
[0032] These or other implementations of this application will become clearer and easier to understand in the following description of the embodiments. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 A schematic diagram of the installation structure of a tool, workpiece, and camera unit provided in an embodiment of the present invention;
[0035] Figure 2 A flowchart illustrating a positioning method provided in an embodiment of the present invention;
[0036] Figure 3 A schematic diagram of the structure of a tool provided in an embodiment of the present invention;
[0037] Figure 4 A scene diagram illustrating the use of a camera unit to photograph tools and workpieces, provided as an embodiment of the present invention;
[0038] Figure 5 This is a schematic diagram of three working frames in an N-frame working image provided in an embodiment of the present invention;
[0039] Figure 6 A schematic diagram of a positioning device provided in an embodiment of the present invention;
[0040] Figure 7 This is a schematic diagram of another positioning device provided in an embodiment of the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0042] As described in the background art, due to the longitudinal gap between the tool and the workpiece and the presence of the camera unit angle, the apparent position of the tool in the image will deviate from its actual position.
[0043] Specifically, please refer to Figure 1 The schematic diagram of the installation structure of the tool, workpiece and camera unit shown indicates that when the tool 130 works on the workpiece 120, the camera unit 110 needs to capture the position image of the tool 130 on the workpiece 120 and provide the coordinates of the tool 130 in the image so that the tool 130 can work accurately on the workpiece 120.
[0044] However, a gap exists between the tool 130 and the workpiece 120, and the camera unit 110 is not perfectly perpendicular to the tool 130 when taking pictures. This causes parallax when the camera unit 110 captures images of the tool 130 and the workpiece 120. In addition, due to the gap between the tool 130 and the workpiece 120, other linear errors exist. For example, when the tool 130 is made of transparent material, its processing and installation angles will cause light refraction, leading to refraction errors. Alternatively, deviations in the installation angle of the camera unit 110 may cause image distortion. These errors further affect the positioning accuracy of the tool 130.
[0045] Based on the above problems, the existing technology proposes the following three solutions:
[0046] One approach is the overall modeling scheme, which involves building a complete system model using a computer and then back-calculating the camera's image results into the world coordinate system. However, this approach has the following drawbacks: the model is too complex, requiring consideration of multiple variables and parameters; the modeling cost is high, requiring a significant investment of time and manpower; and the actual accuracy often falls short of expectations, making it difficult to meet high-precision requirements.
[0047] Secondly, there is the mechanical positioning scheme, which uses mechanical limiting devices or probes to determine the relative position of the tool and the workpiece, thereby eliminating the effects of parallax. However, the mechanical positioning accuracy of this scheme is limited by the machining and assembly accuracy, and mechanical contact may cause wear on the tool or workpiece. Furthermore, mechanical positioning is difficult to achieve in certain scenarios.
[0048] Thirdly, there is the multi-sensor fusion solution, which combines multiple sensors such as LiDAR, 3D scanners, and light sensors to obtain the positional relationship between the tool and the workpiece. However, this solution has the following drawbacks: significantly increased hardware costs, complex multi-sensor data fusion algorithms, high system integration difficulty, and high maintenance costs.
[0049] Therefore, how to accurately locate the coordinates of the tool while avoiding the problems existing in the current technology is an urgent problem to be solved.
[0050] Based on this, the present invention provides a positioning method that, by utilizing the coordinates of the tool in multiple images and the gap between the tool and the workpiece, obtains the standard coordinates of the tool when the gap is 0, thereby accurately positioning the tool coordinates.
[0051] The following is a detailed description of the proposed solution in conjunction with the accompanying drawings.
[0052] Please see Figure 2 The diagram illustrates a flowchart of a positioning method. This positioning method can be executed by a computing device with processing capabilities, such as a server, computer, or laptop, and is not specifically limited to any particular device.
[0053] like Figure 2 As shown, the method specifically includes the following steps:
[0054] Step 210: Obtain N frames of working images of the tool on the workpiece, wherein the tool and the workpiece have different gaps in the N frames of working images.
[0055] Here, each of the N working images includes a tool and a workpiece, and the gap between the tool and the workpiece is different in any two working images, where N is an integer greater than or equal to 2.
[0056] Optionally, the N frames of working images can be obtained by using a camera unit to capture images of the tool in different working states on the workpiece.
[0057] In one example, to reduce the positioning error of the tool, the tool can use the following methods: Figure 3 The structure is shown. In this example, tool 130 can be a combination of template mark 132 and wafer mark 131. Template mark 132 is a "cross-shaped" structure located in the central area, while wafer mark 131 is a structure of four rectangles surrounding the "cross-shaped" template mark 132. This mark layout can effectively reduce positioning errors, improve system accuracy, and provide a stable and reliable visual positioning reference.
[0058] It should be noted that, Figure 3The provided structural diagram is a top view of tool 130, showing only its length and width. This application focuses only on the length and width of tool 130; its height, or thickness, is negligible due to its small size. However, in other scenarios, if the thickness of tool 130 is significant, then its thickness also needs to be considered. In other words, when determining the coordinates of tool 130, it is also necessary to determine the coordinates of its top or bottom surface in the established coordinate system. In this case, the coordinates of tool 130 are no longer two-dimensional but three-dimensional.
[0059] based on Figure 3 For the tool structure shown, please refer to [link / reference]. Figure 4 This illustration shows a scenario where a camera unit is used to photograph a tool and a workpiece, as provided in this application. In this scenario, the camera unit 110 can be placed directly above or slightly above the tool, and continuously captures images during the operation of the tool 130, obtaining N frames of images when the tool 130 and the workpiece 120 have different relative positional relationships. These N frames serve as N working images of the tool 130 on the workpiece 120. Because the tool 130 and the workpiece 120 have different positional relationships when the N frames are captured, there are different gaps between the tool 130 and the workpiece 120 in the N working images.
[0060] For example, please refer to Figure 5 This shows a schematic diagram of three working frames out of N working frames, that is... Figure 5 (a) Figure 5 (b) Figure 5 (c) These three working images can be considered to have been taken sequentially during the working process of tool 130. As can be seen from the figure, the working process of tool 130 is to move continuously to the upper left. Tool 130 moves but workpiece 120 does not move. Therefore, as tool 130 moves, the gap between tool 130 and workpiece 120 will change, and the acquired images will have different visual errors.
[0061] Optionally, after acquiring N frames of working images, an interferometer can be used to measure the gap between the tool and the workpiece in each frame. The interferometer is a device that is needed during the operation of the tool 130. This is mainly because during the operation of the tool 130, the tool 130 needs to continuously contact the workpiece 120 according to the gap between them. For example, assuming that the initial gap between the tool 130 and the workpiece 120 is 30µm to 50µm, the interferometer needs to read the current gap between the tool 130 and the workpiece 120 in real time, and control the movement of the tool 130 according to the current gap, so that the tool 130 and the workpiece 120 gradually contact each other, and the gap between the tool 130 and the workpiece 120 gradually decreases, for example, the final gap decreases to 10µm to 20µm.
[0062] In the process of correcting the standard coordinates, this application does not require additional sensors for tool positioning. Instead, it can directly use existing sensors, namely interferometers, to locate the gap between the tool and the workpiece, which can reduce costs and avoid increasing the complexity of the structure.
[0063] Step 220: Determine the coordinates of the tool in the set coordinate system in each frame of the working image.
[0064] Here, after acquiring N frames of working images captured by the camera unit 110, the coordinates of the tool 130 in each frame of the working image can be determined based on a set coordinate system. The set coordinate system can be a coordinate system pre-configured in the working images.
[0065] Optionally, the tool's coordinates in the set coordinate system can be the coordinates of any point on the tool within the set coordinate system. In one example, for ease of statistical analysis, it can be set to the coordinates of the tool's center point within the set coordinate system. For example, please continue reading... Figure 3 When tool 130 has a symmetrical structure, the center point of this symmetrical structure, which is also the center position of the "cross-shaped" template mark 132, is the center point of tool 130. Therefore, the coordinates of the center position of template mark 132 can be used as the coordinates of tool 130 in the set coordinate system. The center point is a clear and stable point. Using the center point as the positioning reference point helps to improve the accuracy and reliability of visual positioning.
[0066] Optionally, the N frames of working images are captured facing the working plane of the tool. Therefore, the coordinate system can be a two-dimensional coordinate system. The coordinates of the tool include coordinates in the first direction and coordinates in the second direction. The first direction and the second direction are two mutually perpendicular directions on the working plane.
[0067] For example, the coordinate system can be set to a Cartesian coordinate system. Assuming one axis of the Cartesian coordinate system is the x-axis and the other axis is the y-axis, then the coordinates of the tool in the first direction are the coordinates of the tool's center point on the x-axis, and the coordinates of the tool in the first direction are the coordinates of the workpiece's center point on the y-axis. The coordinates of the N sets of tools corresponding to N frames of working images can be expressed as follows:
[0068]
[0069] Based on the above implementation method, by using two mutually perpendicular directions as references, the coordinates of the tool's center point can be determined more accurately.
[0070] Step 230: Based on the tool's coordinates in the N frames of working images and the N gaps corresponding to the N frames of working images, locate the tool's standard coordinates.
[0071] The standard coordinates are the coordinates of the tool in the set coordinate system when the gap between the tool and the workpiece is 0.
[0072] Optionally, models can be built for N tool coordinates and N gaps corresponding to N frames of working images, and the standard coordinates of the tool can be determined based on the modeling results. Since parallax error is linearly related to gap, by collecting tool coordinates under different gaps, the relationship between tool coordinates and gap size can be modeled. By establishing a mathematical model and fitting the data, the coordinates of the tool when the gap is 0 can be predicted, thereby improving the accuracy of visual positioning.
[0073] There are many possible modeling methods, such as building a neural network model, a linear regression model, or a correlation model, etc. Taking the latter as an example, in specific implementation, one can first construct the correlation between standard coordinates, tool coordinates, and gaps based on experience or pre-acquired training data. Then, the tool coordinates and gaps corresponding to each frame of the working image are substituted into this correlation, and the substituted correlation is fitted to obtain the values of the standard coordinates.
[0074] The fitting can be linear or nonlinear. Nonlinear fitting includes, but is not limited to, parabolic fitting, saddle line fitting, etc.
[0075] Taking linear fitting as an example, the correlation can satisfy the following conditions:
[0076] R i =R0+KH i
[0077] Among them, R i Let R0 be the coordinates of the tool corresponding to the i-th frame image, K be a constant coefficient, and H be the coordinates of the tool. i Let represent the gap corresponding to the i-th frame of the image, where i is a positive integer less than or equal to N.
[0078] Optionally, due to the tool's coordinates R i Both R0 and R0 include two directions, and the coordinates of the tool corresponding to the i-th frame image in these two directions are denoted as x and x', respectively. i and y i If the standard coordinates are x0 and y0, then the above formula can include:
[0079] x i =x0+aH i …(Formula 1)
[0080] y i =y0+bH i …(Formula 2)
[0081] Where a is a constant coefficient in the x-direction and b is a constant coefficient in the y-direction.
[0082] Furthermore, optionally, assume that the clearances between the N sets of tools and the workpieces are: H1, H2, ..., H n The tool has N coordinates in the first direction: x1, x2, ..., x n The tool has N coordinates in the second direction: y1, y2, ..., y n Then, the above formula can be written in linear algebra form as follows:
[0083]
[0084] Transforming the above formula, we get:
[0085]
[0086] Optionally, the least squares method can be used to perform linear fitting on the substituted correlation relationship. That is, by using the tool to perform least squares linear fitting calculations on the above formulas 5 and 6 (or formulas 3 and 4), x0 and y0 can be obtained, which are the standard coordinates of the tool when the gap is 0. In this way, the case of multiple data points can be handled. Linear fitting is used for cases with more than two points. Compared with solving the equations at two points, it can provide more stable results and effectively reduce the influence of measurement errors and noise, thereby improving positioning accuracy.
[0087] Based on the above scheme, by constructing the correlation between standard coordinates, tool coordinates, and gap, the standard coordinates of the tool can be calculated using the tool coordinates and the gap between the tool and the workpiece. These standard coordinates are calculated with reference to the gaps of N frames of working images and are relatively accurate.
[0088] Optionally, after obtaining x0 and y0, the calculated standard coordinates can be used to correct the workpiece parallax. For example, the currently measured gap H can be substituted into any of the above formulas to obtain the tool coordinates under gap H, which can be used as the corrected tool coordinates.
[0089] It should be noted that the above content only illustrates the calculation of fitting parameters using linear fitting as an example. However, in practice, other mathematical methods can be used to obtain the same results. For example, only two points can be collected, and the parameters can be obtained by solving equations. Alternatively, new measurement points can be continuously collected, and the fitting parameters can be dynamically updated. Or, the range can be divided into several segments, and correlations can be established for each segment and fitting can be performed, etc., without limitation.
[0090] Based on the positioning method described above, by acquiring images corresponding to different gaps and using the gap values of multiple images and the corresponding tool position information (i.e., the tool's coordinates in a set coordinate system), the accurate coordinates of the tool when the gap between the tool and the workpiece is 0 can be calculated. This method not only improves the positioning accuracy of the tool and effectively corrects visual errors, but also requires no additional hardware investment; the solution can be implemented simply by optimizing the process, thus having low hardware requirements. Furthermore, the tool does not need to directly contact the workpiece during the entire process, thereby avoiding wear and tear caused by contact. In other words, this method accurately positions the tool coordinates while avoiding the problems present in the three existing methods.
[0091] Based on the same concept, this application also provides a positioning device that can perform the positioning method described above.
[0092] Please see Figure 6 A schematic diagram of the structure of a positioning device provided in an embodiment of this application is given, such as... Figure 6 As shown, the positioning device includes:
[0093] The acquisition module 601 is used to acquire N frames of working images of the tool on the workpiece, wherein the tool and the workpiece have different gaps in the N frames of working images, and N is an integer greater than or equal to 2.
[0094] The determination module 602 is used to determine the coordinates of the tool in the set coordinate system in each frame of the working image;
[0095] The positioning module 603 is used to locate the standard coordinates of the tool based on the coordinates of the tool in the N frames of working images and the N gaps corresponding to the N frames of working images. The standard coordinates are the coordinates of the tool in the set coordinate system when the gap between the tool and the workpiece is 0.
[0096] In one possible implementation, the coordinates of the tool in the set coordinate system are the coordinates of the center point of the tool in the set coordinate system.
[0097] In one possible implementation, the positioning module 603 is specifically used to: model the N tool coordinates and N gaps corresponding to the N frames of working images, and determine the standard coordinates of the tool based on the modeling results.
[0098] In one possible implementation, the positioning module 603 is specifically used to: construct the association between standard coordinates, tool coordinates, and gap; substitute the tool coordinates and gap corresponding to each frame of working image into the association, and perform linear fitting on the substituted association to obtain the value of the standard coordinates.
[0099] In one possible implementation, the association satisfies the following condition:
[0100] R i =R0+KH i
[0101] Among them, R i Let R0 be the coordinates of the tool corresponding to the i-th frame image, K be a constant coefficient, and H be the coordinates of the tool. i Let represent the gap corresponding to the i-th frame of the image, where i is a positive integer less than or equal to N.
[0102] In one possible implementation, the positioning module 603 is specifically used to: perform linear fitting on the substituted association relationship using the least squares method.
[0103] In one possible implementation, N frames of working images are captured facing the working plane of the tool. The coordinate system is set as a two-dimensional coordinate system. The coordinates of the tool include coordinates in a first direction and coordinates in a second direction. The first direction and the second direction are two mutually perpendicular directions on the working plane.
[0104] Please see Figure 7 This shows a schematic diagram of another positioning device provided in an embodiment of this application, such as... Figure 7 As shown, the testing device includes a memory 701 and a processor 702, with the processor 702 coupled to the memory 701. The memory 701 stores program instructions, and the processor 702 calls the program instructions stored in the memory 701 to execute the aforementioned positioning method according to the obtained program.
[0105] Optionally, the data processing device may further include an interface circuit 703, which may be a transceiver or an input / output interface. The input / output interface is used for inputting and / or outputting information; output can be understood as sending, and input as receiving. The processor 702 can communicate with other devices in the testing apparatus or other devices besides the positioning device through the interface circuit 703 to obtain the information required to perform the above positioning method.
[0106] When the positioning device 700 is used to achieve Figure 2 In the method shown, the processor 702 is used to implement the functions of the acquisition module 601, the determination module 602, and the positioning module 603 described above.
[0107] It is understood that the processor in the embodiments of this application may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.
[0108] The memory in the embodiments of this application may be random access memory, flash memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, hard disk, portable hard disk, compact disc read-only memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. The storage medium may also be a component of the processor.
[0109] Based on the same technical concept, embodiments of the present invention also provide a computer-readable storage medium storing a computer program or instructions, which, when executed by a processor, causes the computer to perform the above-described positioning method.
[0110] Based on the same technical concept, embodiments of the present invention also provide a computer-readable program product, which, when executed, causes a computer to perform the above-described positioning method.
[0111] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0112] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0113] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0114] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0115] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A positioning method, characterized in that, include: Obtain N frames of working images of the tool on the workpiece, wherein the tool and the workpiece have different gaps in the N frames of working images, and N is an integer greater than or equal to 2; Determine the coordinates of the tool in the set coordinate system for each frame of the working image; Based on the coordinates of the tool in the N frames of working images and the N gaps corresponding to the N frames of working images, the standard coordinates of the tool are located. The standard coordinates are the coordinates of the tool in the set coordinate system when the gap between the tool and the workpiece is 0.
2. The method as described in claim 1, characterized in that, The coordinates of the tool in the set coordinate system are the coordinates of the center point of the tool in the set coordinate system.
3. The method as described in claim 1, characterized in that, The step of locating the standard coordinates of the tool based on the tool's coordinates in the N frames of working images and the N gaps corresponding to the N frames of working images includes: Model the N tool coordinates and the N gaps corresponding to the N frames of working images, and determine the standard coordinates of the tools based on the modeling results.
4. The method as described in claim 3, characterized in that, The step of modeling the N tool coordinates and the N gaps corresponding to the N frames of working images, and determining the standard coordinates of the tool based on the modeling results, includes: Establish the relationship between the standard coordinates, the tool coordinates, and the gap; The coordinates and gaps of the tool corresponding to each frame of the working image are substituted into the correlation relationship, and the correlation relationship after substitution is linearly fitted to obtain the value of the standard coordinates.
5. The method as described in claim 4, characterized in that, The association relationship satisfies the following conditions: R i =R0+KH i Among them, R i Let R0 be the coordinates of the tool corresponding to the i-th frame image, K be a constant coefficient, and H be the coordinates of the tool. i Let be the gap corresponding to the i-th frame image, where i is a positive integer less than or equal to N.
6. The method as described in claim 4, characterized in that, The linear fitting of the substituted correlation includes: The least squares method was used to perform a linear fit on the substituted correlation.
7. The method according to any one of claims 1 to 6, characterized in that, The N frames of working images are captured facing the working plane of the tool. The set coordinate system is a two-dimensional coordinate system. The coordinates of the tool include coordinates in a first direction and coordinates in a second direction. The first direction and the second direction are two mutually perpendicular directions on the working plane.
8. A positioning device, characterized in that, The device includes: The acquisition module is used to acquire N frames of working images of the tool on the workpiece, wherein the tool and the workpiece have different gaps in the N frames of working images, and N is an integer greater than or equal to 2; The determination module is used to determine the coordinates of the tool in the set coordinate system in each frame of the working image; The positioning module is used to locate the standard coordinates of the tool based on the coordinates of the tool in the N frames of working images and the N gaps corresponding to the N frames of working images. The standard coordinates are the coordinates of the tool in the set coordinate system when the gap between the tool and the workpiece is 0.
9. A positioning device, characterized in that, include: A processor coupled to a memory for storing computer programs or instructions, the processor for executing the computer programs or instructions to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of any of the methods described in claims 1 to 7.
11. A computer program product, characterized in that, When it is run on a computer, it causes the computer to perform the method as described in any one of claims 1 to 7.