WO2019010916A1 - Workpiece three-dimensional point cloud data smoothing method - Google Patents

Workpiece three-dimensional point cloud data smoothing method Download PDF

Info

Publication number
WO2019010916A1
WO2019010916A1 PCT/CN2017/116107 CN2017116107W WO2019010916A1 WO 2019010916 A1 WO2019010916 A1 WO 2019010916A1 CN 2017116107 W CN2017116107 W CN 2017116107W WO 2019010916 A1 WO2019010916 A1 WO 2019010916A1
Authority
WO
WIPO (PCT)
Prior art keywords
point
point cloud
cloud data
workpiece
value
Prior art date
Application number
PCT/CN2017/116107
Other languages
French (fr)
Chinese (zh)
Inventor
敬淑义
尹章芹
毛东辉
王杰高
Original Assignee
南京埃斯顿机器人工程有限公司
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 南京埃斯顿机器人工程有限公司 filed Critical 南京埃斯顿机器人工程有限公司
Publication of WO2019010916A1 publication Critical patent/WO2019010916A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20152Watershed segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Definitions

  • the invention relates to a method for processing three-dimensional point cloud data of a workpiece, in particular to a three-dimensional point cloud data smoothing filtering method for a workpiece. It can be combined with robots in the industrial field to obtain relevant information of workpieces, and belongs to the field of industrial robot vision applications.
  • the vision system works with the robot to become the "hand-eye system.”
  • the "hand-eye system” is used to replace the production line workers to complete the production line flow operation, production line assembly, or use the visual system to complete the cumbersome work of material measurement, quality inspection, etc., to improve the robot's perception and adaptability to the environment.
  • the visual control of the robot it is not necessary to teach or offline programming the movement track of the industrial robot in advance, which can save a lot of programming time, improve production efficiency and processing quality, and liberate labor from production labor to a certain extent.
  • Stereoscopic vision is an important topic in the field of computer vision. Its purpose is to reconstruct the three-dimensional geometric information of the scene. Stereoscopic research has important application value, including autonomous navigation systems for mobile robots, aerospace and remote sensing measurements, and industrial automation systems.
  • the current point cloud filtering algorithms mainly include: LIDAR data morphology filtering algorithm, filtering algorithm based on slope change, and the like.
  • the main problem of the LIDAR data morphology filtering algorithm is the artificial selection of the slope threshold and the square effect of the detailed terrain. If the threshold is set too large, the noise may be smoothed out, and the details of the workpiece are smoothed, and the general applicability of the algorithm is poor.
  • the principle of the filtering algorithm based on the slope change is to determine the optimal filter function according to the contour of the workpiece. Although the algorithm is simple, it is necessary to know the contour change information of the workpiece and the set window information in advance, and the applicability of the algorithm is poor.
  • the object of the present invention is to overcome the defects of the prior art and provide a three-dimensional point cloud data smoothing filtering method for a workpiece.
  • the method of the invention is based on Savitzky-Golay filtering, which eliminates the maturity of the original data, improves the quality of the point cloud processing data, and can more accurately reflect the original appearance of the object.
  • the invention provides a three-dimensional point cloud data smoothing filtering method for a workpiece, comprising the following steps:
  • Step 1 Collect point cloud data of the workpiece
  • a perspective is selected to collect the 3D contour point cloud data of the workpiece.
  • Step 2 The collected workpiece point cloud data is obtained according to the three-dimensional coordinate value of the point, and the point cloud is projected onto the viewing plane.
  • Step 3 Obtain a projected grayscale image, and perform binarization threshold processing on the grayscale image to obtain a binary image.
  • Step 4 Open and close the binary image.
  • Step 5 Remove image noise with Savitzky-Golay filtering
  • N represents the number of points in the field
  • M represents the number of times of the polynomial.
  • the value of N is the same.
  • M 3 is generally taken. M is the same, the larger N is, the more the detail is lost, so the values of M and N are determined by the correlation of curvature.
  • n the total number of point clouds.
  • the Savitzky-Golay filter is used to remove the noise of the image.
  • the M-order polynomial is fitted, and the least squares is used to determine the coefficients of the polynomial.
  • Polynomial The value at x i is the smooth value g i of the corresponding point; N is greater than the order M of the polynomial; the M-order polynomial p i (x) fitted by the scan data x i is expressed as:
  • x represents any point in the N point clouds other than the point x i .
  • Y represents the filter value
  • Filter the values of in 1 , point i, and point 2 respectively.
  • equation (1-2) can be written as:
  • Equation (1-5) can be expressed as:
  • a T Ab k A T Y (1-6)
  • Step 6 The watershed segmentation recognition method is used for segmentation and recognition, and the image region is divided into several parts to obtain the largest region, and the color map after denoising is obtained based on the color map of the maximum region cropping.
  • Step 7 Calculate the three-dimensional coordinate values of the points in the point cloud data according to the points in the color map to obtain the denoised point cloud.
  • Step 8 Determine the noise condition in the point cloud data. If there is, change the angle of view, filter again. If not, output the result, the advantages of the present invention compared to other algorithms:
  • the accuracy and speed are higher than other operators; (based on the grayscale image, the point cloud data of the casting is obtained, and the amount of data calculation is reduced, plus Faster data processing speed, using the method of fitting calculation, to provide the accuracy of point cloud computing. )
  • Figure 1 is a flow chart of the Savitzky-Golay algorithm.
  • FIG. 2 is a block diagram of a method for smoothing and filtering a three-dimensional point cloud data of a workpiece of the present invention.
  • Figure 3 is a grayscale diagram of a workpiece sample.
  • Figure 4 is an effect diagram before Savitzky-Golay filtering.
  • Figure 5 is an effect diagram of Savitzky-Golay filtering.
  • the present invention uses a steel pipe casting as a workpiece, and specifically describes a three-dimensional point cloud data smoothing filtering method of the workpiece proposed by the present invention, as shown in FIG. 2, and the specific implementation process is as follows:
  • Step 1 Load the point cloud data of the workpiece, and use vc to read the point cloud data of the iron pipe casting on the vs2013 software platform.
  • Step 2 Select a projection direction, call the pcl (point cloud library) point cloud algorithm library, use the greedy projection triangulation method, calculate the point cloud normal vector, and put the normal vector and the point cloud coordinates together to determine the point cloud projection. Angle and direction.
  • Step 3 Load the grayscale image, as shown in Figure 3.
  • the read grayscale image is loaded on the vs2013 software platform, and the grayscale image is binarized.
  • Step 4 The opening and closing operation of the binary image is first expanded and then etched by a circular structure. Create a circular structure with a radius of 3, use a circular structure to etch the binary image, and then use a circular structure to swell the etched image to obtain a processed binary image to determine the data area to be processed. .
  • Step 5 Remove the noise of the image with Savitzky-Golay filtering.
  • N cannot be set too large, otherwise it will affect the speed of processing data, but it can not affect the accuracy of the fitting, and N is the base, so set the value of N to 47.
  • the Savitzky-Golay filter is used to remove the noise of the image:
  • the value of the polynomial at x i is the smooth value g i of the corresponding point.
  • equation (1-2) can be written as:
  • Equation (1-5) can be expressed as:
  • a T Ab k A T Y (1-6)
  • Figure 4 is a filtered effect diagram of Figure 5.
  • Step 6 Using the watershed segmentation identification method to perform segmentation and segmentation, divide the image region into several parts, obtain the largest region, process the filtered image, and obtain the maximum effective region.
  • Step 7 Calculate the three-dimensional coordinate values of the points in the point cloud data according to the points in the gray scale image to obtain the denoised point cloud. Reverse the three-dimensional coordinates of the point cloud to obtain the denoised point cloud.
  • Step 8 Determine if the denoising is acceptable. If it is qualified, output point cloud. If it is not qualified, select one again to clear The angle of the contour of the object is filtered again.
  • Table 1 shows the comparison of the algorithm in this paper with the commonly used threshold filtering algorithm in time.
  • Point cloud data volume Average time spent on threshold filtering (s) The average time spent on the algorithm (s) 19420 124 30 199013 508 131 798006 1250 240 1901580 33450 387
  • the experimental data is obtained on a CPU with a CPU of 3.0 GHz, a memory of 4 G, and a system of win7.
  • Watershed segmentation identification method a mathematical morphology segmentation method based on topological theory.
  • the basic idea is to regard the image as a geomorphological topological feature.
  • the gray value of each pixel in the image indicates the altitude of the point.
  • Each local minimum and its affected area are called catchment basins, while the boundary of the catchment basin forms a watershed.
  • the concept and formation of the watershed can be illustrated by simulating the immersion process. On each local minimum surface, pierce a small hole, and then slowly immerse the entire model in the water. As the immersion deepens, the influence of each local minimum is slowly expanded outward, in two sets.
  • the faucet at the confluence of the basin forms a watershed and divides the image into different areas.
  • the greedy projection triangulation method firstly project the directed point cloud into a local coordinate plane, and then perform intra-plane triangulation in the coordinate plane, and obtain a triangular mesh surface model according to the topological relationship of the three points in the plane.
  • Opening and closing operation of the binary image by first expanding and then etching with a circular structure taking a circular as a structural element, performing intersection and equal set operations on the region corresponding to the binary image at each pixel position, first etching
  • the process of expansion is called the open operation.
  • Corrosion is a process of eliminating boundary points and shrinking the boundary to the inside. Can be used to eliminate small and meaningless objects.
  • Swelling is the process of merging all background points that come into contact with an object into the object, and expanding the boundary to the outside, which can be used to fill the voids in the object.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

