Positioning method and system for automobile part die machining

By using a dual-feature evaluation model and a k-means clustering algorithm to identify quick mold positioning holes, the problem of inaccurate recognition by traditional algorithms in complex backgrounds is solved, precise correction and automatic adjustment of the mold posture are achieved, and processing quality and efficiency are improved.

CN120747235AActive Publication Date: 2025-10-03XIAN WEIER PRECISION TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511265455.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-10-03
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

Traditional vision algorithms have difficulty accurately identifying the rapid positioning holes of automotive parts molds in complex backgrounds, resulting in the inability to effectively correct mold posture offsets, affecting processing quality and efficiency.

Method used

A dual-feature evaluation model combined with the k-means clustering algorithm is used to screen out suspected hole contours by calculating the circularity of the edge closed contour and the stability of the edge point distribution. The geometric constraints are then used to quickly locate the holes and generate compensation instructions to adjust the mold posture.

Benefits of technology

It achieves accurate detection of mold posture deviation and automatic closed-loop reset, improves the dimensional consistency and surface quality of parts and products, and reduces the scrap rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747235A_ABST
    Figure CN120747235A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of image data processing, and particularly relates to a positioning method and system for automobile part mold machining, and the method comprises the steps: extracting a plurality of edge closed contours from a collected mold region image before machining; calculating the possibility that each edge closed contour is a positioning hole according to the area, perimeter and distance distribution of edge points relative to the center of mass of each edge closed contour; according to the possibility, all edge closed contours are clustered, a plurality of suspected hole contours are screened out, and four rapid positioning holes are identified through geometric constraint; determining a center reference point of the die according to the positions of the four quick positioning holes, and calculating an offset vector of the die before processing relative to the center reference point of the standard die; and generating a compensation instruction, and driving numerical control equipment to adjust the pose of the mold. According to the method, interference of complex surface contours is effectively avoided, the positioning holes are accurately recognized, closed-loop accurate resetting of the position and posture of the mold is achieved, and the machining precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image data processing, and more particularly to a positioning method and system for automobile part mold processing. Background Art

[0002] In the automotive parts manufacturing industry, the production of complex molds relies on multi-axis CNC machine tools, whose machining procedures are completely dependent on the mold's precise preset position in space. However, during the actual machining process, the mold on the machine table is affected by factors such as strong vibration caused by cutting forces and loose fixtures, resulting in cumulative, small dynamic offsets relative to the preset position. If this offset is not corrected, the CNC system will continue to cut according to the preset position, which will directly lead to quality defects such as dimensional tolerance violations, surface distortion, and poor surface finish in the product part. This not only increases the scrap rate but also seriously affects production efficiency and manufacturing costs.

[0003] To ensure machining quality, the mold needs to be offset after each machining operation. A common approach is to use the inherent quick positioning holes around the mold as reference features and calculate the offset by identifying the positions of these positioning holes.

[0004] However, traditional Hough circle detection algorithms have limitations when applied to complex mold surfaces. The mold surface's inherently complex geometric features and texture distribution create numerous closed contours of non-positioning holes in the image. These contours interfere with the algorithm, causing it to identify numerous "noise circles," which in turn affects the precise positioning of rapid positioning holes and renders them unreliable for use on automated production lines. Therefore, accurately identifying rapid positioning holes in a highly noisy environment is a core technical challenge in achieving precise mold repositioning. Summary of the Invention

[0005] In order to solve the technical problem mentioned in the above background technology that the traditional visual algorithm cannot accurately locate the mold rapid positioning hole in a complex background, resulting in the inability to effectively correct the mold posture offset, the present invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a positioning method for automobile part mold processing, comprising: extracting multiple edge closed contours from a collected mold area image before processing; calculating the possibility of each edge closed contour being a positioning hole based on the area, perimeter and distance distribution of the edge point relative to the center of mass of the edge closed contour; clustering all edge closed contours based on the possibility, screening out multiple suspected hole contours, and identifying four quick positioning holes through geometric constraints; determining the center reference point of the mold based on the positions of the four quick positioning holes, and calculating the offset vector of the mold before processing relative to the center reference point of the standard mold; generating compensation instructions accordingly to drive the CNC equipment to adjust the mold posture.

