Special-shaped pipe autonomous feeding method, device and medium
Through computer vision recognition and intelligent decision-making, the laser cutting equipment has achieved autonomous feeding of irregularly shaped tubes, solving the problems of low cutting accuracy and low efficiency in the existing technology, and improving production efficiency and safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN BODOR LASER CO LTD
- Filing Date
- 2023-09-21
- Publication Date
- 2026-05-08
AI Technical Summary
Existing laser cutting equipment cannot accurately and autonomously cut complex irregular tubes, resulting in low production efficiency, high safety risks, material waste, and shortened lifespan of the laser head.
By employing computer vision for pose recognition and intelligent decision-making, and by acquiring cross-sectional contour images from a computer and an industrial camera, the system calculates rotation vectors and performs similarity matching and parameter adjustments to achieve autonomous feeding and precise repositioning of irregularly shaped tubes.
It enables autonomous feeding of laser cutting equipment, improves cutting accuracy and production efficiency, reduces labor costs, and avoids the decrease in cutting accuracy and damage to the laser head caused by human error.
Smart Images

Figure CN117047313B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the technical field of laser cutting, and in particular to a method, equipment and medium for autonomous feeding of irregularly shaped tubes. Background Technology
[0002] With continuous advancements in research and development, laser cutting equipment is becoming increasingly intelligent. To date, laser cutting equipment has replaced manual labor in the autonomous feeding of specific shaped tubes. However, laser cutting equipment has strict requirements for the initial posture of shaped tubes during processing. Because existing laser cutting equipment cannot precisely control the feeding posture of shaped tubes, manual assistance is still needed for processing shaped tubes in laser cutting equipment. However, manual assistance has the following drawbacks:
[0003] 1. Manually adjusting irregularly shaped tubes takes a relatively long time, which directly leads to low production efficiency.
[0004] 2. When manually adjusting irregularly shaped tubes, operators need to manually touch the running laser cutting equipment, and the safety of operators cannot be fully guaranteed.
[0005] 3. For irregularly shaped tubes that are difficult to place in the chuck, it is impossible to accurately reset the position of the irregularly shaped tube manually.
[0006] 4. Inaccurate processing of irregular-shaped tubes will result in waste of irregular-shaped tube materials.
[0007] 5. If there is a positional error between the laser head and the processing surface, the laser head may be scratched or bumped, which will directly reduce the service life of the laser head.
[0008] Due to the aforementioned problems, existing laser cutting equipment cannot accurately and autonomously cut complex irregularly shaped tubes. The domestic market remains largely untapped in the field of autonomous feeding of irregularly shaped tubes into laser cutting equipment.
[0009] This application integrates computer vision pose recognition and intelligent decision-making into laser cutting equipment, which fully realizes autonomous feeding of tube laser cutting equipment, avoids the problem of reduced cutting accuracy caused by human error, improves reset efficiency, reduces labor costs, and improves production efficiency in the tube cutting process of laser cutting machine. Summary of the Invention
[0010] This specification provides one or more embodiments of a method, device, and medium for autonomously feeding irregularly shaped tubes, which solves the following technical problem: existing laser cutting equipment cannot accurately and autonomously cut irregularly shaped tubes with high complexity.
[0011] One or more embodiments of this specification employ the following technical solutions:
[0012] This specification provides one or more embodiments of a method for autonomous feeding of irregularly shaped tubes, the method comprising:
[0013] Obtain the first cross-sectional profile of the irregular tube on the computer end, and calculate the first rotation vector of the first cross-sectional profile;
[0014] The second cross-sectional profile of the irregular tube to be processed is obtained based on the industrial camera, and the second rotation vector of the second cross-sectional profile is calculated.
[0015] Calculate the similarity score between the first cross-sectional profile and the second cross-sectional profile;
[0016] When the similarity score is lower than a preset threshold, the parameters of the industrial camera are adjusted, and the above steps of obtaining the second cross-sectional contour image and calculating the similarity score are repeated until the similarity score is higher than the preset threshold.
[0017] When the similarity score is higher than the preset threshold, the rotation angle of the shaped tube is obtained based on the first rotation vector and the second rotation vector, so that the mechanical chuck can reset the shaped tube to be processed based on the rotation angle.
[0018] Furthermore, obtaining the first cross-sectional profile of the irregularly shaped tube at the computer end specifically includes:
[0019] Obtain the cross-sectional engineering drawing of the irregular tube in the computer terminal, and extract the outline dimension information from the cross-sectional engineering drawing;
[0020] The cross-sectional engineering drawing is converted into an initial cross-sectional image in an image storage format;
[0021] The image pixel scale in the initial cross-sectional image is calculated based on the camera pixel scale of the industrial camera and the contour size information;
[0022] The initial cross-sectional image is scaled to obtain a target cross-sectional image whose camera pixel scale is consistent with the image pixel scale.
[0023] Further, calculating the first rotation vector of the first cross-sectional profile specifically includes:
[0024] If the graphic outline in the target cross-sectional image is rotationally symmetric, then the rotation angle between adjacent axes of symmetry in the rotationally symmetric graphic is calculated and used as the angle of the rotation vector.
[0025] If the graphic contour in the target cross-sectional image does not exhibit rotational symmetry, then the vector pointing from the rotation center to the centroid of the contour in the target cross-sectional image is calculated and used as the first rotation vector.
[0026] Furthermore, the step of acquiring the second cross-sectional profile of the irregularly shaped tube to be processed based on the industrial camera specifically includes:
[0027] The initial image acquired by the industrial camera is subjected to a predetermined region extraction to obtain the cross-sectional area of the irregular tube between the grippers;
[0028] A bilateral filtering function is used to perform noise reduction processing on the cross-sectional area of the irregular tube to obtain a noise-reduced image;
[0029] The denoised image is subjected to exposure processing, and the contour edges under different exposure levels are extracted and fused to obtain an image contour map;
[0030] Remove pixel information other than the contour information from the image contour map to obtain the second cross-sectional contour map.
[0031] Furthermore, the exposure processing of the denoised image specifically includes:
[0032] The denoised image is processed using a smaller brightness parameter;
[0033] If a large overexposed area appears in the noise-reduced image, this brightness area is extracted.
[0034] The extracted brightness area is then processed again by increasing its brightness parameter.
[0035] Repeat the above steps until no image edges can be found in the obtained image area.
[0036] Further, the step of extracting a predetermined region from the initial image acquired by the industrial camera to obtain the cross-sectional region of the irregular tube between the grippers includes:
[0037] Identify the gripper contour in the initial image;
[0038] Determine the largest bounding rectangle of all contours within the gripper contour;
[0039] The pixel region within the largest bounding rectangle is taken as the cross-sectional region of the irregular tube.
[0040] Further, calculating the similarity score between the first cross-sectional profile image and the second cross-sectional profile image specifically includes:
[0041] The target cross-sectional image is cropped to obtain a template image;
[0042] Calculate the angle difference between the first rotation vector and the second rotation vector, and rotate the template image according to the angle difference;
[0043] The rotated template image is trained, and the rotated template image is matched with the second cross-sectional contour image acquired by the industrial camera to calculate the similarity score.
[0044] Further, training the rotated template image includes:
[0045] Using the initial state of the template as the standard state, set a first angle threshold and a second angle threshold as angle training parameters. Set the angle training step size threshold. Extract the image pyramid from the original image;
[0046] The number of feature points to be extracted is determined based on the image size. Gradient feature training is performed on the template image to obtain matching data.
[0047] Save the matching data after training.
[0048] One or more embodiments of the present invention provide an autonomous feeding device for irregularly shaped tubes, the device comprising:
[0049] At least one processor; and,
[0050] A memory communicatively connected to the at least one processor; wherein,
[0051] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0052] Obtain the first cross-sectional profile of the irregular tube on the computer end, and calculate the first rotation vector of the first cross-sectional profile;
[0053] The second cross-sectional profile of the irregular tube to be processed is obtained based on the industrial camera, and the second rotation vector of the second cross-sectional profile is calculated.
[0054] Calculate the similarity score between the first cross-sectional profile and the second cross-sectional profile;
[0055] When the similarity score is lower than a preset threshold, the parameters of the industrial camera are adjusted, and the above steps of obtaining the second cross-sectional contour image and calculating the similarity score are repeated until the similarity score is higher than the preset threshold.
[0056] When the similarity score is higher than the preset threshold, the rotation angle of the shaped tube is obtained based on the first rotation vector and the second rotation vector, so that the mechanical chuck can reset the shaped tube to be processed based on the rotation angle.
[0057] One or more embodiments of the present invention provide a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0058] Obtain the first cross-sectional profile of the irregular tube on the computer end, and calculate the first rotation vector of the first cross-sectional profile;
[0059] The second cross-sectional profile of the irregular tube to be processed is obtained based on the industrial camera, and the second rotation vector of the second cross-sectional profile is calculated.
[0060] Calculate the similarity score between the first cross-sectional profile and the second cross-sectional profile;
[0061] When the similarity score is lower than a preset threshold, the parameters of the industrial camera are adjusted, and the above steps of obtaining the second cross-sectional contour image and calculating the similarity score are repeated until the similarity score is higher than the preset threshold.
[0062] When the similarity score is higher than the preset threshold, the rotation angle of the shaped tube is obtained based on the first rotation vector and the second rotation vector, so that the mechanical chuck can reset the shaped tube to be processed based on the rotation angle.
[0063] The above-mentioned at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects: This application integrates computer vision pose recognition and intelligent decision-making into laser cutting equipment, which fully realizes the autonomous feeding of tube laser cutting equipment, avoids the problem of reduced cutting accuracy caused by human error, improves reset efficiency, reduces labor costs, and improves the production efficiency of laser cutting machine tube cutting process. Attached Figure Description
[0064] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0065] Figure 1 A simplified flowchart illustrating a method for autonomous feeding of irregularly shaped tubes, provided as an embodiment of this specification;
[0066] Figure 2 This is a complete flowchart illustrating a method for autonomous feeding of irregularly shaped tubes, provided in the embodiments of this specification.
[0067] Figure 3This is a flowchart of a template image acquisition process provided by an embodiment of the present invention;
[0068] Figure 4 This is a flowchart of calculating the rotation vector of a template contour provided in an embodiment of the present invention;
[0069] Figure 5 This is an image processing flowchart provided by an embodiment of the present invention;
[0070] Figure 6 This is a flowchart of a similarity score calculation method provided in an embodiment of the present invention;
[0071] Figure 7 This is a structural block diagram of an autonomous feeding device for irregularly shaped tubes in laser cutting equipment, provided by an embodiment of the present invention.
[0072] Figure 8 This is a schematic diagram of an autonomous feeding device for irregularly shaped tubes in laser cutting equipment, provided by an embodiment of the present invention.
[0073] Figure 9 This is a schematic diagram of the operation of an automatic chuck reset irregular tube provided in an embodiment of the present invention. Detailed Implementation
[0074] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0075] When cutting irregularly shaped tubes, the laser cutting equipment of the present invention requires that the initial position of the irregularly shaped tube in the chuck be the same as the initial position of the tube on the computer. Existing irregularly shaped tube cutting equipment cannot obtain the initial position of the irregularly shaped tube in the chuck, which requires manual reset of the initial position of the irregularly shaped tube. If the initial position of the irregularly shaped tube in the chuck differs greatly from the initial position of the irregularly shaped tube on the computer after reset, the problem of large error in the size of the processed workpiece will occur, and even the phenomenon of the processed workpiece scraping against the laser head may occur.
[0076] If the tube has an unusual shape and its surface lacks an effective plane to fit with the chuck, manual reset is difficult, and it is hard to manually reset the tube to the same initial position as the computer.
[0077] The key to the automatic tube feeding achieved by this invention is: identifying the cross-sectional contour pose of the irregular tube to be processed, obtaining the angle difference between the cross-sectional contour pose of the irregular tube to be processed and the initial pose of the irregular tube on the computer, and feeding the angle difference back to the mechanical control module of the laser cutting equipment so that the equipment can accurately reset the irregular tube to be processed.
[0078] To achieve the above steps, the initial pose of the irregular tube on the computer side must first be obtained. This step will involve obtaining the cross-sectional contour of the irregular tube to be processed on the computer side, in order to prepare for subsequent pose calculation and template matching.
[0079] This specification provides an embodiment of a method for autonomous feeding of irregularly shaped tubes. For example... Figure 1 As shown, the method mainly includes the following steps:
[0080] Step S101: Obtain the first cross-sectional profile of the irregular tube on the computer end, and calculate the first rotation vector of the first cross-sectional profile.
[0081] S1.1.1: Obtain the DXF image of the cross-section of the irregular tube.
[0082] All dimensional information of the irregular tube to be processed is stored in the 3D software on the computer beforehand. To obtain the cross-sectional view of the irregular tube, it is first necessary to obtain the DXF image of the cross-section of the irregular tube.
[0083] S1.1.2: Convert the DXF image to a PNG image.
[0084] The contours of irregularly shaped tubes acquired by industrial cameras are stored in image format on the computer. Subsequent image processing algorithms and template matching algorithms are performed in image format. Therefore, when acquiring the cross-sectional view of the irregularly shaped tube on the computer, it is necessary to convert the irregularly shaped tube model stored in three-dimensional format into a two-dimensional image format that can be used for image algorithms.
[0085] This invention uses the open-source dxflib for file format conversion. dxflib is implemented entirely based on the C / C++ standard library and does not depend on any other library.
[0086] S1.1.3: Obtain the size information of the irregular tube.
[0087] The dimensional information of the irregular tubes is all reflected in the 3D drawing software.
[0088] The above size information is used to unify the image pixel size obtained from the computer with the image pixel size obtained from the industrial camera.
[0089] S1.1.4: Scale PNG images.
[0090] Once the industrial camera is installed on the equipment, its position remains fixed. The camera is calibrated to find its internal parameters and external parameters between the camera and the position of the cross-sectional profile being inspected. The pixel scale of the image acquired by the industrial camera is calculated using a series of camera parameters.
[0091] The pixel scale of the computer image is obtained based on the actual size information of the irregular tube.
[0092] Find the scaling relationship between the pixel scale of the image captured by the industrial camera and the pixel scale of the image on the computer.
[0093] The pixel scale of computer-generated images is standardized to match the pixel scale of images captured by industrial cameras.
[0094] S1.2.0: Calculate the rotation vector.
[0095] In this embodiment of the invention, the rotation vector is calculated to find the conversion angle between the orientation of the irregular tube acquired by the industrial camera and the orientation of the irregular tube on the computer.
[0096] In this embodiment of the invention, the rotation vector is the vector between the rotation center of the graphic contour and the centroid of the graphic contour. Since this vector contains both angle and magnitude, it is beneficial for resetting the contour angle, so this vector is defined as the rotation vector.
[0097] To ensure a more accurate orientation of the irregularly shaped tube after rotation and repositioning, this embodiment of the invention employs a combination of coarse and fine search methods for angle lookup. This step is one step within the coarse search; the fine search will be described in step S1.10.0.
[0098] Furthermore, the S1.2.0 calculation of the rotation vector, the sub-process is as follows: Figure 4 As shown, the steps are as follows:
[0099] S1.2.1: Obtain the cross-sectional profile of the irregular tube.
[0100] The image used in this step is an operation performed on the computer-side profile of the irregular tube obtained as shown above.
[0101] S1.2.2: Determine whether the contour diagram is rotationally symmetric.
[0102] In this embodiment of the invention, the rotation center of the contour is first determined. The process for determining the rotation center is as follows:
[0103] 1. Traverse all pixels of the outline in the image.
[0104] 2. Sort the coordinates of the image pixels in ascending order.
[0105] 3. Find the pixel coordinates with the largest row and column value among all pixels, and find the pixel coordinates with the smallest row and column value among all pixels.
[0106] 4. Find the smallest bounding rectangle of the outline.
[0107] 5. Find the intersection of the diagonals of the smallest outer rectangle and define this point as the rotation center of the contour.
[0108] Rotate the image clockwise around the center of the contour with a step size of one degree. If, after N rotations, the image contour coincides with the initial image contour and N is less than 360 degrees, then the image can be considered a rotationally symmetric image. If the step size N when the contour overlaps is equal to 360 degrees, then the contour image is considered not a rotationally symmetric image.
[0109] S1.2.3: Find the rotation angle between adjacent axes of symmetry.
[0110] If the image is rotationally symmetrical, and after N rotations the image contour coincides with the initial image contour, and the step size N of the coincidence is less than 360 degrees, then N is considered to be the rotation angle between adjacent axes of symmetry of this contour.
[0111] If the image contour coincides with the initial image contour after a step size, the step size is reduced by an order of magnitude and the query is continued by rotation matching to find the minimum angle step size at which the contours can coincide. The rotation angle at which the contours can finally overlap is defined as the rotation angle between the adjacent axes of symmetry of the contours.
[0112] S1.2.4: Find the rotation vector between the rotation center and the centroid of the profile.
[0113] Obtain the rotation center of the graphic contour in step S1.2.2 above.
[0114] The concept of image centroid originates from the center of gravity. Since the gravitational field is lost in image processing, pixels are used to approximate mass, and the centroid replaces the center of gravity. In this embodiment of the invention, the centroid is calculated based on image moments, which can be used to describe image features. The image centroid calculation process is as follows:
[0115] 1. Assume the pixel moments of the image outline are:
[0116]
[0117] 2. The zeroth moment of the image is:
[0118]
[0119] 3. The first moment of the image for:
[0120]
[0121] 4. The first moment of the image for:
[0122]
[0123] 5. Based on the first moments shown above, calculate the centroid of the image:
[0124]
[0125] The above method calculates the centroid of the connected regions inside the contour.
[0126] Construct a vector From the center of the corner to the center of mass .
[0127] Establish a coordinate system with the center of rotation as the origin and the horizontal axis as the coordinate system. The axial direction, with the vertical direction as the reference. axial direction, with With the axis direction as the zero reference direction, the rotation vector angle is:
[0128]
[0129] S1.2.5: Obtain the rotation vector of the contour map.
[0130] For a rotationally symmetric profile, the magnitude of its rotation vector is zero, and the angle of the rotation vector is the rotation angle between adjacent axes of symmetry.
[0131] For a non-rotationally symmetric contour, the magnitude of its rotation vector is the distance between the center of rotation of the image contour and the centroid of the image contour, and the angle of the rotation vector is the value calculated in step S1.2.4. value.
[0132] Step S102: Obtain the second cross-sectional profile of the irregular tube to be processed based on the industrial camera, and calculate the second rotation vector of the second cross-sectional profile.
[0133] S1.3.0: Mechanical grippers transport irregularly shaped tubes to designated locations.
[0134] Figure 8 The process of clamping and transporting irregularly shaped tubes is demonstrated.
[0135] like Figure 8As shown in the diagram, 1 represents the upper jaw of the left gripper, 6 represents the lower jaw of the left gripper, 2 represents the upper jaw of the right gripper, 8 represents the lower jaw of the right gripper, 7 represents the shaped tube being gripped, 12 represents the industrial camera, 11 represents the light source of the industrial camera, 3 represents the distance between the optical center of the camera and the cross-section of the shaped tube, 4 represents the transition of the shaped tube from the gripper gripping state to the chuck gripping state, 5 represents the rear chuck, 9 represents the front chuck, and 10 represents the laser cutting head. The shaped tube is first gripped by the mechanical grippers, then transported to a designated position where the industrial camera captures an image. Finally, the shaped tube is transported to the chuck, where it is gripped by the front and rear chucks and processed by the laser cutting head.
[0136] Once the initial pose of the shaped tube after it is gripped by the mechanical gripper is obtained, any pose of the shaped tube moving within the equipment can be calculated by the equipment.
[0137] The designated location for the irregularly shaped tube mentioned in this step refers to the location where the cross-sectional profile of the irregularly shaped tube is captured by the industrial camera.
[0138] The characteristic of this location can be described as follows: the rotation center of the irregular tube and the optical center of the industrial camera are on the same axis.
[0139] An industrial camera will be used to capture the cross-sectional profile of the irregularly shaped tube at this location.
[0140] S1.4.0: An industrial camera acquires the cross-sectional profile of the irregularly shaped tube to be processed.
[0141] Once the equipment is running stably, an industrial camera will capture images of the cross-section of the irregularly shaped tube.
[0142] S1.5.0: Image Processing.
[0143] The purpose of image processing is to obtain a clear and complete cross-sectional profile of the irregularly shaped tube, so as to provide the highest quality profile image for subsequent image template matching.
[0144] Furthermore, the S1.5.0 image processing sub-process is as follows: Figure 5 As shown, the steps are as follows:
[0145] S1.5.1: Image ROI extraction.
[0146] The ROI region extracted in this step is the cross-sectional area of the irregular tube between the grippers.
[0147] Since the size and shape of the grippers are known, the gripper location region in the image is identified first.
[0148] Find the largest bounding rectangle of all contours within the gripper location area.
[0149] The region within the bounding rectangle is taken as the ROI region of the image, and this ROI region is extracted.
[0150] The ROI region extracted in this process will contain the cross-sectional profiles of all irregularly shaped pipes.
[0151] S1.5.2: Image noise reduction processing.
[0152] Because industrial equipment operates in very complex environments during actual production, the images acquired may exhibit noise or distortion. This process performs edge-preserving and noise-reducing processing on the images to make the edges of the images acquired by the industrial camera clearer and the non-edge areas in the images smoother.
[0153] This step uses a bilateral filtering function to process the acquired image. The processing procedure is as follows:
[0154] Determine the spatial kernel function of the function:
[0155]
[0156] The spatial kernel function is determined by the template weights based on the Euclidean distance between pixel locations, where... Represents coordinate points and . These are the coordinates of the other coefficients in the convolution kernel template window; The center coordinates of the template window; is the standard deviation of the Gaussian function. It calculates the nearest points To the center point The degree of proximity.
[0157] Determine the range and kernel function of the function:
[0158]
[0159] The range kernel function is determined by the template weights based on the differences in pixel values. For the coordinates of other coefficients in the template window, Indicates the image at point The pixel value at that location. The center coordinates of the template window, with a corresponding pixel value. ; Let be the standard deviation of the Gaussian kernel function, and let the range of the kernel be within . between.
[0160] Multiplying the two equations yields the template weights of the bilateral filter:
[0161]
[0162] The bilateral filter can be simplified, and its data formula can be expressed as:
[0163]
[0164] airspace What is being measured The distance between two points; the greater the distance, the lower the weight. Range weight. What is being measured The degree of pixel similarity between two points is weighted as the greater the similarity. Intuitively, this means that in a flat region without abrupt edge transitions, the difference in pixel values between neighboring pixels is smaller, corresponding to a smaller value range. The spatial weight is closer to 1. It plays a major role, essentially performing Gaussian filtering directly on the region.
[0165] In flat regions, this is equivalent to Gaussian filtering. In regions with edges, the difference between adjacent pixels is larger, corresponding to a higher value range weight. The value approaches zero, causing the function to decrease here, which is the template weight of the bilateral filter. Close to 0.
[0166] In this embodiment of the invention, the parameters of the bilateral filtering function are dynamically set according to the image size acquired by the industrial camera. The parameter setting principles are as follows:
[0167] When the image size is large, a larger kernel function is used for convolution operation; when the image size is small, a smaller kernel function is used for convolution operation.
[0168] S1.5.3: Adaptive image exposure compensation.
[0169] To address the complex lighting conditions in the equipment's operating environment, adaptive exposure compensation processing is applied to the images.
[0170] The exposure compensation process is as follows:
[0171] 1. Use the Sobel operator to calculate the gradient direction of the image. Select the horizontal operator kernel and the vertical operator to convolve the original image respectively, and obtain the gradient components in the vertical and horizontal directions respectively:
[0172]
[0173]
[0174] 2. Calculate the total gradient of the image as follows:
[0175]
[0176] 3. Use non-maximum suppression to extract edges from the image, comparing the gradient strength of the current pixel with the gradient strength of points along the positive and negative gradient directions. If the gradient strength of the current pixel is the largest compared to the gradients of other points along the same direction, retain its value. If the gradient strength of the current pixel is not the largest compared to the gradients of other points along the same direction, set its value to 0.
[0177] 4. Use dual threshold detection to filter out some edge points. Set two thresholds. and , For low pixel values, For high pixel values. When a pixel value is lower than... When this value is not considered an edge, it is deleted. When a pixel value is higher than... At that time, this value is considered an edge and is preserved. and If a pixel between two points has a point on a true edge in its eight neighborhood, it is considered an edge point and is retained.
[0178] 5. Due to uneven lighting, the two set thresholds will not simultaneously satisfy the entire image. Use the smaller parameter to process the image brightness. If the parameter is normal, there will be no large exposed areas in the image, and the contours in the image will be relatively complete and continuous. If a large exposed area appears in the image, this area will be cropped out. The brightness parameter of the cropped area will be increased for further processing. Repeat the above steps. If no image edges can be found in the final image area, stop this process.
[0179] S1.5.4: Image edge extraction.
[0180] Edge extraction is performed on image regions under different exposure conditions.
[0181] S1.5.5: Image fusion.
[0182] By merging the contour edges of regions with different brightness levels, a complete image contour map is obtained.
[0183] S1.5.6: Image morphological operations.
[0184] Perform morphological operations on the image to avoid breakage of the contour.
[0185] The specific steps for performing a closing operation on the image are as follows:
[0186] 1. Dilate the image.
[0187] 2. Erosion is applied to the expanded image.
[0188] The final result can be represented by connecting two closely spaced graphics.
[0189] S1.5.7: Removes redundant pixel information outside the outline.
[0190] All contour information in the image except the contour itself is considered as interference information, and redundant pixel information outside the contour is removed.
[0191] This process uses the contour area. If the contour area is greater than a set threshold, the contour is retained; if the contour area is less than the set threshold, the contour is deleted.
[0192] S1.6.0: Calculate the rotation vector.
[0193] Calculate the rotation vector of the obtained contour map.
[0194] This process is the same as step S1.2.0, so it will not be described again here.
[0195] Step S103: Calculate the similarity score between the first cross-sectional profile and the second cross-sectional profile.
[0196] Calculate the similarity scores of the contour images obtained in steps S1.1.0 and S1.5.0.
[0197] Factors to consider in similarity scoring include size, rotation angle, and outline deformation.
[0198] In this embodiment of the invention, when training the template, the template image is scaled and rotated, and the training data is used to match the image contour to find the amount of change in the image in terms of size and angle rotation.
[0199] Furthermore, S1.7, calculating the contour similarity score, is a sub-process as follows: Figure 5 As shown, the steps are as follows:
[0200] S1.7.1: Use the PNG outline obtained by DXF conversion as the matching template.
[0201] The image obtained in step S1.1.0 is extracted as a matching template.
[0202] S1.7.2: Rotate the matching template.
[0203] The rotation vectors obtained in steps S1.2.0 and S1.6.0 are processed to calculate the angle difference between the two rotation vectors, and the template image is rotated by the angle difference.
[0204] S1.7.3: Train the matching template.
[0205] The template training process is as follows:
[0206] 1. Using the initial state of the template as the standard state, set the first angle threshold and the second angle threshold as angle training parameters.
[0207] 2. Set the angle training step size threshold.
[0208] 3. Extract the image pyramid from the original image.
[0209] The process of constructing the pyramid image is as follows:
[0210] 1. Set the original image size for layer zero: width W, height H. Calculate the scale of the original image using the scale parameter s. The result is shown below:
[0211]
[0212]
[0213] and The scale of the constructed pyramid image.
[0214] 2. Perform a scale transformation on the original image to obtain the scaled pyramid image.
[0215] The process for calculating the number of feature points extracted from each pyramid image layer is as follows:
[0216] 1. Set the total number of extracted feature points to X, the number of pyramid image layers to m=2, the width of the original image of the zeroth layer to W, the height to H, the corresponding area to C=H*W, and the pyramid image scaling factor to s.
[0217] 2. Calculate the total area of the pyramid image as follows:
[0218]
[0219] 3. Calculate the number of feature points per unit area, as follows:
[0220]
[0221] 4. Calculate the number of feature points that should be assigned to the i-th layer of the pyramid image, as follows:
[0222]
[0223] After determining the number of feature points to be extracted for each pyramid image layer, the feature points are extracted according to the following principles:
[0224] Iterate through all the pixels in the image and extract the pixels whose gradient features exceed the set gradient feature threshold as image feature points.
[0225] Iterate through all pyramid images and rotated images, and save the training-generated matching data.
[0226] S1.7.4: Calculate the similarity score.
[0227] The edge features of the template image are compared with the edge features of the region to be matched, and a similarity score is calculated.
[0228] Step S104: When the similarity score is lower than a preset threshold, adjust the parameters of the industrial camera and repeat the above steps of obtaining the second cross-sectional contour image and calculating the similarity score until the similarity score is higher than the preset threshold.
[0229] S1.8.0: Statistical similarity score exceeds the specified threshold.
[0230] Determine whether the obtained similarity score exceeds the specified threshold. In this invention, the similarity threshold is set to 99%. If the similarity is higher than 99%, the match is considered successful, and step S1.10.0 is executed. If the similarity is lower than 99%, the match is considered unsuccessful, and step S1.9.0 is executed.
[0231] Step S105: When the similarity score is higher than the preset threshold, the rotation angle to be rotated of the irregular tube is obtained based on the first rotation vector and the second rotation vector, so that the mechanical chuck resets the irregular tube to be processed based on the rotation angle.
[0232] S1.9.0: Adjust industrial camera parameters.
[0233] If the matching fails, adjust the parameters of the industrial camera and continue from step S1.4.0.
[0234] In the real-time example of this invention, the camera's exposure parameters are mainly adjusted. If the image is too bright, the exposure parameters are reduced to prevent overexposure. If the image is too dark, supplementary lighting is applied to make the image texture clear.
[0235] S1.10.0: Angle compensation.
[0236] If the match is successful, the angle values obtained in steps 2, 6 and 7 will be combined to obtain the precise angle at which the irregular tube needs to be rotated.
[0237] The compensation values for the angle of irregular tubes are divided into two types: coarse compensation and precise compensation.
[0238] The first method is the rotation vector angle interpolation calculated in steps S1.2.0 and S1.6.0.
[0239] The second method involves step S1.7.0, which calculates the angle value fed back from the similarity score.
[0240] The final reset angle value of the irregular tube is obtained by combining the two angles.
[0241] Step S1.11.0: Precise reset of the irregular tube.
[0242] Figure 9 The figure shows the reset process of the shaped tube. In the figure, 1 represents the rotation center of the shaped tube, 2 represents the front chuck holder, 3 represents the clamped shaped tube, 4 represents the calculated vector magnitude of the rotation center and the gray centroid, 5 represents the calculated position of the gray centroid, 6 represents the process of the shaped tube changing from the clamped state after loading to the reset state, and 7 represents the angle that the shaped tube will rotate to change to the reset state.
[0243] The mechanical gripper transports the shaped tube to the mechanical chuck. The host computer sends the rotation angle to the mechanical chuck, which then precisely resets the shaped tube. The reset angle is shown in Figure 7.
[0244] In summary, this application integrates computer vision pose recognition and intelligent decision-making into laser cutting equipment, fully realizing autonomous feeding of tube laser cutting equipment, avoiding the problem of reduced cutting accuracy caused by human error, improving reset efficiency, reducing labor costs, and improving production efficiency in the tube cutting process of laser cutting machine.
[0245] This specification also provides an embodiment of an autonomous feeding device for irregularly shaped tubes, such as... Figure 7 As shown, the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0246] Obtain the first cross-sectional profile of the irregular tube on the computer end, and calculate the first rotation vector of the first cross-sectional profile;
[0247] The second cross-sectional profile of the irregular tube to be processed is obtained based on the industrial camera, and the second rotation vector of the second cross-sectional profile is calculated.
[0248] Calculate the similarity score between the first cross-sectional profile and the second cross-sectional profile;
[0249] When the similarity score is lower than a preset threshold, the parameters of the industrial camera are adjusted, and the above steps of obtaining the second cross-sectional contour image and calculating the similarity score are repeated until the similarity score is higher than the preset threshold.
[0250] When the similarity score is higher than the preset threshold, the rotation angle of the shaped tube is obtained based on the first rotation vector and the second rotation vector, so that the mechanical chuck can reset the shaped tube to be processed based on the rotation angle.
[0251] This specification also provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0252] Obtain the first cross-sectional profile of the irregular tube on the computer end, and calculate the first rotation vector of the first cross-sectional profile;
[0253] The second cross-sectional profile of the irregular tube to be processed is obtained based on the industrial camera, and the second rotation vector of the second cross-sectional profile is calculated.
[0254] Calculate the similarity score between the first cross-sectional profile and the second cross-sectional profile;
[0255] When the similarity score is lower than a preset threshold, the parameters of the industrial camera are adjusted, and the above steps of obtaining the second cross-sectional contour image and calculating the similarity score are repeated until the similarity score is higher than the preset threshold.
[0256] When the similarity score is higher than the preset threshold, the rotation angle of the shaped tube is obtained based on the first rotation vector and the second rotation vector, so that the mechanical chuck can reset the shaped tube to be processed based on the rotation angle.
[0257] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0258] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0259] The devices, media, and methods provided in the embodiments of this specification are one-to-one correspondences. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0260] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0261] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0262] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0263] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0264] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0265] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0266] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0267] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0268] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.
Claims
1. A method for autonomous feeding of irregularly shaped tubes, characterized in that, The method includes: Obtain the first cross-sectional profile of the irregular tube on the computer end, and calculate the first rotation vector of the first cross-sectional profile; The second cross-sectional profile of the irregular tube to be processed is obtained using an industrial camera, and the second rotation vector of the second cross-sectional profile is calculated. Calculate the similarity score between the first cross-sectional profile and the second cross-sectional profile; When the similarity score is lower than a preset threshold, the parameters of the industrial camera are adjusted, and the above steps of obtaining the second cross-sectional contour image and calculating the similarity score are repeated until the similarity score is higher than the preset threshold. When the similarity score is higher than the preset threshold, the rotation angle of the shaped tube is obtained based on the first rotation vector and the second rotation vector, so that the mechanical chuck can reset the shaped tube to be processed based on the rotation angle; The process of obtaining the first cross-sectional profile of the irregularly shaped tube at the computer end specifically includes: Obtain the cross-sectional engineering drawing of the irregular tube in the computer terminal, and extract the outline dimension information from the cross-sectional engineering drawing; The cross-sectional engineering drawing is converted into an initial cross-sectional image in an image storage format; The image pixel scale in the initial cross-sectional image is calculated based on the camera pixel scale of the industrial camera and the contour size information; The initial cross-sectional image is scaled to obtain a target cross-sectional image with the same camera pixel scale as the image pixel scale. The calculation of the first rotation vector of the first cross-sectional contour map specifically includes: If the graphic outline in the target cross-sectional image is rotationally symmetric, then the rotation angle between adjacent axes of symmetry in the rotationally symmetric graphic is calculated and used as the angle of the rotation vector. If the graphic contour in the target cross-sectional image does not exhibit rotational symmetry, then the vector pointing from the rotation center to the centroid of the contour in the target cross-sectional image is calculated and used as the first rotation vector. The acquisition of the second cross-sectional profile of the irregularly shaped tube to be processed using an industrial camera specifically includes: The initial image acquired by the industrial camera is used to extract a predetermined region to obtain the cross-sectional area of the irregular tube between the grippers; A bilateral filtering function is used to perform noise reduction processing on the cross-sectional area of the irregular tube to obtain a noise-reduced image; The denoised image is subjected to exposure processing, and the contour edges under different exposure levels are extracted and fused to obtain an image contour map; Remove pixel information other than the contour information from the image contour map to obtain the second cross-sectional contour map.
2. The method for autonomous feeding of irregularly shaped tubes according to claim 1, characterized in that, The step of extracting a predetermined region from the initial image acquired by the industrial camera to obtain the cross-sectional region of the irregular tube between the grippers includes: Identify the gripper contour in the initial image; Determine the largest bounding rectangle of all contours within the gripper contour; The pixel region within the largest bounding rectangle is taken as the cross-sectional region of the irregular tube.
3. The method for autonomous feeding of irregularly shaped tubes according to claim 1, characterized in that, The calculation of the similarity score between the first cross-sectional contour map and the second cross-sectional contour map specifically includes: The target cross-sectional image is cropped to obtain a template image; Calculate the angle difference between the first rotation vector and the second rotation vector, and rotate the template image according to the angle difference; The rotated template image is trained, and the rotated template image is matched with the second cross-sectional contour image acquired by the industrial camera to calculate the similarity score.
4. The method for autonomous feeding of irregularly shaped tubes according to claim 3, characterized in that, The training of the rotated template image includes: Based on the initial angle corresponding to the initial state of the template image, a first angle threshold and a second angle threshold are set as angle training parameters, and an angle training step size threshold is set. Based on the size of the template image, extract the pyramid image corresponding to the template image and extract the image feature points of each layer of the pyramid image; Based on the image feature points, the angle training parameters, and the angle training step size, gradient feature training is performed on the template image to obtain matching data; Save the matching data after training.
5. A self-feeding device for irregularly shaped tubes, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Perform the autonomous feeding method for irregularly shaped tubes as described in any one of claims 1-4.
6. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed, they implement the autonomous feeding method for irregularly shaped tubes as described in any one of claims 1-4.
Citation Information
Patent Citations
Visual positioning method for automatic grabbing of special-shaped conduit robot
CN111546335A
Cutting machining method based on visual identification of pipe characteristics
CN113020817A