Positioning method and system for processing automobile part mold

By using a dual-feature evaluation model and k-means clustering algorithm to identify the rapid positioning holes of automotive part molds, the problem of recognition difficulties in complex backgrounds by traditional algorithms is solved, and the accurate correction and automated reset of mold pose are achieved, thereby improving processing quality and efficiency.

CN120747235BActive Publication Date: 2025-11-11XIAN WEIER PRECISION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional vision algorithms struggle to accurately identify quick-positioning holes in automotive part molds against complex backgrounds, resulting in ineffective correction of mold pose deviations and impacting processing quality and efficiency.

Method used

A dual-feature evaluation model combined with the k-means clustering algorithm is adopted to evaluate the probability of positioning holes by the roundness of the edge contour and the stability of the edge point distribution. Four fast positioning holes are identified by geometric constraints, the offset vector is calculated and compensation instructions are generated for automatic correction.

Benefits of technology

It enables precise detection and closed-loop automatic reset of mold position deviation, improves the accuracy and robustness of positioning hole recognition, and ensures the consistency of part quality and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747235B_ABST
    Figure CN120747235B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of image data processing, specifically relating to a positioning method and system for machining automotive parts molds. The method includes: extracting multiple closed edge contours from a pre-machining image of the mold area; calculating the probability that each closed edge contour is a positioning hole based on its area, perimeter, and distance distribution of edge points relative to the centroid; clustering all closed edge contours based on probability, filtering out multiple suspected hole contours, and identifying four quick-positioning holes through geometric constraints; determining the mold's center reference point based on the positions of these four quick-positioning holes, and calculating the offset vector of the pre-machining mold relative to the center reference point of a standard mold; and generating compensation commands to drive CNC equipment to adjust the mold's pose. This invention effectively avoids interference from complex surface contours, accurately identifies positioning holes, achieves closed-loop precise reset of the mold pose, and improves machining accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing. More specifically, this invention relates to a positioning method and system for machining automotive parts molds. Background Technology

[0002] In the automotive parts manufacturing industry, the production of complex molds relies on multi-axis CNC machine tools, whose machining programs depend entirely on the precise pre-set position of the mold in space. However, during actual machining, the mold on the machine tool table is affected by factors such as strong vibrations caused by cutting forces and loosening of the fixture, resulting in cumulative slight dynamic offsets relative to the pre-set position. If this offset is not corrected, and the CNC system continues to cut according to the predetermined position, it will directly lead to quality defects such as exceeding dimensional tolerances, distortion of curved contours, and poor surface finish in the parts, increasing the scrap rate and seriously affecting production efficiency and manufacturing costs.

[0003] To ensure machining quality, the mold needs to be offset and positioned 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 complex geometric features and texture distribution of the mold surface itself create numerous closed contours of non-locating holes in the image. These contours interfere with the algorithm, causing it to identify more "noise circles," thus affecting the accurate positioning of the quick-locating holes and making its application on automated production lines unreliable. Therefore, accurately identifying quick-locating holes in a high-interference background is a core technical problem for achieving precise mold repositioning. Summary of the Invention

[0005] To address the technical problem mentioned in the background art that traditional vision algorithms cannot accurately locate the quick positioning hole of a mold in complex backgrounds, resulting in the inability to effectively correct the mold pose deviation, the present invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a positioning method for machining automotive part molds, comprising: extracting multiple edge closed contours from a pre-machining mold area image; calculating the probability that each edge closed contour is a positioning hole based on its area, perimeter, and distance distribution of edge points relative to the centroid; clustering all edge closed contours based on the probability, filtering 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 these four quick positioning holes, and calculating the offset vector of the pre-machining mold relative to the center reference point of a standard mold; thereby generating compensation commands to drive a CNC device to adjust the mold pose.

[0007] This invention achieves precise detection and closed-loop automatic reset of mold pose deviation through multi-stage collaborative optimization. First, by constructing a dual-feature evaluation model integrating roundness and edge point distribution stability, the probability of all closed contours is quantified, improving the accuracy and discriminative power of the positioning hole feature description. Second, an innovative k-means clustering algorithm is introduced to perform data-driven screening of probability scores, effectively avoiding the limitations of manually setting fixed thresholds and achieving adaptive, high-precision segmentation of suspected hole contours. Next, utilizing geometric prior knowledge of the positioning hole distribution, the four corner positioning holes are locked using 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, achieving automation and high precision in the entire positioning correction process. The overall solution is robust, effectively eliminating interference from complex backgrounds and ensuring the consistency of part quality during continuous processing.