[0007] The present invention realizes the precise detection of mold posture deviation and closed-loop automatic resetting through multi-link collaborative optimization. First, by constructing a dual-feature evaluation model that integrates circularity and edge point distribution stability, the probability of all closed contours is quantified, which improves the accuracy and discrimination of the positioning hole feature description; secondly, the k-means clustering algorithm is innovatively introduced to perform data-driven screening of the possibility scores, effectively avoiding the limitations of manually setting fixed thresholds, and realizing adaptive and high-precision segmentation of suspected hole contours; then, using the geometric prior knowledge of the positioning hole distribution, the final four corner positioning holes are locked by the principle of maximum diagonal distance, ensuring the reliability of the reference points; finally, based on reliable reference points, the offset vector is accurately calculated and compensation instructions are generated, realizing the automation and high precision of the entire positioning correction process. The overall solution is highly robust and can effectively eliminate complex background interference, ensuring the consistency of part quality during continuous processing.

[0008] Preferably, the calculating of the possibility that each edge closed contour is a positioning hole comprises: obtaining the area, perimeter and centroid position information of each edge closed contour; Possibility of a closed edge contour as a positioning hole The calculation formula is: Where, 、 Indicates the The area and perimeter of the closed contour of each edge; 、 Indicates the and The standard deviation of the Euclidean distances of all edge points relative to their centroid on a closed edge contour; 、 Represents the index value of the edge closed contour in the mold area image before processing; Represents the total number of all edge closed contours in the mold area image before processing; represents the maximum value function; represents the natural exponential function.

[0009] The proposed likelihood assessment model uses a dual-dimensional, collaboratively constrained evaluation system, combining a circularity index (characterizing the macroscopic morphology) with an edge point distribution stability index (characterizing the uniformity of the microstructure). This model ensures that high-scoring contours must simultaneously meet the two conditions of near-circular morphology and uniform edge distribution. This effectively addresses the technical challenge of misjudging irregular interfering contours using a single circularity index, significantly improving the accuracy of initial screening for locating holes.

[0010] Preferably, the method clusters all closed edge contours according to the likelihood and selects a plurality of suspected hole contours, including: treating the likelihood of all closed edge contours being positioning holes as a one-dimensional data set; clustering the data set into a preset number of 2 clusters using a k-means clustering algorithm, and determining the cluster with the least number of data points as a high-likelihood score cluster; and marking all closed edge contours contained in the high-likelihood score cluster as suspected hole contours.

[0011] The present invention utilizes the prior distribution characteristics of the probability data, which shows that "most values ​​are small and a few values ​​are large", obtains prior clustering parameters for clustering, and automatically identifies all suspected hole contours, realizing intelligent and adaptive filtering of a large number of interfering contours; compared with the traditional preset fixed division threshold, it is more robust.

[0012] Preferably, the method of identifying four quick positioning holes in the mold area image before processing from the suspected hole contours through geometric constraints includes: obtaining the length of the line between the centroids of each two suspected hole contours; traversing the lengths of all the lines, obtaining the line with the largest length as the first main diagonal line, and determining the two corresponding suspected hole contours; obtaining the line with the largest length from the remaining lines composed of the suspected hole contours as the second main diagonal line, and determining the other two corresponding suspected hole contours; marking a total of four suspected hole contours determined by the two main diagonals as quick positioning holes.

[0013] The present invention is based on the geometric feature that positioning holes are usually distributed at the four corners in mold design, and uses the "maximum diagonal distance" principle to finally determine the positioning holes; after most of the interference has been filtered out in the previous steps, this step can accurately and reliably identify four quick positioning holes used as the final positioning reference from a few candidate contours.

[0014] Preferably, the offset vector of the mold before processing relative to the central reference point of the standard mold satisfies the expression: Where, Indicates the offset vector of the mold before processing relative to the center reference point of the standard mold; Indicates the position information of the center reference point of the mold before processing. Indicates the center reference point of the mold before processing Axis direction and Coordinates in the axis direction; Indicates the position information of the center reference point of the standard mold. Indicates that the center reference point of the standard mold is Axis direction and Axis direction coordinates.

