Glasses frame recognition and grabbing feeding method based on continuous edge extraction

By using a continuous edge extraction method and combining 3D structured light with a robotic arm, the positioning problem of highly reflective, small-volume eyeglass frames was solved, enabling fast and accurate gripping and automatic feeding, thus meeting the production needs of different types of eyeglass frames.

CN115578314BActive Publication Date: 2026-01-09SUZHOU ZHONGKE XINGZHI INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211088357.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-07
Publication Date
2026-01-09
Estimated Expiration
2042-09-07

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve complete 3D point cloud reconstruction on highly reflective and small-volume eyeglass frames, making it difficult to accurately estimate the frame's position. Furthermore, traditional template matching methods require frequent template changes and complex parameter adjustments, impacting the efficiency of automated material loading.

Method used

A continuous edge extraction-based method is used to obtain 3D point cloud data and 2D texture map of the eyeglass frame through 3D structured light scanning. After removing the background, the data is binarized, a smooth edge curve is fitted, a weighted value is calculated, and the data is back-projected into 3D space to guide the robotic arm to grasp the frame.

Benefits of technology

It enables rapid and accurate positioning and gripping on highly reflective and small-volume eyeglass frames, reducing the complexity of template matching and improving the flexibility and efficiency of automatic feeding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115578314B_ABST
    Figure CN115578314B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on continuous edge extraction's glasses frame identification and grabbing feeding method, comprising the following steps: 3D structured light scanning obtains 3D point cloud data and 2D texture map;Background image rejection obtains the 3D point cloud data after background rejection and binary image;Binary image down-sampling, find the no-discontinuous length edge greater than length threshold;Fitting smooth edge curve and segmentation, eliminate the smooth edge curve part that closed area is formed between smooth edge curve;The curve length of each smooth edge curve is sought, and the distance of curve midpoint and centroid;Calculate weighted value;From the curve pixel information of smooth edge curve, back projection is to 3D point cloud space, obtains corresponding 3D point cloud data, interpolation space 3D curve;The pose to be grabbed of space 3D curve center point is calculated, and is issued to manipulator implementation and is grabbed.The application adapts to the production requirement of quick changeover, can estimate the space pose of glasses frame, guarantees the higher success rate of glasses frame and is grabbed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of disordered grabbing industrial automation technology, and particularly relates to a glasses frame recognition and grabbing feeding method based on continuous edge extraction. BACKGROUND

[0002] In order to solve the automatic feeding problem in automatic processing of glasses frames, a 3D structured light is used to scan the stacked glasses frames. The 3D structured light completes 3D point cloud reconstruction for a single glasses frame of the stacked glasses frames. However, the 3D structured light in the prior art has the following defects in actual application: (1) some glasses frames are made of stainless steel material and have high light reflection characteristics, and the volume of the glasses frames is small. Due to the high light reflection and small volume of the glasses frames, it is difficult for the 3D structured light to complete complete and continuous 3D point cloud reconstruction for a single glasses frame, and it is difficult to estimate the position of the glasses frame by using a 3D point cloud position estimation method based on surface matching; (2) there is a large deviation in the tolerance of the size and shape of the processed glasses frames. For different types of glasses frames, the traditional template matching method needs to frequently change the template and has a complex parameter adjustment process.

[0003] Therefore, there is a need for a robust grabbing implementation to guide the robot arm to complete the automatic feeding of the glasses frames. SUMMARY

[0004] In view of the deficiencies in the prior art, the purpose of the present application is to provide a glasses frame recognition and grabbing feeding method based on continuous edge extraction, which is applied to the automatic feeding of glasses frames, can adapt to the production requirements of rapid model change, can estimate the spatial pose of the glasses frame in the case that a single glasses frame is difficult to complete complete and continuous 3D point cloud reconstruction, and can ensure a high success rate of grabbing the glasses frame.