A workpiece three-dimensional point cloud data smoothing method. A Savitzky-Golay algorithm is utilized for workpiece three-dimensional point cloud data smoothing processing. The algorithm employs a method for combined processing of a grayscale image and a point cloud image, reduces the data volume of raw data processing, and increases the amount of time for processing data. A polynomial fitting method is utilized for smoothing point cloud data and retaining the geometric invariance of a point cloud.

Description

一种工件三维点云数据平滑滤波方法Three-dimensional point cloud data smoothing filtering method for workpiece 技术领域Technical field
本发明涉及一种工件三维点云数据处理的方法,具体说是一种工件三维点云数据平滑滤波方法。可以结合机器人应用于工业领域,获取工件的相关信息,属于工业机器人视觉应用领域。The invention relates to a method for processing three-dimensional point cloud data of a workpiece, in particular to a three-dimensional point cloud data smoothing filtering method for a workpiece. It can be combined with robots in the industrial field to obtain relevant information of workpieces, and belongs to the field of industrial robot vision applications.
背景技术Background technique
视觉系统配合机器人,成为“手眼系统”。在现代智能工业应用中,利用“手眼系统”代替产线工人完成生产线流水作业、产线装配,或者利用视觉系统完成物料的测量、质量检查等繁琐工作,提高机器人对环境的感知与应变能力,利用机器人的视觉控制,不需要预先对工业机器人的运动轨迹进行示教或离线编程,可节约大量的编程时间,提高生产效率和加工质量,在一定程度上将人工从生产劳动中解放出来。The vision system works with the robot to become the "hand-eye system." In the modern intelligent industrial application, the "hand-eye system" is used to replace the production line workers to complete the production line flow operation, production line assembly, or use the visual system to complete the cumbersome work of material measurement, quality inspection, etc., to improve the robot's perception and adaptability to the environment. With the visual control of the robot, it is not necessary to teach or offline programming the movement track of the industrial robot in advance, which can save a lot of programming time, improve production efficiency and processing quality, and liberate labor from production labor to a certain extent.
立体视觉是计算机视觉领域的一个重要课题,它的目的在于重构场景的三维几何信息。立体视觉的研究具有重要的应用价值,其应用包括移动机器人的自主导航系统,航空及遥感测量,工业自动化系统等。Stereoscopic vision is an important topic in the field of computer vision. Its purpose is to reconstruct the three-dimensional geometric information of the scene. Stereoscopic research has important application value, including autonomous navigation systems for mobile robots, aerospace and remote sensing measurements, and industrial automation systems.
基于传感器获取三维信息的方法有很多种,主要分为主动式和被动式,工业领域一般采用主动式三维方式获取深度信息,即通过打结构光或者光编码等方式获取立体深度信息,此立体深度信息亦成为三维点云信息。There are many methods for acquiring three-dimensional information based on sensors, which are mainly divided into active and passive. In the industrial field, active three-dimensional methods are generally used to obtain depth information, that is, stereoscopic depth information is acquired by means of structured light or optical coding, and the stereoscopic depth information is obtained. It also becomes a three-dimensional point cloud information.
获取三维点云数据之后,需要对点云数据进行滤波处理。目前的点云滤波算法主要有:LIDAR数据形态学滤波算法、基于坡度变化的滤波算法等。LIDAR数据形态学滤波算法主要问题是坡度阈值的人工选取和细节地形的方块效应,如果阈值设定太大,可能平滑掉噪声,同时将工件的细节平滑处理,算法的普遍适用性很差。基于坡度变化的滤波算法原理是根据工件轮廓确定最优的滤波函数,虽然算法简单,但是需要提前知道工件的轮廓变化信息以及设定的窗口信息,算法适用性差。After acquiring the 3D point cloud data, the point cloud data needs to be filtered. The current point cloud filtering algorithms mainly include: LIDAR data morphology filtering algorithm, filtering algorithm based on slope change, and the like. The main problem of the LIDAR data morphology filtering algorithm is the artificial selection of the slope threshold and the square effect of the detailed terrain. If the threshold is set too large, the noise may be smoothed out, and the details of the workpiece are smoothed, and the general applicability of the algorithm is poor. The principle of the filtering algorithm based on the slope change is to determine the optimal filter function according to the contour of the workpiece. Although the algorithm is simple, it is necessary to know the contour change information of the workpiece and the set window information in advance, and the applicability of the algorithm is poor.
发明内容Summary of the invention
本发明的目的在于,克服现有技术存在的缺陷,提供一种工件三维点云数据平滑滤波方法。本发明方法基于Savitzky-Golay滤波,消除原始数据的不光滑,提高点云处理数据的质量,能更真实反映出物体的本来面貌。The object of the present invention is to overcome the defects of the prior art and provide a three-dimensional point cloud data smoothing filtering method for a workpiece. The method of the invention is based on Savitzky-Golay filtering, which eliminates the maturity of the original data, improves the quality of the point cloud processing data, and can more accurately reflect the original appearance of the object.
本发明一种工件三维点云数据平滑滤波方法,包含以下步骤:The invention provides a three-dimensional point cloud data smoothing filtering method for a workpiece, comprising the following steps:
步骤1:采集工件的点云数据Step 1: Collect point cloud data of the workpiece
基于工件的形状,选取一个视角,采集工件的三维轮廓点云数据。 Based on the shape of the workpiece, a perspective is selected to collect the 3D contour point cloud data of the workpiece.
步骤2:将采集的工件点云数据按照点的三维坐标值获取对应的灰度图,并将点云投影到视平面上面。Step 2: The collected workpiece point cloud data is obtained according to the three-dimensional coordinate value of the point, and the point cloud is projected onto the viewing plane.
步骤3:得到投影的灰度图,并对灰度图进行二值化阈值处理,得到二值图。Step 3: Obtain a projected grayscale image, and perform binarization threshold processing on the grayscale image to obtain a binary image.
步骤4:对二值图进行开闭合运算。Step 4: Open and close the binary image.
步骤5:用Savitzky-Golay滤波去除图像的噪声Step 5: Remove image noise with Savitzky-Golay filtering
1)确定M和N的值。N表示领域内的点个数,M表示多项式的次数。N取值相同,M值越小,平滑效果越好,但是为了确保滤波后的点云和原点云差别不大,一般取M=3。M相同,N越大,细节丢失越大,因此通过曲率的相关关系确定M和N的值。1) Determine the values of M and N. N represents the number of points in the field, and M represents the number of times of the polynomial. The value of N is the same. The smaller the M value is, the better the smoothing effect is. However, in order to ensure that the filtered point cloud and the origin cloud are not much different, M=3 is generally taken. M is the same, the larger N is, the more the detail is lost, so the values of M and N are determined by the correlation of curvature.
(1)利用M次样条插值计算点云的曲率Ci(i=1,2,...,n)以及曲率导数dCi(i=1,2,...,n-1),n表示点云的总数。(1) Calculate the curvature C i (i = 1, 2, ..., n) of the point cloud and the curvature derivative dC i (i = 1, 2, ..., n-1) using M-time spline interpolation, n represents the total number of point clouds.
(2)令Nmax=n/4,Nmin=5;若满足(n/4)<5,则N=5,若点云数n小于5,则结束处理。(2) Let N max = n / 4, N min = 5; if (n / 4) < 5 is satisfied, then N = 5, and if the number of point clouds n is less than 5, the processing is terminated.
(3)确定N的值;若某点的曲率值Ci<Q1,那么可以认为这点和其领域点在一条直线上,然后在其领域内寻找满足dCi<Q2的点,确定点后,如果n1>n2,则N=2n1+1;否则:N=2n2+1,若某点的曲率值Ci>Q1,则该点曲率变化dCi在其领域内寻找满足
Figure PCTCN2017116107-appb-000001
或者
Figure PCTCN2017116107-appb-000002
的点,其中其中Q,Q1,Q2为曲率分割阈值的经验值,如果n1>n2,则N=2n1+1;否者:N=2n2+1,确定N和M的值。n1表示曲率小于并接近Q2的点个数,n2表示曲率值大于并接近Q2的点个数。
(3) Determine the value of N; if the curvature value of a point C i <Q 1 , then it can be considered that this point and its field point are in a straight line, and then find the point in the field that satisfies dC i <Q 2 and determine After the point, if n 1 >n 2 , then N=2n 1 +1; otherwise: N=2n 2 +1, if the curvature value of a point C i >Q 1 , then the curvature change dC i of the point is in its domain Looking for satisfaction
Figure PCTCN2017116107-appb-000001
or
Figure PCTCN2017116107-appb-000002
Point, where Q, Q 1 , Q 2 are empirical values of the curvature segmentation threshold, if n 1 >n 2 , then N=2n 1 +1; otherwise: N=2n 2 +1, determining N and M value. n 1 represents the number of points whose curvature is smaller than and close to Q 2 , and n 2 represents the number of points whose curvature value is larger than and close to Q 2 .
2)确定N和M的值之后,用Savitzky-Golay滤波器去除图像的噪声对任意点xi领域内的N个点用M阶多项式进行拟合,运用最小二乘则确定多项式的系数,多项式在xi处的值是对应点的光滑值gi;N要大于多项式的阶数M;由扫描数据xi拟合的M次多项式pi(x)表示为:2) After determining the values of N and M, the Savitzky-Golay filter is used to remove the noise of the image. For the N points in the field of any point x i , the M-order polynomial is fitted, and the least squares is used to determine the coefficients of the polynomial. Polynomial The value at x i is the smooth value g i of the corresponding point; N is greater than the order M of the polynomial; the M-order polynomial p i (x) fitted by the scan data x i is expressed as:
Figure PCTCN2017116107-appb-000003
Figure PCTCN2017116107-appb-000003
其中x表示N个点云中除了点xi外的任意一点。 Where x represents any point in the N point clouds other than the point x i .
假设对于任意xi都有xi+1-xi=Δx,拟合多项式需要计算出(1-1)中的系数bk,使其达到最优,即:Assuming that x i+1 -x i =Δx for any x i , the fitting polynomial needs to calculate the coefficient b k in (1-1) to make it optimal, ie:
Figure PCTCN2017116107-appb-000004
Figure PCTCN2017116107-appb-000004
bk的系数的矩阵表达:Matrix representation of the coefficients of b k :
Figure PCTCN2017116107-appb-000005
Figure PCTCN2017116107-appb-000005
其他参数用向量表示为:Other parameters are represented by vectors as:
Figure PCTCN2017116107-appb-000006
Figure PCTCN2017116107-appb-000007
Figure PCTCN2017116107-appb-000006
with
Figure PCTCN2017116107-appb-000007
Y表示滤波值,
Figure PCTCN2017116107-appb-000008
分别点i-n1、点i、点i-n2的滤波值。
Y represents the filter value,
Figure PCTCN2017116107-appb-000008
Filter the values of in 1 , point i, and point 2 respectively.
由式(1-3)和(1-4),式(1-2)可写为:From equations (1-3) and (1-4), equation (1-2) can be written as:
Figure PCTCN2017116107-appb-000009
Figure PCTCN2017116107-appb-000009
式(1-5)可以表示为:Equation (1-5) can be expressed as:
ATAbk=ATY                            (1-6)A T Ab k =A T Y (1-6)
因为ATA是正定矩阵,且存在逆矩阵,系数bkSince A T A is a positive definite matrix and there is an inverse matrix, the coefficient b k :
bk=(ATA)-1ATY                         (1-7)b k =(A T A) -1 A T Y (1-7)
步骤6:用分水岭分割识别法进行区域分割识别,将图像区域划分成几个部分,获取最大的区域,基于最大区域裁剪的彩色图,得到去噪后的彩色图。Step 6: The watershed segmentation recognition method is used for segmentation and recognition, and the image region is divided into several parts to obtain the largest region, and the color map after denoising is obtained based on the color map of the maximum region cropping.
步骤7:根据彩色图中的点反推算点云数据中个点的三维坐标值,得到去噪后的点云。Step 7: Calculate the three-dimensional coordinate values of the points in the point cloud data according to the points in the color map to obtain the denoised point cloud.
步骤8:判断点云数据中噪音情况,如果有,换视角,再次滤波,如果没有,输出结果,本发明相较于其它算法的优点:Step 8: Determine the noise condition in the point cloud data. If there is, change the angle of view, filter again. If not, output the result, the advantages of the present invention compared to other algorithms:
1.保持几何特征不变(算法滤波处理,采用拟合算法处理,去除图像中的噪声,保持工件的几何特征不变);1. Keep the geometric features unchanged (algorithm filtering processing, using the fitting algorithm to remove the noise in the image and keep the geometric characteristics of the workpiece unchanged);
2.精度和速度比其它算子高;(基于灰度图,获取铸件的点云数据,数据运算量减少,加 快了数据的处理速度,采用拟合计算的方法,提供点云计算的精度。)2. The accuracy and speed are higher than other operators; (based on the grayscale image, the point cloud data of the casting is obtained, and the amount of data calculation is reduced, plus Faster data processing speed, using the method of fitting calculation, to provide the accuracy of point cloud computing. )
3.适用性强(数据拟合计算,适用于不同的铸件,适应性强)。3. Applicability is strong (data fitting calculation, suitable for different castings, strong adaptability).
附图说明DRAWINGS
图1是Savitzky-Golay算法的流程图。Figure 1 is a flow chart of the Savitzky-Golay algorithm.
图2是本发明工件三维点云数据平滑滤波方法程序框图。2 is a block diagram of a method for smoothing and filtering a three-dimensional point cloud data of a workpiece of the present invention.
图3是工件样本灰度图。Figure 3 is a grayscale diagram of a workpiece sample.
图4是Savitzky-Golay滤波前的效果图。Figure 4 is an effect diagram before Savitzky-Golay filtering.
图5是Savitzky-Golay滤波后的效果图。Figure 5 is an effect diagram of Savitzky-Golay filtering.
具体实施方式Detailed ways
下面结合附图和实施例,对本发明作进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
实施例,本发明以铁管铸件为工件,具体介绍本发明提出的工件三维点云数据平滑滤波方法,如图2所示,具体实施过程如下:Embodiments, the present invention uses a steel pipe casting as a workpiece, and specifically describes a three-dimensional point cloud data smoothing filtering method of the workpiece proposed by the present invention, as shown in FIG. 2, and the specific implementation process is as follows:
步骤1:加载工件的点云数据,在vs2013软件平台上上利用vc读取铁管铸件的点云数据。Step 1: Load the point cloud data of the workpiece, and use vc to read the point cloud data of the iron pipe casting on the vs2013 software platform.
步骤2:择一个投影方向,调用pcl(point cloud library)点云算法库,采用贪婪投影三角化方法,计算点云法向量,并将法向量和点云坐标放在一起,确定点云投影的角度和方向。Step 2: Select a projection direction, call the pcl (point cloud library) point cloud algorithm library, use the greedy projection triangulation method, calculate the point cloud normal vector, and put the normal vector and the point cloud coordinates together to determine the point cloud projection. Angle and direction.
步骤3:加载灰度图,如图3。在vs2013软件平台上加载读取灰度图,并对灰度图进行二值化处理。Step 3: Load the grayscale image, as shown in Figure 3. The read grayscale image is loaded on the vs2013 software platform, and the grayscale image is binarized.
步骤4:用圆形结构对二值图像进行先膨胀后腐蚀的开合闭运算。以3为半径,创建圆形结构,利用圆形结构对二值图进行腐蚀处理,再利用圆形结构对腐蚀后的图像进行膨胀处理,得到处理后的二值图,确定需要处理的数据区域。Step 4: The opening and closing operation of the binary image is first expanded and then etched by a circular structure. Create a circular structure with a radius of 3, use a circular structure to etch the binary image, and then use a circular structure to swell the etched image to obtain a processed binary image to determine the data area to be processed. .
步骤5:用Savitzky-Golay滤波去除图像的噪声。Step 5: Remove the noise of the image with Savitzky-Golay filtering.
采用Savitzky-Golay滤波首先需要确认几个参数:多项式的拟合次数M,点Xi领域内的总点数N,点Xi两边的点数n1和n2。为了使计算的精度和速度达到较好的水平,M一般取2,3,4。本实施例M=3,Using Savitzky-Golay filter needs to first determine several parameters: the number of polynomial fitting M, the total number of points in the field of point X i N, the number of points on either side of the point X i n 1 and n 2. In order to achieve a better level of accuracy and speed of calculation, M generally takes 2, 3, 4. This embodiment M=3,
N不能设置太大,否则影响处理数据的速度,但又不能影响拟合的精度,且N为基数,因此设置设N的值为47。N cannot be set too large, otherwise it will affect the speed of processing data, but it can not affect the accuracy of the fitting, and N is the base, so set the value of N to 47.
基于各方向上矢量值一致性原则,令n1=n2Based on the principle of vector value consistency in the directions of the parties, let n 1 = n 2 .
确定N和M的值之后,用Savitzky-Golay滤波器去除图像的噪声:After determining the values of N and M, the Savitzky-Golay filter is used to remove the noise of the image:
对任意点xi领域内的N=47个点用M=3阶多项式进行拟合,运用最小二乘则 确定多项式的系数,多项式在xi处的值是对应点的光滑值gi。由扫描数据xi拟合的M=3次多项式pi(x)可表示为:For the N=47 points in the field of any point x i , the M=3 order polynomial is fitted, and the least squares is used to determine the coefficient of the polynomial. The value of the polynomial at x i is the smooth value g i of the corresponding point. The M=3rd degree polynomial p i (x) fitted by the scan data x i can be expressed as:
Figure PCTCN2017116107-appb-000010
Figure PCTCN2017116107-appb-000010
假设对于任意xi都有xi+1-xi=Δx,拟合多项式需要计算出(1-1)中的系数bk,使其达到最优,即:Assuming that x i+1 -x i =Δx for any x i , the fitting polynomial needs to calculate the coefficient b k in (1-1) to make it optimal, ie:
Figure PCTCN2017116107-appb-000011
Figure PCTCN2017116107-appb-000011
bk的系数的矩阵表达:Matrix representation of the coefficients of b k :
Figure PCTCN2017116107-appb-000012
Figure PCTCN2017116107-appb-000012
其他参数用向量表示为:Other parameters are represented by vectors as:
Figure PCTCN2017116107-appb-000013
Figure PCTCN2017116107-appb-000014
Figure PCTCN2017116107-appb-000013
with
Figure PCTCN2017116107-appb-000014
由式(1-3)和(1-4),式(1-2)可写为:From equations (1-3) and (1-4), equation (1-2) can be written as:
Figure PCTCN2017116107-appb-000015
Figure PCTCN2017116107-appb-000015
式(1-5)可以表示为:Equation (1-5) can be expressed as:
ATAbk=ATY                           (1-6)A T Ab k =A T Y (1-6)
因为ATA是正定矩阵,且存在逆矩阵,系数bkSince A T A is a positive definite matrix and there is an inverse matrix, the coefficient b k :
bk=(ATA)-1ATY                           (1-7)b k =(A T A) -1 A T Y (1-7)
图4滤波后的效果图为图5。Figure 4 is a filtered effect diagram of Figure 5.
步骤6:用分水岭分割识别法进行区域分割识别,将图像区域划分成几个部分,获取最大的区域,处理滤波后的图,获取最大有效区域。Step 6: Using the watershed segmentation identification method to perform segmentation and segmentation, divide the image region into several parts, obtain the largest region, process the filtered image, and obtain the maximum effective region.
步骤7:根据灰度图中的点反推算点云数据中个点的三维坐标值,得到去噪后的点云。反求点云的三维坐标,获取去噪后的点云。Step 7: Calculate the three-dimensional coordinate values of the points in the point cloud data according to the points in the gray scale image to obtain the denoised point cloud. Reverse the three-dimensional coordinates of the point cloud to obtain the denoised point cloud.
步骤8:判定去噪是否合格。如果合格,输出点云,如果不合格,则再次选择一个可以清 物体轮廓的角度,再次滤波。Step 8: Determine if the denoising is acceptable. If it is qualified, output point cloud. If it is not qualified, select one again to clear The angle of the contour of the object is filtered again.
表1体现了本文算法与常用的阈值滤波算法在时间上的比较。Table 1 shows the comparison of the algorithm in this paper with the commonly used threshold filtering algorithm in time.
表1Table 1
点云数据量Point cloud data volume 阈值滤波平均花费的时间(s)Average time spent on threshold filtering (s) 本文算法的平均花费的时间(s)The average time spent on the algorithm (s)
1942019420 124124 3030
199013199013 508508 131131
798006798006 12501250 240240
19015801901580 3345033450 387387
实验数据在CPU为3.0GHZ,内存为4G,系统为win7的PC上获取。The experimental data is obtained on a CPU with a CPU of 3.0 GHz, a memory of 4 G, and a system of win7.
本发明内容中的以下名词的含义分别为:The meanings of the following nouns in the context of the present invention are:
分水岭分割识别法:一种基于拓扑理论的数学形态学的分割方法,其基本思想是把图像看作是测地学上的拓扑地貌,图像中每一像素的灰度值表示该点的海拔高度,每一个局部极小值及其影响区域称为集水盆地,而集水盆地的边界则形成分水岭。分水岭的概念和形成可以通过模拟浸入过程来说明。在每一个局部极小值表面,刺穿一个小孔,然后把整个模型慢慢浸人水中,随着浸入的加深,每一个局部极小值的影响域慢慢向外扩展,在两个集水盆汇合处构筑大坝,即形成分水岭,将图像划分成不同区域。Watershed segmentation identification method: a mathematical morphology segmentation method based on topological theory. The basic idea is to regard the image as a geomorphological topological feature. The gray value of each pixel in the image indicates the altitude of the point. Each local minimum and its affected area are called catchment basins, while the boundary of the catchment basin forms a watershed. The concept and formation of the watershed can be illustrated by simulating the immersion process. On each local minimum surface, pierce a small hole, and then slowly immerse the entire model in the water. As the immersion deepens, the influence of each local minimum is slowly expanded outward, in two sets. The faucet at the confluence of the basin forms a watershed and divides the image into different areas.
贪婪投影三角化方法:先将有向点云投影到某一局部坐标平面内,再在坐标平面内进行平面内的三角化,根据平面内三位点的拓扑关系获得一个三角网格曲面模型。The greedy projection triangulation method: firstly project the directed point cloud into a local coordinate plane, and then perform intra-plane triangulation in the coordinate plane, and obtain a triangular mesh surface model according to the topological relationship of the three points in the plane.
用圆形结构对二值图像进行先膨胀后腐蚀的开合闭运算:以圆形为结构元素,在每个像素位置上与二值图像对应的区域进行交、并等集合运算,先腐蚀后膨胀的过程称为开运算。腐蚀是一种消除边界点,是边界向内部收缩的过程,。可以用来消除小且无意义的物体。膨胀是将与物体接触的所有背景点合并到该物体中,使边界向外部扩张的过程,可以用来填补物体中的空洞。 Opening and closing operation of the binary image by first expanding and then etching with a circular structure: taking a circular as a structural element, performing intersection and equal set operations on the region corresponding to the binary image at each pixel position, first etching The process of expansion is called the open operation. Corrosion is a process of eliminating boundary points and shrinking the boundary to the inside. Can be used to eliminate small and meaningless objects. Swelling is the process of merging all background points that come into contact with an object into the object, and expanding the boundary to the outside, which can be used to fill the voids in the object.

