A part polishing edge extraction method and device, a terminal device, and a storage medium

By acquiring template line drawing information and extracting part trajectory edges using computer vision algorithms, the edges that need to be polished are automatically identified, solving the problems of high labor costs and low automation levels in existing technologies, and realizing efficient, accurate and flexible automated production of part polishing.

CN118037648BActive Publication Date: 2026-07-03CSSC HUANGPU WENCHONG SHIPBUILDING CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CSSC HUANGPU WENCHONG SHIPBUILDING CO LTD
Filing Date
2024-01-25
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In existing technologies, robotic edge trimming and polishing systems based on 3D vision process all workpiece edges, resulting in wasted processing time and materials. Meanwhile, manual polishing cannot meet the standardization requirements of mass production, and suffers from high labor costs and low automation levels.

Method used

By acquiring the template line drawing information of the part to be polished, the closed contour is extracted and divided into part trajectory edges. By combining computer vision and algorithms to match and filter the trajectory edges, the edges that need to be polished are automatically identified, reducing manual intervention and improving production efficiency and accuracy.

Benefits of technology

It has improved the automation level of the parts grinding process, reduced labor costs, increased production efficiency and precision, adapted to the flexibility of different types and shapes of parts, and optimized the stability and reliability of the matching process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118037648B_ABST
    Figure CN118037648B_ABST
Patent Text Reader

Abstract

The application discloses a part polishing edge extraction method and device, a terminal equipment and a storage medium. The direction of each template line in a template line drawing of a part to be polished and polishing marks of each template line are acquired; a closed contour of the part to be polished in a part to be polished picture is extracted, and the closed contour is divided into a plurality of part trajectory edges; starting from a preset starting point, the part trajectory edges are sequentially traversed along the closed contour of the part to be polished and in a preset direction to determine the direction of each part trajectory edge; a matching result of the part trajectory edges and the template line segments is acquired in combination with the direction of the part trajectory edges, the direction of the template line segments and the traversal sequence of the part trajectory edges; and according to the matching result and the polishing marks of the template line, part trajectory edges that need to be polished are screened from all the part trajectory edges. Through the application, the automation level and efficiency of a part polishing production line can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more particularly to a method, apparatus, terminal device, and storage medium for extracting the grinding edges of parts. Background Technology

[0002] Currently, 3D vision-based robotic edge trimming and grinding trajectory planning systems detect the workpiece edge pose using 3D vision and then plan the robot's processing path based on the edge trimming and grinding process. While 3D vision systems can detect all workpiece edges, a 3D vision-guided robotic edge trimming and grinding system would process all of them. However, in real-world scenarios, not all workpiece edges require grinding. This leads to wasted processing time and materials, and may also result in workpieces that do not meet production requirements.

[0003] However, while manual grinding can avoid the aforementioned technical problems, it cannot meet the needs of standardized mass production and is too costly in terms of labor. Therefore, there is an urgent need for a method for extracting the grinding edges of parts to solve the technical problems of high labor costs, low automation levels, and low production yield and efficiency in the parts grinding process. Summary of the Invention

[0004] This invention provides a method, apparatus, terminal equipment, and storage medium for extracting the grinding edge of parts, so as to improve the automation level, production yield, and production efficiency of the parts grinding production line, while reducing labor costs.

[0005] To address the aforementioned technical problems, in a first aspect, embodiments of the present invention provide a method for extracting the grinding edge of a part, comprising:

[0006] According to the grinding requirements of the part to be ground, obtain the template line diagram information of the part to be ground; the template line diagram information of the part to be ground includes: the direction of each template line and the grinding mark of each template line.

[0007] Extract the closed contour of the part to be polished from the image of the part to be polished, and divide the closed contour into several part trajectory edges;

[0008] Starting from a preset starting point, along the closed contour of the part to be polished, the edges of the part trajectory are traversed sequentially in a preset direction to determine the direction of each part trajectory edge;

[0009] Combining the directions of all the part trajectory edges and the directions of all the template line segments, and following the traversal order of the part trajectory edges, each part trajectory edge is matched with each template line in turn to obtain the matching result;

[0010] Based on the matching results and the grinding marks of all the template lines, the part trajectory edges that need to be ground are selected from all the part trajectory edges.

[0011] Compared with existing technologies, the above embodiments have the following beneficial effects: First, the method can improve the production efficiency of parts grinding and accelerate the production cycle by automating the process, reducing labor costs; second, it can reduce errors caused by human factors and improve the processing accuracy by using computer vision and algorithms to extract and match trajectory edges; finally, it can flexibly adapt to different types and shapes of parts based on different template line drawing information, thereby improving the applicability of the production line.

