Cutting trajectory determination method and apparatus, computer device and readable medium
By using a robot equipped with a line-scanning camera and multiple coordinate mapping transformations to determine an accurate cutting trajectory, the problem of incomplete cutting of parts and product waste was solved, thus improving the sorting success rate.
Patent Information
- Application Number
- CN202411331699.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2044-09-24
AI Technical Summary
Existing technology cannot accurately cut the trajectory, resulting in parts and product waste not being completely separated, causing the robot to fail to grasp.
By using a robot equipped with a line scan camera, the coordinates of multiple cutting points in the product image of the product to be cut are obtained, and multiple mapping transformations are performed, including transformations from the image coordinate system to the base coordinate system and the end coordinate system. By combining coarse positioning and fine positioning, an accurate cutting trajectory is determined.
It achieves more accurate cutting trajectory determination, reduces the adhesion of parts and product waste, and improves the success rate of robot sorting.
Smart Images

Figure CN119304861B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automatic control technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for determining a cutting trajectory. Background Technology
[0002] During the sorting and unloading process of pre-cut parts from a product, it often happens that parts and product waste are not completely cut off or are partially stuck together. This causes the robot to pick up parts and product waste at the same time, resulting in part picking failure. Therefore, finding a method to accurately cut the product and better separate parts from product waste is particularly important.
[0003] In traditional techniques, taking steel plates as an example, the process typically involves obtaining a steel plate template drawing and designing the cutting trajectories for each component on the template drawing. These cutting trajectories cannot be designed within the individual components. Then, based on the cutting trajectories on the template drawing, the actual steel plate is cut to separate the components from the scrap steel.
[0004] However, current methods for determining the cutting trajectory still cannot achieve accurate cutting. Summary of the Invention
[0005] Therefore, it is necessary to provide an accurate method, apparatus, computer device, computer-readable storage medium, and computer program product for determining the cutting trajectory, in order to address the aforementioned technical problems.
[0006] In a first aspect, this application provides a method for determining a cutting trajectory, applied to a robot equipped with a wired scanning camera; including:
[0007] Obtain the first coordinates of multiple cutting points in the product image of the product to be cut, and the second coordinates of multiple cutting points located within a preset range of the origin in the coordinate system of the line scan camera;
[0008] For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the coarse positioning coordinates of the cutting point;
[0009] Map the second coordinate to the end coordinate system to obtain the third coordinate of the cutting point;
[0010] Based on the third coordinate and the coarse positioning coordinate, the scanning coordinates of the line scan camera in the base coordinate system are determined;
[0011] The fourth coordinate, obtained by scanning the cutting point at the scanning coordinates using the line scan camera, is mapped to the base coordinate system to obtain the fifth coordinate.
[0012] By aggregating the fifth coordinates of multiple cutting points, the cutting trajectory of the product to be cut is obtained.
[0013] In one embodiment, obtaining the first coordinates of multiple cutting points in the product image of the product to be cut includes:
[0014] Obtain multiple template images and product images of the product to be cut;
[0015] From multiple template images, select the target template image that matches the product image;
[0016] Determine the initial first coordinates of multiple cutting points in the target template image;
[0017] The initial first coordinates of multiple cutting points in the target template image are mapped to the product image to obtain the first coordinates of multiple cutting points in the product image.
[0018] In one embodiment, determining the initial first coordinates of multiple cutting points in the target template image includes:
[0019] Perform connected component analysis on the target template image to determine the bounding boxes of each part in the target template image;
[0020] Mark the intersection points of each part's border with the grid of the target template image;
[0021] The line segment between two adjacent intersection points that do not belong to the same part is defined as the initial dividing line;
[0022] Select target dividing lines whose length meets the preset length range from the initial dividing lines;
[0023] Multiple cutting points are selected from the target dividing line, and the initial first coordinates of each cutting point are determined.
[0024] In one embodiment, mapping the first coordinates to the base coordinate system to obtain the coarse positioning coordinates of the cutting point includes:
[0025] Obtain the first mapping relationship between the image coordinate system and the area scan camera coordinate system, and the second mapping relationship between the area scan camera coordinate system and the base coordinate system. The area scan camera coordinate system is the coordinate system of the area scan camera that captures the product image.
[0026] Based on the first mapping relationship, the first coordinates are mapped from the image coordinate system to the area array camera coordinate system to obtain the initial coarse positioning coordinates of the cutting point in the area array camera coordinate system;
[0027] Based on the second mapping relationship, the initial coarse positioning coordinates are mapped from the area array camera coordinate system to the base coordinate system to obtain the coarse positioning coordinates of the cutting point in the base coordinate system.
[0028] In one embodiment, mapping the second coordinates to the end coordinate system to obtain the third coordinates of the cutting point includes:
[0029] Obtain the third mapping relationship between the line scan camera coordinate system and the end coordinate system;
[0030] By using the third mapping relationship, the second coordinates are mapped from the line scan camera coordinate system to the end coordinate system, thus obtaining the third coordinates of the cutting point in the end coordinate system.
[0031] In one embodiment, determining the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinate and the coarse positioning coordinates includes:
[0032] Based on the third coordinate and the coarse positioning coordinate, the fourth mapping relationship between the end coordinate system and the base coordinate system is determined;
[0033] Based on the preset angular rotation matrix between the end coordinate system and the base coordinate system, and the fourth mapping relationship, the coordinate translation matrix between the end coordinate system and the base coordinate system is determined;
[0034] The scanning coordinates of the line scan camera in the base coordinate system are determined based on the coordinate translation matrix.
[0035] In one embodiment, the fourth coordinate obtained by scanning the cutting point at the scanning coordinates using a line scan camera is mapped to the base coordinate system to obtain the fifth coordinate, including:
[0036] By using the third mapping relationship, the fourth coordinate obtained by scanning the cutting point at the scanning coordinate of the line scan camera is mapped from the line scan camera coordinate system to the end coordinate system, thus obtaining the initial fifth coordinate of the cutting point in the end coordinate system.
[0037] By using the fourth mapping relationship, the initial coordinates are mapped from the end coordinate system to the base coordinate system, thus obtaining the fifth coordinate of the cutting point in the base coordinate system.
[0038] Secondly, this application also provides a cutting trajectory determination device for use in a robot, the robot being equipped with a wired scanning camera; comprising:
[0039] The acquisition module is used to acquire the first coordinates of multiple cutting points in the product image of the product to be cut, and the second coordinates of multiple cutting points located within a preset range of the origin in the coordinate system of the line scan camera;
[0040] The coarse positioning module is used to map the first coordinate to the base coordinate system for each cutting point to obtain the coarse positioning coordinates of the cutting point.
[0041] The processing module is used to map the second coordinates to the end coordinate system to obtain the third coordinates of the cutting point;
[0042] The scanning coordinate positioning module is used to determine the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinate and the coarse positioning coordinates;
[0043] The precision positioning module is used to map the fourth coordinate obtained by the line scan camera at the scanning coordinates and the scanning cutting point to the base coordinate system to obtain the fifth coordinate.
[0044] The trajectory determination module is used to collect the fifth coordinates of multiple cutting points to obtain the cutting trajectory of the product to be cut.
[0045] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0046] Obtain the first coordinates of multiple cutting points in the product image of the product to be cut, and the second coordinates of multiple cutting points located within a preset range of the origin in the coordinate system of the line scan camera;
[0047] For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the coarse positioning coordinates of the cutting point;
[0048] Map the second coordinate to the end coordinate system to obtain the third coordinate of the cutting point;
[0049] Based on the third coordinate and the coarse positioning coordinate, the scanning coordinates of the line scan camera in the base coordinate system are determined;
[0050] The fourth coordinate, obtained by scanning the cutting point at the scanning coordinates using the line scan camera, is mapped to the base coordinate system to obtain the fifth coordinate.
[0051] By aggregating the fifth coordinates of multiple cutting points, the cutting trajectory of the product to be cut is obtained.
[0052] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0053] Obtain the first coordinates of multiple cutting points in the product image of the product to be cut, and the second coordinates of multiple cutting points located within a preset range of the origin in the coordinate system of the line scan camera;
[0054] For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the coarse positioning coordinates of the cutting point;
[0055] Map the second coordinate to the end coordinate system to obtain the third coordinate of the cutting point;
[0056] Based on the third coordinate and the coarse positioning coordinate, the scanning coordinates of the line scan camera in the base coordinate system are determined;
[0057] The fourth coordinate, obtained by scanning the cutting point at the scanning coordinates using the line scan camera, is mapped to the base coordinate system to obtain the fifth coordinate.
[0058] By aggregating the fifth coordinates of multiple cutting points, the cutting trajectory of the product to be cut is obtained.
[0059] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0060] Obtain the first coordinates of multiple cutting points in the product image of the product to be cut, and the second coordinates of multiple cutting points located within a preset range of the origin in the coordinate system of the line scan camera;
[0061] For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the coarse positioning coordinates of the cutting point;
[0062] Map the second coordinate to the end coordinate system to obtain the third coordinate of the cutting point;
[0063] Based on the third coordinate and the coarse positioning coordinate, the scanning coordinates of the line scan camera in the base coordinate system are determined;
[0064] The fourth coordinate, obtained by scanning the cutting point at the scanning coordinates using the line scan camera, is mapped to the base coordinate system to obtain the fifth coordinate.
[0065] By aggregating the fifth coordinates of multiple cutting points, the cutting trajectory of the product to be cut is obtained.
[0066] The above-mentioned cutting trajectory determination method, apparatus, computer equipment, computer-readable storage medium, and computer program product are applied to a robot equipped with a wire scanning camera. Unlike the traditional method of directly mapping the cutting points in the product image of the product to be cut to the base coordinate system, this provides a more accurate cutting trajectory determination method. Specifically, firstly, coarse positioning is performed on the coordinates of each cutting point. This involves mapping the first coordinates of multiple cutting points in the product image to the base coordinate system to obtain coarse positioning coordinates. Secondly, the second coordinates of multiple cutting points in the line scanner camera coordinate system are mapped to the end coordinate system to obtain the third coordinates. Then, combining the coarse positioning coordinates of the cutting points in the base coordinate system and the third coordinates in the end coordinate system, the scanning coordinates of the line scanner camera in the base coordinate system are accurately determined for fine positioning. Since these scanning coordinates are the coordinates that the line scanner camera can accurately scan in the base coordinate system, the process of mapping the fourth coordinates obtained by scanning the cutting points at these coordinates to the base coordinate system to obtain the fifth coordinates is also more accurate. Finally, by summing the fifth coordinates of multiple cutting points after fine positioning, a more precise target cutting trajectory is obtained. Throughout this process, by performing coarse and fine positioning on multiple cutting points in the product image, a more accurate cutting trajectory can be obtained. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 This is an application environment diagram of the cutting trajectory determination method in one embodiment;
[0069] Figure 2 This is a flowchart illustrating a method for determining the cutting trajectory in one embodiment;
[0070] Figure 3 This is a schematic diagram of three segments of point cloud data obtained by scanning the product to be cut using a line scan camera in one embodiment.
[0071] Figure 4 This is a flowchart illustrating the cutting trajectory determination method in another embodiment;
[0072] Figure 5 This is a schematic diagram of a target template image of a product to be cut in one embodiment.
[0073] Figure 6 This is a schematic diagram of the target segmentation line in the target template image in one embodiment;
[0074] Figure 7 This is a structural block diagram of a cutting trajectory determination device in one embodiment;
[0075] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0076] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0077] The cutting trajectory determination method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, robot 102 is equipped with a line scan camera 104. The coordinate system corresponding to the image captured by line scan camera 104 is the line scan camera coordinate system, which refers to the coordinate system established on the line scan camera. Robot 102 has two coordinate systems: one is the end effector coordinate system, which refers to the tool coordinate system installed at the end of the robot, and the origin and direction of the end effector coordinate system change continuously with the position and angle of the end effector; the other is the base coordinate system, which is a Cartesian coordinate system used to describe the movement of the robot body, with the robot mounting base as the reference.
[0078] When cutting the product to be cut, robot 102 first acquires an image of the product 106 to be cut. It then determines multiple cutting points in the template image, as well as the first coordinates of each cutting point.
[0079] The line scan camera 106 captures images of the cutting points of the product 106 to be cut, obtaining the second coordinates of multiple cutting points within a preset range of the origin in the line scan camera's coordinate system. The line scan camera 106 then sends these second coordinates to the robot 102.
[0080] For each cutting point, robot 102 maps the first coordinate to the base coordinate system to obtain the coarse positioning coordinates of the cutting point; it maps the second coordinate to the end coordinate system to obtain the third coordinate of the cutting point; based on the third coordinate and the coarse positioning coordinate, it determines the scanning coordinates of the line scan camera in the base coordinate system; it maps the fourth coordinate obtained by the line scan camera scanning the cutting point at the scanning coordinate to the base coordinate system to obtain the fifth coordinate; and it aggregates the fifth coordinates of multiple cutting points to obtain the cutting trajectory of the product to be cut. Robot 102 cuts the product 106 according to the cutting trajectory of the product 106.
[0081] In one exemplary embodiment, such as Figure 2 As shown, a method for determining the cutting trajectory is provided, which can be applied to... Figure 1 Taking robot 102 as an example, the robot is equipped with a wired scanning camera. Specifically:
[0082] S100: Obtain the first coordinates of multiple cutting points in the product image of the product to be cut, and the second coordinates of multiple cutting points located within a preset range of the origin in the coordinate system of the line scan camera.
[0083] The cutting point includes at least two components: a cutting start point and a cutting end point. The hardware for determining the cutting trajectory includes a line scan camera, a robot, a cutting gun, and other parts. The line scan camera is fixed to the end of the robot's arm and is used for precise positioning of the cutting point of the product to be cut; its relationship with the robot's arm is that of an "eye on a hand."
[0084] Specifically, an image of the product to be cut is acquired, and multiple cutting points are planned within the product image. The first coordinates of each cutting point are determined. These first coordinates are located in the image coordinate system of the product image. Further, the second coordinates of multiple cutting points within a preset range of the origin of the line scan camera coordinate system are acquired. These second coordinates are assumed coordinates of the cutting points within the preset range of the origin of the line scan camera coordinate system, not actual coordinates. In other words, the second coordinates are obtained by assuming the cutting points are near the origin of the line scan camera coordinate system. For example, the matrix form of the second coordinates can be as follows:
[0085]
[0086] Where P1, P2, and P3 are the x, y, and z coordinates of the cutting point near the origin of the online scanning camera coordinate system.
[0087] S200: For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the coarse positioning coordinates of the cutting point.
[0088] Specifically, all cutting points in the product image of the product to be cut are traversed sequentially. For each cutting point, since the first coordinate is the coordinate of the cutting point in the image coordinate system of the product image, the first coordinate is directly mapped to the base coordinate system to obtain the coarse positioning coordinate of the cutting point in the base coordinate system. At this time, the coarse positioning coordinate has an error of a few millimeters compared with the actual coordinate of the cutting point in the base coordinate system.
[0089] S300, map the second coordinate to the end coordinate system to obtain the third coordinate of the cutting point.
[0090] Specifically, since the coarse positioning coordinates still have a certain error, and this error is greater than the cutting accuracy requirement, in order to achieve more accurate cutting point positioning, it is necessary to perform secondary positioning of the cutting point based on the coarse positioning coordinates of the cutting point in the base coordinate system to obtain the fine positioning coordinates of the cutting point in the base coordinate system.
[0091] The secondary positioning process requires the participation of a line scan camera, which needs to scan the cutting points more accurately. Therefore, it is first necessary to obtain the scanning coordinates of the line scan camera. Since the scanning coordinates of the line scan camera are essentially translation coordinates of the second coordinates of multiple cutting points within a preset range located at the origin of the line scan camera coordinate system, they can be determined based on the mapping relationship between the end coordinate system and the base coordinate system. Therefore, the second coordinates can be mapped to the end coordinate system to obtain the third coordinates of the cutting points in the end coordinate system, so as to further determine the mapping relationship between the end coordinate system and the base coordinate system.
[0092] S400 determines the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinate and the coarse positioning coordinate.
[0093] Specifically, the coarse positioning coordinates are the coordinates of the cutting point in the base coordinate system. Based on the third coordinate and the coarse positioning coordinates, the mapping relationship between the end coordinate system and the base coordinate system is determined. Then, based on the mapping relationship between the end coordinate system and the base coordinate system, the scanning coordinates of the line scan camera in the base coordinate system are determined.
[0094] The S500 uses a line scanner to scan the cutting point at the scanning coordinates, obtaining the fourth coordinate, which is then mapped to the base coordinate system to obtain the fifth coordinate.
[0095] Specifically, when the line scan camera on the robotic arm reaches the scanning coordinates, it scans the parts and waste edges on the product to be cut, typically acquiring three segments of point cloud data, such as... Figure 3 As shown, the point cloud data at the left and right ends represent the point cloud at the part, and the point cloud data in the middle represents the point cloud of the waste border.
[0096] The line scan camera acquires the fourth coordinate of the cut point identified in the three-segment point cloud, which is the coordinate of the cut point in the waste outline point cloud. Since the fourth coordinate is the accurate coordinate of the cut point determined in the line scan camera coordinate system, a coordinate system transformation is performed on the fourth coordinate to map it to the base coordinate system, thus obtaining the fifth coordinate of the cut point in the base coordinate system.
[0097] S600, the fifth coordinate of multiple cutting points, is used to obtain the cutting trajectory of the product to be cut.
[0098] Specifically, the process of obtaining the fifth coordinate is repeated at each cutting point to obtain the fifth coordinate of each cutting point. The fifth coordinates of multiple cutting points are then aggregated to obtain the cutting trajectory of the product to be cut. The robot then cuts the product according to this trajectory.
[0099] Furthermore, the hardware device for the cutting trajectory determination method also includes a cutting gun. The cutting gun is fixed to the end of the robot's arm and is used to cut the product to be cut according to the cutting trajectory of the product to be cut.
[0100] The above-described method for determining the cutting trajectory is applied to a robot equipped with a line-scanning camera. Unlike traditional methods that directly map cutting points from a template image of the product to be cut to a base coordinate system, this method provides a more accurate approach. Specifically, firstly, coarse positioning is performed on the coordinates of each cutting point. This involves mapping the first coordinates of multiple cutting points in the template image of the product to be cut to the base coordinate system to obtain coarse positioning coordinates. Secondly, the second coordinates of multiple cutting points in the line-scanning camera coordinate system are mapped to the end-effector coordinate system to obtain the third coordinates of the cutting points. Then, combining the coarse positioning coordinates of the cutting points in the base coordinate system determined during coarse positioning with the third coordinates in the end-effector coordinate system, the scanning coordinates of the line-scanning camera in the base coordinate system are accurately determined during fine positioning. Since these scanning coordinates are the coordinates that the line-scanning camera can accurately scan in the base coordinate system, the process of mapping the fourth coordinates obtained by scanning the cutting points at these coordinates to the base coordinate system to obtain the fifth coordinates is also more accurate. Finally, by summing the fifth coordinates of multiple cutting points after fine positioning, a more precise target cutting trajectory is obtained. Throughout the process, by performing coarse and fine positioning on multiple cutting points in the product image twice, a more accurate cutting trajectory can be obtained.
[0101] In one exemplary embodiment, such as Figure 4 As shown, S100 includes:
[0102] S110: Obtain multiple template images and product images of the product to be cut.
[0103] S120: Select the target template image that matches the product image from multiple template images.
[0104] S130, determine the initial first coordinates of multiple cutting points in the target template image.
[0105] S140, map the initial first coordinates of multiple cutting points in the target template image to the product image to obtain the first coordinates of multiple cutting points in the product image.
[0106] S150: Obtain the second coordinates of multiple cutting points within a preset range of the origin of the line scan camera coordinate system.
[0107] The hardware device for determining the cutting trajectory also includes an area scan camera. The area scan camera is fixed on a support outside the robot and is used for coarse positioning of the cutting point of the product to be cut, with the robot's robotic arm having an "eye outside the hand" relationship.
[0108] Specifically, multiple template images are acquired, and a product image of the product to be cut is captured using an area scan camera. Then, a template matching algorithm is used to match each template image with the product image to determine the target template image that matches the product image. In practical applications, the template matching algorithm often samples the Linemod template matching algorithm.
[0109] Furthermore, the initial first coordinates of multiple cutting points in each template image are determined, and these initial first coordinates are mapped to the product image to obtain the first coordinates of multiple cutting points in the product image. In other words, if the target template image and the product image are perfectly matched in size, the initial first coordinates of multiple cutting points in the target template image are directly used as the first coordinates of multiple cutting points in the product image. If the target template image and the product image are proportionally matched in size, the initial first coordinates of multiple cutting points in the target template image are mapped to the product image according to the size ratio to obtain the first coordinates of multiple cutting points in the product image.
[0110] In the above embodiments, by employing a template matching algorithm, a target template image that matches the actual product image of the product to be cut is selected, and then the initial first coordinates of multiple cutting points determined on the template image are mapped to the actual product image of the product to be cut, thereby improving the accuracy of determining the first coordinates of multiple cutting points in the product image.
[0111] In an exemplary embodiment, determining the initial first coordinates of multiple cutting points in the target template image includes:
[0112] For each target template image, a connected component analysis is performed to determine the bounding boxes of each part in the target template image. The intersection points of each part's bounding box with the grid of the target template image are marked. The line segment between two adjacent intersection points that do not belong to the same part is determined as the initial dividing line. Target dividing lines with lengths that meet the preset length range are selected from the initial dividing lines. Multiple cutting points are selected from the target dividing lines, and the initial first coordinates of each cutting point are determined.
[0113] The target template image includes multiple part frames, and different parts in the target template image need to be depicted with different colors, while the same parts are depicted with the same color.
[0114] Specifically, such as Figure 5 The image shown is a target template image of a product to be cut. The part data, border data, and cuttable space in the target template image are calculated. For example, connected component analysis is performed on the target template image to determine the information of each connected component. Each connected component in the target template image is also the border information of the part.
[0115] Furthermore, a grid is generated in the template image at equal intervals along the row and column directions, and the intersection points of each part's border with the grid are marked. The line segment between two adjacent intersection points that do not belong to the same part is identified as the initial dividing line. At this point, the initial dividing line is not necessarily the actual dividing line; the target dividing line still needs to be selected from the initial dividing lines.
[0116] Considering the scanning range of a single frame from a line scanner, the length of the dividing lines needs to be limited. Therefore, selecting target dividing lines essentially means selecting those whose lengths meet a preset range. In practical applications, this preset range can be determined based on the specific circumstances. For example, when the initial dividing lines of a vertical line and a horizontal line intersect, cutting one will affect the identification of the other line during precise positioning. Therefore, only one dividing line can be retained from the intersecting initial dividing lines. In this case, a longer or shorter dividing line can be retained depending on the situation. Retaining a longer dividing line reduces the number of cuts required for the product, but it may result in the dividing line range exceeding the range of the line scanner. Retaining a shorter dividing line is more conducive to the line scanner completing the scan, but increasing the number of cuts often increases the risk of damaging the parts.
[0117] Determine the target segmentation line in the target template image, such as... Figure 6 As shown. Multiple cutting points are selected from the filtered target segmentation lines, and the selected cutting points include at least the cutting start point and the cutting end point. The initial first coordinate of each cutting point in the template image coordinate system is determined.
[0118] In this embodiment, by performing connected component analysis on the target template image of the product to be cut, the initial segmentation line can be accurately determined by combining the connected component analysis results with the grid in the target template image. In order to further improve the accuracy of the cutting trajectory determination, the initial segmentation line can be further filtered to select target segmentation lines whose length meets the preset length range, thereby determining the coordinates of multiple cutting points in the target segmentation line.
[0119] In an exemplary embodiment, mapping the first coordinates to the base coordinate system to obtain the coarse positioning coordinates of the cutting point includes:
[0120] Obtain the first mapping relationship between the image coordinate system and the area scan camera coordinate system, and the second mapping relationship between the area scan camera coordinate system and the base coordinate system. Based on the first mapping relationship, map the first coordinates from the image coordinate system to the area scan camera coordinate system to obtain the initial coarse positioning coordinates of the cutting point in the area scan camera coordinate system. Based on the second mapping relationship, map the initial coarse positioning coordinates from the area scan camera coordinate system to the base coordinate system to obtain the coarse positioning coordinates of the cutting point in the base coordinate system.
[0121] In this context, the image coordinate system refers to the coordinate system of the product image to be cut. The area scan camera coordinate system is the coordinate system of the area scan camera that captured the product image. Since the area scan camera and the robot have a hand-eye calibration relationship (eyes outside the hand), direct conversion between the area scan camera coordinate system and the robot coordinate system is possible.
[0122] Specifically, in order to map the first coordinate in the product image to the base coordinate system, firstly, the first mapping relationship between the image coordinate system where the product image is located and the area scan camera coordinate system, and the second mapping relationship between the area scan camera coordinate system and the base coordinate system are obtained.
[0123] Secondly, through the first and second mapping relationships, the first coordinate in the image coordinate system is transformed twice to obtain the coarse positioning coordinates corresponding to the first coordinate in the base coordinate system. Specifically, this includes: based on the first mapping relationship, mapping the first coordinate in the template image from the product image coordinate system to the area scan camera coordinate system to obtain the initial coarse positioning coordinates of the cutting point in the area scan camera coordinate system; then, based on the second mapping relationship, mapping the initial coarse positioning coordinates from the area scan camera coordinate system to the base coordinate system to obtain the coarse positioning coordinates of the cutting point in the base coordinate system.
[0124] Furthermore, the first mapping relationship between the image coordinate system and the area scan camera coordinate system is obtained through the internal parameters and height information of the area scan camera when converting a two-dimensional image to three dimensions.
[0125] In the above embodiments, through the first mapping relationship between the image coordinate system and the area scan camera coordinate system, and the second mapping relationship between the area scan camera coordinate system and the base coordinate system, the first coordinate of the cutting point in the image coordinate system can be transformed twice to obtain the coarse positioning coordinates of the cutting point in the base coordinate system, thereby realizing the approximate positioning of the cutting point by the area scan camera.
[0126] In an exemplary embodiment, mapping the second coordinates to the end coordinate system to obtain the third coordinates of the cutting point includes:
[0127] Obtain the third mapping relationship between the line scan camera coordinate system and the end coordinate system. Through the third mapping relationship, map the second coordinate from the line scan camera coordinate system to the end coordinate system to obtain the third coordinate of the cutting point in the end coordinate system.
[0128] Specifically, in order to obtain the mapping relationship between the end coordinate system and the base coordinate system, it is first necessary to obtain the coordinates of the cutting point in the end coordinate system and the base coordinate system respectively. Since the coordinates of the cutting point in the base coordinate system are coarse positioning coordinates, it is only necessary to obtain the coordinates of the cutting point in the end coordinate system.
[0129] The specific process of obtaining the coordinates of the cutting point in the end coordinate system includes: obtaining the third mapping relationship between the line scan camera coordinate system and the end coordinate system; and mapping the second coordinates of the cutting point, which are within a preset range of the origin of the line scan camera coordinate system, to the end coordinate system through the third mapping relationship to obtain the third coordinates of the cutting point in the end coordinate system.
[0130] In this embodiment, by obtaining the third mapping relationship between the line scan camera coordinate system and the end coordinate system, the third coordinate of the cutting point in the end coordinate system can be accurately determined, thereby obtaining the accurate mapping relationship between the end coordinate system and the base coordinate system, so as to further obtain the scanning coordinates of the line scan camera in the base coordinate system.
[0131] In an exemplary embodiment, determining the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinate and the coarse positioning coordinates includes:
[0132] Based on the third coordinate and the coarse positioning coordinate, the fourth mapping relationship between the end coordinate system and the base coordinate system is determined; based on the preset angle rotation matrix between the end coordinate system and the base coordinate system, and the fourth mapping relationship, the coordinate translation matrix between the end coordinate system and the base coordinate system is determined; based on the coordinate translation matrix, the scanning coordinates of the line scan camera in the base coordinate system are determined.
[0133] Specifically, the coarse positioning coordinates of the cutting point in the base coordinate system = the fourth mapping relationship between the end coordinate system and the base coordinate system * the third coordinate of the cutting point in the end coordinate system.
[0134] The third coordinate of the cutting point in the end coordinate system = the third mapping relationship between the line scan camera coordinate system and the end coordinate system * the second coordinate of the cutting point in the line scan camera coordinate system.
[0135] In other words, the mapping relationship between the coordinates of the cutting point in the base coordinate system and the line scan camera coordinate system is as follows:
[0136] The coarse positioning coordinates of the cutting point in the base coordinate system = the fourth mapping relationship between the end coordinate system and the base coordinate system * the third mapping relationship between the line scan camera coordinate system and the end coordinate system * the second coordinates of the cutting point in the line scan camera coordinate system.
[0137] Therefore, given the coarse positioning coordinates, the third mapping relationship, and the second coordinates, the fourth mapping relationship between the end coordinate system and the base coordinate system can be derived using the above formula.
[0138] Based on the third coordinate of the cutting point in the end coordinate system and the coarse positioning coordinate of the cutting point in the base coordinate system, the fourth mapping relationship between the end coordinate system and the base coordinate system is determined.
[0139] Since the line scan camera is mounted on the end effector of the robot, the fourth mapping relationship between the end effector coordinate system and the base coordinate system is determined by the angle rotation matrix of the line scan camera and the coordinate translation matrix of the line scan camera.
[0140] The angle rotation matrix is typically a 3x3 matrix, while the coordinate translation matrix is typically a 3x1 matrix. The angle rotation matrix is pre-determined by the teaching robot. For example, if the product to be cut has two cutting directions—horizontal and vertical—the preset scanning angle of the line scan camera needs to be able to scan the point cloud along these two cutting directions. The line scan camera emits a laser during scanning, and the laser range is the scanning range of the line scan camera. Since the laser range is a straight line, the teaching robot aligns the laser emitted by the line scan camera with the two cutting directions and records the current angles rx, ry, and rz at the end of the robot arm. These current angles at the end of the teaching robot arm are then used to determine the angle rotation matrix of the line scan camera.
[0141] Based on the angle rotation matrix of the line scan camera and the fourth mapping relationship between the end coordinate system and the base coordinate system, the coordinate translation matrix of the line scan camera is determined, and then based on the coordinate translation matrix, the scanning coordinates of the line scan camera in the robot base coordinate system are determined.
[0142] In the above embodiments, the fourth mapping relationship between the human end coordinate system and the base coordinate system is determined by the third coordinate and the coarse positioning coordinate. Then, based on the preset angle rotation matrix between the end coordinate system and the base coordinate system and the fourth mapping relationship, the coordinate translation matrix between the end coordinate system and the base coordinate system is determined, thereby determining the scanning coordinates of the line scan camera in the base coordinate system, which improves the accuracy of fine positioning of the line scan camera.
[0143] In an exemplary embodiment, the fourth coordinate obtained by scanning the cutting point at the scanning coordinates using a line scan camera is mapped to the base coordinate system to obtain the fifth coordinate, including:
[0144] Through the third mapping relationship, the fourth coordinate obtained by scanning the cutting point at the scanning coordinate of the line scan camera is mapped from the line scan camera coordinate system to the end coordinate system to obtain the initial fifth coordinate of the cutting point in the end coordinate system; through the fourth mapping relationship, the initial coordinate is mapped from the end coordinate system to the base coordinate system to obtain the fifth coordinate of the cutting point in the base coordinate system.
[0145] The third mapping relationship is the mapping relationship between the line scan camera coordinate system and the end coordinate system, and the fourth mapping relationship is the mapping relationship between the end coordinate system and the base coordinate system.
[0146] Specifically, the fourth coordinate is obtained by scanning the cutting point at the scanning coordinates using the line scan camera. Since the line scan camera is mounted on the end effector of the robot arm, and the relationship between the camera and the robot is that the hand is above the eye, the fourth coordinate cannot be directly mapped to the base coordinate system; the end effector coordinate system is also required.
[0147] In other words, by mapping the coordinate system between the line scan camera and the end coordinate system, the fourth coordinate is mapped from the line scan camera coordinate system to the end coordinate system to obtain the initial fifth coordinate of the cutting point in the end coordinate system. Then, the initial fifth coordinate is mapped from the end coordinate system to the base coordinate system to obtain the fifth coordinate of the cutting point in the base coordinate system.
[0148] For example, let the line scan camera scan the cutting point at the scanning coordinates, and the fourth coordinate obtained is:
[0149] The third mapping relationship between the line scan camera coordinate system and the end-effector coordinate system is:
[0150]
[0151] The fourth mapping relationship between the end coordinate system and the base coordinate system is:
[0152]
[0153] in, This is the angle rotation matrix during line scanning by the camera. This is the coordinate translation matrix during line scanning by the camera.
[0154] Let the fifth coordinate of the cutting point in the base coordinate system be... At this point, we can obtain the following expression: .
[0155] In the above embodiments, by using the mapping relationship between the line scan camera coordinate system and the end coordinate system, and the mapping relationship between the end coordinate system and the base coordinate system, the fourth coordinate can be transformed twice to accurately obtain the fifth coordinate of the cutting point in the base coordinate system.
[0156] In a specific application embodiment, the hardware devices used in the cutting trajectory determination process of this application include: an area scan camera, a line scan camera, a 6-axis robotic arm on a robot, a cutting gun, and other components. The area scan camera is fixed to a support and used for coarse positioning of the cutting point, maintaining an "eye-to-hand" relationship with the robotic arm. The line scan camera is fixed to the end of the robotic arm and used for fine positioning of the cutting point, maintaining an "eye-to-hand" relationship with the robotic arm. The cutting gun is fixed to the end of the robotic arm and used to perform the cutting operation.
[0157] The following example uses a steel plate as the product to be cut. The process of cutting the steel plate using the aforementioned hardware equipment includes:
[0158] S1, Determining the coordinates of the cutting points on the image.
[0159] Multiple template images of the steel plate are obtained. At this time, the same part on each template image is drawn with the same color, and different parts are drawn with different colors.
[0160] For each template image, a connected component analysis is performed to determine the borders of each part in the template image. The intersections of each part border with the grid of the template image are marked. The line segments between two adjacent intersections that do not belong to the same part are determined as initial dividing lines. Target dividing lines with lengths that meet the preset length range are selected from the initial dividing lines. Multiple cutting points are selected from the target dividing lines, and the initial first coordinates of each cutting point are determined.
[0161] S2, Coarse Positioning Stage.
[0162] The steel plate is photographed by an area array camera on the bracket to obtain an actual image of the steel plate. A target template image that matches the actual steel plate image is determined from multiple template images. The initial first coordinates of multiple cutting points in the target template image are mapped to the product image to obtain the first coordinates of multiple cutting points in the product image.
[0163] For each cutting point, based on the first mapping relationship between the image coordinate system and the area scan camera coordinate system, the first coordinates of the cutting point in the product image are mapped to the area scan camera coordinate system to obtain the initial coarse positioning coordinates of the cutting point in the area scan camera coordinate system. Then, based on the second mapping relationship between the area scan camera coordinate system and the base coordinate system, the initial coarse positioning coordinates are mapped from the area scan camera coordinate system to the base coordinate system to obtain the coarse positioning coordinates of the cutting point in the base coordinate system.
[0164]
[0165] S3, Scan Coordinate Determination Stage.
[0166] Obtain the second coordinates of multiple cutting points located in the line scan camera coordinate system: And the fourth mapping relationship between the end coordinate system and the base coordinate system:
[0167] Among them, A 3x3 It is the angle rotation matrix during scanning by the line scan camera, B 3x1 It is the coordinate translation matrix during the scanning process of the line scan camera.
[0168] The third mapping relationship between the known line scan camera and the end coordinate system In the following circumstances:
[0169] The following expression exists:
[0170]
[0171] in, .
[0172] Assume the second coordinate is the coordinate of the cutting point near the origin of the line scan camera coordinate system, i.e., the second coordinate:
[0173]
[0174] Then we have the following expression:
[0175]
[0176] at this time,
[0177]
[0178]
[0179] Expanding, we get: .
[0180] And the known angular rotation matrix of the line scan camera in the base coordinate system is: .
[0181] Based on the angle rotation matrix, the coordinate translation matrix is further obtained:
[0182]
[0183] S4, fine positioning stage.
[0184] Based on the coordinate translation matrix, the line scan camera is moved to the scanning coordinates so that it can scan the edges of parts and scrap on the steel plate. This typically yields three segments of point cloud data, namely two segments of zeros.
[0185] Using the point cloud data of the component and the point cloud data of a section of waste material outline, determine the fourth coordinate of the cutting point: Obtain the third mapping relationship between the line scan camera coordinate system and the end-effector coordinate system. And the fourth mapping relationship between the end coordinate system and the base coordinate system. :
[0186]
[0187]
[0188] The expression for obtaining the fifth coordinate of the cutting point in the base coordinate system is as follows:
[0189]
[0190] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0191] Based on the same inventive concept, this application also provides a cutting trajectory determining device for implementing the cutting trajectory determining method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more cutting trajectory determining device embodiments provided below can be found in the limitations of the cutting trajectory determining method described above, and will not be repeated here.
[0192] In one exemplary embodiment, such as Figure 7 As shown, a cutting trajectory determination device 700 is provided, applied to a robot equipped with a wired scanning camera; it includes: an acquisition module 100, a primary positioning module 200, a processing module 300, a scanning coordinate positioning module 400, a secondary positioning module 500, and a trajectory determination module 600, wherein:
[0193] The acquisition module 100 is used to acquire the first coordinates of multiple cutting points in the product image of the product to be cut, and the second coordinates of multiple cutting points located within a preset range of the origin in the coordinate system of the line scan camera;
[0194] The coarse positioning module 200 is used to map the first coordinate to the base coordinate system for each cutting point to obtain the coarse positioning coordinates of the cutting point.
[0195] Processing module 300 is used to map the second coordinates to the end coordinate system to obtain the third coordinates of the cutting point;
[0196] The scanning coordinate positioning module 400 is used to determine the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinate and the coarse positioning coordinates;
[0197] The precision positioning module 500 is used to map the fourth coordinate obtained by the line scan camera at the scanning coordinates and the scanning cutting point to the base coordinate system to obtain the fifth coordinate.
[0198] The trajectory determination module 600 is used to collect the fifth coordinates of multiple cutting points to obtain the cutting trajectory of the product to be cut.
[0199] In one embodiment, the acquisition module 100 is used to acquire multiple template images and a product image of the product to be cut, determine the initial first coordinates of multiple cutting points in each template image; match the multiple template images with the product image to determine the target template image that matches the product image, and map the initial first coordinates of multiple cutting points in the target template image to the product image to obtain the first coordinates of multiple cutting points in the product image.
[0200] In one embodiment, the acquisition module 100 is further configured to perform connected component analysis on each template image, determine the border of each part in the template image, mark the intersection of each part border with the grid of the template image, determine the line segment between two adjacent intersections that do not belong to the same part as the initial dividing line, filter out the target dividing line whose length meets the preset length range from the initial dividing line, filter out multiple cutting points from the target dividing line, and determine the initial first coordinate of each cutting point.
[0201] In one embodiment, the primary positioning module 200 is further configured to obtain a first mapping relationship between the image coordinate system and the area scan camera coordinate system, and a second mapping relationship between the area scan camera coordinate system and the base coordinate system. The area scan camera coordinate system is the coordinate system of the area scan camera that captures the product image. Based on the first mapping relationship, the first coordinates are mapped from the image coordinate system to the area scan camera coordinate system to obtain the initial coarse positioning coordinates of the cutting point in the area scan camera coordinate system. Based on the second mapping relationship, the initial coarse positioning coordinates are mapped from the area scan camera coordinate system to the base coordinate system to obtain the coarse positioning coordinates of the cutting point in the base coordinate system.
[0202] In one embodiment, the processing module 300 is further configured to obtain a third mapping relationship between the line scan camera coordinate system and the end coordinate system, and through the third mapping relationship, map the second coordinate from the line scan camera coordinate system to the end coordinate system to obtain the third coordinate of the cutting point in the end coordinate system.
[0203] In one embodiment, the scanning coordinate positioning module 400 is further configured to determine a fourth mapping relationship between the end coordinate system and the base coordinate system based on the third coordinate and the coarse positioning coordinate, determine a coordinate translation matrix between the end coordinate system and the base coordinate system based on the preset angle rotation matrix between the end coordinate system and the base coordinate system and the fourth mapping relationship, and determine the scanning coordinates of the line scan camera in the base coordinate system according to the coordinate translation matrix.
[0204] In one embodiment, the secondary positioning module 500 is further configured to map the fourth coordinates obtained by scanning the cutting point at the scanning coordinates of the line scan camera from the line scan camera coordinate system to the end coordinate system through the third mapping relationship, thereby obtaining the initial fifth coordinates of the cutting point in the end coordinate system. The initial coordinates are then mapped from the end coordinate system to the base coordinate system through the fourth mapping relationship, thereby obtaining the fifth coordinates of the cutting point in the base coordinate system.
[0205] Each module in the aforementioned cutting trajectory determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0206] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores various coordinate data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When executed by the processor, the computer program implements a method for determining a cutting trajectory.
[0207] Those skilled in the art will understand that Figure 8 The structure shown is a block diagram of a partial structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0208] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0209] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0210] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0211] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0212] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0213] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for determining a cutting trajectory, characterized in that, Applied to a robot equipped with a wired scanning camera; the method includes: Obtain the first coordinates of multiple cutting points in the product image of the product to be cut, and the second coordinates of multiple cutting points located within a preset range of the origin in the coordinate system of the line scan camera; For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the coarse positioning coordinates of the cutting point; The second coordinate is mapped to the end coordinate system to obtain the third coordinate of the cutting point; Based on the third coordinate and the coarse positioning coordinate, the scanning coordinates of the line scan camera in the base coordinate system are determined; The fourth coordinate obtained by scanning the cutting point at the scanning coordinates using the line scan camera is mapped to the base coordinate system to obtain the fifth coordinate. The fifth coordinates of multiple cutting points are collected to obtain the cutting trajectory of the product to be cut.
2. The method according to claim 1, characterized in that, The step of obtaining the first coordinates of multiple cutting points in the product image of the product to be cut includes: Obtain multiple template images and product images of the product to be cut; From the multiple template images, a target template image that matches the product image is selected; Determine the initial first coordinates of multiple cutting points in the target template image; The initial first coordinates of multiple cutting points in the target template image are mapped to the product image to obtain the first coordinates of multiple cutting points in the product image.
3. The method according to claim 2, characterized in that, Determining the initial first coordinates of multiple cutting points in the target template image includes: Perform connected component analysis on the target template image to determine the borders of each part in the target template image; Mark the intersection points of the outlines of each part with the grid of the target template image; The line segment between two adjacent intersection points that do not belong to the same part is defined as the initial dividing line; Select target dividing lines whose lengths meet the preset length range from the initial dividing lines; Multiple cutting points are selected from the target dividing line, and the initial first coordinates of each cutting point are determined.
4. The method according to claim 1, characterized in that, The step of mapping the first coordinates to the base coordinate system to obtain the coarse positioning coordinates of the cutting point includes: Obtain the first mapping relationship between the image coordinate system and the area scan camera coordinate system, and the second mapping relationship between the area scan camera coordinate system and the base coordinate system, wherein the area scan camera coordinate system is the coordinate system of the area scan camera that captures the product image; Based on the first mapping relationship, the first coordinates are mapped from the image coordinate system to the area array camera coordinate system to obtain the initial coarse positioning coordinates of the cutting point in the area array camera coordinate system; Based on the second mapping relationship, the initial coarse positioning coordinates are mapped from the area array camera coordinate system to the base coordinate system to obtain the coarse positioning coordinates of the cutting point in the base coordinate system.
5. The method according to claim 1, characterized in that, The step of mapping the second coordinates to the end coordinate system to obtain the third coordinates of the cutting point includes: Obtain the third mapping relationship between the line scan camera coordinate system and the end coordinate system; Through the third mapping relationship, the second coordinates are mapped from the line scan camera coordinate system to the end coordinate system to obtain the third coordinates of the cutting point in the end coordinate system.
6. The method according to claim 5, characterized in that, Determining the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinate and the coarse positioning coordinate includes: Based on the third coordinate and the coarse positioning coordinate, a fourth mapping relationship between the end coordinate system and the base coordinate system is determined; Based on the preset angle rotation matrix between the end coordinate system and the base coordinate system, and the fourth mapping relationship, the coordinate translation matrix between the end coordinate system and the base coordinate system is determined; The scanning coordinates of the line scan camera in the base coordinate system are determined based on the coordinate translation matrix.
7. The method according to claim 6, characterized in that, The step of mapping the fourth coordinate obtained by scanning the cutting point at the scanning coordinates using the line scan camera to the base coordinate system to obtain the fifth coordinate includes: Through the third mapping relationship, the fourth coordinate obtained by the line scan camera scanning the cutting point at the scanning coordinate is mapped from the line scan camera coordinate system to the end coordinate system to obtain the initial fifth coordinate of the cutting point in the end coordinate system; The initial coordinates are mapped from the end coordinate system to the base coordinate system through the fourth mapping relationship, thereby obtaining the fifth coordinate of the cutting point in the base coordinate system.
8. A cutting trajectory determining device, characterized in that, Applied to a robot, the robot is equipped with a wired scanning camera; the device includes: The acquisition module is used to acquire the first coordinates of multiple cutting points in the product image of the product to be cut, and the second coordinates of multiple cutting points located within a preset range of the origin in the coordinate system of the line scan camera; The coarse positioning module is used to map the first coordinates to the base coordinate system for each cutting point to obtain the coarse positioning coordinates of the cutting point. The processing module is used to map the second coordinates to the end coordinate system to obtain the third coordinates of the cutting point; The scanning coordinate positioning module is used to determine the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinate and the coarse positioning coordinate; The precision positioning module is used to map the fourth coordinate obtained by the line scanning camera scanning the cutting point at the scanning coordinates to the base coordinate system to obtain the fifth coordinate; The trajectory determination module is used to collect the fifth coordinates of multiple cutting points to obtain the cutting trajectory of the product to be cut.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Product detection track determination method and device
CN116309285A
Welding seam grinding track planning method based on three-dimensional point cloud
CN117226855A