[0005] In order to achieve the above object, the technical scheme adopted by the present application is as follows: a glasses frame recognition and grabbing feeding method based on continuous edge extraction, comprising the following steps: (1) 3D structured light scans the glasses frame in a stacked state to obtain 3D point cloud data and a 2D texture map; (2) background map removal is performed on the 2D texture map to obtain 3D point cloud data after background removal and a binary image; (3) a length threshold is set, the binary image is down-sampled, and a continuous long edge greater than the length threshold is found; (4) a smooth edge curve is fitted, and the smooth edge curve part forming a closed area between the smooth edge curves is removed by segmenting the smooth edge curves that intersect; (5) the curve length of each smooth edge curve is calculated; (6) the distance between the curve midpoint of each smooth edge curve and the centroid is calculated; (7) a weighted value is calculated; (8) the curve pixel information of the smooth edge curve is back-projected to the 3D point cloud space to obtain the corresponding 3D point cloud data and interpolate a 3D space curve; (9) the pose to be grabbed of the center point of the 3D space curve is calculated and sent to a mechanical arm; (10) the mechanical arm performs grabbing, 3D structured light is scanned again to obtain 3D point cloud data and a 2D texture map, and the foregoing steps are repeated until all the glasses frames are grabbed.

[0006] As a preferred scheme, the 3D structured light is 3D monocular structured light.

[0007] As a preferred scheme, step (2) selects a continuous long edge from the 2D texture map after background removal as a real glasses frame to obtain 3D point cloud data after background removal and a binary image.

[0008] As a preferred scheme, step (3) first down-samples the binary image, and in the down-sampled image, any two adjacent edge pixels with a gray value of 255 are examined, a growth direction is determined according to the two pixels, and it is checked whether the two pixels can be connected to form a connecting edge in the 2D texture map along the growth direction. After the operation of the pixels in the down-sampled image is performed, the pixels that can be connected by the connecting edge are connected to form a continuous long edge. In this way, a plurality of continuous long edges with a length greater than the length threshold appear in the down-sampled image, the plurality of continuous long edges with a length greater than the length threshold are all target glasses frames to be grabbed, and the selected grabbing point is a 3D coordinate corresponding to an original image pixel indexed by a down-sampled pixel in the selected continuous long edge.

[0009] As a preferred scheme, when the binary image is down-sampled, a larger pixel is used. If there is an edge pixel in the large pixel, the large pixel is white, otherwise the large pixel is black. In each white large pixel, the original image pixel indexed by the white large pixel is the edge pixel closest to the center of the white large pixel.

[0010] As a preferred solution, the included angle between the edge pixel and the growth direction is not more than 90 degrees.

[0011] As a preferred solution, in step (4), the no-discontinuous continuous length edges greater than the length threshold value screened in step (3) are subjected to interpolation smoothing processing to fit a smooth edge curve, a segmentation algorithm is used to segment the smooth edge curve, and then a plurality of continuous smooth edge curves are obtained in the binary image.

[0012] As a preferred solution, through steps (5)-(9), the continuous smooth edge curves in the binary image are indexed to the corresponding 3D space positions, the positions of the smooth edge curves in the world coordinate system are calculated, the smooth edge curves are fitted in the world coordinate system, the positions of the smooth edge curves are estimated, and the grasping pose of the eyeglass frame is estimated, and the position of the outermost eyeglass frame is selected to guide the robot to realize grasping and feeding.

[0013] As a preferred solution, the 6 degrees of freedom are used for grasping the eyeglass frame, the smooth edge curves are screened, the smooth edge curves are back-projected to the 3D space, the positions of the eyeglass frames in the 3D space are fitted, and the position estimation of the graspable position is quickly given.

[0014] As a preferred solution, the application further provides a method for recognizing and grasping eyeglass frames based on continuous edge extraction, which comprises the following specific steps:

[0015] (1) 3D structured light is used to scan the stacked eyeglass frames to obtain 3D point cloud data and a 2D texture image;

[0016] (2) The 3D point cloud data obtained in step (1) is subjected to background elimination, a plane P0 on which the eyeglass frames are placed is fitted, the plane P0 is translated by Δd along the positive direction of its normal vector to obtain a plane P1, the plane P0 is translated by Δd along the negative direction of its normal vector to obtain a plane P2, the 3D point cloud data falling between the planes P1 and P2 is eliminated, and the 3D point cloud data after background elimination and a binary image are obtained; the Δd is 0.1-1 mm;

[0017] (3) A length threshold value d is set, and the no-discontinuous continuous length edges greater than the length threshold value d are extracted by using the binary image and the 3D point cloud data;

[0018] (4) According to the obtained no-discontinuous continuous length edge information, interpolation processing is performed, the smooth edge curves are processed in the binary image, the pixel information of each point constituting the smooth edge curves is recorded, the smooth edge curves that intersect are segmented, and the smooth edge curves that can form a closed area are eliminated;

[0019] (5) The curve length L of the smooth edge curves screened in step (4) is calculated;

[0020] (6) Calculate the curve midpoint of each smooth edge curve in step (5) of the image coordinate system of the binary image, and calculate the centroid of the point group composed of the curve midpoints of each smooth edge curve, and obtain the distance D between the centroid and the curve midpoint of each smooth edge curve;

[0021] (7) According to the result of distance D in step (6) and the size of curve length L in step (5), the weight is allocated in 1:1, and the weighted value is obtained: 0.5*D+0.5*L, D is the distance between the centroid and the curve midpoint of each smooth edge curve, and L is the curve length of the smooth edge curve;

[0022] (8) According to the maximum value of the weighted value in step (7), the corresponding smooth edge curve is indexed, and the pixel information of the smooth edge curve is indexed 3D point cloud data, and the spatial 3D curve is interpolated;

[0023] (9) Calculate the tangent vector of the curve midpoint center in the smooth edge curve in step (8) on the spatial 3D curve And its unit vector Index the points in the smooth edge curve in step (8) near the curve midpoint center, and the range of the points near the curve center center in the smooth edge curve in step (8) is [center-0.5d center-0.5d], wherein d is the length threshold, and center is the curve center of the smooth edge curve; A plane P3 is constructed by the points in the smooth edge curve in step (8) near the curve midpoint center, and the normal vector of the plane P3 is calculated The normal vector is constrained The projection of the world coordinate system Z axis is negative, and the Z axis direction of the tool coordinate system of the manipulator should be adapted to the direction; Calculate Wherein is the cross product of vectors and , and the constructed is perpendicular to the orthogonal normal vector and the vector is the normal vector of the plane P3, is the unit vector of the line vector; The to-be-grasped pose of the center point of the spatial 3D curve is constructed, and the pose is sent to the manipulator to realize the rough grasping of the glasses frame, and the pose homogeneous matrix is:

[0024]

[0025] Wherein, is the cross product of vectors and , and the constructed is perpendicular to the orthogonal normal vector vector is the normal vector of the plane P3, is the line vector unit vector, and center is the curve center of the smooth edge curve.

[0026] (10) The mechanical arm implements grabbing, 3D structured light re-scans the stacked state of the glasses frame, and repeats steps (1) to step (9) until all the glasses frames are grabbed.

[0027] Compared with the prior art, the beneficial effects of the present application are:

[0028] (1) The method of using the positioning of the local contour edge of the glasses frame instead of the positioning of the whole glasses frame can quickly and effectively realize the position estimation problem of the slender high-reflective glasses frame.

[0029] (2) For different types of glasses frames, as long as a certain length of curve can be effectively found in the image, the grabbing position can be planned, and the frequent template replacement and complex parameter adjustment process in the traditional template matching method are eliminated. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1 is the work flow chart of the present application. DETAILED DESCRIPTION

[0031] The present application will be further described below in conjunction with specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and cannot be used to limit the protection scope of the present application.