[0015] The present invention directly converts the position difference between the center reference point of the pre-processed mold and the standard mold in the image space into a two-dimensional vector containing direction and size information; this vector accurately quantifies the offset of the mold in the processing plane, provides a mathematical basis for the subsequent generation of compensation instructions, and is a key link in achieving high-precision closed-loop automatic reset control.

[0016] In a second aspect, the present invention provides a positioning system for automobile part mold processing, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned positioning method for automobile part mold processing is implemented.

[0017] By adopting the above technical solution, the above positioning method for automobile parts mold processing is generated into a computer program and stored in a memory to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.

[0018] The beneficial effects of the present invention are: (1) The present invention integrates the dual-feature evaluation model of contour circularity and edge point distribution stability, and combines it with k-means clustering for adaptive screening. This can effectively eliminate the interference of non-hole contours such as irregular surfaces on the mold surface, significantly improving the accuracy and robustness of positioning hole recognition. (2) The present invention combines the geometric prior of the distribution of mold positioning holes and reliably determines the mold center reference point by the principle of maximum diagonal distance, thereby accurately quantifying the offset of the mold before processing relative to the standard mold in the processing plane; (3) After obtaining the offset of the mold before processing, the present invention introduces the spatial conversion rate to accurately map the pixel deviation in the image space into the movement instruction in the physical space, and generates the reverse compensation command, thereby realizing the automated closed-loop control from "visual inspection" to "physical correction", greatly improving the dimensional consistency and surface quality of products such as automotive stamping parts, and effectively reducing the scrap rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flow chart schematically illustrating a positioning method for automobile part mold processing in the present invention; Figure 2 Schematically shows the original mold grayscale image; Figure 3 Schematic diagram of a fast positioning hole obtained by traditional Hough circle detection processing; Figure 4 The figure schematically shows a quick positioning hole diagram obtained after processing by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0021] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0022] The embodiment of the present invention discloses a positioning method for automobile parts mold processing, referring to Figure 1 , including steps S1 to S5: S1. Collect the mold area image before processing and perform preprocessing.

[0023] It's important to note that in actual production, part molds are fixed to the processing area of ​​a punch press or CNC machine tool. During the processing process, processes like feeding and cutting generate strong vibrations, which can cause slight deviations in the mold's position between machining tasks, thereby affecting the final part quality. Therefore, it is necessary to capture images of the mold area before machining to extract relevant features and monitor its deviations in real time.

[0024] Specifically, a high-resolution industrial camera is deployed above the processing area, ensuring that its viewing angle and distance can fully and clearly capture the detailed features of the mold. The camera's acquisition frequency is synchronized with the production cycle, and is set to trigger a capture within the time interval between two consecutive processing tasks, capturing real-time images of the mold area before processing. The captured raw images are pre-processed through Gaussian filtering, denoising, and grayscale conversion to obtain the grayscale value of each pixel in preparation for subsequent analysis. At the same time, it is also necessary to obtain the position information of each pixel in the image. The specific method is: take the pixel point in the lower left corner of the original image as the origin, and use the horizontal right direction of the origin as the The positive direction of the axis, the vertical upward direction at the origin is The positive direction of the axis is used to build a rectangular coordinate system; the position information of each pixel in the original image is obtained in the rectangular coordinate system, including Axis coordinates and The coordinates in the axis direction; since the length of the image in the horizontal direction and the length in the vertical direction are 、 , so the pixel is The range of the axis coordinates is , the pixel is The range of the axis coordinates is .

[0025] At this point, an image of the mold area before processing is obtained for subsequent analysis.

[0026] S2. Extract each closed edge contour in the mold area image before processing; based on the area, perimeter, and distribution of the distances of each edge point on the contour relative to its center of mass of each closed edge contour, calculate the possibility that each closed edge contour is a positioning hole.