[0012] In one embodiment of the first aspect, the step of combining the directions of all the part trajectory edges and the directions of all the template line segments, and sequentially matching each of the part trajectory edges with each of the template lines according to the traversal order of the part trajectory edges to obtain the matching result includes:

[0013] Based on the directions of all the part trajectory edges and all the template lines, obtain the angle between each part trajectory edge and each template line;

[0014] Using the traversal order as the matching order, the template lines are matched sequentially with the part trajectory edge that forms the smallest angle with them to obtain the matching result.

[0015] Compared with the prior art, the above embodiments have the following beneficial effects: First, using the traversal order as the matching order helps to optimize the matching process, reduce possible errors in the matching process, and improve the stability and reliability of the entire system; In addition, by calculating the angle between each part trajectory edge and the template line, the relationship between them can be matched more accurately, which allows part trajectories of different shapes and structures to better adapt to various situations during matching, improving matching accuracy while increasing the flexibility of the system.

[0016] In one embodiment of the first aspect, the step of selecting the part trajectory edges that need to be polished from all the part trajectory edges based on the matching results and the polishing marks of all the template lines includes:

[0017] Iterate through the grinding marks of each template line in turn to obtain all template lines with grinding marks that need to be ground;

[0018] Based on the matching information, the part trajectory edges that match each template line that needs to be polished are sequentially determined as the part trajectory edges that need to be polished.

[0019] Compared with the prior art, the above embodiments have the following beneficial effects: the grinding marks of the template lines can be set according to specific needs, making the parts grinding system more flexible to adapt to different types of parts and processing requirements, improving the automation level and flexibility of the parts grinding process; in addition, when it is necessary to adjust the grinding path of a certain type of part, only the marking information of the template needs to be adjusted, reducing the workload of the operator and improving grinding efficiency.

[0020] In one embodiment of the first aspect, the step of extracting the closed contour of the part to be polished from the image of the part to be polished, and dividing the closed contour into several part trajectory edges, includes:

[0021] Based on the edge detection algorithm, the edge points of the part to be polished in the image of the part to be polished are extracted, and the vertex information of the part to be polished is obtained from the edge points;

[0022] According to the linear fitting algorithm, the edge points are fitted with linear lines to obtain the closed contour of the part to be polished;

[0023] Based on the vertex information of the part to be polished, the closed contour of the part to be polished is divided into several part trajectory edges.

[0024] Compared with the prior art, the above embodiments have the following beneficial effects: First, edge points are obtained through edge detection algorithm, and then the edge points are fitted into a closed contour, ensuring that the obtained part trajectory edges are interconnected, which facilitates the subsequent traversal of each part trajectory edge in a fixed order, improving the stability and accuracy of subsequent data processing; In addition, based on the vertex information of the part to be polished, the breakpoint situation between different trajectory edges is accurately identified, and the contour is accurately divided into several part trajectory edges, which helps to improve the efficiency and accuracy of subsequent part polishing edge recognition.

[0025] Secondly, embodiments of the present invention also provide a part grinding edge extraction device, including: a template line drawing information acquisition module, a part trajectory edge extraction module, a trajectory edge direction confirmation module, a line matching module, and a grinding edge judgment module;

[0026] The template line diagram information acquisition module is used to acquire the template line diagram information of the part to be polished according to the polishing requirements of the part to be polished; the template line diagram information of the part to be polished includes: the direction of each template line and the polishing mark of each template line.

[0027] The part trajectory edge extraction module is used to extract the closed contour of the part to be polished in the image of the part to be polished, and divide the closed contour into several part trajectory edges.

[0028] The trajectory edge direction confirmation module is used to start from a preset starting point, follow the closed contour of the part to be polished, and traverse the trajectory edges of the part in a preset direction to determine the direction of each trajectory edge.

[0029] The line matching module is used to combine the directions of all the part trajectory edges and the directions of all the template line segments, and sequentially match each part trajectory edge with each template line according to the traversal order of the part trajectory edges to obtain the matching result;

[0030] The grinding edge judgment module is used to filter out the part trajectory edges that need to be ground from all the part trajectory edges based on the matching results and the grinding marks of all the template lines.

[0031] In one embodiment of the second aspect, the line matching module includes: an angle calculation unit and a matching unit;

[0032] The included angle calculation unit is used to obtain the included angle between each part trajectory edge and each template line based on the direction of all part trajectory edges and the direction of all template lines.

[0033] The matching unit is used to use the traversal order as the matching order, and sequentially match the template line with the part trajectory edge that forms the smallest angle with it to obtain the matching result.

[0034] In one embodiment of the second aspect, the grinding edge judgment module is used to filter out the part trajectory edges that need to be ground from all the part trajectory edges based on the matching result and the grinding marks of all the template lines, including:

[0035] Iterate through the grinding marks of each template line in turn to obtain all template lines with grinding marks that need to be ground;

[0036] Based on the matching information, the part trajectory edges that match each template line that needs to be polished are sequentially determined as the part trajectory edges that need to be polished.

[0037] In one embodiment of the second aspect, the part trajectory edge extraction module includes: an edge detection unit, a closed contour extraction unit, and a closed contour division unit;

[0038] The edge detection unit extracts the edge points of the part to be polished in the image of the part to be polished according to the edge detection algorithm, and obtains the vertex information of the part to be polished from the edge points.

[0039] The closed contour extraction unit is used to perform linear fitting on the edge points according to the linear fitting algorithm to obtain the closed contour of the part to be polished.

[0040] The closed contour division unit is used to divide the closed contour of the part to be polished into several part trajectory edges according to the vertex information of the part to be polished.

[0041] Thirdly, the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the above-described method for extracting the grinding edge of a part.

[0042] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the above-described method for extracting the grinding edge of a part. Attached Figure Description

[0043] Figure 1 This is a flowchart illustrating an embodiment of a method for extracting the grinding edge of a part provided by the present invention;

[0044] Figure 2 This is a schematic diagram of one embodiment of a part grinding edge extraction device provided by the present invention. Detailed Implementation

[0045] 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 embodiments of the present invention, and not all embodiments. 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.

[0046] Example 1

[0047] Please refer to Figure 1 The present invention provides a method for extracting the grinding edge of a part, comprising:

[0048] S101: According to the grinding requirements of the part to be ground, obtain the template line diagram information of the part to be ground; the template line diagram information of the part to be ground includes: the direction of each template line and the grinding mark of each template line.

[0049] Preferably, the direction of each template line starts from the template line drawing starting point, which is the same as the starting point of the part trajectory edge in S103, and proceeds in the same direction as the traversal order described in S103, and the direction of each template line is determined sequentially.

[0050] Preferably, when traversing each template line according to the above process, a grinding mark is marked for each template line to indicate whether grinding is required, based on the grinding requirements. This can be represented by, but is not limited to, Boolean variables.

[0051] Compared with the prior art, the above embodiments have the following advantages: they can flexibly adapt to different types and shapes of parts according to different template line drawing information, thereby improving the applicability of the production line; in addition, different grinding requirements can be achieved simply by changing the template line drawing information, reducing the complexity of manual operation and improving the work efficiency of operators.

[0052] S102: Extract the closed contour of the part to be polished from the image of the part to be polished, and divide the closed contour into several part trajectory edges;

[0053] In one embodiment, the step of extracting the closed contour of the part to be polished from the image of the part to be polished and dividing the closed contour into several part trajectory edges includes: extracting the edge points of the part to be polished from the image of the part to be polished according to an edge detection algorithm, and obtaining the vertex information of the part to be polished from the edge points; performing line fitting on the edge points according to a line fitting algorithm to obtain the closed contour of the part to be polished; and dividing the closed contour of the part to be polished into several part trajectory edges according to the vertex information of the part to be polished.

[0054] Preferably, the vertex information of the part to be polished can be obtained in the following way:

[0055] S1021: Extract the edge points of the part to be polished from the image of the part to be polished according to the edge detection algorithm;

[0056] S1022: The edge points of the part to be polished are filtered using the Douglas-Puk algorithm for preliminary screening;

[0057] S1023: Calculate the angle formed by each of the three adjacent points in the edge point set. When the three adjacent points are located on the edge of the polygon, the angle tends to be 180 degrees, while the angle formed by the vertex is less than 180 degrees. Use a two-dimensional array to record the angle formed by the three adjacent points and the index of the corner point in the edge point set. Finally, sort the data and return the corner point with the smallest angle, which is the vertex of the part to be polished.