[0032] Example 1:

[0033] As Figure 1As shown, a kind of glasses frame recognition and grabbing feeding method based on continuous edge extraction, comprising the following steps: (1) 3D structured light scanning glasses frame in stacking state, obtains 3D point cloud data and 2D texture map;(2) obtains 3D point cloud data and binary image after background removal of 2D texture map;(3) setting length threshold, down-sampling binary image, finding continuous long edge greater than length threshold;(4) fitting smooth edge curve, and segmenting smooth edge curve with intersection, removing smooth edge curve part forming closed area between smooth edge curves;(5) calculating curve length of each smooth edge curve;(6) calculating distance between curve midpoint of each smooth edge curve and centroid;(7) calculating weighted value;(8) by curve pixel information of smooth edge curve, back-projection to 3D point cloud space, obtaining corresponding 3D point cloud data, interpolating space 3D curve;(9) calculating the pose of space 3D curve center point to be grabbed, and issuing to mechanical arm;(10) mechanical arm implements grabbing, 3D structured light re-scanning obtains 3D point cloud data and 2D texture map, repeating the foregoing steps until all glasses frame grabbing is completed.

[0034] Preferably, the 3D structured light is 3D monocular structured light.

[0035] Because of the high light reflection problem of glasses frame, single glasses frame of similar glasses frame object is difficult to complete complete and continuous 3D point cloud reconstruction, so it is difficult to estimate the position of the object using the 3D point cloud position estimation method based on Surface Matc, considering that rough grabbing of glasses frame only needs to provide a suitable grabbing point to realize grabbing, therefore a method of using local contour edge positioning of glasses frame instead of overall positioning of glasses frame is proposed, which can quickly and effectively realize the position estimation purpose of slender high light reflection object. For different types of glasses frame, as long as continuous long edge greater than length threshold can be found in binary image, smooth edge curve can be fitted, and grabbing position can be planned, so that the need for frequent template replacement and complex parameter adjustment process in traditional template matching method is eliminated.

[0036] More preferably, step (2) selects continuous long edge as real glasses frame from background removed 2D texture map, thereby obtaining 3D point cloud data and binary image after background removal.

[0037] Specifically, for the 2D texture map after background removal, there are other noise points besides the edges of the glasses frame, and continuous long edge needs to be selected as the real glasses frame.

[0038] More preferably, step (3) first downsamples the binary image, in the downsampled image, any two adjacent edge pixels with a gray value of 255 are examined, and it is checked whether they can be connected to form a connecting edge in the 2D texture map along the growth direction determined by the two pixels. After the above operation is performed on each pixel of the downsampled image, the pixels that can be connected in turn through the connecting edge are connected to form a continuous length edge, and a plurality of continuous length edges with a length greater than a length threshold value appear in the downsampled image. The plurality of continuous length edges with a length greater than the length threshold value are all graspable eyeglass frame targets, and the candidate grasping points are 3D coordinates corresponding to the original image pixels indexed by the downsampled pixels in the selected continuous length edge.

[0039] Specifically, when the binary image is downsampled, a larger pixel is used, if there is an edge pixel in the large pixel, the large pixel is white, otherwise the large pixel is black, and in each white large pixel, the original image pixel indexed by the white large pixel is the edge pixel closest to the center of the white large pixel.

[0040] More specifically, the angle between the edge pixel and the growth direction is not more than 90 degrees.

[0041] Preferably, in step (4), the continuous length edges greater than the length threshold value selected in step (3) are subjected to interpolation smoothing processing to fit a smooth edge curve, and a segmentation algorithm is used to segment the smooth edge curve, thereby obtaining a plurality of continuous smooth edge curves in the binary image.

