CN105004274A - Cylindrical surface radius measuring method based on three-dimensional vision - Google Patents

Cylindrical surface radius measuring method based on three-dimensional vision Download PDF

Info

Publication number
CN105004274A
CN105004274A CN201510395713.7A CN201510395713A CN105004274A CN 105004274 A CN105004274 A CN 105004274A CN 201510395713 A CN201510395713 A CN 201510395713A CN 105004274 A CN105004274 A CN 105004274A
Authority
CN
China
Prior art keywords
dimensional
mrow
cylindrical surface
msub
point
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.)
Granted
Application number
CN201510395713.7A
Other languages
Chinese (zh)
Other versions
CN105004274B (en
Inventor
田劲东
李东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen University filed Critical Shenzhen University
Priority to CN201510395713.7A priority Critical patent/CN105004274B/en
Publication of CN105004274A publication Critical patent/CN105004274A/en
Application granted granted Critical
Publication of CN105004274B publication Critical patent/CN105004274B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a cylindrical surface radius measuring method based on a three-dimensional vision. The cylindrical surface radius measuring method comprises the steps that a three-dimensional vision measuring system obtains three-dimensional point cloud data of a cylindrical surface, and the three-dimensional vision measuring system is composed of a projector and a camera; parallel planes are adopted to segment the three-dimensional point cloud data into two-dimensional plane data; an ordering algorithm based on angles is adopted to expand the two-dimensional plane data into a one-dimensional point sequence; over-limit median filtering and secondary filtering are carried out on the one-dimensional point sequence, so that the one-dimensional point sequence after noise removal is obtained; ellipse fitting and circle fitting are carried out according to the obtained one-dimensional point sequence, so that the magnitudes of radiuses at different cross sections of the cylindrical surface are obtained. According to the invention, the magnitudes of radiuses at different cross sections of a cylindrical part are obtained, and position error measurement and analysis can be directly carried out according to the calculated magnitudes of radiuses at different cross sections, so that the method is accurate, comprehensive, high in noise resistance capability and measurement precision, and can be widely applied to the field of computer vision detection.

Description

Cylindrical surface radius measuring method based on three-dimensional vision
Technical Field
The invention relates to the field of computer vision detection, in particular to a cylindrical surface radius measuring method based on three-dimensional vision.
Background
In industrial inspection, computer vision inspection technology has been increasingly emphasized in inspection of mechanical parts due to its advantages of non-contact, high precision and high efficiency. The cylindrical parts are common parts in mechanical parts, such as bearings, magnetic tiles used in motor rotors, cylindrical magnetic stirring rods and the like. It is counted that in the conventional machine part, the appearance frequency of the cylindrical surface reaches 73.5% as a basic shape in the constitution of the machine part. The detection of the radius of the cylindrical surfaces is an important component in the quality detection of the cylindrical mechanical parts, and the radius of the cylindrical mechanical parts is usually detected by measuring one outer end surface of the cylindrical surfaces but cannot detect the section radius of other positions in the conventional method for detecting the radius of the cylindrical mechanical parts based on computer vision. Doing so presents two problems: firstly, shape measurement and error analysis can only be completed, and the method is only limited to shape detection of the outer end face, and cannot complete shape detection of cross sections at other positions, and is not accurate enough; secondly, the measurement and analysis of the position error can not be realized, and the position error is not comprehensive enough. The form and position errors have great influence on the working precision, the connection strength, the sealing property, the motion stability, the wear resistance, the service life, the noise and the like of various mechanical parts. Therefore, there is a need for a method for detecting the radius of different cross-sectional positions of a cylindrical part (to give a more accurate shape), and measuring and analyzing the position error by using data of a plurality of positions.
Disclosure of Invention
In order to solve the technical problems, the invention aims to: the method for measuring the radius of the cylindrical surface based on the three-dimensional vision is accurate and comprehensive.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a cylindrical surface radius measuring method based on three-dimensional vision comprises the following steps:
s1, acquiring three-dimensional point cloud data of the cylindrical surface through a three-dimensional vision measuring system, wherein the three-dimensional vision measuring system consists of a projector and a camera;
s2, dividing the three-dimensional point cloud data of the cylindrical surface into two-dimensional plane data by adopting a parallel plane;
s3, unfolding the two-dimensional plane data into a one-dimensional point sequence by adopting an angle-based sorting algorithm;
s4, performing overrun median filtering and secondary filtering on the one-dimensional point sequence to obtain a one-dimensional point sequence with noise removed;
and S5, performing ellipse fitting and circle fitting according to the obtained one-dimensional point sequence, thereby obtaining the radius of the cross section of the cylindrical surface at different positions.
Further, in step S1, it specifically includes:
a three-dimensional vision measuring system based on stripe structure light and active stereoscopic vision technology is built by adopting a camera and a projector, then system calibration, stripe projection and acquisition, absolute phase acquisition and corresponding point matching are sequentially carried out through the three-dimensional vision measuring system, and finally three-dimensional point cloud data of the cylindrical surface are acquired.
Further, in step S2, it specifically includes:
and dividing the three-dimensional point cloud data into a plurality of groups of two-dimensional plane data by adopting a group of parallel planes, wherein the parallel planes are vertical to an X axis, and the X axis is the central axis of the cylindrical surface.
Further, the step S3, which includes:
s31, performing circle fitting according to the data obtained in the step S2 to obtain a center point of a circle, defining the center point of the circle as a base point o, and constructing a base vector passing through the base point o and having a positive direction along the X-axisAnd extracting edge data points m from the two-dimensional plane datanForm an edge vector with the base point oWherein n is 1,2,3, …;
s32, calculating an edge vectorAnd the base vectorAngle of (theta)n
S33, according to the edge vectorAnd the base vectorIncluded angle thetanIs used for extracting edge data points m from two-dimensional plane datanRe-ordering to obtain a re-ordered point sequence MiWherein i is 1,2,3, …, n;
s34, calculating the point sequence M after reorderingiDistance d from base pointiAnd forming an expanded one-dimensional point sequence d by the calculated distancei
Further, the step S4, which includes:
s41, adopting an overrun median filter to pair the expanded one-dimensional point sequence diPerforming primary filtering to obtain a sequence point after primary filtering, wherein the sequence point d after primary filteringiThe expression of' is:
<math><mrow> <mfenced open = '{' close = ''> <mtable> <mtr> <mtd> <mrow> <msub> <mi>md</mi> <mi>i</mi> </msub> <mo>=</mo> <mi>m</mi> <mi>e</mi> <mi>d</mi> <mi>i</mi> <mi>a</mi> <mi>n</mi> <mrow> <mo>(</mo> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>,</mo> <mn>...</mn> <mo>,</mo> <msub> <mi>d</mi> <mrow> <mi>i</mi> <mo>+</mo> <mi>t</mi> <mi>e</mi> <mi>m</mi> <mi>p</mi> <mi>l</mi> <mi>a</mi> <mi>t</mi> <mi>e</mi> </mrow> </msub> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mi>h</mi> <mrow> <mo>(</mo> <mi>i</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfenced open = '{' close = ''> <mtable> <mtr> <mtd> <mrow> <mn>1</mn> <mo>,</mo> <mrow> <mo>|</mo> <mrow> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>-</mo> <msub> <mi>md</mi> <mi>i</mi> </msub> </mrow> <mo>|</mo> </mrow> <mo>&le;</mo> <msub> <mi>x</mi> <mn>0</mn> </msub> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mn>0</mn> <mo>,</mo> <mrow> <mo>|</mo> <mrow> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>-</mo> <msub> <mi>md</mi> <mi>i</mi> </msub> </mrow> <mo>|</mo> </mrow> <mo>></mo> <msub> <mi>x</mi> <mn>0</mn> </msub> </mrow> </mtd> </mtr> </mtable> </mfenced> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <msup> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>&prime;</mo> </msup> <mo>=</mo> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>*</mo> <mi>h</mi> <mrow> <mo>(</mo> <mi>i</mi> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> </mtable> </mfenced> <mo>,</mo> </mrow></math>
wherein template is the size of the template of the overrun median filter, median is the median, x0Is a set distance threshold;
s42, according to the sequence point d after the primary filteringi' size of distance to base point and sequence point di' the distance between two adjacent points on two sides and the base point is equal to the distance between two adjacent points on two sides, and the sequence point d after one filtering is carried outiAnd performing secondary filtering to obtain a one-dimensional point sequence after removing noise.
Further, in step S5, it specifically includes:
s51, carrying out ellipse fitting on the one-dimensional point sequence after the noise is removed to obtain an ellipse central point, and then carrying out space straight line fitting on the ellipse central point to obtain a first central axis of the cylindrical surface;
s52, rotating the first central axis of the cylindrical surface and the three-dimensional point cloud data of the cylindrical surface to be parallel to the X axis;
s53, re-executing the steps S2-S4 on the three-dimensional point cloud data of the rotated cylindrical surface to obtain a one-dimensional point sequence parallel to the X axis after noise is removed;
s54, performing circle fitting on the one-dimensional point sequence parallel to the X axis after noise removal to obtain a circle center point, and then performing space straight line fitting on the circle center point to obtain a second center axis of the cylindrical surface and a corresponding circle radius;
and S55, judging whether the included angle between the second central axis of the cylindrical surface and the X axis is smaller than a set judgment threshold, if so, taking the obtained circle radius as the radius of different positions of the cylindrical surface, otherwise, rotating the three-dimensional point cloud data of the second central axis of the cylindrical surface and the cylindrical surface to be parallel to the X axis, and returning to the step S2.
The invention has the beneficial effects that: firstly, acquiring point cloud data of a cylindrical surface by a three-dimensional vision measurement system; and then, dividing the three-dimensional point cloud data into a plurality of groups of two-dimensional plane data by using parallel planes, filtering and denoising the two-dimensional data at each position by adopting an angle-based sorting algorithm and an overrun median filter, and finally calculating the radius of the cross section of the cylindrical part at different positions by combining ellipse fitting and circle fitting, wherein the radius is not limited to the shape detection of the outer end surface, and the position error can be directly measured and analyzed according to the calculated radius of the cross section at different positions.
Drawings
The invention is further illustrated by the following figures and examples.
FIG. 1 is an overall flow chart of a method for measuring the radius of a cylindrical surface based on three-dimensional vision according to the present invention;
FIG. 2 is a flowchart of step S3 according to the present invention;
FIG. 3 is a flowchart of step S4 according to the present invention;
FIG. 4 is a flowchart of step S5 according to the present invention;
FIG. 5-1 is a schematic diagram of a three-dimensional vision measuring system according to the present invention;
FIG. 5-2 is a flow chart of the three-dimensional vision measuring system of the present invention for acquiring three-dimensional point cloud data;
FIG. 6 is a set of two-dimensional plane data after the segmentation of the noise-disturbed semi-cylindrical surface;
FIG. 7 is a one-dimensional sequence of points obtained after the reordering of FIG. 6;
FIG. 8 is a diagram of the result of denoising with the overrun median filter in FIG. 7;
FIG. 9 is an enlarged fragmentary view of the oval portion of FIG. 8;
FIG. 10 is a graph of results after a second filtering with distance from the base point;
FIG. 11 is a graph of the final filtering results of the present invention;
FIG. 12 is a flow chart of a cylinder radius measurement algorithm of the present invention;
FIG. 13 is a graph showing the radius measurements at different locations on the outer surface of the NdFeB tiles.
Reference numerals: 1. a camera; 2. a projector.
Detailed Description
Referring to fig. 1, a method for measuring a radius of a cylindrical surface based on three-dimensional vision includes:
s1, acquiring three-dimensional point cloud data of the cylindrical surface through a three-dimensional vision measuring system, wherein the three-dimensional vision measuring system consists of a projector and a camera;
s2, dividing the three-dimensional point cloud data of the cylindrical surface into two-dimensional plane data by adopting a parallel plane;
s3, unfolding the two-dimensional plane data into a one-dimensional point sequence by adopting an angle-based sorting algorithm;
s4, performing overrun median filtering and secondary filtering on the one-dimensional point sequence to obtain a one-dimensional point sequence with noise removed;
and S5, performing ellipse fitting and circle fitting according to the obtained one-dimensional point sequence, thereby obtaining the radius of the cross section of the cylindrical surface at different positions.
Further, as a preferred embodiment, in step S1, it is specifically:
a three-dimensional vision measuring system based on stripe structure light and active stereoscopic vision technology is built by adopting a camera and a projector, then system calibration, stripe projection and acquisition, absolute phase acquisition and corresponding point matching are sequentially carried out through the three-dimensional vision measuring system, and finally three-dimensional point cloud data of the cylindrical surface are acquired.
Further, as a preferred embodiment, in step S2, it is specifically:
and dividing the three-dimensional point cloud data into a plurality of groups of two-dimensional plane data by adopting a group of parallel planes, wherein the parallel planes are vertical to an X axis, and the X axis is the central axis of the cylindrical surface.
Referring to fig. 2, further as a preferred embodiment, the step S3 includes:
s31, performing circle fitting according to the data obtained in the step S2 to obtain a circle center point, defining the circle center point as a base point o, and constructing a over base pointo and base vector oriented in the positive direction of the X axisAnd extracting edge data points m from the two-dimensional plane datanForm an edge vector with the base point oWherein n is 1,2,3, …;
s32, calculating an edge vectorAnd the base vectorAngle of (theta)n
S33, according to the edge vectorAnd the base vectorIncluded angle thetanIs used for extracting edge data points m from two-dimensional plane datanRe-ordering to obtain a re-ordered point sequence MiWherein i is 1,2,3, …, n;
s34, calculating the point sequence M after reorderingiDistance d from base pointiAnd forming an expanded one-dimensional point sequence d by the calculated distancei
The base point generally selects a centroid (i.e., a center point of a circle obtained by circle fitting) of the two-dimensional plane data as the base point. And taking the base point as an end point, taking the ray with the positive direction of the x axis as a direction as a base vector, forming an edge vector by the edge data points and the base point, and pointing the edge vector direction to the edge data points along the base point. Edge data point m extracted from two-dimensional plane datanIs a certain data point located on the upper surface of the cylindrical surface.
And calculating an included angle between an edge vector formed by the edge data point and the base vector according to the anticlockwise direction, and then expanding the two-dimensional data point into a one-dimensional point sequence according to the size of the included angle.
Referring to fig. 3, further as a preferred embodiment, the step S4 includes:
s41, adopting an overrun median filter to pair the expanded one-dimensional point sequence diPerforming primary filtering to obtain a sequence point after primary filtering, wherein the sequence point d after primary filteringiThe expression of' is:
<math><mrow> <mfenced open = '{' close = ''> <mtable> <mtr> <mtd> <mrow> <msub> <mi>md</mi> <mi>i</mi> </msub> <mo>=</mo> <mi>m</mi> <mi>e</mi> <mi>d</mi> <mi>i</mi> <mi>a</mi> <mi>n</mi> <mrow> <mo>(</mo> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>,</mo> <mn>...</mn> <mo>,</mo> <msub> <mi>d</mi> <mrow> <mi>i</mi> <mo>+</mo> <mi>t</mi> <mi>e</mi> <mi>m</mi> <mi>p</mi> <mi>l</mi> <mi>a</mi> <mi>t</mi> <mi>e</mi> </mrow> </msub> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mi>h</mi> <mrow> <mo>(</mo> <mi>i</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfenced open = '{' close = ''> <mtable> <mtr> <mtd> <mrow> <mn>1</mn> <mo>,</mo> <mrow> <mo>|</mo> <mrow> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>-</mo> <msub> <mi>md</mi> <mi>i</mi> </msub> </mrow> <mo>|</mo> </mrow> <mo>&le;</mo> <msub> <mi>x</mi> <mn>0</mn> </msub> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mn>0</mn> <mo>,</mo> <mrow> <mo>|</mo> <mrow> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>-</mo> <msub> <mi>md</mi> <mi>i</mi> </msub> </mrow> <mo>|</mo> </mrow> <mo>></mo> <msub> <mi>x</mi> <mn>0</mn> </msub> </mrow> </mtd> </mtr> </mtable> </mfenced> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <msup> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>&prime;</mo> </msup> <mo>=</mo> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>*</mo> <mi>h</mi> <mrow> <mo>(</mo> <mi>i</mi> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> </mtable> </mfenced> <mo>,</mo> </mrow></math>
wherein template is the size of the template of the overrun median filter, median is the median, x0Is a set distance threshold;
s42, according to the sequence point d after the primary filteringi' size of distance to base point and sequence point di' the distance between two adjacent points on two sides and the base point is equal to the distance between two adjacent points on two sides, and the sequence point d after one filtering is carried outiAnd performing secondary filtering to obtain a one-dimensional point sequence after removing noise.
Referring to fig. 4, as a further preferred embodiment, in step S5, it is specifically:
s51, carrying out ellipse fitting on the one-dimensional point sequence after the noise is removed to obtain an ellipse central point, and then carrying out space straight line fitting on the ellipse central point to obtain a first central axis of the cylindrical surface;
s52, rotating the first central axis of the cylindrical surface and the three-dimensional point cloud data of the cylindrical surface to be parallel to the X axis;
s53, re-executing the steps S2-S4 on the three-dimensional point cloud data of the rotated cylindrical surface to obtain a one-dimensional point sequence parallel to the X axis after noise is removed;
s54, performing circle fitting on the one-dimensional point sequence parallel to the X axis after noise removal to obtain a circle center point, and then performing space straight line fitting on the circle center point to obtain a second center axis of the cylindrical surface and a corresponding circle radius;
and S55, judging whether the included angle between the second central axis of the cylindrical surface and the X axis is smaller than a set judgment threshold, if so, taking the obtained circle radius as the radius of different positions of the cylindrical surface, otherwise, rotating the three-dimensional point cloud data of the second central axis of the cylindrical surface and the cylindrical surface to be parallel to the X axis, and returning to the step S2.
The invention is described in further detail below with reference to the figures and specific examples of the specification.
Example one
The cylindrical surface radius measuring method based on three-dimensional vision in the embodiment mainly comprises the following implementation processes:
(1) acquiring three-dimensional point cloud data.
In the embodiment, a three-dimensional vision measurement system based on the stripe structure light and the active stereo vision technology is built by adopting a camera and a projector, and the built system schematic diagram and the flow for acquiring three-dimensional point cloud data are shown in fig. 5-1 and fig. 5-2. After the system calibration is completed, the computer controls the camera to collect and decode the deformed fringe pattern, then the absolute phase value of each point can be obtained according to the decoded deformed fringe pattern, and finally the absolute phase value is used as a characteristic to carry out corresponding point matching, so that the three-dimensional point cloud data of the measured object can be obtained.
(2) Data partitioning.
In order to reduce the computational complexity, after the three-dimensional point cloud data is acquired, the three-dimensional data needs to be segmented in the embodiment. In order to obtain more data points to improve the measurement accuracy, the embodiment uses a cube with a certain thickness for segmentation, and as long as the point in the cube is located, the embodiment calculates the point as being approximately in the same parallel plane. In the embodiment, the three-dimensional point cloud data can be divided into a group of two-dimensional plane data through a group of parallel planes formed by the thickness cubes, so that the calculation complexity is reduced.
(3) Noise filtering
Since noise inevitably exists in actually measured three-dimensional point cloud data, a plurality of isolated points appear around two-dimensional plane data, and therefore pre-filtering processing must be performed before ellipse and circle fitting. Fig. 6 is a section view of a simulated noise-disturbed semi-cylindrical surface at a certain position, which represents the radius of each position on the cylindrical surface, but is a series of one-dimensional radii and cannot be directly filtered by a two-dimensional filter. Therefore, before filtering, the embodiment designs an angle-based sorting algorithm, two-dimensional plane data is firstly changed into a one-dimensional point sequence, and then filtering processing is performed, so that noise in the data can be effectively filtered, and the accuracy of measuring the radius of the cylindrical surface is ensured.
The specific implementation process of the sorting algorithm based on the angle in the embodiment is as follows: firstly, selecting a base point o on a two-dimensional plane; then, a base vector passing through the base point o and having a positive direction along the X axis is constructedAnd extracting edge data points m from the two-dimensional plane datanForm an edge vector with the base point oThen, the edge vector is solvedAnd the base vectorAngle of (theta)nIf the edge data point mnIs smaller than the ordinate of the central point, thetanHas a value ofOn the contrary, [ theta ]nHas a value ofWherein, <math><mrow> <mo><</mo> <mover> <mrow> <mi>o</mi> <mi>p</mi> </mrow> <mo>&RightArrow;</mo> </mover> <mo>,</mo> <mover> <mrow> <msub> <mi>om</mi> <mi>n</mi> </msub> </mrow> <mo>&RightArrow;</mo> </mover> <mo>></mo> <mo>=</mo> <mi>arccos</mi> <mfrac> <mrow> <mover> <mrow> <mi>o</mi> <mi>p</mi> </mrow> <mo>&RightArrow;</mo> </mover> <mo>&CenterDot;</mo> <mover> <mrow> <msub> <mi>om</mi> <mi>n</mi> </msub> </mrow> <mo>&RightArrow;</mo> </mover> </mrow> <mrow> <mrow> <mo>|</mo> <mover> <mrow> <mi>o</mi> <mi>p</mi> </mrow> <mo>&RightArrow;</mo> </mover> <mo>|</mo> </mrow> <mrow> <mo>|</mo> <mover> <mrow> <msub> <mi>om</mi> <mi>n</mi> </msub> </mrow> <mo>&RightArrow;</mo> </mover> <mo>|</mo> </mrow> </mrow> </mfrac> <mo>;</mo> </mrow></math> then, based on the edge vectorAnd the base vectorIncluded angle thetanIs used for extracting edge data points m from two-dimensional plane datanRe-ordering to obtain a re-ordered point sequence Mi(ii) a Finally, M is solvediDistance d from base pointiAnd forming a new point sequence d by the distance valueiAs shown in fig. 7.
As can be seen from fig. 6 and 7, a lot of noise occurs around the data, so these isolated points must be filtered before the fitting calculation is performed. According to the characteristics of one-dimensional data noise, the embodiment adopts an overrun median filter for filtering, and the construction method of the overrun median filter is as follows: selecting a template size of the overrun median filter, and then making mdi=median(di,…,di+template) Generally, 5 points are selected to find the median of 5 adjacent points, i.e. template takes 5, in which case the overrun median filter can be designed as follows:
<math><mrow> <mi>h</mi> <mrow> <mo>(</mo> <mi>i</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfenced open = '{' close = ''> <mtable> <mtr> <mtd> <mrow> <mn>1</mn> <mo>,</mo> <mrow> <mo>|</mo> <mrow> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>-</mo> <msub> <mi>md</mi> <mi>i</mi> </msub> </mrow> <mo>|</mo> </mrow> <mo>&le;</mo> <msub> <mi>x</mi> <mn>0</mn> </msub> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mn>0</mn> <mo>,</mo> <mrow> <mo>|</mo> <mrow> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>-</mo> <msub> <mi>md</mi> <mi>i</mi> </msub> </mrow> <mo>|</mo> </mrow> <mo>></mo> <msub> <mi>x</mi> <mn>0</mn> </msub> </mrow> </mtd> </mtr> </mtable> </mfenced> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>1</mn> <mo>)</mo> </mrow> </mrow></math>
let sequence point diAfter filtering with this filter the sequence point becomes di', then diThe expression of' is:
di'=di*h(i) (2)
after the processing of the formulas (1) and (2), most of the isolated points have been removed, as shown in fig. 8. However, as can be seen from fig. 8, there are some noise points, such as the points of the elliptical area. It is apparent from the enlarged partial view of the oval region of fig. 8 of fig. 9 that there are also a few isolated dots in fig. 8. In order to completely remove the noise points, a secondary filtering process is also required. As can be seen from fig. 9, the distances from the remaining noise points to the base point are all greater (or all less) than the distances from the neighboring points on both sides to the base point. Accordingly, a condition can be set when the sequence point d isiWhen the distance from a certain point to the base point is greater than (or less than) the distance from the adjacent points on both sides to the base point, the point is removed, otherwise, the point is reserved, so that the secondary filtering effect graph shown in fig. 10 can be obtained. The final filtering result shown in fig. 11 is finally obtained. As can be seen from fig. 10 and 11, the isolated point noise is completely filtered at this time, and the fitting accuracy of the subsequent ellipse and circle is ensured.
Example two
The central axis direction of the cylindrical surface point cloud data acquired by the three-dimensional vision measurement system is random, and it is assumed that the specific flow of the cylindrical surface radius measurement algorithm is as shown in fig. 12: firstly, acquiring point cloud data of a cylindrical surface by using a three-dimensional vision measuring system; and then, dividing the point cloud data into a plurality of groups of two-dimensional plane data by using a group of parallel planes, filtering noise by using an angle-based sorting algorithm and an overrun median filter, and then performing ellipse fitting. However, the central axis of the cylindrical surface still forms a certain included angle with the X axis, so that the accuracy of the obtained plane data is not high. In order to obtain two-dimensional plane data with higher precision, the embodiment performs spatial straight line fitting on the central point obtained by fitting the ellipse, and then rotates the fitted straight line and the three-dimensional point cloud data to the position parallel to the X axis. In addition, in order to ensure that the central axis is parallel to the X axis as much as possible, a determination threshold is set in this embodiment, so that the included angle between the central axis and the X axis is smaller than the determination threshold after continuous rotation operation, and at this time, the central axis and the X axis can be considered to be parallel. And finally, performing circle fitting operation, so that the obtained measurement result has higher precision.
To illustrate the stability and accuracy of the method of the present invention, the present embodiment is described in conjunction with a neodymium-iron-boron tile magnet for a motor rotor. Motors made of neodymium iron boron permanent magnet materials are more and more widely applied, such as special motors for textiles, aero-generators, torque motors, motors for automobiles and motorcycles, permanent magnet outer rotor motors and the like. The quality of the motor rotor in the motors directly influences the performance of the motors, and the radius is an important detection parameter of the motor rotor and has important practical value.
In this embodiment, first, a three-dimensional vision measurement system is used to obtain point cloud data of the outer surface of the neodymium iron boron tile, the total number of obtained data points is 2.31 ten thousand, then the radius values at 20 equidistant positions on the cylindrical surface are calculated by the method of the present invention, the measurement result is shown in table 1, and the nominal radius value of the neodymium iron boron tile part is 13.76 mm.
TABLE 1 radius measurement of different positions on the outer surface of NdFeB Tile (unit: mm)
Serial number Measured value (mm)
1 13.6612
2 13.6762
3 13.6689
4 13.6939
5 13.7089
6 13.7255
7 13.7007
8 13.7334
9 13.7281
10 13.7495
11 13.7737
12 13.7922
13 13.7903
14 13.8146
15 13.8007
16 13.8269
17 13.8243
18 13.8326
19 13.8183
20 13.8457
To visually display the data changes in table 1, the data in table 1 can be plotted as a graph, as shown in fig. 13. As can be seen from table 1 and fig. 13, the radius values of the different positions of the rotor of the ndfeb tile motor are different, and the radius values generally increase from one side to the other side, and the deviation between the two ends is about 0.18 mm. If only one end face is detected to characterize and measure the radius of the cylindrical surface, the cylindrical surface is definitely inaccurate, and the form and position error analysis cannot be carried out.
To further verify the method of the present invention, in this embodiment, 8 sets of data are collected for the neodymium-iron-boron tile motor rotor, each set of data points is about 2.3 ten thousand, and then the radius measurement values of each set are calculated as shown in table 2.
TABLE 2 measurement of the radius of the outer surface of the NdFeB tiles
Serial number Radius value (mm) of each group Measuring deviation (mm)
1 13.7604 0.0004
2 13.7561 0.0039
3 13.7673 0.0073
4 13.7546 0.0045
5 13.7614 0.0014
6 13.7615 0.0015
7 13.7581 0.0019
8 13.7601 0.0001
std 0.0039 ——
It can be seen from the data in table 2 that when the method of the present invention is used to measure the same cylindrical surface for many times, the maximum measurement deviation value in each group does not exceed 0.008mm, and the variance of the measurement values in each group is 0.004 mm. The experiment shows that the method has the advantages of high measurement precision and strong noise resistance, and is suitable for the requirement of high-precision radius measurement of the cylindrical surface in the industry.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (6)

1. A cylindrical surface radius measuring method based on three-dimensional vision is characterized in that: the method comprises the following steps:
s1, acquiring three-dimensional point cloud data of the cylindrical surface through a three-dimensional vision measuring system, wherein the three-dimensional vision measuring system consists of a projector and a camera;
s2, dividing the three-dimensional point cloud data of the cylindrical surface into two-dimensional plane data by adopting a parallel plane;
s3, unfolding the two-dimensional plane data into a one-dimensional point sequence by adopting an angle-based sorting algorithm;
s4, performing overrun median filtering and secondary filtering on the one-dimensional point sequence to obtain a one-dimensional point sequence with noise removed;
and S5, performing ellipse fitting and circle fitting according to the obtained one-dimensional point sequence, thereby obtaining the radius of the cross section of the cylindrical surface at different positions.
2. The method for measuring the radius of the cylindrical surface based on the three-dimensional vision as claimed in claim 1, wherein: in the step S1, it is specifically:
a three-dimensional vision measuring system based on stripe structure light and active stereoscopic vision technology is built by adopting a camera and a projector, then system calibration, stripe projection and acquisition, absolute phase acquisition and corresponding point matching are sequentially carried out through the three-dimensional vision measuring system, and finally three-dimensional point cloud data of the cylindrical surface are acquired.
3. The method for measuring the radius of the cylindrical surface based on the three-dimensional vision as claimed in claim 2, wherein: in the step S2, it is specifically:
and dividing the three-dimensional point cloud data into a plurality of groups of two-dimensional plane data by adopting a group of parallel planes, wherein the parallel planes are vertical to an X axis, and the X axis is the central axis of the cylindrical surface.
4. The method for measuring the radius of the cylindrical surface based on the three-dimensional vision as claimed in claim 3, wherein: the step S3, which includes:
s31, performing circle fitting according to the data obtained in the step S2 to obtain a center point of a circle, defining the center point of the circle as a base point o, and constructing a base vector passing through the base point o and having a positive direction along the X-axisAnd extracting edge data points m from the two-dimensional plane datanForm an edge vector with the base point oWherein n is 1,2,3, …;
s32, calculating an edge vectorAnd the base vectorAngle of (theta)n
S33, according to the edge vectorAnd the base vectorIncluded angle thetanIs used for extracting edge data points m from two-dimensional plane datanRe-ordering to obtain a re-ordered point sequence MiWherein i is 1,2,3, …, n;
s34, calculating the point sequence M after reorderingiDistance d from base pointiAnd forming an expanded one-dimensional point sequence d by the calculated distancei
5. The method for measuring the radius of the cylindrical surface based on the three-dimensional vision according to claim 4, characterized in that: the step S4, which includes:
s41, adopting an overrun median filter to pair the expanded one-dimensional point sequence diPerforming primary filtering to obtain a sequence point after primary filtering, wherein the sequence point d after primary filteringiThe expression of' is:
<math> <mrow> <mfenced open='{' close=''> <mtable> <mtr> <mtd> <mrow> <msub> <mi>md</mi> <mi>i</mi> </msub> <mo>=</mo> <mi>m</mi> <mi>e</mi> <mi>d</mi> <mi>i</mi> <mi>a</mi> <mi>n</mi> <mrow> <mo>(</mo> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>,</mo> <mo>...</mo> <mo>,</mo> <msub> <mi>d</mi> <mrow> <mi>i</mi> <mo>+</mo> <mi>t</mi> <mi>e</mi> <mi>m</mi> <mi>p</mi> <mi>l</mi> <mi>a</mi> <mi>t</mi> <mi>e</mi> </mrow> </msub> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mi>h</mi> <mrow> <mo>(</mo> <mi>i</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfenced open='{' close=''> <mtable> <mtr> <mtd> <mrow> <mi></mi> <mn>1</mn> <mo>,</mo> <mo>|</mo> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>-</mo> <msub> <mi>md</mi> <mi>i</mi> </msub> <mo>|</mo> <mo>&le;</mo> <msub> <mi>x</mi> <mn>0</mn> </msub> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mn>0</mn> <mo>,</mo> <mo>|</mo> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>-</mo> <msub> <mi>md</mi> <mi>i</mi> </msub> <mo>|</mo> <mo>></mo> <msub> <mi>x</mi> <mn>0</mn> </msub> </mrow> </mtd> </mtr> </mtable> </mfenced> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <msubsup> <mi>d</mi> <mi>i</mi> <mo>&prime;</mo> </msubsup> <mo>=</mo> <msub> <mi>d</mi> <mi>i</mi> </msub> <mo>*</mo> <mi>h</mi> <mrow> <mo>(</mo> <mi>i</mi> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> </mtable> </mfenced> <mo>,</mo> </mrow> </math>
wherein template is the size of the template of the overrun median filter, median is the median, x0Is a set distance threshold;
s42, according to the sequence point d after the primary filteringi' size of distance to base point and sequence point di' the distance between two adjacent points on two sides and the base point is equal to the distance between two adjacent points on two sides, and the sequence point d after one filtering is carried outiAnd performing secondary filtering to obtain a one-dimensional point sequence after removing noise.
6. The method for measuring the radius of a cylindrical surface based on three-dimensional vision according to any one of claims 3 to 5, wherein: in the step S5, it is specifically:
s51, carrying out ellipse fitting on the one-dimensional point sequence after the noise is removed to obtain an ellipse central point, and then carrying out space straight line fitting on the ellipse central point to obtain a first central axis of the cylindrical surface;
s52, rotating the first central axis of the cylindrical surface and the three-dimensional point cloud data of the cylindrical surface to be parallel to the X axis;
s53, re-executing the steps S2-S4 on the three-dimensional point cloud data of the rotated cylindrical surface to obtain a one-dimensional point sequence parallel to the X axis after noise is removed;
s54, performing circle fitting on the one-dimensional point sequence parallel to the X axis after noise removal to obtain a circle center point, and then performing space straight line fitting on the circle center point to obtain a second center axis of the cylindrical surface and a corresponding circle radius;
and S55, judging whether the included angle between the second central axis of the cylindrical surface and the X axis is smaller than a set judgment threshold, if so, taking the obtained circle radius as the radius of different positions of the cylindrical surface, otherwise, rotating the three-dimensional point cloud data of the second central axis of the cylindrical surface and the cylindrical surface to be parallel to the X axis, and returning to the step S2.
CN201510395713.7A 2015-07-07 2015-07-07 A kind of face of cylinder radius measurement method based on 3D vision Active CN105004274B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510395713.7A CN105004274B (en) 2015-07-07 2015-07-07 A kind of face of cylinder radius measurement method based on 3D vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510395713.7A CN105004274B (en) 2015-07-07 2015-07-07 A kind of face of cylinder radius measurement method based on 3D vision

Publications (2)

Publication Number Publication Date
CN105004274A true CN105004274A (en) 2015-10-28
CN105004274B CN105004274B (en) 2017-06-30

Family

ID=54377040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510395713.7A Active CN105004274B (en) 2015-07-07 2015-07-07 A kind of face of cylinder radius measurement method based on 3D vision

Country Status (1)

Country Link
CN (1) CN105004274B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106197266A (en) * 2016-07-01 2016-12-07 北京航空航天大学 For the method measuring the pose of the columnar object with circular cambered surface
CN106875439A (en) * 2017-02-20 2017-06-20 天津大学 Silicon single crystal rod shape dimension measurement method based on three-dimensional point cloud model
CN107248163A (en) * 2017-06-12 2017-10-13 天津大学 A kind of automatic generation method of decorative pattern expanded view towards rotationally symmetrical porcelain
CN109000572A (en) * 2018-09-17 2018-12-14 四川大学 A kind of body diameter detection method
CN109741386A (en) * 2018-12-26 2019-05-10 豪威科技(武汉)有限公司 The Enhancement Method and stereo visual system of stereo visual system
CN112284696A (en) * 2019-07-11 2021-01-29 中国科学院半导体研究所 Gas cylinder volume detection method and system based on 3D vision technology
CN112508803A (en) * 2020-11-03 2021-03-16 中山大学 Denoising method and device for three-dimensional point cloud data and storage medium
CN112977535A (en) * 2021-05-11 2021-06-18 领视科技成都有限公司 Electrified railway clearance detection method and system based on laser scanning
CN116336953A (en) * 2023-05-30 2023-06-27 武汉工程大学 System and method for measuring radius and depth of perforation model

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060291716A1 (en) * 2005-06-28 2006-12-28 Janakiraman Vaidyanathan Thermal imaging and laser scanning systems and methods for determining the location and angular orientation of a hole with an obstructed opening residing on a surface of an article
CN101135550A (en) * 2007-10-08 2008-03-05 天津大学 Space circular hole geometric parameter measurement method based on lines structure light visible sensation sensor
CN101419063A (en) * 2008-10-30 2009-04-29 上海大学 Cylindricity non-contact measurement method and system based on multi-diameter splicing technology
CN102506704A (en) * 2011-10-14 2012-06-20 天津大学 geometric parameter online measurement method of compression spring
CN103322916A (en) * 2013-06-28 2013-09-25 中国计量学院 Large-scale vertical tank volume measurement system and method based on three-dimensional laser scanning method
CN103852032A (en) * 2012-12-07 2014-06-11 上海汽车集团股份有限公司 Characteristic parameter extraction method for cylindrical axis parts
CN104457562A (en) * 2013-09-13 2015-03-25 武汉惟景三维科技有限公司 Adapter on-line detection system based on surface structured light

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060291716A1 (en) * 2005-06-28 2006-12-28 Janakiraman Vaidyanathan Thermal imaging and laser scanning systems and methods for determining the location and angular orientation of a hole with an obstructed opening residing on a surface of an article
CN101135550A (en) * 2007-10-08 2008-03-05 天津大学 Space circular hole geometric parameter measurement method based on lines structure light visible sensation sensor
CN101419063A (en) * 2008-10-30 2009-04-29 上海大学 Cylindricity non-contact measurement method and system based on multi-diameter splicing technology
CN102506704A (en) * 2011-10-14 2012-06-20 天津大学 geometric parameter online measurement method of compression spring
CN103852032A (en) * 2012-12-07 2014-06-11 上海汽车集团股份有限公司 Characteristic parameter extraction method for cylindrical axis parts
CN103322916A (en) * 2013-06-28 2013-09-25 中国计量学院 Large-scale vertical tank volume measurement system and method based on three-dimensional laser scanning method
CN104457562A (en) * 2013-09-13 2015-03-25 武汉惟景三维科技有限公司 Adapter on-line detection system based on surface structured light

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
宋振等: "基于三维激光扫描仪法的大型立式罐容量的计量", 《计量技术》 *
宋振等: "立式罐容量计量中三维激光扫描法研究", 《中国测试》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106197266B (en) * 2016-07-01 2018-10-02 北京航空航天大学 Method for the pose for measuring the columnar object with round cambered surface
CN106197266A (en) * 2016-07-01 2016-12-07 北京航空航天大学 For the method measuring the pose of the columnar object with circular cambered surface
CN106875439B (en) * 2017-02-20 2019-06-07 天津大学 Silicon single crystal rod shape dimension measurement method based on three-dimensional point cloud model
CN106875439A (en) * 2017-02-20 2017-06-20 天津大学 Silicon single crystal rod shape dimension measurement method based on three-dimensional point cloud model
CN107248163A (en) * 2017-06-12 2017-10-13 天津大学 A kind of automatic generation method of decorative pattern expanded view towards rotationally symmetrical porcelain
CN107248163B (en) * 2017-06-12 2020-11-10 天津大学 Automatic generation method of texture development diagram for rotationally symmetric porcelain
CN109000572A (en) * 2018-09-17 2018-12-14 四川大学 A kind of body diameter detection method
CN109741386A (en) * 2018-12-26 2019-05-10 豪威科技(武汉)有限公司 The Enhancement Method and stereo visual system of stereo visual system
CN112284696A (en) * 2019-07-11 2021-01-29 中国科学院半导体研究所 Gas cylinder volume detection method and system based on 3D vision technology
CN112508803A (en) * 2020-11-03 2021-03-16 中山大学 Denoising method and device for three-dimensional point cloud data and storage medium
CN112508803B (en) * 2020-11-03 2023-10-03 中山大学 Denoising method and device for three-dimensional point cloud data and storage medium
CN112977535A (en) * 2021-05-11 2021-06-18 领视科技成都有限公司 Electrified railway clearance detection method and system based on laser scanning
CN116336953A (en) * 2023-05-30 2023-06-27 武汉工程大学 System and method for measuring radius and depth of perforation model
CN116336953B (en) * 2023-05-30 2023-08-11 武汉工程大学 System and method for measuring radius and depth of perforation model

Also Published As

Publication number Publication date
CN105004274B (en) 2017-06-30

Similar Documents

Publication Publication Date Title
CN105004274B (en) A kind of face of cylinder radius measurement method based on 3D vision
CN107798326B (en) Contour vision detection method
CN103632366B (en) A kind of parameter identification method of ellipse target
CN103886593A (en) Method for detecting hook face circular hole based on three-dimensional point cloud
CN105865344A (en) Workpiece dimension measuring method and device based on machine vision
CN104359403A (en) Plane part size measurement method based on sub-pixel edge algorithm
CN104897062A (en) Visual measurement method and device for shape and position deviation of part non-coplanar parallel holes
CN104392476A (en) Method of extracting three-dimensional axis of tunnel based on minimum bounding box algorithm
CN104992400A (en) Method and device for multispectral image registration
CN105335997A (en) Complex structure point cloud processing algorithm bases on Poisson reconstruction
CN109272542A (en) A kind of determination method of three-dimension object volume
CN104819915A (en) Method for testing roundness and sphericity of fracturing propping agent
CN105631872A (en) Remote sensing image registration method based on multiple feature points
CN114612412B (en) Processing method of three-dimensional point cloud data, application of processing method, electronic equipment and storage medium
CN102074011B (en) method for detecting any triangle in digital image
Radvar-Esfahlan et al. Robust generalized numerical inspection fixture for the metrology of compliant mechanical parts
CN103679713A (en) Two-dimensional image registration method for partially matched images
CN109285210B (en) Pipeline three-dimensional reconstruction method combining topological relation and epipolar constraint
CN106228593B (en) A kind of image dense Stereo Matching method
CN103871048B (en) Straight line primitive-based geometric hash method real-time positioning and matching method
CN114299079B (en) Dense point cloud data-oriented engine blade section line data acquisition method
CN107102056B (en) Unit expansion construction method of defect magnetic leakage signal
Wu et al. Noniterative calibration of a camera lens with radial distortion
CN111583237B (en) Neighborhood window recursion cell reconstruction method for detecting cellular regularity
Wang et al. An effective hole detection method for 3D models

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant