Cutting track determination method and device, computer equipment and readable medium
The line scanning camera is equipped with a robot to coarsely position and precisely position the cutting products to be cut, and the cutting trajectory is determined, which solves the problem of inaccurate cutting trajectory in the prior art, and improves the separation efficiency and cutting accuracy of parts and waste.
Patent Information
- Application Number
- CN202411331699.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The existing cutting trajectory determination method cannot achieve accurate cutting of products, resulting in difficult to effectively separate parts and waste materials, affecting sorting efficiency.
The line scanning camera is equipped with a robot. By obtaining the coordinates of multiple cutting points in the product image of the product to be cut, coarse positioning and precise positioning, the scanning coordinates of the line scanning camera under the base coordinate system are determined, and the cutting trajectory is accurately obtained.
More accurate cutting trajectory determination is achieved, the separation efficiency between parts and waste is improved, and the accuracy of the cutting process is ensured.
Smart Images

Figure CN119304861A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic control technology, and in particular to a cutting trajectory determination method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] In the process of sorting and unloading the parts that have been cut from the product, it is often the case that the parts and the waste of the product are not completely cut off and partially adhere to each other, so that the robot will grab the parts and the waste of the product at the same time during sorting, resulting in the failure of the parts grabbing. Therefore, it is particularly important to find a method to accurately cut the product to better separate the parts and the waste of the product.
[0003] In traditional technology, taking steel plate as an example, the steel plate template is generally obtained, and the part cutting track of each part is designed on the steel plate template, and the part cutting track cannot be designed inside each part. Then, according to the part cutting track on the steel plate template, the actual steel plate is cut to separate the parts and steel plate waste.
[0004] However, current cutting trajectory determination methods still cannot achieve accurate cutting. Summary of the invention
[0005] Based on this, it is necessary to provide an accurate cutting trajectory determination method, device, computer equipment, computer readable storage medium and computer program product to address the above technical problems.
[0006] In a first aspect, the present application provides a cutting trajectory determination method, which is applied to a robot equipped with a wired scanning camera; comprising:
[0007] Acquire first coordinates of a plurality of cutting points in a product image of a product to be cut, and second coordinates of a plurality of cutting points located within a preset range of an origin in a line scan camera coordinate system;
[0008] For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the rough 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 rough positioning coordinate, determine the scanning coordinate of the line scan camera in the base coordinate system;
[0011] The fourth coordinate obtained by scanning the cutting point with the line scan camera at the scanning coordinate is mapped to the base coordinate system to obtain the fifth coordinate;
[0012] The fifth coordinates of multiple cutting points are collected to obtain the cutting trajectory of the product to be cut.
[0013] In one embodiment, obtaining first coordinates of a plurality of cutting points in a product image of a product to be cut includes:
[0014] Acquire multiple template images and product images of products to be cut;
[0015] Filter out a target template image that matches the product image from multiple template images;
[0016] Determining initial first coordinates of a plurality of cutting points in the target template image;
[0017] The initial first coordinates of the plurality of cutting points in the target template image are mapped to the product image to obtain the first coordinates of the plurality of cutting points in the product image.
[0018] In one embodiment, determining initial first coordinates of a plurality of cutting points in a target template image includes:
[0019] Performing connected domain analysis on the target template image to determine the bounding boxes of each part in the target template image;
[0020] Mark the intersection of each part border and the grid of the target template image;
[0021] Determine the line segment between two adjacent intersection points that do not belong to the same part as the initial segmentation line;
[0022] Filter out target segmentation lines whose lengths meet a preset length range from the initial segmentation lines;
[0023] A plurality of cutting points are selected from the target segmentation line, and an initial first coordinate of each cutting point is determined.
[0024] In one embodiment, mapping the first coordinate to the base coordinate system to obtain the rough positioning coordinates of the cutting point includes:
[0025] Acquire a first mapping relationship between an image coordinate system and an area array camera coordinate system, and a second mapping relationship between the area array camera coordinate system and a base coordinate system, wherein the area array camera coordinate system is a coordinate system of an area array camera that captures product images;
[0026] Based on the first mapping relationship, the first coordinate is mapped from the image coordinate system to the area array camera coordinate system to obtain the initial rough 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 coordinate to the end coordinate system to obtain the third coordinate of the cutting point includes:
[0029] Acquire a third mapping relationship between the line scan camera coordinate system and the terminal coordinate system;
[0030] Through the third mapping relationship, the second coordinate is mapped from the line scan camera coordinate system to the terminal coordinate system to obtain the third coordinate of the cutting point in the terminal 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] Determine a fourth mapping relationship between the terminal coordinate system and the base coordinate system based on the third coordinate and the rough positioning coordinate;
[0033] Determine a coordinate translation matrix between the terminal coordinate system and the base coordinate system based on a preset angle rotation matrix between the terminal coordinate system and the base coordinate system and a fourth mapping relationship;
[0034] According to the coordinate translation matrix, the scanning coordinates of the line scan camera in the base coordinate system are determined.
[0035] In one embodiment, the fourth coordinate obtained by scanning the cutting point by the line scan camera at the scanning coordinate is mapped to the base coordinate system to obtain the fifth coordinate, including:
[0036] Through the third mapping relationship, the fourth coordinate obtained by scanning the cutting point by the line scan camera at the scanning coordinate is mapped from the line scan camera coordinate system to the terminal coordinate system to obtain the initial fifth coordinate of the cutting point in the terminal coordinate system;
[0037] Through the fourth mapping relationship, the initial coordinates are mapped from the terminal coordinate system to the base coordinate system to obtain the fifth coordinates of the cutting point in the base coordinate system.
[0038] In a second aspect, the present application further provides a cutting trajectory determination device, which is applied to a robot equipped with a wired scanning camera; comprising:
[0039] An acquisition module, used to acquire first coordinates of a plurality of cutting points in a product image of a product to be cut, and second coordinates of a plurality of cutting points located within a preset range of an origin in a line scan camera coordinate system;
[0040] A coarse positioning module is used to map the first coordinate to the base coordinate system for each cutting point to obtain the coarse positioning coordinate of the cutting point;
[0041] A processing module, used for mapping the second coordinate into the terminal coordinate system to obtain the third coordinate of the cutting point;
[0042] A 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 rough positioning coordinate;
[0043] A precise positioning module is used to map the fourth coordinate obtained by scanning the cutting point at the scanning coordinate by the line scan camera 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] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0046] Acquire first coordinates of a plurality of cutting points in a product image of a product to be cut, and second coordinates of a plurality of cutting points located within a preset range of an origin in a line scan camera coordinate system;
[0047] For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the rough 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 rough positioning coordinate, determine the scanning coordinate of the line scan camera in the base coordinate system;
[0050] The fourth coordinate obtained by scanning the cutting point with the line scan camera at the scanning coordinate is mapped to the base coordinate system to obtain the fifth coordinate;
[0051] The fifth coordinates of multiple cutting points are collected to obtain the cutting trajectory of the product to be cut.
[0052] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0053] Acquire first coordinates of a plurality of cutting points in a product image of a product to be cut, and second coordinates of a plurality of cutting points located within a preset range of an origin in a line scan camera coordinate system;
[0054] For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the rough 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 rough positioning coordinate, determine the scanning coordinate of the line scan camera in the base coordinate system;
[0057] The fourth coordinate obtained by scanning the cutting point with the line scan camera at the scanning coordinate is mapped to the base coordinate system to obtain the fifth coordinate;
[0058] The fifth coordinates of multiple cutting points are collected to obtain the cutting trajectory of the product to be cut.
[0059] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0060] Acquire first coordinates of a plurality of cutting points in a product image of a product to be cut, and second coordinates of a plurality of cutting points located within a preset range of an origin in a line scan camera coordinate system;
[0061] For each cutting point, the first coordinate is mapped to the base coordinate system to obtain the rough 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 rough positioning coordinate, determine the scanning coordinate of the line scan camera in the base coordinate system;
[0064] The fourth coordinate obtained by scanning the cutting point with the line scan camera at the scanning coordinate is mapped to the base coordinate system to obtain the fifth coordinate;
[0065] The fifth coordinates of multiple cutting points are collected to obtain the cutting trajectory of the product to be cut.
[0066] The above-mentioned cutting trajectory determination method, device, computer equipment, computer-readable storage medium and computer program product are applied to a robot equipped with a wired scanning camera; different from the traditional technology of directly mapping the cutting points in the product image of the product to be cut to the base coordinate system, it provides a more accurate cutting trajectory determination method. Specifically, firstly, the coordinates of each cutting point are roughly positioned, that is, the first coordinates of multiple cutting points in the product image of the product to be cut are mapped to the base coordinate system to obtain the rough positioning coordinates of the cutting points; secondly, the second coordinates of multiple cutting points in the line scan camera coordinate system are mapped to the terminal coordinate system to obtain the third coordinates of the cutting points, and then the rough positioning coordinates of the cutting points in the base coordinate system determined during the rough positioning and the third coordinates in the terminal coordinate system are combined to accurately determine the scanning coordinates of the line scan camera in the base coordinate system during the fine positioning. Since the scanning coordinates at this time are the coordinates that the line scan camera can accurately scan in the base coordinate system, the fourth coordinates obtained by scanning the cutting points at the scanning coordinates by the line scan camera are mapped to the base coordinate system based on the scanning coordinates to obtain the fifth coordinates. This process is also more accurate, and then the fifth coordinates of multiple cutting points after fine positioning are summarized to obtain a more accurate target cutting trajectory. In the whole process, a more accurate cutting trajectory can be obtained by performing two positioning operations of coarse positioning and fine positioning on multiple cutting points in the product image. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0068] FIG1 is a diagram showing an application environment of a method for determining a cutting trajectory in one embodiment;
[0069] Figure 2 A schematic diagram of a flow chart of a method for determining a cutting trajectory in one embodiment;
[0070] Figure 3 A schematic diagram of three segments of point cloud data obtained when a product to be cut is scanned by a line scan camera in one embodiment;
[0071] Figure 4 A schematic flow chart of a method for determining a cutting trajectory in another embodiment;
[0072] Figure 5 A schematic diagram of a target template image of a product to be cut in one embodiment;
[0073] Figure 6is a schematic diagram of a target segmentation line in a target template image in one embodiment;
[0074] Figure 7 It is a structural block diagram of a cutting trajectory determination device in one embodiment;
[0075] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are used to explain the present application and are not used to limit the present application.
[0077] The cutting trajectory determination method provided in the embodiment of the present application can be applied to the application environment as shown in Figure 1. Among them, the robot 102 is equipped with a line scan camera 104. The coordinate system corresponding to the line scan camera 104 when shooting is the line scan camera coordinate system, and the line scan camera coordinate system refers to the coordinate system established on the line scan camera. The robot 102 has two coordinate systems, one is the end coordinate system, which refers to the tool coordinate system installed at the end of the robot. The origin and direction of the end coordinate system change with the end position and angle; the other is the base coordinate system, which is a rectangular coordinate system based on the robot mounting base and used to describe the movement of the robot body.
[0078] When cutting the product to be cut, the robot 102 first obtains a product image of the product to be cut 106. A plurality of cutting points in the template image and a first coordinate of each cutting point are determined.
[0079] The line scan camera 106 takes a picture of the cutting points of the product to be cut 106 , and obtains the second coordinates of a plurality of cutting points of the product to be cut that are within a preset range of the origin in the line scan camera coordinate system. The line scan camera 106 sends the second coordinates to the robot 102 .
[0080] For each cutting point, the robot 102 maps the first coordinate to the base coordinate system to obtain the rough positioning coordinate of the cutting point; maps the second coordinate to the terminal coordinate system to obtain the third coordinate of the cutting point; determines the scanning coordinate of the line scan camera in the base coordinate system based on the third coordinate and the rough positioning coordinate; maps the fourth coordinate obtained by scanning the cutting point at the scanning coordinate by the line scan camera to the base coordinate system to obtain the fifth coordinate; and collects the fifth coordinates of multiple cutting points to obtain the cutting trajectory of the product to be cut. The robot 102 cuts the product to be cut 106 according to the cutting trajectory of the product to be cut 106.
[0081] In an exemplary embodiment, Figure 2As shown, a method for determining a cutting trajectory is provided, and the method is applied to the robot 102 in FIG. 1 as an example for explanation, and the robot is equipped with a wire-scanning camera.
[0082] S100, obtaining first coordinates of a plurality of cutting points in a product image of a product to be cut, and second coordinates of a plurality of cutting points located within a preset range of an origin in a line scan camera coordinate system.
[0083] Among them, there are at least two cutting points, namely, the cutting start point and the cutting end point. The hardware device of the cutting trajectory determination method includes a line scan camera, a robot, a cutting gun and other components. The line scan camera is fixed at the end of the robot's robotic arm and is used for the precise positioning of the cutting point of the product to be cut. The line scan camera and the robot's robotic arm are in the same relationship as the eye on the hand.
[0084] Specifically, a product image of the product to be cut is obtained, multiple cutting points of the product to be cut are planned in the product image, and the first coordinates of each cutting point are determined. The first coordinates at this time are in the image coordinate system of the product image. Further, the second coordinates of multiple cutting points in the product to be cut that are located within a preset range of the origin of the line scan camera coordinate system are obtained. The second coordinates are assumed coordinates of the cutting points within a preset range of the origin of the line scan camera coordinate system, and are not real coordinates. That is, assuming that the cutting points are near the origin of the line scan camera coordinate system, the second coordinates are obtained. For example, the matrix form of the second coordinates can be as follows:
[0085]
[0086] Among them, P1, P2, and P3 are the x-, y-, and z-axis coordinates of the cutting point near the origin of the line scan camera coordinate system.
[0087] S200, for each cutting point, mapping the first coordinate to the base coordinate system to obtain the rough positioning coordinates of the cutting point.
[0088] Specifically, all cutting points in the product image of the product to be cut are traversed in sequence. 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 rough positioning coordinate of the cutting point in the base coordinate system. The rough positioning coordinate at this time has an error of several millimeters with the actual coordinate of the cutting point in the base coordinate system.
[0089] S300, mapping the second coordinate to the end coordinate system to obtain the third coordinate of the cutting point.
[0090] Specifically, since there is still a certain error in the rough positioning coordinates, and the 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 rough positioning coordinates of the cutting point in the base coordinate system to obtain the precise positioning coordinates of the cutting point in the base coordinate system.
[0091] The process of secondary positioning requires the participation of the line scan camera, that is, the line scan camera is required to scan the cutting point more accurately. Therefore, the scanning coordinates of the line scan camera need to be obtained first. Since the scanning coordinates of the line scan camera are essentially the translation coordinates of the second coordinates of multiple cutting points within a preset range relative to the origin of the line scan camera coordinate system, they can be determined based on the mapping relationship between the terminal coordinate system and the base coordinate system. Therefore, the second coordinates can be mapped to the terminal coordinate system to obtain the third coordinates of the cutting point in the terminal coordinate system, so as to further determine the mapping relationship between the terminal coordinate system and the base coordinate system.
[0092] S400: Determine the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinates and the coarse positioning coordinates.
[0093] Specifically, the coarse positioning coordinates are the coordinates of the cutting point in the base coordinate system. Based on the third coordinates and the coarse positioning coordinates, the mapping relationship between the terminal coordinate system and the base coordinate system is determined. Then, based on the mapping relationship between the terminal coordinate system and the base coordinate system, the scanning coordinates of the line scan camera in the base coordinate system are determined.
[0094] S500, a fourth coordinate obtained by scanning the cutting point at the scanning coordinate by the line scan camera is mapped to the base coordinate system to obtain a fifth coordinate.
[0095] Specifically, when the line scan camera on the robot arm reaches the scanning coordinates, the line scan camera scans the parts and waste borders on the product to be cut. Generally, three segments of point cloud data can be obtained, 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 obtains the fourth coordinate of the cutting point identified in the three-segment point cloud, that is, the coordinate of the cutting point in the waste frame point cloud. Since the fourth coordinate is the accurate coordinate of the cutting point determined in the line scan camera coordinate system, the fourth coordinate is converted to the base coordinate system to obtain the fifth coordinate of the cutting point in the base coordinate system.
[0097] S600, collecting the fifth coordinates of the plurality of cutting points to obtain a cutting trajectory of the product to be cut.
[0098] Specifically, each cutting point is traversed, and the fifth coordinate acquisition process is performed to obtain the fifth coordinate of each cutting point. The fifth coordinates of multiple cutting points are aggregated to obtain the cutting trajectory of the product to be cut. The robot cuts the product to be cut along the cutting trajectory of the product to be cut.
[0099] Furthermore, the hardware device of the cutting trajectory determination method also includes a cutting gun. The cutting gun is fixed at the end of the robot 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-mentioned method for determining the cutting trajectory is applied to a robot equipped with a line scan camera; different from the conventional method of directly mapping the cutting points in the template image of the product to be cut to the base coordinate system, a more accurate method for determining the cutting trajectory is provided. Specifically, firstly, the coordinates of each cutting point are roughly positioned, that is, the first coordinates of multiple cutting points in the template image of the product to be cut are mapped to the base coordinate system to obtain the rough positioning coordinates of the cutting point; secondly, the second coordinates of multiple cutting points in the line scan camera coordinate system are mapped to the terminal coordinate system to obtain the third coordinates of the cutting point, and then the rough positioning coordinates of the cutting point in the base coordinate system determined during the rough positioning and the third coordinates in the terminal coordinate system are combined to accurately determine the scanning coordinates of the line scan camera in the base coordinate system during the fine positioning. Since the scanning coordinates at this time are the coordinates that the line scan camera can accurately scan in the base coordinate system, the fourth coordinates obtained by scanning the cutting point at the scanning coordinates by the line scan camera are mapped to the base coordinate system based on the scanning coordinates to obtain the fifth coordinates. This process is also more accurate, and then the fifth coordinates of multiple cutting points after fine positioning are summarized to obtain a more accurate target cutting trajectory. During the whole process, a more accurate cutting trajectory can be obtained by performing coarse positioning and fine positioning on multiple cutting points in the product image.
[0101] In an exemplary embodiment, Figure 4 As shown, S100, including:
[0102] S110, acquiring a plurality of template images and product images of products to be cut.
[0103] S120, screening out a target template image matching the product image from the multiple template images.
[0104] S130, determining initial first coordinates of a plurality of cutting points in the target template image.
[0105] S140, mapping the initial first coordinates of the plurality of cutting points in the target template image to the product image to obtain the first coordinates of the plurality of cutting points in the product image.
[0106] S150, obtaining second coordinates of a plurality of cutting points within a preset range of the origin of the line scan camera coordinate system.
[0107] The hardware device of the cutting trajectory determination method also includes an area array camera. The area array camera is fixed on a bracket outside the robot and is used for coarse positioning of the cutting point of the product to be cut. The area array camera has an eye-outside-hand relationship with the robot arm.
[0108] Specifically, multiple template images are obtained, and product images of the products to be cut are captured by an array camera. Then, each template image is matched with the product image by a template matching algorithm to determine a target template image that matches the product image. In practical applications, the template matching algorithm often samples the linemod template matching algorithm.
[0109] Further, the initial first coordinates of the multiple cutting points in each template image are determined, and the initial first coordinates of the multiple cutting points in the target template image are mapped to the product image to obtain the first coordinates of the multiple cutting points in the product image. That is, if the target template image and the product image have completely matched sizes, the initial first coordinates of the multiple cutting points in the target template image are directly determined as the first coordinates of the multiple cutting points in the product image; if the target template image and the product image have matched sizes in proportion, the initial first coordinates of the 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 the multiple cutting points in the product image.
[0110] In the above embodiment, a template matching algorithm is used to screen a target template image that matches the actual product image of the product to be cut, 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 initial first coordinates of a plurality of cutting points in a target template image includes:
[0112] For each target template image, a connected domain analysis is performed on the target template image to determine the bounding boxes of each part in the target template image, mark the intersections of each part bounding box and the grid of the target template image, and determine the line segment between two adjacent intersections that do not belong to the same part as the initial segmentation line; a target segmentation line whose length meets a preset length range is selected from the initial segmentation line, multiple cutting points are selected from the target segmentation line, and the initial first coordinate of each cutting point is determined.
[0113] The target template image includes a plurality of part frames, and different parts in the target template image need to be depicted using different colors, and the same parts are depicted using the same color.
[0114] Specifically, Figure 5 As shown, a target template image of a product to be cut is shown. The part data, border data, and cuttable space in the target template image are calculated. For example, a connected domain analysis is performed on the target template image to determine the information of each connected domain in the target template image. Each connected domain in the target template image is also the border information of the part.
[0115] Furthermore, a grid is generated in the template image with equal spacing in the row and column directions, and the intersections of each part border and the grid are marked. The line segment between two adjacent intersections that do not belong to the same part is determined as the initial segmentation line. At this time, the initial segmentation line is not necessarily the actual segmentation line, and the target segmentation line needs to be screened out from the initial segmentation line.
[0116] Considering the scanning range of one frame of data of the line scan camera, it is necessary to limit the length of the dividing line. Therefore, filtering out the target dividing line is actually filtering out the dividing line whose length meets the preset length range. In practical applications, the preset length range that the length meets can be determined according to the on-site situation. For example, when the initial dividing line of the vertical line and the initial dividing line of the horizontal line intersect, cutting one will affect the recognition of the other cutting line in the precise positioning. Therefore, only one dividing line can be retained in the intersecting initial dividing lines. At this time, a longer or shorter cutting line can be retained according to the on-site situation. If a longer dividing line is retained, the number of cutting times of the product to be cut can be reduced, but it is easy for the dividing line range to exceed the range of the line scan camera. If a shorter dividing line is retained, it is more conducive to the line scan camera to complete the scan, but increasing the number of cutting times often increases the risk of cutting parts.
[0117] Determine the target segmentation line in the target template image as follows Figure 6 A plurality of cutting points are selected from the selected target segmentation lines, and the selected cutting points at least include a cutting start point and a cutting end point, and an initial first coordinate of each cutting point in the template image coordinate system is determined.
[0118] In this embodiment, by performing a connected domain analysis on the target template image of the product to be cut, the initial segmentation line can be accurately determined by combining the connected domain 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 screened, and the target segmentation line whose length meets the preset length range can be screened out from the initial segmentation line, thereby determining the coordinates of multiple cutting points in the target segmentation line.
[0119] In an exemplary embodiment, mapping the first coordinate to the base coordinate system to obtain the rough positioning coordinates of the cutting point includes:
[0120] A first mapping relationship between the image coordinate system and the area array camera coordinate system, and a second mapping relationship between the area array camera coordinate system and the base coordinate system are obtained; based on the first mapping relationship, the first coordinate is 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.
[0121] The image coordinate system is the coordinate system of the product image to be cut. The area array camera coordinate system is the coordinate system of the area array camera that takes the product image. The area array camera and the robot are in a hand-eye calibration relationship where the eye is outside the hand. Therefore, the conversion between the area array camera coordinate system and the robot coordinate system can be performed directly.
[0122] Specifically, in order to map the first coordinate in the product image to the base coordinate system, first, a first mapping relationship between the image coordinate system of the product image and the area array camera coordinate system, and a second mapping relationship between the area array camera coordinate system and the base coordinate system are obtained.
[0123] Secondly, through the first mapping relationship and the second mapping relationship, 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, it includes: based on the first mapping relationship, the first coordinate in the template image is mapped from the product image coordinate system to the array camera coordinate system to obtain the initial coarse positioning coordinates of the cutting point in the array camera coordinate system; then based on the second mapping relationship, the initial coarse positioning coordinates are mapped from the array 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 array camera coordinate system is obtained by converting the two-dimensional image into three-dimensional information through the internal parameters and height information of the area array camera.
[0125] In the above embodiment, through the first mapping relationship between the image coordinate system and the area array camera coordinate system, and the second mapping relationship between the area array 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 rough positioning coordinates of the cutting point in the base coordinate system, thereby realizing the approximate positioning of the cutting point through the area array camera.
[0126] In an exemplary embodiment, mapping the second coordinate to the end coordinate system to obtain the third coordinate of the cutting point includes:
[0127] A third mapping relationship between the line scan camera coordinate system and the terminal coordinate system is obtained, and the second coordinate is mapped from the line scan camera coordinate system to the terminal coordinate system through the third mapping relationship to obtain the third coordinate of the cutting point in the terminal coordinate system.
[0128] Specifically, in order to obtain the mapping relationship between the end coordinate system and the base coordinate system, first, it is 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 terminal coordinate system includes: obtaining the third mapping relationship between the line scan camera coordinate system and the terminal coordinate system, and through the third mapping relationship, mapping the second coordinate of the cutting point within a preset range of the origin of the line scan camera coordinate system to the terminal coordinate system to obtain the third coordinate of the cutting point in the terminal coordinate system.
[0130] In this embodiment, by acquiring 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, and then the accurate mapping relationship between the end coordinate system and the base coordinate system can be obtained, 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, determine the fourth mapping relationship between the terminal coordinate system and the base coordinate system; based on the preset angle rotation matrix between the terminal coordinate system and the base coordinate system, and the fourth mapping relationship, determine the coordinate translation matrix between the terminal coordinate system and the base coordinate system; according to the coordinate translation matrix, determine the scanning coordinates of the line scan camera in the base coordinate system.
[0133] Specifically, the rough positioning coordinates of the cutting point in the base coordinate system=the fourth mapping relationship between the terminal coordinate system and the base coordinate system*the third coordinates of the cutting point in the terminal 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] That is to say, 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 rough 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, when the coarse positioning coordinates, the third mapping relationship, and the second coordinates are known, the fourth mapping relationship between the terminal coordinate system and the base coordinate system can be derived according to the above formula.
[0138] Based on the third coordinate of the cutting point in the terminal coordinate system and the coarse positioning coordinate of the cutting point in the base coordinate system, a fourth mapping relationship between the terminal coordinate system and the base coordinate system is determined.
[0139] Since the line scan camera is mounted at the end of the robot, the fourth mapping relationship between the end 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] Among them, the angle rotation matrix is generally a matrix of three rows and three columns, and the coordinate translation matrix is generally a matrix of three rows and one column. The angle rotation matrix is determined in advance by the teaching robot. For example, the cutting of the product to be cut has two cutting directions: horizontal cutting and vertical cutting. The preset shooting angle of the line scan camera needs to be able to scan the point cloud in these two cutting directions. The line scan camera emits a laser when 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 makes the laser emitted by the line scan camera parallel to the two cutting directions and records the current angles rx, ry and rz of the end of the teaching robot's robot arm. The current angle of the end of the teaching robot arm is determined as the angle rotation matrix of the line scan camera.
[0141] Based on the angular rotation matrix of the line scan camera, the fourth mapping relationship between the terminal 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 embodiment, the fourth mapping relationship between the human terminal coordinate system and the base coordinate system is determined through the third coordinate and the coarse positioning coordinate, and then based on the preset angle rotation matrix between the terminal coordinate system and the base coordinate system, and the fourth mapping relationship, the coordinate translation matrix between the terminal coordinate system and the base coordinate system is determined, and then the scanning coordinates of the line scan camera in the base coordinate system are determined, thereby improving the accuracy of precise positioning of the line scan camera.
[0143] In an exemplary embodiment, the fourth coordinate obtained by scanning the cutting point by the line scan camera at the scanning coordinate 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 by the line scan camera 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; 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 a mapping relationship between the line scan camera coordinate system and the terminal coordinate system, and the fourth mapping relationship is a mapping relationship between the terminal coordinate system and the base coordinate system.
[0146] Specifically, the fourth coordinate obtained by scanning the cutting point at the scanning coordinates of the line scan camera is obtained. Since the line scan camera is mounted at the end of the robot arm, the relationship between the line scan camera and the robot is like the hand over the eye. Therefore, the fourth coordinate cannot be directly mapped to the base coordinate system, and the participation of the end coordinate system is also required.
[0147] That is to say, through the mapping relationship between the line scan camera coordinate system 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, and 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 be at the scanning coordinate, and the fourth coordinate obtained by scanning the cutting point is:
[0149] The third mapping relationship between the line scan camera coordinate system and the terminal coordinate system is:
[0150]
[0151] The fourth mapping relationship between the end coordinate system and the base coordinate system is:
[0152]
[0153] in, is the angle rotation matrix of the line scan camera when scanning, It is the coordinate translation matrix of the line scan camera when scanning.
[0154] Let the fifth coordinate of the cutting point in the base coordinate system be , then we can get the following expression: .
[0155] In the above embodiment, through 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 equipment used in the cutting trajectory determination process of the present application includes: an area array camera, a line scan camera, a 6-axis robot arm on a robot, a cutting gun and other components. Among them, the area array camera is fixed on the bracket and is used for the rough positioning of the cutting point, and its relationship with the robot arm is like an eye outside the hand. The line scan camera is fixed at the end of the robot arm and is used for the precise positioning of the cutting point, and its relationship with the robot arm is like an eye on the hand. The cutting gun is fixed at the end of the robot arm and is used to perform cutting operations.
[0157] Taking the steel plate as an example, the steel plate cutting process is performed by the above hardware equipment, including:
[0158] S1, the stage of determining the coordinates of the cutting points on the image.
[0159] A plurality of template images of the steel plate are obtained, and 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 domain analysis is performed on the template image to determine the borders of each part in the template image, mark the intersections of each part border and 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 segmentation line, select a target segmentation line whose length meets the preset length range from the initial segmentation line, select multiple cutting points from the target segmentation line, and determine the initial first coordinate of each cutting point.
[0161] S2: Rough positioning stage.
[0162] The steel plate is photographed by the area array camera on the bracket to obtain the actual steel plate image of the steel plate, and a target template image matching the actual steel plate image is determined among 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 array camera coordinate system, the first coordinate of the cutting point in the product image is mapped 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. Then, based on the second mapping relationship between the area array camera coordinate system and the base coordinate system, 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:
[0164]
[0165] S3, scanning coordinate determination stage.
[0166] Get the second coordinates of multiple cutting points 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 is the angle rotation matrix of the line scan camera when scanning, B 3x1 It is the coordinate translation matrix of the line scan camera when scanning.
[0168] The third mapping relationship between the known line scan camera and the end coordinate system In case of:
[0169] The following expressions exist:
[0170]
[0171] in, .
[0172] Assume that the second coordinate is the coordinate of the cutting point near the origin of the line scan camera coordinate system, that is, the second coordinate:
[0173]
[0174] Then we have the following expressions:
[0175]
[0176] at this time,
[0177]
[0178]
[0179] Expand to get: .
[0180] And the angle rotation matrix of the line scan camera in the base coordinate system is known to be: .
[0181] According to the angle rotation matrix, the coordinate translation matrix is further obtained:
[0182]
[0183] S4: Precision positioning stage.
[0184] According to the coordinate translation matrix, the line scan camera is moved to the scanning coordinates so that the line scan camera can scan the parts and waste frames on the steel plate. At this time, three-segment point cloud data can generally be obtained, namely two segments of zero
[0185] The fourth coordinate of the cutting point is determined by comparing the point cloud data of the waste material and the point cloud data of a section of the waste material border: , obtain the third mapping relationship between the line scan camera coordinate system and the terminal 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 involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0191] Based on the same inventive concept, the embodiment of the present application also provides a cutting trajectory determination device for implementing the cutting trajectory determination method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more cutting trajectory determination device embodiments provided below can refer to the limitations of the cutting trajectory determination method above, and will not be repeated here.
[0192] In an exemplary embodiment, Figure 7 As shown, a cutting trajectory determination device 700 is provided, which is 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] An acquisition module 100, for acquiring first coordinates of a plurality of cutting points in a product image of a product to be cut, and second coordinates of a plurality of cutting points located within a preset range of an origin in a line scan camera coordinate system;
[0194] A coarse positioning module 200 is used to map the first coordinate to the base coordinate system for each cutting point to obtain a coarse positioning coordinate of the cutting point;
[0195] The processing module 300 is used to map the second coordinate to the terminal coordinate system to obtain the third coordinate of the cutting point;
[0196] A 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 coordinates and the rough positioning coordinates;
[0197] The precise positioning module 500 is used to map the fourth coordinate obtained by scanning the cutting point at the scanning coordinate by the line scanning camera 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 product images of the product to be cut, and determine the initial first coordinates of multiple cutting points in each template image; match the multiple template images with the product image, 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 of the embodiments, the acquisition module 100 is also used to perform a connected domain analysis on each template image, determine the bounding boxes of each part in the template image, mark the intersection points of each part bounding box and the grid of the template image, determine the line segment between two adjacent intersection points that do not belong to the same part as the initial segmentation line, filter out a target segmentation line whose length meets a preset length range from the initial segmentation line, filter out multiple cutting points from the target segmentation line, and determine the initial first coordinate of each cutting point.
[0201] In one embodiment, the primary positioning module 200 is also used to obtain a first mapping relationship between the image coordinate system and the area array camera coordinate system, and a second mapping relationship between the area array camera coordinate system and the base coordinate system. The area array camera coordinate system is the coordinate system of the area array camera that captures the product image. Based on the first mapping relationship, the first coordinate is 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.
[0202] In one embodiment, the processing module 300 is also used to obtain a third mapping relationship between the line scan camera coordinate system and the end coordinate system. Through the third mapping relationship, the second coordinate is mapped 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 also used to determine a fourth mapping relationship between the terminal coordinate system and the base coordinate system based on the third coordinate and the coarse positioning coordinate, determine a coordinate translation matrix between the terminal coordinate system and the base coordinate system based on a preset angle rotation matrix between the terminal 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 also used to map the fourth coordinate obtained by scanning the cutting point at the scanning coordinate by the line scan camera from the line scan camera coordinate system to the end coordinate system through a third mapping relationship to obtain the initial fifth coordinate of the cutting point in the end coordinate system, and map the initial coordinate from the end coordinate system to the base coordinate system through the fourth mapping relationship to obtain the fifth coordinate of the cutting point in the base coordinate system.
[0205] Each module in the above-mentioned cutting trajectory determination device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0206] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store various coordinate data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a cutting trajectory determination method is implemented.
[0207] Those skilled in the art will understand that the structure shown in FIG. 8 is a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of 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 a different arrangement of components.
[0208] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0209] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0210] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0211] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0212] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining a cutting trajectory, characterized in that: Applied to a robot, the robot is equipped with a wired scanning camera; the method comprises: Acquire first coordinates of a plurality of cutting points in a product image of a product to be cut, and second coordinates of a plurality of cutting points located within a preset range of an origin in a line scan camera coordinate system; For each cutting point, mapping the first coordinate to a base coordinate system to obtain a rough positioning coordinate of the cutting point; Mapping the second coordinate to the terminal coordinate system to obtain the third coordinate of the cutting point; Based on the third coordinate and the rough positioning coordinate, determining the scanning coordinate of the line scan camera in the base coordinate system; The fourth coordinate obtained by scanning the cutting point by the line scan camera at the scanning coordinate is mapped to the base coordinate system to obtain a fifth coordinate; The fifth coordinates of the plurality of cutting points are collected to obtain a cutting trajectory of the product to be cut.
2. The method according to claim 1, characterized in that The step of obtaining first coordinates of a plurality of cutting points in a product image of a product to be cut comprises: Acquire multiple template images and product images of products to be cut; Selecting a target template image that matches the product image from the plurality of template images; Determining initial first coordinates of a plurality of cutting points in the target template image; The initial first coordinates of the plurality of cutting points in the target template image are mapped to the product image to obtain the first coordinates of the plurality of cutting points in the product image.
3. The method according to claim 2, characterized in that The determining of the initial first coordinates of the plurality of cutting points in the target template image comprises: Performing a connected domain analysis on the target template image to determine the borders of each part in the target template image; Marking the intersections of the frame of each part and the grid of the target template image; Determine the line segment between two adjacent intersection points that do not belong to the same part as the initial segmentation line; Filtering out a target segmentation line whose length meets a preset length range from the initial segmentation lines; A plurality of cutting points are selected from the target segmentation line, and an initial first coordinate of each of the cutting points is determined.
4. The method according to claim 1, characterized in that: Mapping the first coordinate to the base coordinate system to obtain the rough positioning coordinates of the cutting point includes: Acquire a first mapping relationship between an image coordinate system and an area array camera coordinate system, and a second mapping relationship between the area array camera coordinate system and a base coordinate system, wherein the area array camera coordinate system is a coordinate system of an area array camera that captures the product image; Based on the first mapping relationship, the first coordinate is mapped from the image coordinate system to the area array camera coordinate system to obtain the initial rough 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 Mapping the second coordinate to the end coordinate system to obtain the third coordinate of the cutting point includes: Acquire a third mapping relationship between the line scan camera coordinate system and the terminal coordinate system; The second coordinate is mapped from the line scan camera coordinate system to the terminal coordinate system through the third mapping relationship to obtain the third coordinate of the cutting point in the terminal coordinate system.
6. The method according to claim 5, characterized in that The step of determining the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinates and the rough positioning coordinates includes: Determining a fourth mapping relationship between the terminal coordinate system and the base coordinate system based on the third coordinate and the rough positioning coordinate; Determine a coordinate translation matrix between the terminal coordinate system and the base coordinate system based on a preset angle rotation matrix between the terminal coordinate system and the base coordinate system and the fourth mapping relationship; The scanning coordinates of the line scan camera in the base coordinate system are determined according to the coordinate translation matrix.
7. The method according to claim 6, characterized in that The fourth coordinate obtained by scanning the cutting point by the line scan camera at the scanning coordinate is mapped to the base coordinate system to obtain the fifth coordinate, including: By means of the third mapping relationship, the fourth coordinate obtained by scanning the cutting point by the line scan camera at the scanning coordinate is mapped from the line scan camera coordinate system to the terminal coordinate system to obtain the initial fifth coordinate of the cutting point in the terminal coordinate system; The initial coordinates are mapped from the terminal coordinate system to the base coordinate system through the fourth mapping relationship to obtain the fifth coordinates of the cutting point in the base coordinate system.
8. A cutting trajectory determination device, characterized in that: Applied to a robot, the robot is equipped with a wired scanning camera; the device comprises: An acquisition module, used to acquire first coordinates of a plurality of cutting points in a product image of a product to be cut, and second coordinates of a plurality of cutting points located within a preset range of an origin in a line scan camera coordinate system; A coarse positioning module, used for mapping the first coordinate to a base coordinate system for each cutting point to obtain a coarse positioning coordinate of the cutting point; A processing module, used for mapping the second coordinate to an end coordinate system to obtain a third coordinate of the cutting point; A scanning coordinate positioning module, used for determining the scanning coordinates of the line scan camera in the base coordinate system based on the third coordinates and the rough positioning coordinates; A precise positioning module, used for mapping the fourth coordinate obtained by scanning the cutting point by the line scan camera at the scanning coordinate to the base coordinate system to obtain a fifth coordinate; The trajectory determination module is used to collect the fifth coordinates of the plurality of 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, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
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
Workpiece cutting track determination method and device and computer equipment
CN117444979A
Cutting track generation method and device, computer equipment and storage medium
CN117930744A
Dog muzzle apparatus with remote control
KR1020250000290A