[0042] Preferably, steps (5) to (9) are used to index the corresponding 3D space positions of the continuous smooth edge curves in the binary image, to obtain the positions of the eyeglass frames corresponding to the smooth edge curves in the world coordinate system, to fit the smooth edge curves in the world coordinate system, to estimate the positions of the smooth edge curves, and to estimate the grasping pose of the eyeglass frame, and to select the position of the outermost eyeglass frame to guide the robot to realize grasping and feeding.

[0043] Preferably, the 6 degrees of freedom are used to implement grasping of the eyeglass frame, the smooth edge curve is selected, the smooth edge curve is back projected to the 3D space, the position of the eyeglass frame in the 3D space is fitted, and a graspable position estimate is quickly given.

[0044] Specifically, considering the stacking, the 6 degrees of freedom are used to implement grasping of the eyeglass frame, the smooth edge curve is selected, the smooth edge curve is back projected to the 3D space, the position of the eyeglass frame in the 3D space is fitted, and a graspable position estimate is quickly given.

[0045] Embodiment 2:

[0046] On the basis of embodiment 1, the application further provides a glasses frame recognition and grabbing feeding method based on continuous edge extraction, comprising the following specific steps:

[0047] (1) 3D structured light scans the glasses frame in a stacked state to obtain 3D point cloud data and a 2D texture map;

[0048] (2) background elimination is performed on the 3D point cloud data obtained in step (1), a plane P0 on which the glasses frame is placed is fitted, the plane P0 is translated by Δd along the positive direction of its normal vector to obtain a plane P1, and the plane P0 is translated by Δd along the negative direction of its normal vector to obtain a plane P2, the 3D point cloud data falling between the plane P1 and the plane P2 is eliminated, and 3D point cloud data after background elimination and a binary image are obtained; the Δd is 0.1-1 mm;

[0049] (3) a length threshold d is set, and a continuous length greater than the length threshold d is extracted by using the binary image and the 3D point cloud data;

[0050] (4) according to the obtained continuous length information, interpolation processing is performed, the binary image is processed into a smooth edge curve, pixel information of each point constituting the smooth edge curve is recorded, the smooth edge curves that intersect are segmented, and the smooth edge curves that can form a closed area are eliminated;

[0051] (5) the curve length L of the smooth edge curve screened in step (4) is calculated;

[0052] (6) the curve midpoint of each smooth edge curve in step (5) in the image coordinate system of the binary image is calculated, the centroid of a point group composed of the curve midpoints of each smooth edge curve is calculated, and the distance D between the centroid and the curve midpoint of each smooth edge curve is calculated;

[0053] (7) according to the result of the distance D in step (6) and the size of the curve length L in step (5), a weight is allocated in a 1:1 ratio, a weighted value: 0.5*D+0.5*L is calculated, D is the distance between the centroid and the curve midpoint of each smooth edge curve, and L is the curve length of the smooth edge curve;

[0054] (8) according to the maximum value of the weighted value in step (7), the corresponding smooth edge curve is indexed, the pixel information of the smooth edge curve is indexed to the 3D point cloud data, and a spatial 3D curve is interpolated;

[0055] (9) the tangent vector of the curve midpoint center in the smooth edge curve in step (8) on the spatial 3D curve is calculated and the unit vector is calculated The step (8) smoothes the edge curve of the points near the center of the curve, the range of the points near the center of the curve of the step (8) smoothed edge curve is [center-0.5d center-0.5d], wherein d is a length threshold, and the center is the center of the smoothed edge curve; a plane P3 is constructed from the points near the center of the curve of the step (8) smoothed edge curve, and a normal vector of the plane P3 is calculated The normal vector is constrained The projection of the world coordinate system Z axis is negative, and the Z axis direction of the manipulator tool coordinate system should be adapted to the direction; the calculation is Wherein is the cross product of the vector and The constructed is perpendicular to the orthogonal normal vector and the vector is the normal vector of the plane P3, is a line vector unit vector; a to-be-grasped pose of the 3D curve center point is constructed, and the pose is sent to the manipulator to realize rough grasping of the glasses frame, and the pose homogeneous matrix is:

[0056]

[0057] Wherein, is the cross product of the vector and The constructed is perpendicular to the orthogonal normal vector and the vector is the normal vector of the plane P3, is a line vector unit vector, and the center is the center of the smoothed edge curve;

[0058] (10) The manipulator implements grasping, the 3D structured light re-scans the glasses frame in a stacked state, and steps (1) to (9) are repeated until all the glasses frames are grasped.

[0059] The application is applied to automatic feeding of glasses frames, and has the following advantages: high flexibility, only one continuous length edge greater than a length threshold needs to be found from a binary image, a smoothed edge curve is fitted, the position of the whole glasses frame is estimated from the position of the smoothed edge curve of the local glasses frame, template matching is not needed for each type of glasses frame, quick switching of different glasses frame grasping can be realized quickly, and model change production of product production is facilitated.

[0060] The above merely describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims

1. A method for recognizing and picking up eyeglass frames based on continuous edge extraction, characterized in that, The method comprises the following steps: (1) 3D structured light scans the stacked glasses frame to obtain 3D point cloud data and a 2D texture map; (2) background image removal is performed on the 2D texture map to obtain 3D point cloud data after background removal and a binary image; (3) a length threshold is set, the binary image is down-sampled, and a continuous long edge greater than the length threshold is searched; (4) a smooth edge curve is fitted, and the smooth edge curve part forming a closed area between the smooth edge curves is removed by segmenting the smooth edge curves intersecting with each other; (5) the curve length of each smooth edge curve is calculated; (6) the distance between the curve midpoint of each smooth edge curve and the centroid is calculated; (7) the weighted value is calculated according to the distance between the curve midpoint of the smooth edge curve in step (6) and the curve length in step (5); and (8) the corresponding smooth edge curve is indexed. The 3D point cloud data corresponding to the smooth edge curve is obtained by back-projection of the curve pixel information of the smooth edge curve to the 3D point cloud space, and the spatial 3D curve is interpolated. In step (3), the binary image is down-sampled, and in the down-sampled image, whether two adjacent edge pixels with a gray value of 255 can be connected to form a connecting edge along a growth direction determined by the two pixels is checked, and after the operation on each pixel in the down-sampled image, the pixels connected by the connecting edge are connected to form a continuous long edge without a break, and a plurality of continuous long edges without a break greater than the length threshold are obtained in the down-sampled image, the continuous long edges without a break greater than the length threshold are all graspable glasses frame targets, and the selected grasping point is a 3D coordinate corresponding to an original image pixel indexed by a down-sampled pixel in the continuous long edge without a break. The 3D structured light is 3D monocular structured light.

2. The method of claim 1, wherein the method is characterized by: In step (2), the continuous long edge is selected from the 2D texture map after background removal as a real glasses frame, and the 3D point cloud data after background removal and the binary image are obtained.

3. The method of claim 1, wherein the method is characterized by: In the down-sampling of the binary image, a larger pixel is used, if there is an edge pixel in the larger pixel, the larger pixel is white, otherwise, the larger pixel is black, and in each white larger pixel, the original image pixel indexed by the white larger pixel is the edge pixel closest to the center of the white larger pixel.

4. The method of claim 1, wherein the method is characterized by: The angle between the edge pixel and the growth direction is less than or equal to 90 degrees.

5. The method of claim 1, wherein the method is characterized by: In step (4), the continuous long edge greater than the length threshold selected in step (3) is subjected to interpolation smoothing processing to fit the smooth edge curve, the smooth edge curve is segmented by using a segmentation algorithm, and a plurality of continuous smooth edge curves are obtained in the binary image.

6. The method of claim 1, wherein the method further comprises: ​ 7. The method of claim 1, wherein the method further comprises: The continuous smooth edge curve in the binary image is indexed to the corresponding 3D space position through steps (5)-(9), the position of the smooth edge curve corresponding to the glasses frame in the world coordinate system is calculated, the smooth edge curve is fitted in the world coordinate system, the position of the smooth edge curve is estimated, the grasping pose of the glasses frame is estimated, and the position of the outermost glasses frame is selected to guide the robot to realize grasping and feeding.

