Method and apparatus for generating machining paths
By acquiring workpiece image features through an image acquisition device on a numerical control machine tool, fitting three-dimensional edge information, and automatically generating a processing path, the problem of manual deburring is solved, and efficient automated processing is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IND TECH RES INST
- Filing Date
- 2022-03-10
- Publication Date
- 2026-06-16
AI Technical Summary
Existing numerical control machine tools require manual removal of burrs after machining, resulting in high labor costs and difficulty in quality control. In particular, for mass-produced high-precision machine tools, it is impossible to flexibly correct the variation of individual workpieces.
By acquiring images at different positions on the workpiece using an imaging device, image features are obtained, three-dimensional edge information is fitted, and a processing path is generated to achieve automated edge processing.
It improves the flexibility and ease of use of machine processing, reduces manual intervention, and enhances the adaptability of processing paths.
Smart Images

Figure CN116612271B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and apparatus for generating a processing path. Background Technology
[0002] Generally, after a workpiece is machined by a computer numerical control (CNC) machine tool, some production lines require an additional manual deburring workstation to further process the burrs on the machined workpiece. For example, the shape error of a lost-wax casting workpiece can reach 2mm. However, for mass-production high-precision CNC machine tools, it is not possible to flexibly correct for the variation in a single workpiece. Therefore, the deburring process after machining must be done manually, which consumes manpower and time, and the quality is even more difficult to control when dealing with hard materials.
[0003] Therefore, how to effectively generate edge processing paths for workpieces to improve the flexibility of machine tool processing and increase ease of use is an important current issue. Summary of the Invention
[0004] The present invention provides a method and apparatus for generating processing paths, thereby effectively generating edge processing paths for workpieces to improve the flexibility of machine processing and increase ease of use.
[0005] This invention provides a method for generating a machining path, comprising the following steps: Moving an image-acquiring device to a first position within a region of interest to acquire a first image of the workpiece. Moving the image-acquiring device to a second position to acquire a second image of the workpiece. Based on the first and second images, obtaining first and second edge features of the workpiece. Based on the first and second edge features, fitting three-dimensional edge information of the workpiece. Generating a machining path based on the three-dimensional edge information.
[0006] This invention provides a machining path generation apparatus, including an image acquisition device and a processing device. The image acquisition device is mounted on a machine tool. The processing device controls the machine tool to move the image acquisition device to a first position in the region of interest to acquire an image of the workpiece, thereby obtaining a first image; and to move the image acquisition device to a second position to acquire an image of the workpiece, thereby obtaining a second image. Based on the first and second images, the processing device acquires first and second edge features of the workpiece; based on the first and second edge features, it fits three-dimensional edge information of the workpiece; and based on the three-dimensional edge information, it generates a machining path.
[0007] The processing path generation method and apparatus disclosed in this invention acquire a first image of the workpiece by moving an image-acquiring device to a first position within the region of interest, and then acquires a second image by moving the image-acquiring device to a second position. Based on the first and second images, first and second edge features of the workpiece are obtained. Furthermore, based on these first and second edge features, three-dimensional edge information of the workpiece is fitted, and a processing path is generated based on this three-dimensional edge information. This effectively generates edge processing paths for the workpiece, improving the flexibility of machine tool processing and increasing ease of use. Attached Figure Description
[0008] Figure 1 This is a schematic diagram of a processing path generation device according to an embodiment of the present invention.
[0009] Figure 2 This is a flowchart of a processing path generation apparatus according to an embodiment of the present invention.
[0010] Figure 3 for Figure 2 The detailed flowchart of step S208.
[0011] Figure 4 for Figure 3 The detailed flowchart of step S306.
[0012] The labels in the diagram are explained as follows:
[0013] 100: Processing path generation device
[0014] 110: Image capturing device
[0015] 120: Processing device
[0016] 150: Machine Tool
[0017] 160: Workpiece
[0018] S202~S210, S302~S310, S402~S420: Steps Detailed Implementation
[0019] The technical terms used in this specification refer to those commonly used in the field. Where this specification provides explanations or definitions for certain terms, the interpretation of those terms shall be based on the explanations or definitions provided in this specification. Each embodiment of this disclosure has one or more technical features. Where feasible, those skilled in the art may selectively implement some or all of the technical features in any embodiment, or selectively combine some or all of the technical features in these embodiments.
[0020] In the embodiments listed below, the same or similar components will be represented by the same reference numerals.
[0021] Figure 1 This is a schematic diagram of a processing path generation apparatus according to an embodiment of the present invention. Please refer to... Figure 1 The processing path generation device 100 may include an image acquisition device 110 and a processing device 120.
[0022] The image acquisition device 110 may be disposed on the machine tool 150. More specifically, the image acquisition device 110 may be disposed on the spindle of the machine tool 150. In some embodiments, the image acquisition device 110 may include an image acquisition lens and an image acquisition unit, or a charge-coupled device (CCD), but the embodiments of the present invention are not limited thereto. Additionally, the machine tool 150 may be a numerical control machine tool or other types of machine tools, but the embodiments of the present invention are not limited thereto.
[0023] The processing device 120 is coupled to the image acquisition device 110. The processing device 120 can control the machine tool 150 to move the image acquisition device 110 to a first position of the region of interest (ROI) to acquire an image of the workpiece 160, thereby obtaining a first image. In this embodiment, the ROI may include a rectangle, a circle, an ellipse, or an irregular polygon, but the embodiments of the present invention are not limited to these. For example, the shape of the ROI can be adjusted according to the appearance shape of the workpiece. In addition, the ROI may also correspond to a coordinate value. Furthermore, the shape of the sensing area and its corresponding coordinate value can be set and adjusted by the user according to the appearance shape of the workpiece 160, and the ROI and its corresponding coordinate value can be pre-stored in the storage device of the processing device 120, such as memory, hard disk, etc.
[0024] Next, the processing device 120 can control the machine tool 150 to move the image-acquiring device 110 to the second position to acquire an image of the workpiece 160, thereby obtaining a second image. In this embodiment, the machine tool 150 can move the image-acquiring device 110 from the first position to the second position in the horizontal direction. For example, the horizontal direction may include the X-axis and the Y-axis. In some embodiments, the machine tool 150 can move the image-acquiring device 110 from the first position to the second position along the X-axis. In some embodiments, the machine tool 150 can move the image-acquiring device 110 from the first position to the second position along the Y-axis. In some embodiments, the machine tool 150 can move the image-acquiring device 110 from the first position to the second position along both the X-axis and the Y-axis.
[0025] After the processing device 120 acquires the first image and the second image of the workpiece 160, it can obtain the first edge features and the second edge features of the workpiece 160 based on the first image and the second image. In other words, the processing device 120 can analyze and process the first image and the second image corresponding to the region of interest, without needing to analyze and process the entire first image and the second image, in order to obtain the first edge features and the second edge features of the workpiece 160. This speeds up the acquisition of the first edge features and the second edge features of the workpiece 160.
[0026] Next, the processing device 120 can fit the three-dimensional edge information of the workpiece 160 based on the first edge feature and the second edge feature. For example, the processing device 120 can calculate the offset between the first edge feature and the second edge feature to obtain the depth difference (e.g., Z-axis information) between the first edge feature and the second edge feature, and then fit the three-dimensional edge information of the workpiece 160. Afterwards, the processing device 120 can generate a processing path based on the above-mentioned three-dimensional edge information. That is, the processing device 120 can convert the three-dimensional edge information into a processing path through the three-dimensional coordinate axis, so that the processing device 120 can control the machine tool 150 to perform subsequent processing on the workpiece 160 according to the processing path, such as cutting off the burrs on the edge of the workpiece 160. In this way, after processing, the machine tool 150 in this embodiment does not need to be recalibrated by changing the mold, and can directly generate a processing path adapted to each individual workpiece 160 through the image acquisition device 110 and the processing device 120, thereby increasing the convenience of use.
[0027] In this embodiment, the processing device 120 may include a microcontroller (MCU) or a microprocessor, but the embodiments of the present invention are not limited thereto. Furthermore, the image capturing device 110 and the processing device 120 may be separately configured, that is, the processing device 120 is not mounted on the machine tool 150, such as... Figure 1 As shown, but the embodiments of the present invention are not limited thereto. In some embodiments, the image acquisition device 110 and the processing device 120 may be mounted on the machine tool 150.
[0028] Furthermore, after the processing device 120 obtains the first edge feature and the second edge feature corresponding to the workpiece 160, the processing device 120 can perform edge point gradient calculation on the first edge feature and the second edge feature to determine multiple edge feature points of the workpiece 160. In this embodiment, the above-mentioned edge point gradient calculation can be the Sobleoperator, but the embodiments of the present invention are not limited to this.
[0029] In other words, the processing device 120 can use the gradient vectors of the images corresponding to the first edge feature and the second edge feature as the basis for edge judgment, and use separate matrix masks to detect edges with different orientations (i.e., X-axis direction and Y-axis direction). When the gradient vector of the image changes beyond a threshold, the processing device 120 can determine that the image is an edge of the workpiece 160, and generate edge feature points of the workpiece 160 accordingly.
[0030] Next, the processing device 120 can perform feature point filtering on the aforementioned edge feature points to obtain multiple discrete feature points. Furthermore, the processing device 120 can, for example, perform feature point filtering on the edge feature points using a labeling method to obtain the aforementioned discrete feature points.
[0031] For example, the processing device 120 can segment the image corresponding to the aforementioned edge feature points into multiple blocks, assign a label to each block, and label all adjacent blocks with the same label. Next, the processing device 120 determines the number of edge feature points in the block corresponding to each label. If the number of edge feature points in the block corresponding to a certain label is less than a preset number (i.e., the number of edge feature points is too small), the processing device 120 determines that the edge feature points in the block corresponding to the label are noise and removes all edge feature points from the block corresponding to the label. If the number of edge feature points in the block corresponding to a certain label is greater than or equal to a default number, the processing device 120 outputs the aforementioned edge feature points as discrete feature points.
[0032] Next, the processing device 120 can calculate the aforementioned discrete feature points to generate edge information of the workpiece 160. Furthermore, after obtaining the discrete feature points, the processing device 120 can select two discrete feature points. Then, the processing device 120 can calculate the distance between the two discrete feature points to determine whether the distance between them is small or large. Afterward, the processing device 120 can determine whether the distance is greater than a preset distance.
[0033] When the distance is determined to be less than the preset distance, it indicates that the distance between the two discrete feature points is small, and the processing device 120 can directly output the two discrete feature points. When the distance is determined to be greater than the preset distance, it indicates that the distance between the two discrete feature points is large, and the processing device 120 can calculate the curvature of the two discrete feature points in order to determine whether the connection between the two discrete feature points is a straight line or an arc.
[0034] Next, the processing device 120 can determine whether the curvature is less than a preset curvature. When the curvature is determined to be less than the preset curvature, it indicates that the connection between the two discrete feature points is a straight line. Then, the processing device 120 can perform a straight line supplementation operation between the two discrete feature points to generate multiple first supplementation points, and output the first supplementation points and the two discrete feature points as the basis for subsequent connections.
[0035] When the curvature is determined to be less than a preset curvature, it indicates that the connection between the two discrete feature points is an arc. The processing device 120 then performs an arc-line completion operation between the two discrete feature points based on the curvature to generate multiple second completion points, and outputs the second completion points and the two discrete feature points as a basis for subsequent connections. In some embodiments, the processing device 120, for example, uses the least squares method to perform the arc-line completion operation between the two discrete feature points based on the curvature to generate the second completion points.
[0036] Next, the processing device 120 can determine whether all discrete feature points have been selected. When it is determined that not all discrete feature points have been selected, the processing device 120 will continue to select two discrete feature points from the discrete feature points, that is, select two new discrete feature points, and perform the above operation on the two new discrete feature points in order to process all discrete feature points.
[0037] When all discrete feature points have been selected, the processing device 120 can generate edge information of the workpiece 160 based on the discrete feature points, the first supplementary point, and the second supplementary point. For example, the processing device 120 can connect the discrete feature points, the first supplementary point, and the second supplementary point to generate the edge contour of the workpiece 160 and use it as the edge information of the workpiece 160. In this way, the accuracy of the edge information of the workpiece 160 can be increased by generating the first supplementary point and the second supplementary point.
[0038] Next, the processing device 120 can obtain the depth information of the workpiece 160 based on the first edge feature and the second edge feature. For example, assuming the depth of the first edge feature point of the first edge feature is the same as the depth of the second edge feature point of the second edge feature, the relative positions of the first edge feature point and the second edge feature point obtained after the imaging device 110 moves remain unchanged. If the depth of the first edge feature point of the first edge feature is different from the depth of the second edge feature point of the second edge feature (i.e., the depths of the first edge feature point and the second edge feature point are different), the relative positions of the first edge feature point and the second edge feature point obtained after the imaging device 110 moves will change.
[0039] In this way, by controlling the machine tool 150 to move the image acquisition device 110, the first edge feature and the second edge feature can be acquired. By calculating the relative positions of the first edge feature point of the first edge feature and the second edge feature point of the second edge feature, the depth information corresponding to the first edge feature point and the second edge feature point is obtained as the depth information of the workpiece 160. Then, the processing device 120 can fit the three-dimensional edge information of the workpiece 160 based on the edge information and the depth information of the workpiece 160.
[0040] Figure 2 This is a flowchart of a processing path generation method according to an embodiment of the present invention. In step S202, the imaging device is moved to a first position in the region of interest to capture an image of the workpiece, thereby obtaining a first image. In step S204, the imaging device is moved to a second position to capture an image of the workpiece, thereby obtaining a second image. In step S206, based on the first image and the second image, a first edge feature and a second edge feature of the workpiece are obtained.
[0041] In step S208, the three-dimensional edge information of the workpiece is fitted based on the first edge feature and the second edge feature. In step S210, a processing path is generated based on the three-dimensional edge information. In this embodiment, the region of interest includes, for example, a rectangle, a circle, an ellipse, or an irregular polygon.
[0042] Figure 3 for Figure 2 The detailed flowchart of step S208 is as follows: In step S302, the first edge feature and the second edge feature are subjected to edge point gradient calculation to determine multiple edge feature points of the workpiece. In step S304, feature points are filtered to obtain multiple discrete feature points. In step S306, the discrete feature points are calculated to generate the edge information of the workpiece.
[0043] In step S308, the depth information of the workpiece is obtained based on the first edge feature and the second edge feature. In step S310, the three-dimensional edge information of the workpiece is fitted based on the edge information and the depth information of the workpiece. In this embodiment, step S304 further uses a tagging method to filter the edge feature points to obtain discrete feature points.
[0044] Figure 4 for Figure 3 The detailed flowchart for step S306 is as follows: In step S402, two discrete feature points are selected. In step S404, the distance between the two discrete feature points is calculated. In step S406, it is determined whether the distance is greater than a preset distance. If the distance is not greater than the preset distance, proceed to step S408 and output the two discrete feature points.
[0045] When the distance between the two discrete feature points is greater than the preset distance, proceed to step S410 to calculate the curvature of the two discrete feature points. In step S412, determine whether the curvature is less than the preset curvature. When the curvature is not less than the preset curvature, proceed to step S414 to perform a straight line supplementation operation between the two discrete feature points to generate multiple first supplementation points, and output the first supplementation points and the two discrete feature points.
[0046] When the curvature is determined to be less than the preset curvature, proceed to step S416, where an arc-shaped point-filling operation is performed between the two discrete feature points based on the curvature to generate multiple second-filling points, and the second-filling points and the two discrete feature points are output. In step S418, it is determined whether all discrete feature points have been selected.
[0047] If it is determined that not all discrete feature points have been selected, return to step S402, select two more discrete feature points (i.e., select two new discrete feature points), and proceed to subsequent steps S404~S418 until it is determined that not all discrete feature points have been selected. If it is determined that all discrete feature points have been selected, proceed to step S420, and generate the edge information of the workpiece based on the discrete feature points, the first supplementary point, and the second supplementary point.
[0048] It is worth noting that, Figure 2 , Figure 3 and Figure 4 The order of the steps is for illustrative purposes only and is not intended to limit the order of steps in the embodiments of the present invention. The order of the steps can be changed by the user according to their needs. Furthermore, without departing from the spirit and scope of the present invention, additional steps can be added or fewer steps can be used in the above flowchart.
[0049] In summary, the processing path generation method and apparatus disclosed in this invention acquire a first image of the workpiece by moving the image-acquiring device to a first position within the region of interest, and then acquires a second image by moving the image-acquiring device to a second position. Based on the first and second images, first and second edge features of the workpiece are obtained. Furthermore, based on these first and second edge features, three-dimensional edge information of the workpiece is fitted, and a processing path is generated based on this three-dimensional edge information. This effectively generates edge processing paths for the workpiece, improving the flexibility of machine tool processing and increasing ease of use.
[0050] Although the present invention has been disclosed above with reference to embodiments, it is not intended to limit the scope of the invention. Anyone skilled in the art can make some modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention shall be determined by the scope of the appended claims.
Claims
1. A method for generating a processing path, comprising: The imaging device is moved to a first position in the region of interest to capture an image of the workpiece, thereby obtaining a first image; The imaging device is moved to a second position to capture an image of the workpiece, thereby obtaining a second image; Based on the first image and the second image, the first edge feature and the second edge feature of the workpiece are obtained; Based on the first edge feature and the second edge feature, the three-dimensional edge information of the workpiece is fitted; and Based on the three-dimensional edge information, a processing path is generated; The step of fitting the three-dimensional edge information of the workpiece based on the first edge feature and the second edge feature includes: The first edge feature and the second edge feature are subjected to edge point gradient calculation to determine multiple edge feature points of the workpiece; Feature point filtering is performed on the multiple edge feature points to obtain multiple discrete feature points; The edge information of the workpiece is generated by calculating the plurality of discrete feature points; Based on the first edge feature and the second edge feature, the depth information of the workpiece is obtained; and Based on the edge information and depth information of the workpiece, the three-dimensional edge information of the workpiece is fitted.
2. The processing path generation method as described in claim 1, wherein the region of interest includes a rectangle, a circle, an ellipse, or an irregular polygon.
3. The processing path generation method as described in claim 1, wherein the plurality of edge feature points are filtered by a labeling method to obtain the plurality of discrete feature points.
4. The processing path generation method as described in claim 1, wherein the step of calculating the plurality of discrete feature points to generate the edge information of the workpiece includes: Select two discrete feature points from the plurality of discrete feature points; Calculate the distance between the two discrete feature points; Determine whether the spacing is greater than a preset spacing; When it is determined that the distance is not greater than the preset distance, the two discrete feature points are output; When it is determined that the spacing is greater than the preset spacing, the curvature of the two discrete feature points is calculated; Determine whether the curvature is less than a preset curvature; When it is determined that the curvature is not less than the preset curvature, a straight line supplementation operation is performed between the two discrete feature points to generate multiple first supplementation points, and the multiple first supplementation points and the two discrete feature points are output. When it is determined that the curvature is less than the preset curvature, an arc-line point-filling operation is performed between the two discrete feature points according to the curvature to generate multiple second-filling points, and the multiple second-filling points and the two discrete feature points are output. Determine whether all of the multiple discrete feature points have been selected; If it is determined that not all of the multiple discrete feature points have been selected, return to the step of selecting the two discrete feature points of the multiple discrete feature points; as well as When it is determined that all of the plurality of discrete feature points have been selected, the edge information of the workpiece is generated based on the plurality of discrete feature points, the plurality of first supplementary points, and the plurality of second supplementary points.
5. A processing path generation device, comprising: Image acquisition device, mounted on machine tool; as well as The processing device controls the machine tool to move the image acquisition device to a first position in the region of interest to acquire an image of the workpiece, thereby obtaining a first image; and to move the image acquisition device to a second position to acquire an image of the workpiece, thereby obtaining a second image. Based on the first image and the second image, the processing device acquires a first edge feature and a second edge feature of the workpiece; based on the first edge feature and the second edge feature, it fits the three-dimensional edge information of the workpiece; and based on the three-dimensional edge information, it generates a processing path. The processing device performs edge point gradient calculation on the first edge feature and the second edge feature to determine multiple edge feature points of the workpiece. The processing device performs feature point filtering on the multiple edge feature points to obtain multiple discrete feature points. The processing device calculates on the multiple discrete feature points to generate edge information of the workpiece. The processing device obtains the depth information of the workpiece based on the first edge feature and the second edge feature. The processing device fits the three-dimensional edge information of the workpiece based on the edge information and the depth information of the workpiece.
6. The processing path generating apparatus as described in claim 5, wherein the region of interest includes a rectangle, a circle, an ellipse, or an irregular polygon.
7. The processing path generation apparatus as described in claim 5, wherein the processing apparatus performs feature point filtering on the plurality of edge feature points using a tagging method to obtain the plurality of discrete feature points.
8. The processing path generation device as described in claim 5, wherein the processing device selects two discrete feature points from the plurality of discrete feature points, the processing device calculates the distance between the two discrete feature points, the processing device determines whether the distance is greater than a preset distance, and when the distance is determined not to be greater than the preset distance, the processing device outputs the two discrete feature points; when the distance is determined to be greater than the preset distance, the processing device calculates the curvature of the two discrete feature points, the processing device determines whether the curvature is less than a preset curvature, and when the curvature is determined not to be less than the preset curvature, the processing device performs a straight-line point-filling operation between the two discrete feature points to generate a plurality of first filler points, and outputs the plurality of first filler points. When the curvature is determined to be less than the preset curvature, the processing device performs an arc-shaped point-filling operation between the two discrete feature points based on the curvature to generate multiple second supplementary points, and outputs the multiple second supplementary points and the two discrete feature points. The processing device determines whether all of the multiple discrete feature points have been selected. When it is determined that the multiple discrete feature points have not been selected, the processing device continues to select the two discrete feature points of the multiple discrete feature points. When it is determined that all of the multiple discrete feature points have been selected, the processing device generates the edge information of the workpiece based on the multiple discrete feature points, the multiple first supplementary points, and the multiple second supplementary points.