[0008] Preferably, calculating the probability that each edge closed profile is a positioning hole includes: obtaining the area, perimeter, and centroid position information of each edge closed profile; The possibility of a closed edge contour being a positioning hole The calculation formula is: In the formula, , Indicates the first Area and perimeter of a closed contour with defined edges; , Indicates the first The and the first On a closed edge profile, the standard deviation of the Euclidean distance of all edge points relative to their centroid; , This represents the index value of the closed edge contour in the mold area image before processing; This represents the total number of all closed edge contours in the mold area image before processing; This represents the function that takes the maximum value. This represents the natural exponential function.

[0009] The probability assessment model proposed in this invention constructs a two-dimensional collaborative constraint evaluation system by using a roundness index characterizing the macroscopic morphology of the contour and an edge point distribution stability index characterizing the uniformity of its microstructure. This model ensures that high-scoring contours must simultaneously meet two conditions: a nearly circular shape and uniform edge distribution. This effectively solves the technical problem that a single roundness index can easily lead to misjudgment of irregularly shaped contours, significantly improving the accuracy of initial screening for positioning holes.

[0010] Preferably, the step of clustering all edge-closed contours based on probability and filtering out multiple suspected hole contours includes: taking the probability of all edge-closed contours being positioning holes as a one-dimensional dataset; using the k-means clustering algorithm to cluster the dataset into a preset number of clusters of 2, and determining the cluster with the fewest data points as the high probability score cluster; and marking all edge-closed contours contained in the high probability score cluster as suspected hole contours.

[0011] This invention utilizes the prior distribution characteristics of probability data, which show that "most values ​​are small and a few values ​​are large", to obtain prior clustering parameters for clustering, thereby automatically identifying all suspected hole contours and realizing intelligent and adaptive filtering of a large number of interfering contours; compared with the traditional preset fixed division threshold, it has stronger robustness.

[0012] Preferably, the step of identifying four quick-positioning holes in the mold area image before processing from the suspected hole contours using geometric constraints includes: obtaining the length of the line connecting the centroids of every two suspected hole contours; traversing the lengths of all the connecting lines, obtaining the line with the longest length as the first main diagonal, and determining the two suspected hole contours corresponding to it; from the connecting lines formed by the remaining suspected hole contours, obtaining the line with the longest length as the second main diagonal, and determining the other two suspected hole contours corresponding to it; and marking the four suspected hole contours determined by the two main diagonals as quick-positioning holes.

[0013] This invention is based on the geometric feature that positioning holes are usually distributed at the four corners in mold design. It uses the principle of "maximum diagonal distance" to finally determine the positioning holes. After filtering out most of the interference in the previous steps, this step can accurately and reliably identify four quick positioning points used as the final positioning reference from a small number of candidate contours.

[0014] Preferably, the offset vector of the mold before processing relative to the center reference point of the standard mold satisfies the expression: In the formula, This represents the offset vector of the mold before processing relative to the center reference point of the standard mold; This indicates the position information of the center reference point of the mold before processing. This indicates the center reference point of the mold before processing. Axial direction and Coordinates along the axis; This indicates the position information of the center reference point of the standard mold. The center reference point of the standard mold is indicated at Axial direction and Coordinates along the axis.

[0015] This invention directly transforms the positional difference between the center reference point of the pre-processing 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, providing a mathematical basis for the subsequent generation of compensation instructions, and is a key link in realizing high-precision closed-loop automatic reset control.

[0016] Secondly, the present invention provides a positioning system for processing automotive parts molds, including 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 processing automotive parts molds is implemented.

[0017] By adopting the above technical solution, a computer program is generated from the positioning method for processing automotive parts molds, and stored in a memory for loading and execution by a processor. This allows for the creation of a terminal device based on the memory and processor, making it convenient to use.

[0018] The beneficial effects of this invention are as follows:

[0019] (1) This invention uses a dual-feature evaluation model that integrates the circularity of the contour and the stability of the edge point distribution, and combines k-means clustering for adaptive screening. This can effectively eliminate interference from non-hole contours such as irregular curved surfaces on the mold surface, and significantly improve the accuracy and robustness of the positioning hole identification.

[0020] (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 relative to the standard mold in the processing plane before processing;

[0021] (3) After obtaining the offset of the mold before processing, the present invention introduces a spatial conversion rate to accurately map the pixel deviation in the image space into the movement command in the physical space and generates a reverse compensation command, realizing the automated closed-loop control from "visual inspection" to "physical correction", which greatly improves the dimensional consistency and surface quality of automotive stamping parts and other products, and effectively reduces the scrap rate. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating a positioning method for machining automotive parts molds according to the present invention;

[0023] Figure 2 This is a schematic representation of the original mold's grayscale image;

[0024] Figure 3 This is a schematic diagram illustrating the rapid positioning hole obtained after traditional Hough circle detection processing;

[0025] Figure 4This is a schematic diagram illustrating a quick positioning hole obtained after processing according to an embodiment of the present invention. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

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

[0028] This invention discloses a positioning method for machining automotive parts molds, referring to... Figure 1 This includes steps S1-S5:

[0029] S1. Collect images of the mold area before processing and perform preprocessing.

[0030] It should be noted that in actual production, the part mold is fixed in the processing area of ​​the punch press or CNC machine tool. During processing, the feeding and cutting processes generate strong vibrations, which may cause slight deviations in the mold's position between processing tasks, thus affecting the final part's processing quality. Therefore, it is necessary to acquire images of the mold area before processing to extract relevant features and monitor its offset in real time.

[0031] Specifically, a high-resolution industrial camera is deployed above the processing area to ensure that its shooting angle and distance can capture the detailed features of the mold comprehensively and clearly; the camera's acquisition frequency is synchronized with the production cycle, set to trigger an image once during the time interval between two adjacent processing tasks, and to acquire images of the mold area in real time before processing; the acquired raw images are preprocessed such as Gaussian filtering for noise reduction and grayscale conversion to obtain the grayscale value of each pixel, in preparation for subsequent analysis;

[0032] Simultaneously, it is also necessary to obtain the position information of each pixel in the image. The specific method is as follows: taking the pixel at the bottom left corner of the original image as the origin, and defining the horizontal direction to the right from the origin as... The positive direction of the axis is defined by taking the vertically upward direction from the origin as... The positive direction of the axis is used to construct a Cartesian coordinate system; the position information of each pixel in the original image is obtained in the Cartesian coordinate system, including... Coordinates in the axial direction and The coordinates along the axes; since the length of the image in the horizontal direction and the length in the vertical direction are respectively... , Therefore, the pixel is in The range of values ​​for the coordinates along the axis is: Pixels in The range of values ​​for the coordinates along the axis is: .

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

[0034] S2. Extract each closed edge contour from the mold area image before processing; based on the area, perimeter, and distribution of the distance between each edge point and its centroid on each closed edge contour, calculate the probability that each closed edge contour is a positioning hole.

[0035] It should be noted that each mold surface typically has quick-positioning holes around its perimeter, the positions of which in the image can be used to calibrate the precise position of the mold on the machining platform. However, traditional algorithms such as Hough circle detection are susceptible to interference when processing mold surfaces with complex geometric features, resulting in insufficient accuracy in identifying circular hole regions, thus affecting the subsequent accurate positioning of the positioning holes. Considering the large number of closed contours distributed in the mold surface image, this invention proposes to extract all edge closed contours and comprehensively evaluate the probability of each contour being a positioning hole based on its geometric characteristics, thereby more accurately identifying all possible positioning holes.

[0036] Specifically, an edge detection algorithm is applied to the mold area image before processing to identify edge pixels with significant changes in grayscale value, thereby obtaining a binary image of the mold area before processing. In this image, pixels marked as 1 are edge pixels, and pixels marked as 0 are non-edge pixels. For example, the edge detection algorithm can be the robust and widely used Canny algorithm, which can effectively suppress noise and accurately locate edges.

[0037] A contour finding algorithm is used to scan the acquired binary image of the mold area before processing to identify and extract closed edge contours, as well as the area and perimeter of each closed edge contour. For example, the findContours function provided by the OpenCV function library can be used to extract all closed edge contours, the contourArea function can be used to obtain the area of ​​each closed edge contour, and the arcLength function can be used to obtain the perimeter of each closed edge contour. It should be noted that the contour finding algorithm and the relevant OpenCV function library are well-known technologies and will not be described in detail here.

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

[0039]

[0040] In the formula, Indicates the first The possibility of a closed edge contour being a positioning hole; , Indicates the first Area and perimeter of a closed contour with defined edges; , Indicates the first The and the first On a closed edge profile, the standard deviation of the Euclidean distance of all edge points relative to their centroid; This represents the index value of the closed contour of the edge in the mold area image before processing; This represents the total number of closed edge contours in the mold area image before processing; This represents the function that takes the maximum value. This represents the natural exponential function.

[0041] in, This reflects the roundness of the closed contour at the edge; the closer the value is to 1, the closer the contour is to a perfect circle in macroscopic shape. Furthermore, since some irregular curved surfaces on the mold surface can form closed contours, the calculated roundness may also be high. Therefore, a microstructure characteristic index is introduced. This reflects the dispersion of the distances between edge points on the contour and their centroids. The smaller the value, the closer the distances from the edge points to the centroids are, indicating a more uniform spatial distribution. If both of the above conditions are met, the obtained... The larger the value, the more likely the current closed contour possesses both "high roundness" and "high edge point distribution stability," thus increasing the probability that the contour is a true positioning hole. It should be noted that when... When the standard deviation is 0, it indicates that all contours involved in the comparison are ideal circles. In this case, the standard deviation of all contours will also be 0, and it no longer has the significance of distinguishing them by the stability of edge point distribution. In this special case, an exponential term can be defined. The value is 1, at this time The value is determined solely by its roundness, i.e. .

[0042] At this point, it is possible to obtain the possibility that all closed edge contours in the mold area image before processing are positioning holes.

[0043] S3. Based on probability, cluster all edge-closed contours, filter out multiple suspected hole contours, and identify four quick-positioning holes in the mold area image before processing from the suspected hole contours through geometric constraints.

[0044] It should be noted that although each contour has a probability score after the calculation in step S2, it still contains a large number of low-scoring interference items caused by holes in the part itself, surface texture, etc. In order to accurately identify the real positioning hole, it is necessary to first perform an efficient screening of all contours to segment all contours that may be holes. Since the probability data of all closed contours in the image being positioning holes exhibits a clear distribution characteristic of "most values ​​being small and a few values ​​being large", this prior knowledge can be used to introduce a clustering algorithm for automated data-driven screening.

[0045] Specifically, the probability of all closed edge contours in the current pre-processing mold area image being positioning holes is taken as a one-dimensional dataset; the number of prior clusters is set to 2, and clustering operation is performed on this dataset to obtain two clusters; since the number of data points with high probability scores is much smaller than the number of data points with low probability scores, the cluster with the fewest 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; for example, the clustering algorithm includes, but is not limited to, other clustering algorithms such as the k-means algorithm, such as the iterative self-organizing clustering algorithm.

[0046] It should be further noted 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 profiles by the length feature of the line connecting the centroids of two suspected hole profiles.

[0047] Specifically, for all suspected hole contours, the Euclidean distance formula is used to iterate and obtain the length of the line connecting the centroids of every two suspected hole contours; the first iteration is performed, and the line with the longest length among all the connecting lines is selected as the first main diagonal, and its corresponding two suspected hole contours are determined; the two determined suspected hole contours are removed from the set of suspected hole contours, and the second iteration is performed, and the line with the longest length among the connecting lines composed of the remaining suspected hole contours is selected as the second main diagonal, and its corresponding two other 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.

[0048] At this point, the four quick-positioning holes and their corresponding centroid positions in the mold area image before processing have been obtained.

[0049] For example, by Figure 3 and Figure 4 This intuitively demonstrates the significant superiority of the method of the present invention over the traditional Hough circle detection algorithm in the task of rapidly locating holes. Figure 3 This demonstrates that the traditional Hough circle detection algorithm suffers severe interference when handling mold surfaces with complex geometries, identifying 73 contours as potential hole contours. In this situation, the large number of false targets makes the subsequent accurate selection of the four true positioning holes inaccurate. In contrast, Figure 4 The results of this invention are presented. First, using the probability assessment model and clustering screening proposed in this invention, the number of suspected hole contours was significantly reduced to 33, demonstrating that this method can effectively eliminate more than half of the interference from non-hole contours. Subsequently, through geometric constraint analysis, the quick-locating holes located at the four corners were accurately and uniquely identified from these 33 candidate contours.

[0050] S4. Based on the position information of the four quick positioning holes, determine the center reference point of the mold before processing, and calculate the offset vector of the mold before processing relative to the center reference point of the standard mold.

[0051] It should be noted that, since the camera position is fixed and the mold only moves on the plane of the punch press, the minute offsets generated during processing are mainly represented as translational motion on a two-dimensional plane in the image, without involving other complex transformations such as rotation or scaling. Therefore, this offset can be accurately quantified by quantifying the translation of the mold's center reference point, thus providing a reliable basis for subsequent adjustment and positioning.

[0052] Specifically, after the mold is first precisely aligned manually to the predetermined pose on the CNC machine, an image is captured as the standard mold area image. The same processing steps as S1 to S3 described above are performed on the standard mold area image to obtain the four quick-positioning holes and their centroid positions. The average coordinates of the centroids of the four quick-positioning holes in each direction are used to construct the center reference point of the standard mold. Similarly, the average coordinates of the centroids of the four quick-positioning holes in each direction are used to construct the center reference point of the mold before machining.

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

[0054]

[0055] In the formula, This represents the offset vector of the mold before processing relative to the center reference point of the standard mold; This indicates the center reference point of the mold before processing. Axial direction and Coordinates along the axis; The center reference point of the standard mold is indicated at Axial direction and Coordinates along the axis.

[0056] in, This reflects the direction and distance of translation of the mold relative to the standard mold on a plane before processing. If A positive value indicates that the mold before processing was... A shift to the right relative to the standard mold indicates a shift to the left; conversely, a shift to the right indicates a shift to the right. The larger the absolute value, the better the mold was before processing. The greater the translational distance relative to the standard mold in the direction, the closer the distance; conversely, the smaller the translational distance, the closer the distance. If A positive value indicates that the mold before processing was... In terms of direction, it has translated upwards relative to the standard mold; conversely, it has translated downwards. The larger the absolute value, the better the mold was before processing. The greater the distance the model is translated relative to the standard mold in the direction, the closer the distance is; conversely, the smaller the distance is.

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

[0058] S5. Generate compensation instructions based on the offset vector and perform pose reset.

[0059] It should be noted that if a positional deviation occurs during machining, failing to adjust the positioning and proceeding with cutting according to the CNC system's pre-programmed position will lead to a decrease in part quality. Therefore, it is necessary to adjust the positioning of the pre-machining mold based on the offset vector of the mold's center reference point relative to the standard mold.

[0060] Specifically, in order to adjust the mold from its current position back to the standard position, a movement with the same magnitude but opposite direction as the offset vector needs to be applied. 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 negative 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 negatively taken to obtain the mold adjustment vector before processing.

[0061] 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 was The direction is offset to the right by 3 pixels relative to the standard position. The direction was shifted downwards by 2 pixels; after negation, the adjustment vector was obtained as follows: This means that during actual adjustments, the mold before processing needs to be moved 3 pixels to the left and 2 pixels up to return it to the standard position.

[0062] However, considering that the robotic arm performs the positioning process in real space while the adjustment vector is based on the distance within the image, it is necessary to use the spatial transformation rate to map the values ​​of each direction of the adjustment vector back to the real space system. The specific method is to multiply the mold adjustment vector before processing with the spatial transformation rate to obtain the mapped mold adjustment vector.

[0063] For example, the spatial conversion rate can be determined as follows: obtain the actual length of the standard mold, and simultaneously count the number of pixels corresponding to the standard mold in the image; divide the actual length of the standard mold by the number of pixels corresponding to it in the image, and the result is the spatial conversion rate. This spatial conversion rate reflects the real spatial length corresponding to one pixel in the image and is a key parameter for achieving accurate mapping from image space to real space. For example, if an actual length of 10 millimeters is measured as 100 pixels in the image, then the spatial conversion rate is 10 / 100 = 0.1 millimeters / pixel.

[0064] The mold adjustment vector mapped from the pre-processing mold is used as a compensation command and transmitted to the robotic arm control system of the CNC machine tool through the communication interface. The control system parses the command and drives the end effector of the robotic arm (such as a fixture) to move the mold according to the direction and distance specified by the vector, thereby achieving precise adjustment and positioning of the mold before processing, ensuring consistency with the pre-programmed pose, and thus guaranteeing the quality of the automotive parts processing line.

[0065] This invention also discloses a positioning system for processing automotive parts molds, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a positioning method for processing automotive parts molds according to the present invention is implemented.

[0066] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

Claims

1. A positioning method for machining automotive parts molds, characterized in that, include: Multiple closed edge contours are extracted from the pre-processing mold area image, including: edge detection is performed on the pre-processing mold area image using the Canny algorithm, and all closed edge contours are extracted using the contour lookup function; Based on the area, perimeter, and the distribution of distances between edge points and their centroids for each closed edge contour, the probability of each closed edge contour being a positioning hole is calculated, including: obtaining the area, perimeter, and centroid position information of each closed edge contour; The possibility of a closed edge contour being a positioning hole The calculation formula is: In the formula, , Indicates the first Area and perimeter of a closed contour with defined edges; , Indicates the first The and the first On a closed edge profile, the standard deviation of the Euclidean distance of all edge points relative to their centroid; , This represents the index value of the closed edge contour in the mold area image before processing; This represents the total number of all closed edge contours in the mold area image before processing; This represents the function that takes the maximum value. Represents the natural exponential function; Based on probability, all edge-closed contours are clustered to filter out multiple suspected hole contours, including: the probability of all edge-closed contours being located holes is collected as a one-dimensional dataset. The dataset is clustered into clusters of a predetermined number of 2 using the k-means clustering algorithm, and the cluster with the fewest data points is identified as the high probability score cluster; all edge-closed contours contained in the high probability score cluster are marked as suspected hole contours. Identifying four quick-positioning holes in a pre-processing mold area image from suspected hole contours using geometric constraints includes: obtaining the length of the line connecting the centroids of every two suspected hole contours; traversing the lengths of all the connecting lines, obtaining the line with the longest length as the first main diagonal, and determining the two suspected hole contours corresponding to it; from the connecting lines formed by the remaining suspected hole contours, obtaining the line with the longest length as the second main diagonal, and determining the other two suspected hole contours corresponding to it; marking the four suspected hole contours determined by the two main diagonals as quick-positioning holes; Based on the position information of the four quick positioning holes, determine the center reference point of the mold before processing, and calculate the offset vector of the mold before processing relative to the center reference point of the standard mold. Compensation commands are generated based on the offset vector to drive the CNC equipment to adjust the pose of the current mold before machining.

2. The positioning method for processing automotive parts molds according to claim 1, characterized in that, The step of determining the center reference point of the mold before processing based on the position information of the four quick positioning holes includes: Calculate the average coordinates of the centroids of the four quick-positioning holes in each direction, and use them as the position information of the center reference point of the mold before current processing.

3. The positioning method for processing automotive parts molds 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: ; In the formula, This represents the offset vector of the mold before processing relative to the center reference point of the standard mold; This indicates the position information of the center reference point of the mold before processing. This indicates the center reference point of the mold before processing. Axial direction and Coordinates along the axis; This indicates the position information of the center reference point of the standard mold. The center reference point of the standard mold is indicated at Axial direction and Coordinates along the axis.

4. The positioning method for processing automotive parts molds according to claim 3, 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, which is an image captured after the mold is first manually and accurately aligned to the predetermined pose of the CNC equipment.

5. A positioning method for machining automotive parts molds according to claim 4, characterized in that, The step of generating compensation instructions based on the offset vector includes: The calculated offset vector is negative to obtain the mold adjustment vector before processing; Multiply the mold adjustment vector before processing by the spatial transformation rate and map it back to the real space coordinate system to obtain 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 command.

6. A positioning system for machining automotive parts molds, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement a positioning method for machining automotive parts molds according to any one of claims 1-5.

Citation Information

Patent Citations

  • Punching defect detection method for automobile punching pipe

    CN118505686A

  • Infrared measuring device and measuring method thereof

    CN119984035A