8. The method of claim 7, wherein the method further comprises: The 6-DOF is used for grasping the glasses frame, the smooth edge curve is screened, the smooth edge curve is back projected to the 3D space, the position of the glasses frame in the 3D space is fitted, and the position estimation of the graspable position is quickly given.

9. The method of claim 1-8, wherein the method is characterized in that, The method comprises the following steps: (1) 3D structured light scans the glasses frame in the stacking state to obtain 3D point cloud data and a 2D texture image; (2) The 3D point cloud data obtained in step (1) is subjected to background elimination, and a plane P0 on which the glasses frame is placed is fitted. The plane P0 is translated by Δd along the positive direction of the normal vector to obtain a plane P1, and the plane P0 is translated by Δd along the negative direction of the normal vector to obtain a plane P2. The 3D point cloud data between the planes P1 and P2 is eliminated to obtain the 3D point cloud data after background elimination and a binary image; the Δd is 0.1-1 mm; (3) A length threshold d is set, and the non-discontinuous length edges greater than the length threshold d are extracted by using the binary image and the 3D point cloud data; (4) According to the obtained non-discontinuous length edge information, corresponding interpolation processing is performed to process the binary image into a smooth edge curve, and the pixel information of each point constituting the smooth edge curve is recorded. The smooth edge curves that can form a closed area are segmented and eliminated; (5) The curve length L of the smooth edge curve screened in step (4) is calculated; (6) The curve midpoint of each smooth edge curve in step (5) is calculated in the image coordinate system of the binary image, and the centroid of the point group composed of the curve midpoints of each smooth edge curve is calculated. The distance D between the centroid and the curve midpoint of each smooth edge curve is calculated; (7) According to the result of the distance D in step (6) and the size of the curve length L in step (5), the weight is allocated in a 1:1 ratio, and the weighted value is calculated: 0.5*D+0.5*L, D is the distance between the centroid and the curve midpoint of each smooth edge curve, and L is the curve length of the smooth edge curve; (8) According to the maximum value of the weighted value in step (7), the corresponding smooth edge curve is indexed, and the pixel information of the smooth edge curve is indexed to the 3D point cloud data to interpolate the spatial 3D curve; (9) Calculate the tangent vector of the center point of the curve in step (8) on the 3D curve in space. And find its unit vector. The points in the smoothed edge curve in step (8) located near the center of the curve are indexed. The range of points near the center of the smoothed edge curve in step (8) is [center-0.5dcenter-0.5d], where d is the length threshold and center is the center of the smoothed edge curve. A plane P3 is constructed from the points in the smoothed edge curve in step (8) located near the center of the curve, and the normal vector of the plane P3 is calculated. Constrain the normal vector The projection of the Z-axis in the world coordinate system is negative, and the Z-axis direction established in the robot tool coordinate system should be adapted to this direction; calculation in For vectors and The cross product, after construction Perpendicular to orthogonal vectors with vector Let be the normal vector of plane P3. Given a line vector and a unit vector, construct the pose of the center point of a 3D curve to be grasped, and send the pose to the robotic arm to achieve coarse grasping of the eyeglass frame. The pose homogeneous matrix is: wherein is a vector is the cross product of , the constructed is perpendicular to the orthogonal normal vector is the vector is a normal vector of the plane P3, is a line vector unit vector, and center is the curve center of the smooth edge curve; (10) The mechanical arm implements grasping, the 3D structured light re-scans the glasses frame in the stacking state, and steps (1)-(9) are repeated until the grasping of all the glasses frames is completed.

Citation Information

Patent Citations

  • Implementation method for workpiece grasping of industrial robot based on visual positioning

    CN106934813A