The invention relates to the technical fields of three-dimensional measurement based on computer vision and industrial automation, in particular to a line structured light center extraction method adopted in cases of complicated environments and complicated part surface interference when a line structured light scanning method is used for three-dimensional reconstruction and three-dimensional measurement.
At present, in the field of industrial automation, it is necessary to extract three-dimensional point cloud information of objects in many application scenarios such as gripping of objects stacked out of order and measurement of three-dimensional data of products. Compared with surface structured light scanning, line structured light scanning, as a principle method for acquiring three-dimensional point cloud data, has the advantages of high accuracy and low sensitivity to reflective objects.
In actual application, center extraction of line structured light strips is a key step in the line structured light scanning process, and has a direct influence on the accuracy of an entire system. Particularly in a case where the surface of a measured object is in a dark color or is seriously reflective, or the measurement background interference is strong, the accuracy and robustness of center extraction of the line structured light stripes are unsatisfying.
The study of existing line structured light center extraction algorithms mainly focuses on how to optimize the processing speed and accuracy under the condition of weak background interference. However, there are only a few center extraction algorithms for complicated object surfaces, which makes it impossible to use the line structured light scanning method for industrial application in complicated cases, thus severely limiting specific industrial application scenarios.
In view of application scenarios with complicated object surface interference, the invention considers the features of light stripes from the aspect of overall relevancy of line structured light scan images and quantify and represent the features of line structured light stripes determined by human eyes to fulfill high accuracy and robustness even in complicated cases, thus expanding the application scenarios of line structured light scanning.
To solve the problems that, in complicated scenarios, pseudo ribbon stripe regions caused by complicated texture and dark stripe regions caused by dark surfaces severely reduce the stripe center extraction effect and it is hard to locally filter out pseudo stripes and detect real stripes, the invention provides a line structured light center extraction method based on laser stripe feature estimation, which has a good interference filter effect and is able to accurately and stably extract the center pixel of line structured light stripes.
To solve the above-mentioned problems, the invention adopts the following technical solution:
A line structured light center extraction method for complicated surfaces comprises the following steps:
In Step 1, a maximum pixel of the light stripe is obtained after the line structured light image is processed by the extremum method, a connected field area is calculated, an interference region with a small area and a reflective region with a width not meeting stripe features are filtered, a connected domain meeting stripe region features is used as a light stripe region, the seed point of the algorithm is selected, and iterative line fitting is performed upwards and downwards respectively.
By performing the above step, a small interference region and a large reflective region can be removed, and some pseudo stripe regions meeting corresponding features are taken as substitutive seed points. After the center line is extracted, multiple parallel center lines from different seed points are determined and estimated according to the length of the center line and connection with other determined center lines, and finally, an optimal center line is determined to ensure that correct seed points are extracted in the above-mentioned cases.
In Step 2, an average grayscale VL of adjacent pixels of a line away from the seed point, used as an initial point, by a distance L in a θ direction is calculated first, and an intensity representation value VQ in this direction is obtained by weighted averaging, as shown by formula (1):
Wherein, fL=R−L, n=Σ1nfL, and based on the stripe width, a constant R is set as 20; Vθ represents an intensity feature difference between this direction and a background direction, and the larger the intensity representation value, the larger the intensity feature difference between this direction and the background direction, and the greater the possibility of the stripe direction.
For an excessively dark laser stripe caused by a dark surface, a direction continuity feature value θdev is established to represent a change of the stripe direction in two successive times of growing, and the smaller the value of the change of the stripe direction, the higher the continuity of the laser stripe, and the greater the possibility of the stripe direction; and finally, the score function is established to calculate extreme points of all intensity feature values, and a stripe direction corresponding to a maximum value of the score function is selected as a growth direction, as shown by formula (2):
In Step 3, a complete light stripe skeleton can be extracted from each seed point by growing, and when the grayscale of a processed region is extremely low or the degree of attenuation of the intensity representation value during two successive iterations is too large, the iterative operation is stopped to obtain the center line of the light stripe.
The accurate center point of the laser stripe is calculated in a local adjacent region of the obtained stripe center line by the grayscale centroid method. Assume I is a laser stripe image, I(i,j) is the grayscale of a pixel in the ith row and jth column, (i0,j0) is pixel coordinates of the obtained center line, and coordinates of an accurate center point of the i0
By adoption of the above technical solution, the invention has the following beneficial effects:
The invention provides a good stripe center extraction scheme that can effectively reduce interference in cases of part surfaces with complicated texture, part surfaces in dark colors and reflective part surfaces in the line structured light scanning process, thus guaranteeing good robustness and stability in the stripe center extraction process.
The invention will be further described below with reference to accompanying drawings.
The invention will be further described below in conjunction with the accompanying drawings and embodiments.
First, a line structured light image is processed by an extremum method and a connected domain filter method by means of strong filter to select a connected domain region best fitting laser stripe features, and the center point of the region is used as a reliable center point of a laser stripe, namely a seed point.
As shown in
Finally, the obtained center line is filtered, and a unique center line is determined for each row to eliminate interference on a complicated object surface, and a center point of the laser stripe is extracted by a grayscale centroid method according to formula (3) and is then output.
As can be seen from
The above embodiments are merely specific ones of the invention, and are not intended to limit the technical features of the invention. Any simple variations, equivalent substations or embellishments made to solve basically identical technical problems and fulfill basically identical technical effects based on the invention should also fall within the protection scope of the invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2020/134128 | 12/5/2020 | WO |