[0058] Compared with the prior art, the above embodiments have the following beneficial effects: First, edge points are obtained through edge detection algorithm, and then the edge points are fitted into a closed contour, ensuring that the obtained part trajectory edges are connected end to end, which facilitates the subsequent traversal of each part trajectory edge in a fixed order, improving the stability and accuracy of subsequent data processing; In addition, based on the vertex information of the part to be polished, the breakpoint situation between different trajectory edges is accurately identified, and the contour is accurately divided into several part trajectory edges, which helps to improve the efficiency and accuracy of subsequent part polishing edge recognition.

[0059] S103: Starting from a preset starting point, along the closed contour of the part to be polished, and following a preset direction, traverse the edges of the part trajectory in sequence to determine the direction of each edge of the part trajectory;

[0060] Preferably, the preset direction can be clockwise or counterclockwise.

[0061] Preferably, along the closed contour of the part to be polished, starting from a certain vertex of the closed contour, the direction of each part trajectory edge is determined by traversing the endpoints of each part trajectory edge. Specifically, the endpoint that is traversed first in each part trajectory edge is taken as the starting point, and the other endpoint is taken as the ending point, thereby determining the direction of each part trajectory edge.

[0062] Compared with the prior art, the above embodiments have the following beneficial effects: by traversing each part trajectory edge in a fixed order, the direction of each part trajectory edge is determined, which improves the stability and accuracy of the subsequent matching process.

[0063] S104: Combining the directions of all the part trajectory edges and the directions of all the template line segments, and following the traversal order of the part trajectory edges, match each part trajectory edge with each template line sequentially to obtain the matching result;

[0064] In one embodiment, the step of combining the directions of all the part trajectory edges and the directions of all the template line segments, and sequentially matching each part trajectory edge with each template line according to the traversal order of the part trajectory edges to obtain the matching result includes: obtaining the angle between each part trajectory edge and each template line based on the directions of all the part trajectory edges and the directions of all the template lines; using the traversal order as the matching order, sequentially matching the template line with the part trajectory edge that forms the smallest angle to obtain the matching result.

[0065] Preferably, the above embodiments can be implemented through the following steps:

[0066] S1041: Map the closed contour of the part to be ground and the template line drawing to the two-dimensional coordinate system at the same horizontal angle;

[0067] S1042: When the part trajectory edge or the template line segment is a straight line, a corresponding vector is generated by combining the direction of the part trajectory edge or the direction of the template line segment; when the part trajectory edge or the template line segment is a curve, a tangent line is generated with the starting point of the part trajectory edge or the template line segment as the tangent point, and the tangent line generates a corresponding vector with the starting point of the tangent point and the direction of the part trajectory edge or the direction of the template line segment.

[0068] S1043: Calculate the angle between the two vectors generated in S1042 based on the direction of the part trajectory edge and the direction of the template line segment;

[0069] S1044: Compare the included angle of the part trajectory edge with each template line segment in the traversal order. When the included angle formed with the current template line segment is greater than the included angle of the previous traversed template line segment, match the current part trajectory edge with the previous template line segment and delete the previous template line segment, and it will not participate in the next matching process.

[0070] S1045: Repeat step S1044 until only one part trajectory edge to be matched and one template line segment to be matched remain. Match the remaining part trajectory edge to be matched with the template line segment to be matched to obtain all matching results.

[0071] Preferably, the matching result can be recorded in the following way: a different sequence number is set for each template line segment in advance, and when the part trajectory edge matches the template line segment, the part trajectory edge is marked with the sequence number set by the template line segment.

[0072] S105: Based on the matching results and the grinding marks of all the template lines, select the part trajectory edges that need to be ground from all the part trajectory edges.

[0073] Compared with the prior art, the above embodiments have the following beneficial effects: First, using the traversal order as the matching order helps to optimize the matching process, reduce possible errors in the matching process, and improve the stability and reliability of the entire system; In addition, by calculating the angle between each part trajectory edge and the template line, the relationship between them can be matched more accurately, which allows part trajectories of different shapes and structures to better adapt to various situations during matching, improving matching accuracy while increasing the flexibility of the system.

[0074] In one embodiment, the step of selecting the part trajectory edges that need to be polished from all the part trajectory edges based on the matching results and the polishing marks of all the template lines includes: sequentially traversing the polishing marks of each template line to obtain all template lines with polishing marks that need to be polished; and sequentially determining the part trajectory edges that match each template line that needs to be polished as the part trajectory edges that need to be polished based on the matching information.

[0075] Compared with the prior art, the above embodiments have the following beneficial effects: the grinding marks of the template lines can be set according to specific needs, making the parts grinding system more flexible to adapt to different types of parts and processing requirements, improving the automation level and flexibility of the parts grinding process; in addition, when it is necessary to adjust the grinding path of a certain type of part, only the marking information of the template needs to be adjusted, reducing the workload of the operator and improving grinding efficiency.

