A multi-hole positioning machining method and system based on dual coordinate system verification
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-16
- Publication Date
- 2026-08-14
AI Technical Summary
[0002]在进行制动环板加工过程中,现有多孔制动环板的多孔位定位技术主要采用机械治具定位、全部孔位逐一视觉识别或基于工件整体轮廓的配准方式,其中机械治具方式虽然稳定,但柔性差、换型成本高;全部孔位逐一识别方式虽然减少了对专用工装的依赖,但在钢板表面存在反光、油污、遮挡、毛刺或孔边缺损等情况下,容易导致识别计算量大、效率低且鲁棒性不足;基于整体轮廓的配准方式则对工件边界完整性和成像条件依赖较强,难以适应复杂现场环境
1、高鲁棒性与低识别负担:仅需识别三个基准孔(优选构成最小面积三角形的孔),即可推导出其余所有孔位,大幅减少了视觉识别的计算量,提高了在复杂光照或表面缺陷下的识别成功率。
Smart Images

Figure CN122569162A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of CNC machining of brake ring plates, machine vision positioning, and automatic recognition of multi-hole coordinates, specifically to a method and system for recognizing the multi-hole coordinates of brake ring plates based on the establishment of a dual local coordinate system with three reference holes and error verification. Background Technology
[0002] In the machining of brake ring plates, existing multi-hole positioning technologies mainly employ mechanical fixture positioning, visual recognition of all holes one by one, or registration based on the overall workpiece contour. While mechanical fixture positioning is stable, it suffers from poor flexibility and high changeover costs. The method of recognizing all holes one by one reduces reliance on specialized tooling, but issues such as reflectivity, oil contamination, obstructions, burrs, or hole edge defects on the steel plate surface can lead to high computational load, low efficiency, and insufficient robustness. The registration method based on the overall contour is highly dependent on the integrity of the workpiece boundaries and imaging conditions, making it difficult to adapt to complex on-site environments. For planar structural parts where the hole geometry is determined during the CAD design phase, existing technologies do not fully utilize the fixed geometric relationships between a few reference holes and the remaining holes to achieve rapid positioning, resulting in low positioning efficiency, unstable accuracy, and poor machining reliability. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of existing technologies by proposing a multi-hole positioning and processing method and system based on dual coordinate system verification. This method can determine the positions of the remaining holes by identifying only two reference holes and then combining polar coordinate system establishment and geometric reasoning, thereby reducing the identification burden and improving positioning efficiency, flexibility and field adaptability. At the same time, it is convenient to further introduce error correction mechanisms such as scale correction, angle compensation and translation compensation.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: The first aspect of this invention provides a multi-hole positioning machining method based on dual-coordinate system verification, comprising the following steps: S1. Obtain the geometric model of the workpiece to be processed and establish a hole position template database containing the geometric relationships of multiple target hole designs; S2. Acquire workpiece surface image and preprocess it. Identify the first reference hole position, the second reference hole position and the third reference hole position in the preprocessed image, and obtain the actual center coordinates of the three. S3. Taking the actual center of the first reference hole as the common origin, establish a first local coordinate system and a second local coordinate system in the direction from the first reference hole to the second reference hole and in the direction from the first reference hole to the third reference hole, respectively. S4. Based on the design geometric relationship between the remaining target holes and the reference hole position in the hole position template database, the actual positions of the remaining target holes are inferred and calculated in the first local coordinate system and the second local coordinate system respectively, to obtain the first inference result set and the second inference result set. S5. Compare the first inference result set and the second inference result set to obtain the hole position inference error, and perform fusion processing or correction processing on the coordinates of the target hole according to the hole position inference error to generate the final processing coordinates. S6. Control the machining equipment to perform multi-hole machining on the workpiece according to the final machining coordinates.
[0005] Preferably, when establishing the local coordinate system in step S3, the method further includes steps of scale compensation, angle compensation, and translation compensation of the coordinate system: Based on the ratio of the actual distance to the design distance between the first reference hole position and the second reference hole position, and between the first reference hole position and the third reference hole position, the first scale compensation coefficient and the second scale compensation coefficient are determined. An angular compensation amount is introduced to compensate for the deviation between the visual coordinate system and the equipment machining coordinate system; A translation compensation amount is introduced to compensate for the offset of the coordinate origin.
[0006] Preferably, the process of fusing the target hole coordinates based on the hole position inference error in step S5 specifically involves: When the hole position inference error is less than a preset threshold, the weighted average of the coordinates of the same target hole in the first inference result set and the coordinates in the second inference result set is taken as the final processing coordinates of the target hole.
[0007] Preferably, the hole position inference error is the Euclidean distance between the coordinates of the same target hole in the two sets of inference results.
[0008] Preferably, the preset threshold is determined based on at least one of process allowable error, equipment calibration residual error, and historical error statistics.
[0009] Preferably, the first reference hole position, the second reference hole position, and the third reference hole position are three holes that form the smallest area triangle among a plurality of target holes, or are pre-set process positioning holes.
[0010] A second aspect of the present invention provides a multi-hole positioning machining system based on dual-coordinate system verification, the system being used to implement a multi-hole positioning machining method based on dual-coordinate system verification, comprising: The template building module is used to create a database of hole position templates containing the geometric relationships of multiple target hole designs; The image acquisition and recognition module is used to acquire and preprocess images of the workpiece surface, and to identify the actual center coordinates of the first reference hole, the second reference hole, and the third reference hole. The coordinate system establishment module is used to establish a first local coordinate system based on the direction of the second reference hole and a second local coordinate system based on the direction of the third reference hole, with the first reference hole position as the common origin; The coordinate reasoning module is used to reason about the actual positions of the remaining target holes in two local coordinate systems based on a template database, and obtain two sets of reasoning result sets. The error verification and fusion module is used to compare two sets of inference results, calculate the hole position inference error, and generate the final machining coordinates based on the error. The machining control module is used to control the machining equipment to perform operations based on the final machining coordinates.
[0011] Preferably, when performing inference calculations, the coordinate inference module is specifically used to execute the inference algorithm as described in claim 2 or 3, which includes scale compensation, angle compensation, and translation compensation.
[0012] Preferably, the error verification and fusion module includes: The error calculation unit is used to calculate the Euclidean distance between the inference coordinates of the same target hole in two sets of coordinate systems as the hole position inference error. The threshold judgment unit is used to compare the hole position inference error with a preset threshold. The coordinate fusion unit is used to perform weighted fusion of two sets of inference coordinates when the error is less than the threshold. The alarm verification unit is used to trigger an alarm or execute a re-identification command when the error exceeds the threshold.
[0013] A third aspect of the present invention provides an electronic device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the method.
[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. High robustness and low recognition burden: Only three reference holes need to be identified (preferably the holes that form the smallest area triangle) to deduce the location of all other holes, which greatly reduces the computational load of visual recognition and improves the recognition success rate under complex lighting or surface defects.
[0016] 2. Online self-verification capability: By introducing a dual-coordinate system inference mechanism and comparing the results of two independent calculation paths, online quantitative evaluation of positioning errors is achieved, which is impossible with traditional single-coordinate system methods.
[0017] 3. Precision compensation: By introducing scale coefficients, angle compensation amounts, and translation compensation amounts, equipment installation errors, lens distortion, and workpiece placement deviations are uniformly incorporated into the mathematical model for correction, significantly improving the final processing accuracy. Attached Figure Description
[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0019] Figure 1 This is a flowchart of the method of the present invention.
[0020] Figure 2 This is a schematic diagram illustrating the principle of establishing a dual local coordinate system in this invention.
[0021] Figure 3 This is a system structure block diagram of the present invention. Detailed Implementation
[0022] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0023] Example 1: See Figure 1 This embodiment takes machining nine holes in a steel plate as an example. - (This section provides a detailed explanation of the dual-coordinate system modeling process based on polar coordinates.)
[0024] Step 1, Template creation: Establish a hole position template database based on the geometric model corresponding to the steel plate to be processed. The hole position template database includes at least the design geometric relationship data of multiple target holes and the reference hole position information. The specific process includes: During the offline preparation phase, extract the CAD drawings corresponding to the steel plate model. to The coordinates of each hole in the design coordinate system. A template database is established as a reference point. The template database can record: to Design coordinates to Compared to Design vectors, to Compared to Design distance and design angle and Compared to The design location, aperture parameters, tolerance threshold, and processing sequence are specified. In this embodiment, it is preferable to store two types of parameters simultaneously: one type is rectangular coordinate parameters, and the other type is polar coordinate parameters, so that the system can select the appropriate parameter based on actual computational needs.
[0025] Step 2, Image Acquisition, Preprocessing and Recognition: Acquire an image of the surface of the steel plate to be processed and preprocess the image; identify the first reference hole position, the second reference hole position and the third reference hole position in the preprocessed image, and obtain the actual center coordinates of the first reference hole position, the second reference hole position and the third reference hole position; The specific process includes: The steel plate to be processed is placed on the processing platform, and an industrial camera positioned above the platform acquires an image of the steel plate's surface. To improve recognition stability, a supplementary lighting device can be activated simultaneously. Since the steel plate surface may have uneven lighting, surface reflections, oxide scale, or oil stains, one or more of the following processing steps can be performed sequentially after image acquisition: lens distortion correction, grayscale conversion, median filtering, edge enhancement, adaptive threshold segmentation, and morphological opening / closing operations. After preprocessing, the edge contours of the holes are highlighted, facilitating subsequent recognition.
[0026] In the preprocessed image, hole features are identified. Hough circle transform can be used to obtain candidate regions for circular holes, which are then filtered based on hole diameter range, roundness score, theoretical distance between holes, and template matching results. Alternatively, deep learning object detection methods can be used to regress the hole center position. Finally, the first reference hole position is identified. Second reference hole position and the third reference hole position And obtain its actual center coordinates: ; In this embodiment, the reason why it is preferred is... , , The triangle that forms the smallest area among the nine holes is because the three holes are close to each other, making it easier to identify them stably and simultaneously in the same field of view. It also has higher consistency in local imaging, which helps to reduce local distortion differences and identification errors.
[0027] Step 3, Establishment of dual local coordinate systems: Using the first reference hole position as the common origin, establish the following: See Figure 2 A first local coordinate system with the direction from the first reference hole position to the second reference hole position as the reference direction; and A second local coordinate system with the direction of the first reference hole position (referring to the direction of the three reference hole positions) as the reference direction; The specific process includes: by Two local coordinate systems are established with the common origin as the origin.
[0028] In the first local coordinate system, With the origin as the point, point to The direction is the first reference direction, and its direction angle can be expressed as: ; In the second local coordinate system, With the origin as the point, point to The direction is the second reference direction, and its direction angle can be expressed as: ; When necessary, it can also be based on and , and The design distance and the actual distance are used to determine the first-scale compensation coefficient. Second-scale compensation coefficient .
[0029] Step 4, inferring the coordinates of the remaining holes based on two local coordinate systems: Based on the design geometric relationship data of the remaining target holes relative to the first reference hole position in the hole position template database, the actual positions of the remaining target holes are inferred in the first local coordinate system and the second local coordinate system respectively, to obtain the first inference result set and the second inference result set; The specific process includes: For any target hole to be reasoned (i=4,5,6,7,8,9), let its relative position in the template database be... The design polar coordinate parameters are ; Therefore, in the first local coordinate system, the first inference coordinate of the target hole is: ; ; In the second local coordinate system, the second inference coordinates of the target hole are: ; ; in, This represents the design angle parameter of the target hole relative to the second reference direction; alternatively, it can be recalculated from the design coordinate vector relative to the second reference direction. The first scale coefficient The distance between the first and second reference holes is determined by the ratio of the actual distance to the design distance, i.e.: ; in, This represents the design distance between the first and second reference hole positions in the CAD template. The second scale coefficient... The distance between the first and third reference holes is determined by the ratio of the actual distance to the design distance, i.e.: ; in, This represents the design distance between the first and third reference hole positions in the CAD template. In another implementation, the system does not directly store polar coordinate parameters, but instead stores coordinates relative to... Design vector Then, by using rotation and translation matrices, the results are mapped to the first and second local coordinate systems respectively, resulting in two sets of inference results. This implementation is mathematically equivalent to the polar coordinate inference described above.
[0030] In actual equipment, there are usually fixed installation deviations and translational deviations between the visual recognition coordinate system and the drilling actuator coordinate system. The fixed installation deviations mainly come from the industrial camera installation angle error, equipment assembly error, and the angle error between the visual coordinate axis and the equipment coordinate axis; the translational deviations mainly come from the offset of the industrial camera installation position, the fixed offset between the drill bit center and the vision center, and the overall positional translation caused by each loading of the steel plate.
[0031] Therefore, based on the establishment of a dual local coordinate system with the first reference hole position and the second and third reference hole positions respectively, the present invention further introduces angle compensation and translation compensation.
[0032] (1) The introduction of angle compensation specifically includes: set up: This is the angle compensation amount for the first local coordinate system; This is the angle compensation amount for the second local coordinate system.
[0033] The angle compensation amount is used to compensate for the fixed installation angle deviation between the visual measurement coordinate system and the equipment processing coordinate system.
[0034] Then the compensated orientation angle of the first local coordinate system is: ; The compensated orientation angle of the second local coordinate system is: ; The angle compensation amount can be obtained through the equipment calibration process. Let the theoretical reference direction angle during equipment calibration be... The reference orientation angle obtained by visual recognition is The angle compensation amount can then be defined as: ; For the bi-establishment model, it can be expressed as follows: ; ; When the installation errors of the equipment are approximately consistent, a uniform angle compensation amount can also be used. ,Right now: ; (2) The introduction of translation compensation specifically includes: set up This is the translation compensation amount in the first local coordinate system; This is the translation compensation amount in the second local coordinate system.
[0035] The translation compensation amount is used to compensate for the fixed offset between the visual coordinate origin and the equipment processing coordinate origin, as well as the overall translation deviation caused by the actual placement of the steel plate.
[0036] The translation compensation amount can be determined by the difference between the theoretical reference coordinates and the visually converted coordinates. For example, suppose the theoretical machining coordinates of a certain reference point are... Visual recognition coordinate conversion is Then we have: ; ; Furthermore, the translation compensation amount can be decomposed into the sum of the fixed installation offset and the current workpiece placement translation amount, that is: ; in, , Indicates the fixed installation offset of the equipment; This indicates the real-time translation offset caused by the current workpiece loading.
[0037] (3) Introducing the target hole reasoning formula after compensation: For any target hole to be reasoned Assume its design polar coordinate parameters are still... After introducing angle compensation and translation compensation, the compensated inference coordinates in the first local coordinate system are: ; The compensated inference coordinates in the second local coordinate system are: ; The above formula is consistent with the aforementioned dual-system inference formula, except that it further introduces angle compensation terms and translation compensation terms, and therefore can be used as an extension of the aforementioned inference model in real devices.
[0038] Step 5, Error Comparison After Compensation: Compare the first inference result set and the second inference result set to obtain the hole position inference error, and perform the following processing on the actual position of the remaining target holes according to the hole position inference error: coordinate fusion, error compensation, re-identification or manual verification; The specific process includes: By comparing the inference results of the same target hole in two sets of compensated local coordinate systems, the inference error of the hole position after compensation is obtained: ; Substituting the above compensated reasoning formula into the equation, we get: ; This formula integrates the differences in the two systems, the differences in angle compensation, the differences in translation compensation, and the differences in scale compensation into the same error expression, making it suitable as a basis for online processing decisions.
[0039] Threshold setting: The preset threshold is used to determine whether the dual-system inference result meets the automatic processing requirements. It can be determined based on at least one of the following: allowable processing error, equipment calibration residual error, and historical error statistics. Specifically, if the allowable processing error for the target hole is... Then, a first threshold can be set based on the process tolerance error: ; in, For safety, a value of 0.3 is preferred. 0.7.
[0040] Furthermore, during equipment calibration, the residual calibration error between the vision measurement system and the machining actuator can be measured using a standard target plate, standard orifice plate, or standard workpiece. And set a second threshold based on the calibration residual error: ; in, The magnification factor is preferably in the range of 1.5. 3.
[0041] Furthermore, during system trial operation or batch processing, the bi-system inference error of multiple target holes can be analyzed. Statistical analysis was performed to obtain the mean error. and standard deviation of error And set a third threshold based on the error statistics results: ; in, For statistical coefficients, a value of 2 is preferred. 3. Preferably, the preset threshold Take the first threshold Second threshold and the third threshold The minimum value in, that is: ; Therefore, the preset threshold can simultaneously meet the requirements of process accuracy, equipment capacity constraints, and on-site operational stability, thereby setting the preset threshold as the safety boundary value between automatic processing release and alarm verification.
[0042] Step 6, final execution coordinate determination: control the drilling actuator to complete the multi-hole processing of the steel plate based on the actual position of the remaining target holes after processing.
[0043] The specific process includes: When the compensated hole position inference error is less than the preset threshold, a weighted fusion method can be used to determine the final execution coordinates: ; in: ; final The coordinates for drilling are sent to the equipment control system. When the compensated hole position inference error exceeds a preset threshold, the system can trigger re-identification, recalibration, manual verification, or pause processing.
[0044] This invention introduces a third reference hole position and constructs a dual local coordinate reasoning and error verification mechanism based on the traditional two-hole system. This enables multi-hole processing of steel plates to not only infer the remaining hole positions when only a small number of holes are identified, but also to evaluate the reliability of the reasoning results online.
[0045] Furthermore, this invention incorporates the fixed installation deviation of the equipment, the angular error between the visual coordinate system and the machining coordinate system, the translational deviation between the visual center and the execution center, and the real-time translational deviation caused by each loading of the workpiece into the angle compensation amount and translational compensation amount model. By combining this with the dual-system reasoning formula, a complete machining coordinate solution method for real equipment scenarios is formed, thereby significantly improving the accuracy, stability and engineering applicability of automatic positioning machining of multi-hole steel plates.
[0046] It should be noted that the terms "polar coordinate system" and "local coordinate system" used in this specification can be equivalently replaced in this invention depending on the specific implementation; the multiple target holes can be nine holes, or can be extended to more or fewer holes; the reference hole position can be a pre-made hole, a machined hole, a process positioning hole, or other stable identifiable holes. Any equivalent substitutions or modifications made using the concept of this invention in terms of reference hole position identification, coordinate system establishment, dual-result reasoning comparison, compensation correction, and processing verification should fall within the protection scope of this invention.
[0047] Example 2 Please see Figure 3 This embodiment provides a multi-hole positioning machining system based on dual-coordinate system verification. The system is used to implement the method described in Embodiment 1 above. The system includes: The template construction module is used to create a hole position template database containing the geometric relationships of multiple target holes. Specifically, this module is configured to read the CAD design drawings of the workpiece, extract the design coordinates, design distance, and design angle of each target hole relative to the reference hole, and convert them into polar coordinate parameters (distance r and angle θ) and store them in the database.
[0048] The image acquisition and recognition module is used to acquire and preprocess images of the workpiece surface, and to identify the actual center coordinates of the first, second, and third reference hole positions. This module includes: Image acquisition unit, used to acquire raw images of the workpiece surface using an industrial camera; The image preprocessing unit is used to perform grayscale conversion, filtering and noise reduction, and edge enhancement on the original image. The feature recognition unit is used to identify hole features in an image using Hough circle transform or deep learning algorithms, and to select three reference holes that form the smallest area triangle. H 1. H 2. H 3) Calculate its pixel coordinates or physical coordinates.
[0049] The coordinate system establishment module is used to establish a first local coordinate system based on the direction of the second reference hole and a second local coordinate system based on the direction of the third reference hole, with the first reference hole position as the common origin. This module is further configured as follows: Calculate the angle between the line connecting the first reference hole position and the second reference hole position and the horizontal axis, and use it as the first reference direction angle; Calculate the angle between the line connecting the first and third reference hole positions and the horizontal axis, and use it as the second reference direction angle.
[0050] The coordinate inference module is used to infer the actual positions of the remaining target holes based on a template database, in two sets of local coordinate systems, and obtain two sets of inference result sets. Specifically, this module executes an inference algorithm that includes scale compensation, angle compensation, and translation compensation. The scale compensation unit is used to calculate the first scale compensation coefficient based on the ratio of the actual distance to the design distance between the first and second reference hole positions; and to calculate the second scale compensation coefficient based on the ratio of the actual distance to the design distance between the first and third reference hole positions. The parameter introduction unit is used to introduce a preset angle compensation amount to correct the installation deviation between the visual coordinate system and the equipment processing coordinate system, and to introduce a translation compensation amount to correct the origin offset. The coordinate calculation unit is used to calculate the first inference coordinates of each target hole in the first local coordinate system and the second inference coordinates in the second local coordinate system by using the above-mentioned compensation coefficients and compensation amounts, combined with the polar coordinate transformation formula.
[0051] The error verification and fusion module compares two sets of inference results, calculates the hole position inference error, and generates the final machining coordinates based on the error. This module includes: The error calculation unit is used to calculate the Euclidean distance between the first and second inference coordinates of the same target hole, as the hole position inference error. A threshold judgment unit is used to compare the hole position inference error with a preset threshold; the preset threshold is determined based on process allowable error, equipment calibration residual error, or historical error statistics. The coordinate fusion unit is configured to perform a weighted average of the first and second inference coordinates to generate the final processing coordinates when the hole position inference error is less than a preset threshold. The alarm verification unit is configured to trigger an alarm signal when the hole position inference error is greater than or equal to a preset threshold, prompting the operator to verify or instructing the image acquisition and recognition module to re-acquire the image.
[0052] The machining control module is used to generate CNC code based on the final machining coordinates, control the motion axes of the machining equipment to move to the target position and perform drilling or cutting operations.
[0053] Example 3: This embodiment provides an electronic device, which may be a dedicated industrial control computer (IPC), an embedded controller, or a CNC machine tool control system with data processing capabilities.
[0054] The electronic device includes at least one processor, memory, a communication interface, and a bus. The processor, memory, and communication interface communicate with each other via the bus.
[0055] The communication interface is used for information exchange between electronic devices and external devices (such as industrial cameras and CNC machine tool actuators).
[0056] The processor is used to invoke program instructions in the memory to execute the multi-hole positioning machining method based on dual-coordinate system verification described in the above embodiments. For example, the processor is configured as follows: Obtain the geometric model data of the workpiece to be processed; Receive surface images transmitted by the image acquisition device and execute the hole location recognition algorithm; Based on the identified reference hole coordinates, perform dual local coordinate system establishment and coordinate inference calculations (including scale, angle and translation compensation calculations). Execute error verification logic to determine whether the machining accuracy requirements are met; The final machining coordinates are generated and sent to the machining equipment via the communication interface.
[0057] The memory is used to store the computer program required by the processor to execute the above method, as well as the data generated during the operation (such as the hole template database, image data, intermediate calculation results, etc.). The memory can be high-speed random access memory (RAM) or non-volatile memory (such as disk storage).
[0058] Example 4: This embodiment provides a computer-readable storage medium. The computer-readable storage medium stores a computer program (or computer instructions), which, when executed by a processor, implements the steps of the multi-hole positioning machining method based on dual-coordinate system verification as described in any one of Embodiment 1.
[0059] Specifically, the computer program includes: Program code used to create a hole location template database; Program code used to process images and identify reference hole positions; Program code for establishing a dual local coordinate system and performing coordinate transformation; Coordinate reasoning program code used to perform scale compensation, angle compensation, and translation compensation; Program code used to calculate inference error, perform threshold judgment, and coordinate fusion.
[0060] The computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device (such as the electronic device described in Embodiment 2). For example, the computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specifically (by way of example only), the computer-readable storage medium can include: a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0061] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. A multi-hole positioning machining method based on dual-coordinate system verification, characterized in that, Includes the following steps: S1. Obtain the geometric model of the workpiece to be processed and establish a hole position template database containing the geometric relationships of multiple target hole designs; S2. Acquire workpiece surface image and preprocess it. Identify the first reference hole position, the second reference hole position and the third reference hole position in the preprocessed image, and obtain the actual center coordinates of the three. S3. Taking the actual center of the first reference hole as the common origin, establish a first local coordinate system and a second local coordinate system in the direction from the first reference hole to the second reference hole and in the direction from the first reference hole to the third reference hole, respectively. S4. Based on the design geometric relationship between the remaining target holes and the reference hole position in the hole position template database, the actual positions of the remaining target holes are inferred and calculated in the first local coordinate system and the second local coordinate system respectively, to obtain the first inference result set and the second inference result set. S5. Compare the first inference result set and the second inference result set to obtain the hole position inference error, and perform fusion processing or correction processing on the coordinates of the target hole according to the hole position inference error to generate the final processing coordinates. S6. Control the machining equipment to perform multi-hole machining on the workpiece according to the final machining coordinates.
2. The multi-hole positioning machining method based on dual coordinate system verification according to claim 1, characterized in that, When establishing the local coordinate system in step S3, the steps of scaling, angular and translation compensation of the coordinate system are also included: Based on the ratio of the actual distance to the design distance between the first reference hole position and the second reference hole position, and between the first reference hole position and the third reference hole position, the first scale compensation coefficient and the second scale compensation coefficient are determined. An angle compensation amount is introduced to compensate for the deviation between the visual coordinate system and the equipment machining coordinate system; A translation compensation amount is introduced to compensate for the offset of the coordinate origin.
3. The multi-hole positioning machining method based on dual coordinate system verification according to claim 1, characterized in that, The specific steps of fusing the target hole coordinates based on the hole position inference error in step S5 are as follows: When the hole position inference error is less than a preset threshold, the weighted average of the coordinates of the same target hole in the first inference result set and the coordinates in the second inference result set is taken as the final processing coordinates of the target hole.
4. The multi-hole positioning machining method based on dual coordinate system verification according to claim 3, characterized in that, The hole location inference error is the Euclidean distance between the coordinates of the same target hole in the two sets of inference results.
5. The multi-hole positioning machining method based on dual coordinate system verification according to claim 3, characterized in that, The preset threshold is determined based on at least one of the following: process allowable error, equipment calibration residual error, and historical error statistics.
6. The multi-hole positioning machining method based on dual coordinate system verification according to claim 1, characterized in that, The first reference hole position, the second reference hole position, and the third reference hole position are three holes that form the smallest area triangle among multiple target holes, or they are pre-set process positioning holes.
7. A multi-hole positioning machining system based on dual-coordinate system verification, the system being used to implement the multi-hole positioning machining method based on dual-coordinate system verification as described in any one of claims 1-6, characterized in that, include: The template building module is used to create a database of hole position templates containing the geometric relationships of multiple target hole designs; The image acquisition and recognition module is used to acquire and preprocess images of the workpiece surface, and to identify the actual center coordinates of the first reference hole, the second reference hole, and the third reference hole. The coordinate system establishment module is used to establish a first local coordinate system based on the direction of the second reference hole and a second local coordinate system based on the direction of the third reference hole, with the first reference hole position as the common origin. The coordinate reasoning module is used to reason about the actual positions of the remaining target holes in two local coordinate systems based on a template database, and obtain two sets of reasoning result sets. The error verification and fusion module is used to compare two sets of inference results, calculate the hole position inference error, and generate the final machining coordinates based on the error. The machining control module is used to control the machining equipment to perform operations based on the final machining coordinates.
8. The multi-hole positioning machining system based on dual coordinate system verification according to claim 7, characterized in that, When performing inference calculations, the coordinate inference module is specifically used to execute the inference algorithm as described in claim 2 or 3, which includes scale compensation, angle compensation, and translation compensation.
9. The multi-hole positioning machining system based on dual coordinate system verification according to claim 7, characterized in that, The error verification and fusion module includes: The error calculation unit is used to calculate the Euclidean distance between the inference coordinates of the same target hole in two sets of coordinate systems as the hole position inference error. The threshold judgment unit is used to compare the hole position inference error with a preset threshold. The coordinate fusion unit is used to perform weighted fusion of two sets of inference coordinates when the error is less than the threshold. The alarm verification unit is used to trigger an alarm or execute a re-identification command when the error exceeds the threshold.
10. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 6.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 6.