[0027] It should be noted that each mold surface is usually surrounded by quick positioning holes, and their positions in the image can be used to calibrate the precise position of the mold on the processing platform. However, traditional algorithms such as Hough circle detection are susceptible to interference when processing mold surfaces with complex geometric features, and the recognition accuracy of circular hole areas is insufficient, thus affecting the subsequent precise positioning of the positioning holes. Considering that there are a large number of closed contours distributed in the mold surface image, the present invention proposes to extract all edge closed contours and comprehensively evaluate the possibility of each contour being a positioning hole based on its geometric characteristics, thereby more accurately identifying all possible positioning holes.

[0028] Specifically, an edge detection algorithm is applied to the mold area image before processing to identify edge pixels where the grayscale value changes significantly, and a binary image of the mold area before processing is obtained, wherein pixels marked as 1 are edge pixels and pixels marked as 0 are non-edge pixels; exemplarily, the edge detection algorithm can be the robust and widely used Canny algorithm, which can effectively suppress noise and accurately locate edges.

[0029] A contour search algorithm is used to scan the obtained binary image of the mold area before processing to identify and extract edge closed contours and the area and perimeter of each edge closed contour; for example, the findContours function provided in the OpenCV function library can be used to extract all edge closed contours, the contourArea function can be used to obtain the area of ​​each edge closed contour, and the arcLength function can be used to obtain the perimeter of each edge closed contour; it should be noted that the contour search algorithm and the OpenCV related function library are well-known technologies and will not be described in detail here.

[0030] For each closed edge contour in the mold area image before processing, the center of mass position information is constructed using the mean of the coordinates of all edge points on the contour in each direction. The probability that each closed edge contour in the mold area image before processing is a positioning hole is obtained based on the distribution of its contour area, perimeter, and the distance of each edge point on the contour relative to its center of mass. The specific calculation formula is as follows:

[0031] Where, Indicates the Possibility of a closed edge contour being a positioning hole; 、 Indicates the The area and perimeter of the closed contour of each edge; 、 Indicates the and The standard deviation of the Euclidean distances of all edge points relative to their centroid on a closed edge contour; Indicates the index value of the edge closed contour in the mold area image before processing; Indicates the total number of closed edge contours in the mold area image before processing; represents the maximum value function; represents the natural exponential function.

[0032] in, It reflects the circularity of the closed edge contour. The closer its value is to 1, the closer the contour is to a perfect circle in terms of macroscopic morphology. In addition, due to the closed contours formed by some irregular curved surfaces on the mold surface, the calculated circularity may also be higher. Therefore, the microstructural characteristic index is introduced. It reflects the degree of discreteness of the distance between the edge points on the contour and the centroid. The smaller its value is, the closer the distance between the edge points on the contour and the centroid is, that is, the more uniform its distribution in space is. If both of the above two items are satisfied, the obtained The larger the value, the more likely the current edge closed contour has both "high circularity" and "high edge point distribution stability" characteristics. Therefore, it can be considered that the contour is more likely to be a real positioning hole. It should be noted that when When it is 0, it means that all the contours involved in the comparison are ideal circles. At this time, the standard deviation of all contours must also be 0, and it is no longer meaningful to distinguish them by the stability of the edge point distribution. In this special case, the exponential term can be defined The value of is 1, then The value of is determined only by its circularity, i.e. .

[0033] At this point, the possibility that all closed edge contours in the mold area image before processing are positioning holes is obtained.

[0034] S3. Cluster all edge closed contours according to the likelihood, screen out multiple suspected hole contours, and identify four fast positioning holes in the mold area image before processing from the suspected hole contours through geometric constraints.

[0035] It should be noted that although each contour has a probability score calculated in step S2, it still contains a large number of low-scoring interference items caused by holes in the part itself, surface texture, and other factors. To accurately identify the true locating holes, all contours must first be efficiently screened to segment all possible holes. Because the probability data for all closed-edge contours in the image being locating holes exhibits a clear "most values ​​are small, and a few values ​​are large" distribution, this prior knowledge can be leveraged to introduce a clustering algorithm for automated, data-driven screening.