Claims (2)

  1. 一种工件三维点云数据平滑滤波方法,包含以下步骤:A three-dimensional point cloud data smoothing filtering method for workpieces, comprising the following steps:
    步骤1.采集工件的点云数据Step 1. Collect point cloud data of the workpiece
    基于工件的形状,选取一个视角,采集工件的三维轮廓点云数据;Based on the shape of the workpiece, a perspective is selected to collect the three-dimensional contour point cloud data of the workpiece;
    步骤2.将采集的工件点云数据按照点的三维坐标值获取对应的灰度图,并将点云投影到视平面上面;Step 2. Acquire the corresponding point cloud data according to the three-dimensional coordinate value of the point, and project the point cloud onto the viewing plane;
    步骤3.得到投影的灰度图,并对灰度图进行二值化阈值处理,得到二值图;Step 3. Obtain a projected grayscale image, and perform a binarization threshold processing on the grayscale image to obtain a binary image;
    步骤4.对二值图进行开闭合运算;Step 4. Perform an open and close operation on the binary image;
    步骤5.用Savitzky-Golay滤波去除图像的噪声Step 5. Remove image noise with Savitzky-Golay filtering
    1)确定M和N的值,N表示领域内的点个数,M表示多项式的次数:1) Determine the values of M and N, where N is the number of points in the field, and M is the number of polynomials:
    (1)利用M次样条插值计算点云的曲率Ci(i=1,2,...,n)以及曲率导数dCi(i=1,2,...,n-1),n表示点云的总数;(1) Calculate the curvature C i (i = 1, 2, ..., n) of the point cloud and the curvature derivative dC i (i = 1, 2, ..., n-1) using M-time spline interpolation, n represents the total number of point clouds;
    (2)令Nmax=n/4,Nmin=5;若满足(n/4)<5,则N=5,若点云数n小于5,则结束处理;(2) Let N max = n / 4, N min = 5; if (n / 4) < 5, then N = 5, if the number of point clouds n is less than 5, the process ends;
    (3)确定N的值;若某点的曲率值Ci<Q1,那么可以认为这点和其领域点在一条直线上,然后在其领域内寻找满足dCi<Q2的点,确定点后,如果n1>n2,则N=2n1+1;否则:N=2n2+1;若某点的曲率值Ci>Q1,则该点曲率变化dCi在其领域内寻找满足
    Figure PCTCN2017116107-appb-100001
    或者
    Figure PCTCN2017116107-appb-100002
    的点,其中Q,Q1,Q2为曲率分割阈值的经验值,如果n1>n2,则
    Figure PCTCN2017116107-appb-100003
    否则:N=2n2+1;确定N和M的值;n1表示曲率小于并接近Q2的点个数,n2表示曲率值大于并接近Q2的点个数;
    (3) Determine the value of N; if the curvature value of a point C i <Q 1 , then it can be considered that this point and its field point are in a straight line, and then find the point in the field that satisfies dC i <Q 2 and determine After the point, if n 1 >n 2 , then N=2n 1 +1; otherwise: N=2n 2 +1; if the curvature value of a point C i >Q 1 , then the curvature change dC i of the point is in its domain Looking for satisfaction
    Figure PCTCN2017116107-appb-100001
    or
    Figure PCTCN2017116107-appb-100002
    Point, where Q, Q 1 , Q 2 are empirical values of the curvature segmentation threshold, if n 1 >n 2 , then
    Figure PCTCN2017116107-appb-100003
    Otherwise: N = 2n 2 +1; determine the values of N and M; n 1 represents the number of points whose curvature is less than and close to Q 2 , and n 2 represents the number of points whose curvature value is greater than and close to Q 2 ;
    2)确定N和M的值之后,用Savitzky-Golay滤波器去除图像的噪声2) After determining the values of N and M, remove the noise of the image with a Savitzky-Golay filter
    对任意点xi领域内的N个点用M阶多项式进行拟合,运用最小二乘则确定多项式的系数,多项式在xi处的值是对应点的光滑值gi;N要大于多项式的阶数M;由扫描数据xi拟合的M次多项式pi(x)表示为:For the N points in any field x i domain, the M-order polynomial is fitted, and the least squares is used to determine the coefficients of the polynomial. The value of the polynomial at x i is the smooth value g i of the corresponding point; N is greater than the polynomial The order M; the M-order polynomial p i (x) fitted by the scan data x i is expressed as:
    Figure PCTCN2017116107-appb-100004
    Figure PCTCN2017116107-appb-100004
    bk=(ATA)-1ATY b k =(A T A) -1 A T Y
    Figure PCTCN2017116107-appb-100005
    Figure PCTCN2017116107-appb-100005
    其中x表示N个点云中除了点xi外的任意一点;假设对于任意xi都有xi+1-xi=Δx,Y表示滤波值,
    Figure PCTCN2017116107-appb-100006
    分别点i-n1、点i、点i+n2的滤波值;
    Where x represents any point in the N point clouds other than the point x i ; assume that for any x i there is x i+1 -x i =Δx, Y represents the filtered value,
    Figure PCTCN2017116107-appb-100006
    Filter the values of in 1 , point i, and point i+n 2 respectively;
    步骤6.用分水岭分割识别法进行区域分割识别,将图像区域划分成几个部分,获取最大的区域,基于最大区域裁剪的彩色图,得到去噪后的彩色图;Step 6. Using the watershed segmentation identification method to segment the region, divide the image region into several parts, obtain the largest region, and obtain the color map after denoising based on the color map of the maximum region cropping;
    步骤7.根据彩色图中的点反推算点云数据中个点的三维坐标值,得到去噪后的点云;Step 7. Calculate the three-dimensional coordinate values of the points in the point cloud data according to the points in the color map to obtain the denoised point cloud;
    步骤8.判断点云数据中噪音情况,如果有噪音,换视角,再次滤波,如果没有噪音,输出最后的点云数据。Step 8. Determine the noise condition in the point cloud data. If there is noise, change the angle of view, filter again. If there is no noise, output the last point cloud data.
  2. 根据权利要求1所述的工件三维点云数据平滑滤波方法,其特征在于,步骤5中,M=3。 The workpiece 3D point cloud data smoothing filtering method according to claim 1, wherein in step 5, M=3.
PCT/CN2017/116107 2017-07-10 2017-12-14 Workpiece three-dimensional point cloud data smoothing method WO2019010916A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710554642.X 2017-07-10
CN201710554642.XA CN107274376A (en) 2017-07-10 2017-07-10 A kind of workpiece three dimensional point cloud smooth filtering method

Publications (1)

Publication Number Publication Date
WO2019010916A1 true WO2019010916A1 (en) 2019-01-17

Family

ID=60072712

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/116107 WO2019010916A1 (en) 2017-07-10 2017-12-14 Workpiece three-dimensional point cloud data smoothing method

Country Status (2)

Country Link
CN (1) CN107274376A (en)
WO (1) WO2019010916A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111986115A (en) * 2020-08-22 2020-11-24 王程 Accurate elimination method for laser point cloud noise and redundant data
CN112102178A (en) * 2020-07-29 2020-12-18 深圳市菲森科技有限公司 Point cloud feature-preserving denoising method and device, electronic equipment and storage medium
CN115451846A (en) * 2022-07-22 2022-12-09 中国人民解放军63891部队 TLS-based large parabolic antenna caliber measuring and calculating method

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107274376A (en) * 2017-07-10 2017-10-20 南京埃斯顿机器人工程有限公司 A kind of workpiece three dimensional point cloud smooth filtering method
CN109975314A (en) * 2018-12-27 2019-07-05 江苏理工学院 A kind of wood surface detection system and detection method based on three-dimensional laser point cloud data
CN111435551B (en) * 2019-01-15 2023-01-13 华为技术有限公司 Point cloud filtering method and device and storage medium
CN110060330B (en) * 2019-03-08 2023-05-23 武汉库柏特科技有限公司 Three-dimensional modeling method and device based on point cloud image and robot
CN110880202B (en) * 2019-12-02 2023-03-21 中电科特种飞机系统工程有限公司 Three-dimensional terrain model creating method, device, equipment and storage medium
CN113962904B (en) * 2021-11-26 2023-02-10 江苏云脑数据科技有限公司 Method for filtering and denoising hyperspectral image

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104266587A (en) * 2014-09-22 2015-01-07 电子科技大学 Three-dimensional measurement system and method for obtaining actual 3D texture point cloud data
CN106022694A (en) * 2016-05-30 2016-10-12 燕山大学 Bulk cargo yard stacker-reclaimer positioning method based on point cloud data processing technology and system for realizing same
CN107274376A (en) * 2017-07-10 2017-10-20 南京埃斯顿机器人工程有限公司 A kind of workpiece three dimensional point cloud smooth filtering method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104266587A (en) * 2014-09-22 2015-01-07 电子科技大学 Three-dimensional measurement system and method for obtaining actual 3D texture point cloud data
CN106022694A (en) * 2016-05-30 2016-10-12 燕山大学 Bulk cargo yard stacker-reclaimer positioning method based on point cloud data processing technology and system for realizing same
CN107274376A (en) * 2017-07-10 2017-10-20 南京埃斯顿机器人工程有限公司 A kind of workpiece three dimensional point cloud smooth filtering method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LI, XIAOZHI ET AL.: "Denoising and Smoothing Based on 3-D Body Scan Line Point Cloud Data", JOURNAL OF TEXTILE RESEARCH, 31 March 2010 (2010-03-31), ISSN: 0253-9721 *
XIAO, BEI: "Research on Point Cloud of Three-dimensional Laserscanner Pre-processing Algorithm", ELECTRONIC TECHNOLOGY & INFORMATION SCIENCE, CHINA MASTER'S THESES FULL-TEXT DATABASE, no. 5, 15 May 2012 (2012-05-15), pages 7, 23-27 - 29-30, ISSN: 1674-0246 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112102178A (en) * 2020-07-29 2020-12-18 深圳市菲森科技有限公司 Point cloud feature-preserving denoising method and device, electronic equipment and storage medium
CN111986115A (en) * 2020-08-22 2020-11-24 王程 Accurate elimination method for laser point cloud noise and redundant data
CN115451846A (en) * 2022-07-22 2022-12-09 中国人民解放军63891部队 TLS-based large parabolic antenna caliber measuring and calculating method
CN115451846B (en) * 2022-07-22 2024-04-09 中国人民解放军63891部队 TLS-based large parabolic antenna caliber measuring and calculating method

