CN112629409A - Method for extracting line structure light stripe center - Google Patents
Method for extracting line structure light stripe center Download PDFInfo
- Publication number
- CN112629409A CN112629409A CN202011375938.3A CN202011375938A CN112629409A CN 112629409 A CN112629409 A CN 112629409A CN 202011375938 A CN202011375938 A CN 202011375938A CN 112629409 A CN112629409 A CN 112629409A
- Authority
- CN
- China
- Prior art keywords
- point
- line
- image
- light
- extracting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
Abstract
The invention relates to the technical field of machine vision, and discloses a method for extracting the center of a linear structured striation. Therefore, the extraction method of the fringe center needs to be designed from three aspects of precision, real-time performance and applicability.
Description
Technical Field
The invention relates to the technical field of machine vision, in particular to a method for extracting the centers of light stripes of a line structure.
Background
Common methods for extracting the centers of the structured light fringes include a threshold value method, a gray scale gravity center method, a curve fitting method and a Hessian matrix method. The threshold value method is a framework extraction method, and has high speed but poor positioning accuracy. Liu bin and the like adopt a gray scale gravity center method, the pixel coordinates of the centers of the texture of the structured light can be accurately acquired, and the method is more suitable for light bars with smaller light band dispersity; an improved gray scale gravity center method is provided by Zhaobayan and the like, a light band is processed by binarization before the gray scale gravity center method is adopted, the influence of non-uniform width of the light band on an extraction result is reduced, and the extraction precision is higher. According to the characteristics of the gray scale of the light section of the line structure, an improved curve fitting method is provided for Liutao and the like, but the extraction speed is low; based on the Liu Ji and the like, the initial light stripe center is extracted by the maximum value of the cross correlation before curve fitting, and then the stripe center is accurately positioned by a curve fitting method, so that the method has strong interference capability and good robustness, but the calculated amount of curve fitting is still large; the line fitting is applied in the light bars with broken line defects, such as Jiangyanpay, and the like, so that the light bar defects are improved, but the extraction precision can only reach the pixel level. Steger utilizes Hessian matrix to obtain the normal direction of the center of the line-structured light stripe, and carries out second-order Taylor expansion on the gray distribution function of each point pixel of the structured light stripe along the normal direction to obtain the central point of the stripe, the method has high precision, but at least 5 times of Gaussian convolution operation is required, the calculated amount is large, and the real-time performance is poor; the small field images acquired by a plurality of cameras are spliced by utilizing overlapped field of view (OFOV) images, such as the billows and the like, so that the pixel coordinates of the centers of light bars are acquired, and the method is high in cost; on the basis, a stripe normal is solved by Principal Component Analysis (PCA), a Hessian matrix in a Steger algorithm is replaced, and the complexity of calculation is reduced.
Populus diversifolia proposes an extraction method combining a principal component analysis method and a gray scale gravity center method in a linear structured light extraction method, and performs Gaussian convolution on an image and preliminarily extracts effective striation information in the image by using a threshold segmentation method; calculating the gradient distribution and the amplitude of the light stripe image, and selecting a point with zero amplitude as an initial point; obtaining the normal direction of the point by utilizing PCA; two points with the maximum amplitude values on two sides of the initial point along the normal direction are used as boundary points, the light stripe centers in the boundary are calculated by utilizing a gray scale gravity center method, the next initial point is determined, and the light stripe centers are extracted through iteration. The method combines a principal component analysis method with a gray scale gravity center method, the precision is less than 0.05 pixel compared with a Steger method, the precision effect is not improved, the processing time has no obvious advantage, and the method is insensitive to the surface of an object with stronger optical property.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a method for extracting the centers of the light stripes of the line structure.
The invention is realized by the following technical scheme: the invention provides a method for extracting the centers of light stripes of a line structure, which comprises the following steps:
step 1, extracting ROI (region of interest) of an image, and processing the image in the ROI;
step 2, calculating the gradient distribution of the structured light striations, the amplitude value and selecting a point with zero amplitude value as an initial point;
and 3, determining the normal direction and the tangential direction of the point by a principal component analysis method, taking the point as a seed point as a region growing iterative operation, and further extracting an accurate fringe center.
Further, in step 1, the extraction structured light stripe image at the initial point has high contrast and strong light stripe directivity, and a region of interest (ROI) in the structured light image is extracted by using a self-adaptive threshold method, so that not only can the influence of noise of the object to be measured on the subsequent stripe center extraction be effectively reduced, but also the extraction speed of the stripe center is greatly improved.
Further, in step 2, the image f (x, y) is convolved with the gaussian function g (x, y), that is, the image f (x, y) is convolved with the gaussian function g (x, y)To reduce the influence of noise points in the image, the gray scale gradient (G) of the image is calculatedx,Gy) And the magnitude | G (x, y) |, the calculation process is:
within ROI of the extracted line structured light, Mi(i 1,2, 3.) denotes the ith row of the light bar, and the row-by-row search is performed for a point P with zero amplitude0(i0,j0) This point is taken as the initial point.
Further, in the step 3, a covariance matrix is raised by noise from a gradient vector of a pixel in the initial point field, and a normal direction and a tangential direction of the striations of the light are obtained by solving a feature vector of the covariance matrix by a principal component analysis method; the selected field size is W, and a covariance matrix C is established
Solving the eigenvalues λ of the matrix1、λ2And corresponding feature vectors v1、v2
Wherein, the eigenvector corresponding to the eigenvalue with large absolute value is the normal direction of the initial point, and λ can be known from the above formula1>λ2So that λ1Corresponding feature vector v1Normal to the initial point, λ2Corresponding feature vector v2Is tangential to the initial point.
Further, in the step 3, the stepThe initial point P described in step 20(i0,j0) As the seed point, the gray scale function of the light strip is in Gaussian distribution in the direction of the normal line of the light strip, so that a gray threshold is set as a growth criterion, 8 pixels around the seed point are traversed by a 9 x 9 template, and the next seed point is determined; once the seed point is determined, the normal line and the tangent line of the point can be obtained by a principal component analysis method; and defining 8 fields around the growing point along the tangent region as a growing connected domain, and judging whether the point with the gray difference smaller than the threshold value can be classified as a connected domain to prevent overgrowth.
Compared with the prior art, the invention has the following beneficial effects:
the Steger algorithm obtains the normal direction of the stripe by utilizing a Hessian matrix and performs second-order Taylor expansion on a gray distribution function on the cross section of the structural stripe to obtain the center of the sub-pixel, so that the extraction precision of the sub-pixel can be achieved, but the calculation complexity is high, and the requirement of industrial real-time detection is difficult to meet, so that the requirement can be met while the precision is ensured, the calculation steps are simplified to achieve the purpose of real-time detection, and the gray gravity center method is easily interfered by noise and has poor applicability. Therefore, the extraction method of the fringe center needs to be designed from three aspects of precision, real-time performance and applicability.
The method combines the principal component analysis method and the region growing method, is similar to solving a normal line and a tangent line by a Hessian matrix, is simpler and more convenient to calculate by the principal component analysis method, has higher real-time performance, is better than a gray scale gravity center method and a Steger algorithm in theory by combining the principal component analysis method and the region growing method, and has certain self-adaptive capacity for extracting the light stripe center of the line structure by using the region growing method.
Drawings
FIG. 1 is a schematic flow chart of a method for extracting centers of light striations with a line structure according to the present invention;
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Moreover, the technical solutions in the embodiments of the present invention may be combined with each other, but it is necessary to be able to be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent, and is not within the protection scope of the present invention.
Referring to fig. 1, a method for extracting centers of light stripes of a line structure includes the following steps:
step 1, extracting ROI (region of interest) of an image, and processing the image in the ROI;
step 2, calculating the gradient distribution of the structured light striations, the amplitude value and selecting a point with zero amplitude value as an initial point;
and 3, determining the normal direction and the tangential direction of the point by a principal component analysis method, taking the point as a seed point as a region growing iterative operation, and further extracting an accurate fringe center.
In the step 1, the extraction structured light stripe image at the initial point has high contrast and strong light stripe directivity, and a region of interest (ROI) in the structured light image is extracted by using a self-adaptive threshold method, so that the influence of noise of a measured object on the subsequent stripe center extraction can be effectively reduced, and the extraction speed of the stripe center is greatly improved.
In step 2, the image f (x, y) is convolved with the gaussian function g (x, y), i.e. convolution with the gaussian function g (x, y) is performedTo reduce the influence of noise points in the image, the gray scale gradient (G) of the image is calculatedx,Gy) And the magnitude | G (x, y) |, the calculation process is:
within ROI of the extracted line structured light, Mi(i 1,2, 3.) denotes the ith row of the light bar, and the row-by-row search is performed for a point P with zero amplitude0(i0,j0) This point is taken as the initial point.
In the step 3, a covariance matrix is generated by noise from the gradient vector of the pixels in the initial point field, and the normal direction and the tangential direction of the light striations are obtained by solving the eigenvector of the covariance matrix by a principal component analysis method; the selected field size is W, and a covariance matrix C is established
Solving the eigenvalues λ of the matrix1、λ2And corresponding feature vectors v1、v2
Wherein, the eigenvector corresponding to the eigenvalue with large absolute value is the normal direction of the initial point, and λ can be known from the above formula1>λ2So that λ1Corresponding feature vector v1Normal to the initial point, λ2Corresponding feature vector v2Is tangential to the initial point.
In the step 3, the initial point P in the step 2 is set0(i0,j0) As the seed point, the gray scale function of the light strip is in Gaussian distribution in the normal direction of the light strip, so that the gray threshold is set as the growth criterion, 8 pixels around the seed point are traversed by a 9 x 9 template, and the next seed point is determinedSub-points; once the seed point is determined, the normal line and the tangent line of the point can be obtained by a principal component analysis method; and defining 8 fields around the growing point along the tangent region as a growing connected domain, and judging whether the point with the gray difference smaller than the threshold value can be classified as a connected domain to prevent overgrowth.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein, and any reference signs in the claims are not intended to be construed as limiting the claim concerned.
Claims (5)
1. A method for extracting the centers of light stripes of a line structure is characterized by comprising the following steps: the method comprises the following steps:
step 1, extracting ROI (region of interest) of an image, and processing the image in the ROI;
step 2, calculating the gradient distribution of the structured light striations, the amplitude value and selecting a point with zero amplitude value as an initial point;
and 3, determining the normal direction and the tangential direction of the point by a principal component analysis method, taking the point as a seed point as a region growing iterative operation, and further extracting an accurate fringe center.
2. The method for extracting the centers of the line-structured light stripes according to claim 1, wherein: in step 1, the extraction structured light stripe image at the initial point has high contrast and strong light stripe directivity, and a region of interest (ROI) in the structured light image is extracted by using an adaptive threshold method.
3. The method as claimed in claim 1, wherein the center of the line-structured light stripe is extractedIn the following steps: in step 2, the image f (x, y) is convolved with the gaussian function g (x, y), i.e. convolution with the gaussian function g (x, y) is performedTo reduce the influence of noise points in the image, the gray scale gradient (G) of the image is calculatedx,Gy) And the magnitude | G (x, y) |, the calculation process is:
within ROI of the extracted line structured light, Mi(i-1, 2,3 …) represents the ith row in the light bar, and the point P with zero amplitude is searched line by line0(i0,j0) This point is taken as the initial point.
4. The method for extracting the centers of the line-structured light stripes according to claim 1, wherein: in the step 3, a covariance matrix is generated by noise from the gradient vector of the pixels in the initial point field, and the normal direction and the tangential direction of the light striations are obtained by solving the eigenvector of the covariance matrix by a principal component analysis method; the selected field size is W, and a covariance matrix C is established
Solving the eigenvalues λ of the matrix1、λ2And corresponding feature vectors v1、v2
Wherein, the eigenvector corresponding to the eigenvalue with large absolute value is the normal direction of the initial point, and λ can be known from the above formula1>λ2So that λ1Corresponding feature vector v1Normal to the initial point, λ2Corresponding feature vector v2Is tangential to the initial point.
5. The method for extracting the centers of the line-structured light stripes according to claim 1, wherein: in the step 3, the initial point P in the step 2 is set0(i0,j0) As the seed point, the gray scale function of the light strip is in Gaussian distribution in the direction of the normal line of the light strip, so that a gray threshold is set as a growth criterion, 8 pixels around the seed point are traversed by a 9 x 9 template, and the next seed point is determined; once the seed point is determined, the normal line and the tangent line of the point can be obtained by a principal component analysis method; and defining 8 fields around the growing point along the tangent region as a growing connected domain, and judging whether the point with the gray difference smaller than the threshold value can be classified as a connected domain to prevent overgrowth.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011375938.3A CN112629409A (en) | 2020-11-30 | 2020-11-30 | Method for extracting line structure light stripe center |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011375938.3A CN112629409A (en) | 2020-11-30 | 2020-11-30 | Method for extracting line structure light stripe center |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112629409A true CN112629409A (en) | 2021-04-09 |
Family
ID=75306969
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011375938.3A Pending CN112629409A (en) | 2020-11-30 | 2020-11-30 | Method for extracting line structure light stripe center |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112629409A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113223074A (en) * | 2021-05-06 | 2021-08-06 | 哈尔滨工程大学 | Underwater laser stripe center extraction method |
CN113256518A (en) * | 2021-05-20 | 2021-08-13 | 上海理工大学 | Structured light image enhancement method for intraoral 3D reconstruction |
CN113436207A (en) * | 2021-06-28 | 2021-09-24 | 江苏特威机床制造有限公司 | Method for quickly and accurately extracting line structure light stripe center of regular surface |
CN115953459A (en) * | 2023-03-10 | 2023-04-11 | 齐鲁工业大学(山东省科学院) | Method for extracting laser stripe center line under complex illumination condition |
CN116433707A (en) * | 2023-06-14 | 2023-07-14 | 武汉工程大学 | Accurate extraction method and system for optical center sub-pixels of line structure under complex background |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004077359A1 (en) * | 2003-02-27 | 2004-09-10 | Agency For Science, Technology And Research | Method and apparatus for extracting cerebral ventricular system from images |
JP2011022084A (en) * | 2009-07-17 | 2011-02-03 | Fuji Electric Holdings Co Ltd | Device and method for measuring three-dimensional pose |
CN110400285A (en) * | 2019-05-30 | 2019-11-01 | 哈尔滨工业大学(深圳) | Wire bonding pad defect location and classification method |
CN111707672A (en) * | 2020-06-28 | 2020-09-25 | 江苏科技大学 | Method for detecting surface defects of wind power rotary supporting piece |
-
2020
- 2020-11-30 CN CN202011375938.3A patent/CN112629409A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2004077359A1 (en) * | 2003-02-27 | 2004-09-10 | Agency For Science, Technology And Research | Method and apparatus for extracting cerebral ventricular system from images |
JP2011022084A (en) * | 2009-07-17 | 2011-02-03 | Fuji Electric Holdings Co Ltd | Device and method for measuring three-dimensional pose |
CN110400285A (en) * | 2019-05-30 | 2019-11-01 | 哈尔滨工业大学(深圳) | Wire bonding pad defect location and classification method |
CN111707672A (en) * | 2020-06-28 | 2020-09-25 | 江苏科技大学 | Method for detecting surface defects of wind power rotary supporting piece |
Non-Patent Citations (2)
Title |
---|
何坚强等: "基于主成分分析和区域增长的结构光中心线提取", 《科学技术与工程》 * |
曾大为等: "基于自适应模板线结构的光条中心亚像素提取方法", 《光电子技术》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113223074A (en) * | 2021-05-06 | 2021-08-06 | 哈尔滨工程大学 | Underwater laser stripe center extraction method |
CN113256518A (en) * | 2021-05-20 | 2021-08-13 | 上海理工大学 | Structured light image enhancement method for intraoral 3D reconstruction |
CN113436207A (en) * | 2021-06-28 | 2021-09-24 | 江苏特威机床制造有限公司 | Method for quickly and accurately extracting line structure light stripe center of regular surface |
CN113436207B (en) * | 2021-06-28 | 2024-01-23 | 江苏特威机床制造有限公司 | Method for rapidly and accurately extracting line structure light stripe center of regular surface |
CN115953459A (en) * | 2023-03-10 | 2023-04-11 | 齐鲁工业大学(山东省科学院) | Method for extracting laser stripe center line under complex illumination condition |
CN116433707A (en) * | 2023-06-14 | 2023-07-14 | 武汉工程大学 | Accurate extraction method and system for optical center sub-pixels of line structure under complex background |
CN116433707B (en) * | 2023-06-14 | 2023-08-11 | 武汉工程大学 | Accurate extraction method and system for optical center sub-pixels of line structure under complex background |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112629409A (en) | Method for extracting line structure light stripe center | |
CN110866924B (en) | Line structured light center line extraction method and storage medium | |
CN109035276B (en) | Image edge extraction method and device and automatic driving system | |
CN107507208B (en) | Image feature point extraction method based on curvature estimation on contour | |
CN109559324B (en) | Target contour detection method in linear array image | |
CN109961506A (en) | A kind of fusion improves the local scene three-dimensional reconstruction method of Census figure | |
CN113436207B (en) | Method for rapidly and accurately extracting line structure light stripe center of regular surface | |
CN113034452B (en) | Weldment contour detection method | |
CN109816645B (en) | Automatic detection method for steel coil loosening | |
CN102169581A (en) | Feature vector-based fast and high-precision robustness matching method | |
US20140050411A1 (en) | Apparatus and method for generating image feature data | |
CN110717934B (en) | Anti-occlusion target tracking method based on STRCF | |
CN111462214B (en) | Line structure light stripe center line extraction method based on Hough transformation | |
CN111260708A (en) | Line structure optical center extraction method and system | |
CN110598613A (en) | Expressway agglomerate fog monitoring method | |
CN108510544B (en) | Light strip positioning method based on feature clustering | |
CN111652790A (en) | Sub-pixel image registration method | |
CN108038856B (en) | Infrared small target detection method based on improved multi-scale fractal enhancement | |
CN104915951B (en) | A kind of stippled formula DPM two-dimension code area localization methods | |
CN114373130A (en) | Space-based infrared dark and weak moving target detection method | |
CN113223074A (en) | Underwater laser stripe center extraction method | |
CN112734816A (en) | Heterogeneous image registration method based on CSS-Delaunay | |
CN111415378A (en) | Image registration method for automobile glass detection and automobile glass detection method | |
CN114742849A (en) | Leveling instrument distance measuring method based on image enhancement | |
CN114494165A (en) | Clustering-based light bar extraction method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210409 |