[0036] Specifically, the possibility that all closed edge contours in the mold area image before processing are positioning holes is taken as a one-dimensional data set; the number of prior clusters is set to 2, and a clustering operation is performed on the data set to obtain two clusters; since the number of data points with high probability scores is far less than the number of data points with low probability scores, the cluster with the least number of data points corresponds to the high probability score cluster, and all closed edge contours contained in the high probability score cluster are marked as suspected hole contours; illustratively, the clustering algorithm includes but is not limited to other clustering algorithms of the k-means algorithm, such as an iterative self-organizing clustering algorithm.

[0037] It should be further explained that, considering that the quick positioning holes of the mold are usually evenly distributed in the four diagonal areas of the mold, based on this geometric feature, the four positioning holes used for positioning can be finally determined from these suspected hole contours through the line length feature between the centroids of each pair of suspected hole contours.

[0038] Specifically, for all suspected hole contours, the Euclidean distance calculation formula is used to traverse and obtain the length of the line between each two suspected hole contour centroids; the first traversal is performed, and among the lengths of all the lines, the line with the largest length is obtained as the first main diagonal line, and the two corresponding suspected hole contours are determined; the two determined suspected hole contours are removed from the suspected hole contour set, and the second traversal is performed, and among the lines composed of the remaining suspected hole contours, the line with the largest length is obtained as the second main diagonal line, and the other two corresponding suspected hole contours are determined; the four suspected hole contours determined by the two main diagonals are marked as quick positioning holes in the mold area image before processing.

[0039] At this point, the four quick positioning holes and the corresponding centroid position information in the mold area image before processing are obtained.

[0040] For example, through Figure 3 and Figure 4 , which intuitively demonstrates the significant superiority of the method of the present invention over the traditional Hough circle detection algorithm in the task of fast positioning hole recognition. Figure 3The results show that the traditional Hough circle detection algorithm is seriously disturbed when processing mold surfaces with complex geometric features, and 73 contours are identified as suspected hole contours. In this case, the large number of false targets makes it inaccurate to accurately screen out the four real positioning holes. In contrast, Figure 4 The results of the present invention are presented. First, the proposed likelihood assessment model and cluster screening significantly reduced the number of suspected hole contours to 33, demonstrating that this method can effectively eliminate more than half of the non-hole contour interference. Subsequently, geometric constraint analysis accurately and uniquely identified the rapid positioning holes located at the four corners from these 33 candidate contours.

[0041] S4. Determine the center reference point of the mold before processing based on the position information of the four rapid positioning holes, and calculate the offset vector of the mold before processing relative to the center reference point of the standard mold.

[0042] It's important to note that because the camera is fixed and the mold moves only on the plane of the punch press, the slight offsets that occur during processing appear primarily as two-dimensional translations in the image, without involving other complex transformations like rotation or scaling. Therefore, this offset can be precisely quantified by quantifying the translation of the mold's center reference point, providing a reliable basis for subsequent adjustments and positioning.

[0043] Specifically, after the mold is manually and precisely aligned to the predetermined position of the CNC device for the first time, an image is captured as the standard mold area image. The standard mold area image is processed identically to the above steps S1 to S3 to obtain the four rapid positioning holes and their centroid positions in the standard mold area image. The center reference point of the standard mold is constructed using the average coordinates of the centroids of the four rapid positioning holes in the standard mold area image in various directions. Similarly, the center reference point of the mold before processing is constructed using the average coordinates of the centroids of the four rapid positioning holes in various directions in the mold area image before processing.

[0044] Based on the difference between the center reference point of the mold before processing and the center reference point of the standard mold, the offset vector of the mold before processing relative to the center reference point of the standard mold is calculated; the specific calculation formula is as follows:

[0045] Where, Indicates the offset vector of the mold before processing relative to the center reference point of the standard mold; Indicates the center reference point of the mold before processing Axis direction and Coordinates in the axis direction; Indicates that the center reference point of the standard mold is Axis direction and Axis direction coordinates.