[0076] Example 2

[0077] Please refer to Figure 2 This invention provides a part grinding edge extraction device, comprising: a template line drawing information acquisition module 201, a part trajectory edge extraction module 202, a trajectory edge direction confirmation module 203, a line matching module 204, and a grinding edge judgment module 205; wherein, the part trajectory edge extraction module 202 includes: an edge detection unit 2021, a closed contour extraction unit 2022, and a closed contour division unit 2023; the line matching module 204 includes: an angle calculation unit 2041 and a matching unit 2042;

[0078] The template line diagram information acquisition module 201 is used to acquire the template line diagram information of the part to be polished according to the polishing requirements of the part to be polished; the template line diagram information of the part to be polished includes: the direction of each template line and the polishing mark of each template line.

[0079] The part trajectory edge extraction module 202 is used to extract the closed contour of the part to be polished in the image of the part to be polished, and divide the closed contour into several part trajectory edges.

[0080] The trajectory edge direction confirmation module 203 is used to start from a preset starting point, follow the closed contour of the part to be polished, and traverse the trajectory edges of the part in a preset direction to determine the direction of each trajectory edge of the part.

[0081] The line matching module 204 is used to combine the directions of all the part trajectory edges and the directions of all the template line segments, and sequentially match each part trajectory edge with each template line according to the traversal order of the part trajectory edges to obtain the matching result;

[0082] The grinding edge judgment module 205 is used to filter out the part trajectory edges that need to be ground from all the part trajectory edges based on the matching results and the grinding marks of all the template lines.

[0083] In one embodiment, the included angle calculation unit 2041 is used to obtain the included angle between each part trajectory edge and each template line based on the direction of all the part trajectory edges and the direction of all the template lines; the matching unit 2042 is used to use the traversal order as the matching order, and sequentially match the template line with the part trajectory edge that forms the smallest included angle to obtain the matching result.

[0084] In one embodiment, the grinding edge judgment module 205 is used to filter out the part trajectory edges that need to be ground from all the part trajectory edges according to the matching result and the grinding marks of all the template lines, including: sequentially traversing the grinding marks of each template line to obtain all template lines with grinding marks that need to be ground; and sequentially determining the part trajectory edges that match each template line that needs to be ground as the part trajectory edges that need to be ground according to the matching information.

[0085] In one embodiment, the edge detection unit 2021 extracts edge points of the part to be polished from the image of the part to be polished according to an edge detection algorithm, and obtains vertex information of the part to be polished from the edge points; the closed contour extraction unit 2022 is used to perform line fitting on the edge points according to a line fitting algorithm to obtain the closed contour of the part to be polished; the closed contour division unit 2023 is used to divide the closed contour of the part to be polished into several part trajectory edges according to the vertex information of the part to be polished.

[0086] Example 3

[0087] Based on the above-described embodiments of the part grinding edge extraction method, another embodiment of the present invention provides a part grinding edge extraction terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the part grinding edge extraction method of any embodiment of the present invention.

[0088] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the part grinding edge extraction device.

[0089] The part grinding edge extraction device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The part grinding edge extraction terminal device may include, but is not limited to, a processor and a memory.

[0090] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the part grinding edge extraction equipment, connecting various parts of the equipment via various interfaces and lines. The memory can be used to store the computer programs and / or modules. The processor implements various functions of the part grinding edge extraction equipment by running or executing the computer programs and / or modules stored in the memory, and by calling data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0091] Example 4

[0092] Based on the above embodiments of the part grinding edge extraction method, another embodiment of the present invention provides a storage medium, the storage medium including a stored computer program, wherein, when the computer program is running, the device where the storage medium is located controls the part grinding edge extraction method of any embodiment of the present invention to execute.

[0093] In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0094] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

[0095] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method of edge extraction for part sanding, the method comprising: include: Based on the grinding requirements of the parts to be ground, obtain the template line drawing information of the parts to be ground; The template line drawing information of the part to be polished includes: the direction of each template line and the polishing mark of each template line; Extract the closed contour of the part to be polished from the image of the part to be polished, and divide the closed contour into several part trajectory edges; Starting from a preset starting point, along the closed contour of the part to be polished, the edges of the part trajectory are traversed sequentially in a preset direction to determine the direction of each part trajectory edge; Combining the directions of all the part trajectory edges and the directions of all the template line segments, and following the traversal order of the part trajectory edges, each part trajectory edge is matched with each template line in turn to obtain the matching result; Based on the matching results and the grinding marks of all the template lines, the part trajectory edges that need to be ground are selected from all the part trajectory edges.