Also Published As

Publication number Publication date
CN107274376A (en) 2017-10-20

Similar Documents

Publication Publication Date Title
WO2019010916A1 (en) Workpiece three-dimensional point cloud data smoothing method
CN110136072B (en) Point cloud noise removing method, denoising system, computer device and storage medium
CN109903327B (en) Target size measurement method of sparse point cloud
Hoang et al. Metaheuristic optimized edge detection for recognition of concrete wall cracks: a comparative study on the performances of roberts, prewitt, canny, and sobel algorithms
CN112581457B (en) Pipeline inner surface detection method and device based on three-dimensional point cloud
Amhaz et al. A new minimal path selection algorithm for automatic crack detection on pavement images
CN109035224B (en) Submarine pipeline detection and three-dimensional reconstruction method based on multi-beam point cloud
CN110458772B (en) Point cloud filtering method and device based on image processing and storage medium
CN108225319B (en) Monocular vision rapid relative pose estimation system and method based on target characteristics
CN107978017B (en) Indoor structure rapid modeling method based on frame line extraction
Sharma et al. Edge detection using Moore neighborhood
CN106373128B (en) Method and system for accurately positioning lips
CN109583377B (en) Control method and device for pipeline model reconstruction and upper computer
CN106327522A (en) Infrared small target detection method based on multi-direction morphological filtering complex cloud background
Yogeswaran et al. 3d surface analysis for automated detection of deformations on automotive body panels
CN113971669A (en) Three-dimensional detection system applied to pipeline damage identification
CN107967675B (en) Structured point cloud denoising method based on adaptive projection moving least square
CN108010002B (en) Structured point cloud denoising method based on adaptive implicit moving least square
CN109671084B (en) Method for measuring shape of workpiece
CN114067147B (en) Ship target confirmation method based on local shape matching
CN110555122A (en) Building plan wall vectorization method based on segmented rectangles
CN108596910B (en) Three-dimensional sonar point cloud image segmentation method based on single Gaussian model
CN113205465B (en) Point cloud data set segmentation method and system
CN113052940B (en) Space-time correlation map real-time construction method based on sonar
CN111105408B (en) Building surface crack detection method and system based on image processing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17917722

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17917722

Country of ref document: EP

Kind code of ref document: A1