[0046] in, Reflects the translation direction and distance of the mold before processing relative to the standard mold on the plane. The value is positive, indicating that the mold before processing is In the direction, the mold has shifted to the right relative to the standard mold; otherwise, it has shifted to the left. The larger the absolute value of The farther the translation distance is relative to the standard mold, the closer the distance is. The value is positive, indicating that the mold before processing is In the direction of the standard mold, the mold has shifted upwards; otherwise, it has shifted downwards. The larger the absolute value of The farther the translation distance is relative to the standard mold in the direction, the closer the distance is.

[0047] At this point, the offset vector of the mold before processing relative to the center reference point of the standard mold is obtained.

[0048] S5. Generate compensation instructions based on the offset vector and perform posture reset.

[0049] It should be noted that if there is a posture offset during the machining process, subsequent machining according to the posture predetermined by the CNC system program without adjustment and positioning will result in reduced part quality. Therefore, it is necessary to adjust the positioning of the mold before machining based on the offset vector of the mold relative to the center reference point of the standard mold.

[0050] Specifically, in order to adjust the mold from the current position back to the standard position, it is necessary to apply a movement equal to the offset vector in magnitude and opposite in direction. This is based on the principle of coordinate transformation. The offset vector represents the transformation from the standard position to the current position, and the negated vector represents the inverse transformation required to return from the current position to the standard position. Therefore, the offset vector of the mold before processing relative to the center reference point of the standard mold calculated in step S4 is negated to obtain the mold adjustment vector before processing.

[0051] For example, if the offset vector of the mold before processing relative to the center reference point of the standard mold is This indicates that the mold before processing The direction is shifted 3 pixels to the right relative to the standard position. The direction is shifted downward by 2 pixels; after negation, the adjustment vector is This means that in actual adjustment, the mold before processing needs to be moved 3 pixels to the left and 2 pixels upward to return the mold before processing to the standard position.

[0052] However, considering that the positioning process of the robot arm is performed in the real space and the adjustment vector is based on the distance within the image, it is necessary to use the spatial conversion rate to map the values ​​of the adjustment vector in each direction back to the real space system. The specific method is: multiply the mold adjustment vector before processing by the spatial conversion rate to obtain the mapped mold adjustment vector.

[0053] For example, the spatial conversion rate can be determined by obtaining the actual length of the standard mold and counting the number of pixels corresponding to the standard mold in the image. The actual length of the standard mold is divided by the number of pixels corresponding to the standard mold in the image. The result is the spatial conversion rate. This spatial conversion rate reflects the real-world length corresponding to one pixel in the image and is a key parameter for accurately mapping image space to real space. For example, if the actual length of 10 mm is measured as 100 pixels in the image, the spatial conversion rate is 10 / 100 = 0.1 mm / pixel.

[0054] The mold adjustment vector mapped to the mold before processing is used as a compensation instruction and transmitted to the CNC machine tool's robotic arm control system through the communication interface; the control system parses the instruction and drives the robotic arm's end effector (such as a fixture) to move the mold in the direction and distance specified by the vector, thereby achieving precise adjustment and positioning of the mold before processing, ensuring consistency with the program's predetermined posture, and ensuring the quality of the automotive parts processing line.

[0055] An embodiment of the present invention further discloses a positioning system for processing automobile part molds, comprising a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a positioning method for processing automobile part molds according to the present invention is implemented.

[0056] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.

Claims

1. A positioning method for automobile parts mold processing, characterized in that: include: extracting a plurality of edge closed contours from the acquired image of the mold area before processing; Based on the area, perimeter and distribution of distances of each edge point on the contour relative to its centroid of each edge closed contour, the possibility of each edge closed contour being a positioning hole is calculated; According to the possibility, all edge closed contours are clustered to screen out multiple suspected hole contours, and four fast positioning holes in the mold area image before processing are identified from the suspected hole contours through geometric constraints; According to the position information of the four rapid positioning holes, the center reference point of the mold before processing is determined, and the offset vector of the mold before processing relative to the center reference point of the standard mold is calculated; Generate compensation instructions based on the offset vector to drive the CNC equipment to adjust the posture of the mold before current processing.