2. A method of edge extraction for part polishing as claimed in claim 1, wherein, The process involves combining the directions of all the part trajectory edges and the directions of all the template line segments, and sequentially matching each part trajectory edge with each template line according to the traversal order of the part trajectory edges to obtain the matching result, including: Based on the directions of all the part trajectory edges and all the template lines, obtain the angle between each part trajectory edge and each template line; Using the traversal order as the matching order, the template lines are matched sequentially with the part trajectory edge that forms the smallest angle with them to obtain the matching result.

3. A method of edge extraction for part polishing as recited in claim 1, wherein, The step of filtering out the part trajectory edges that need to be polished from all the part trajectory edges based on the matching results and the polishing marks of all the template lines includes: Iterate through the grinding marks of each template line in turn to obtain all template lines with grinding marks that need to be ground; Based on the matching information, the part trajectory edges that match each template line that needs to be polished are sequentially determined as the part trajectory edges that need to be polished.

4. A method of edge extraction for part polishing as recited in claim 1, wherein, The step involves extracting the closed contour of the part to be polished from the image of the part to be polished, and dividing the closed contour into several part trajectory edges, including: Based on the edge detection algorithm, the edge points of the part to be polished in the image of the part to be polished are extracted, and the vertex information of the part to be polished is obtained from the edge points; According to the linear fitting algorithm, the edge points are fitted with linear lines to obtain the closed contour of the part to be polished; Based on the vertex information of the part to be polished, the closed contour of the part to be polished is divided into several part trajectory edges.

5. A part-finish edge extraction device characterized by, The part grinding edge extraction device includes: a template line drawing information acquisition module, a part trajectory edge extraction module, a trajectory edge direction confirmation module, a line matching module, and a grinding edge judgment module; The template line diagram information acquisition module is used to acquire the template line diagram information of the part to be polished according to the polishing requirements of the part to be polished; the template line diagram information of the part to be polished includes: the direction of each template line and the polishing mark of each template line. The part trajectory edge extraction module is used to extract the closed contour of the part to be polished in the image of the part to be polished, and divide the closed contour into several part trajectory edges. The trajectory edge direction confirmation module is used to start from a preset starting point, follow the closed contour of the part to be polished, and traverse the trajectory edges of the part in a preset direction to determine the direction of each trajectory edge. The line matching module is used to combine the directions of all the part trajectory edges and the directions of all the template line segments, and sequentially match each part trajectory edge with each template line according to the traversal order of the part trajectory edges to obtain the matching result; The grinding edge judgment module is used to filter out the part trajectory edges that need to be ground from all the part trajectory edges based on the matching results and the grinding marks of all the template lines.

6. A part edge polishing extraction device as claimed in claim 5, characterized in that The line matching module includes: an angle calculation unit and a matching unit; The included angle calculation unit is used to obtain the included angle between each part trajectory edge and each template line based on the direction of all part trajectory edges and the direction of all template lines. The matching unit is used to use the traversal order as the matching order, and sequentially match the template line with the part trajectory edge that forms the smallest angle with it to obtain the matching result.

7. The part grinding edge extraction device as described in claim 5, characterized in that, The grinding edge judgment module is used to filter out the part trajectory edges that need to be ground from all the part trajectory edges based on the matching results and the grinding marks of all the template lines, including: Iterate through the grinding marks of each template line in turn to obtain all template lines with grinding marks that need to be ground; Based on the matching information, the part trajectory edges that match each template line that needs to be polished are sequentially determined as the part trajectory edges that need to be polished.

8. A part edge polishing extraction device as claimed in claim 5, characterized in that, The part trajectory edge extraction module includes: an edge detection unit, a closed contour extraction unit, and a closed contour division unit; The edge detection unit extracts the edge points of the part to be polished in the image of the part to be polished according to the edge detection algorithm, and obtains the vertex information of the part to be polished from the edge points. The closed contour extraction unit is used to perform linear fitting on the edge points according to the linear fitting algorithm to obtain the closed contour of the part to be polished. The closed contour division unit is used to divide the closed contour of the part to be polished into several part trajectory edges according to the vertex information of the part to be polished.

9. A terminal device, comprising: The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement a part grinding edge extraction method as described in any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform a part grinding edge extraction method as described in any one of claims 1 to 4.