2. A positioning method for automobile part mold processing according to claim 1, characterized in that: The calculating of the possibility that each edge closed contour is a positioning hole includes: Get the area, perimeter and centroid position information of each edge closed contour; Possibility of a closed edge contour as a positioning hole The calculation formula is: ; Where, 、 Indicates the The area and perimeter of the closed contour of each edge; 、 Indicates the and The standard deviation of the Euclidean distances of all edge points relative to their centroid on a closed edge contour; 、 Represents the index value of the edge closed contour in the mold area image before processing; Represents the total number of all edge closed contours in the mold area image before processing; represents the maximum value function; represents the natural exponential function.

3. The positioning method for automobile part mold processing according to claim 1, characterized in that: According to the possibility, all edge closed contours are clustered to screen out multiple suspected hole contours, including: The probability of all edge-closed contours being positioning holes is taken as a one-dimensional data set; The data is clustered into a preset number of 2 clusters using the k-means clustering algorithm, and the cluster with the least number of data points is determined as the high-likelihood score cluster; All edge-closed contours contained in the high-likelihood score cluster are marked as suspected hole contours.

4. A positioning method for automobile part mold processing according to claim 1, characterized in that: The method of identifying four fast positioning holes in the mold area image before processing from the suspected hole contours through geometric constraints includes: Get the length of the line between the centroids of each two suspected hole contours; Traverse the lengths of all the connecting lines, obtain the connecting line with the longest length as the first main diagonal line, and determine the two corresponding suspected hole contours; from the connecting lines composed of the remaining suspected hole contours, obtain the connecting line with the longest length as the second main diagonal line, and determine the other two corresponding suspected hole contours; mark the four suspected hole contours determined by the two main diagonals as quick positioning holes.

5. The positioning method for automobile part mold processing according to claim 1, characterized in that: Determining the center reference point of the mold before processing based on the position information of the four quick positioning holes includes: The average value of the coordinates of the centroids of the four rapid positioning holes in each direction is calculated as the position information of the center reference point of the mold before the current processing.

6. A positioning method for automobile part mold processing according to claim 1, characterized in that: The offset vector of the mold before processing relative to the center reference point of the standard mold satisfies the expression: ; Where, Indicates the offset vector of the mold before processing relative to the center reference point of the standard mold; Indicates the position information of the center reference point of the mold before processing. Indicates the center reference point of the mold before processing Axis direction and Coordinates in the axis direction; Indicates the position information of the center reference point of the standard mold. Indicates that the center reference point of the standard mold is Axis direction and Axis direction coordinates.

7. A positioning method for automobile part mold processing according to claim 6, characterized in that: The center reference point of the standard mold is obtained through the position information of the four quick positioning holes in the standard mold area image. The standard mold area image is an image captured after the mold is manually and accurately aligned to the predetermined position of the CNC device for the first time.

8. A positioning method for automobile part mold processing according to claim 7, characterized in that: Generating a compensation instruction according to the offset vector includes: Performing a negation operation on the calculated offset vector to obtain a mold adjustment vector before processing; Multiplying the mold adjustment vector before processing by the space conversion rate, mapping it back to the real space coordinate system, and obtaining the mold adjustment vector after mapping; The spatial conversion rate is obtained by dividing the actual length of the standard mold by the number of corresponding pixels in the standard mold area image; The adjustment vector of the mapped mold is used as a compensation instruction.

9. The positioning method for automobile part mold processing according to claim 1, characterized in that: The step of extracting a plurality of closed edge contours from the collected mold area image before processing includes: The Canny algorithm is used to detect the edges of the mold area image before processing, and the contour search function is used to extract all closed edge contours.

10. A positioning system for automobile parts mold processing, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a positioning method for automobile part mold processing according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Edge offset vision measurement method based on machine vision and image detector

    CN113870217A

  • Punching defect detection method for automobile punching pipe

    CN118505686A

  • Infrared measuring device and measuring method thereof

    CN119984035A

  • Automobile part positioning method and system for numerical control machine tool machining

    CN120318313A

  • Irregular workpiece machining and positioning method and system combined with machine vision

    CN120525850A