Curvature Estimation of 3D Point Cloud Surfaces Through the Fitting of Normal Section Curvatures
- 格式:pdf
- 大小:568.81 KB
- 文档页数:8
第42卷第5期 激光杂志Vol.42,No.5 2021 年5 月LASER JOURNAL May,2021基于V R技术的激光三维点云数据的虚拟重建曹贤龙郑州商学院,郑州451200摘要:针对激光扫描云数据的虚拟重建存在噪声大,重建效果差的问题,提出一种激光三维点云数据的 虚拟重建算法。
通过设置多个激光扫描自由度,利用V R技术将激光测量映射到虚拟三维场景当中,获取点云 数据,并利用图像滤波器对采集到的点云数据进行去噪处理。
在此基础上,设置一个主数据点,利用该数据点 对重建激光点云三维数据进行划分,分配重建任务,搜集重建后的结果并显示,完成点云数据的虚拟重建。
实验结果表明,采用改进方法后,噪声被有效剔除,重建效果更佳。
关键词:V R技术;激光扫描;三维点云数据;虚拟重建;数据划分中图分类号:T N249 文献标识码:A doi:10. 14016/ki.jgzz.2021. 05. 205Virtual reconstruction algorithm of laser 3D point cloud dataC A O XianlongZ h e n g zh o u B usin ess U n iv ersity,Z h e n g zh o u451200,C h in aAbstract:Aiming a t the problems of high noise and poor reconstruction effect in the virtual reconstruction of laser scanning cloud data,a virtual reconstruction algorithm of laser3D point cloud data i s proposed.By setting multiple laser scanning degrees of freedom,V R technology i s used t o map the laser measurement t o the virtual three-dimensional scene t o obtain the point cloud data,and the image f i l t e r i s used t o denoise the collected point cloud data.O n this basis,a master data point i s set up t o divide the3D data of laser point cloud that may be reconstructed,distribute the reconstruction task,collect and display the reconstruction results,and complete the virtual reconstruction of the point cloud data.The experimental results show that the noise i s effectively eliminated and the reconstruction effect i s better. Key words:V R technology;laser scanning; 3D point cloud data;virtual reconstruction;data divisioni引言现阶段,以激光成像技术为基础的工业检测以及 逆向工程等行业的兴起,都离不开三维激光扫描成像 技术。
3D点云点云分割、⽬标检测、分类3D点云点云分割、⽬标检测、分类原标题Deep Learning for 3D Point Clouds: A Survey作者Yulan Guo, Hanyun Wang, Qingyong Hu, Hao Liu, Li Liu, and Mohammed Bennamoun导读3D点云学习( Point Clouds)作为近年来的研究热点之⼀,受到了⼴泛关注,每年在各⼤会议上都有⼤量的相关⽂章发表。
当前,点云上的深度学习变得越来越流⾏,⼈们提出了许多⽅法来解决这⼀领域的不同问题。
国防科技⼤学郭裕兰⽼师课题组新出的这篇论⽂对近⼏年点云深度学习⽅法进⾏了全⾯综述,是第⼀篇全⾯涵盖多个重要点云相关任务的深度学习⽅法的综述论⽂,包括三维形状分类、三维⽬标检测与跟踪、三维点云分割等,并对点云深度学习的机制和策略进⾏全⾯的归纳和解读,帮助读者更好地了解当前的研究现状和思路。
也提供了现有⽅法在⼏个可公开获得的数据集上的全⾯⽐较,最后也介绍了未来的研究⽅向。
对于3D点云,数据正在迅速增长。
⼤有从2D向3D发展的趋势,⽐如在opencv中就已经慢慢包含了3D点云的处理的相关模块,在数据⽅⾯点云的获取也是有多种渠道,⽆论是源于CAD模型还是来⾃LiDAR传感器或RGBD相机的扫描点云,⽆处不在。
另外,⼤多数系统直接获取3D点云⽽不是拍摄图像并进⾏处理。
因此,在深度学习⼤⽕的年代,应该如何应⽤这些令⼈惊叹的深度学习⼯具,在3D点云上的处理上达到对⼆维图像那样起到很好的作⽤呢?3D点云应⽤深度学习⾯临的挑战。
⾸先在神经⽹络上⾯临的挑战:(1)⾮结构化数据(⽆⽹格):点云是分布在空间中的XYZ点。
没有结构化的⽹格来帮助CNN滤波器。
(2)不变性排列:点云本质上是⼀长串点(nx3矩阵,其中n是点数)。
在⼏何上,点的顺序不影响它在底层矩阵结构中的表⽰⽅式,例如,相同的点云可以由两个完全不同的矩阵表⽰。
三维点云特征描述算法
三维点云特征描述算法是对三维点云数据进行提取和描述其特征的算法。
常见的三维点云特征描述算法有以下几种:
1. 点云特征描述算法:其中一个比较经典的算法是PFH
(Point Feature Histogram),它通过计算每个点的法线方向和
周围邻域点的相对位置关系来描述点的特征。
还有其他的一些方法,比如FPFH(Fast Point Feature Histogram)等。
2. 局部特征描述算法:这类算法把点云分成小的局部区域,然后对每个局部区域进行特征提取和描述,比如SHOT (Signature of Histograms of Orientations)算法。
3. 深度学习特征描述算法:随着深度学习在计算机视觉领域的广泛应用,也有一些基于深度学习的点云特征描述算法被提出。
这些算法一般通过深度学习网络对点云进行特征提取和特征描述。
4. 结构化特征描述算法:这类算法主要是针对特定的点云结构进行特征描述,比如面片、网格等。
常见的算法有Spin Image、Shape Context等。
总的来说,三维点云特征描述算法的目标是提取和描述点云中的局部结构和全局性质,以便于后续的识别、分类、配准等任务的处理。
不同的算法适用于不同的应用场景,选择合适的算法对于点云数据的处理非常重要。
《三维点云数据处理的技术研究》篇一一、引言随着计算机视觉和3D传感技术的快速发展,三维点云数据已成为多种领域研究与应用的关键基础。
从地形勘测到自动驾驶汽车的开发,从机器视觉到机器人学研究,三维点云数据处理的重要性日渐突出。
因此,三维点云数据处理技术的研究具有重要意义,成为了一个热门的科技领域。
本文将对三维点云数据处理技术进行详细研究。
二、三维点云数据的概念和获取方式三维点云数据是一组表示三维空间中的一系列点的集合。
每个点都包含了位置信息(X,Y,Z),还可以包括颜色、反射率等其他信息。
目前,常见的三维点云数据获取方式主要包括激光扫描、结构化光扫描和深度相机捕捉等。
这些技术能够快速、准确地获取大量的三维点云数据。
三、三维点云数据处理的关键技术1. 数据预处理:包括数据去噪、滤波、配准和抽样等步骤。
数据去噪可以去除由于各种原因产生的噪声数据,滤波则用于减少数据的冗余度并增强数据的平滑性,配准则是对不同来源或不同时刻获得的数据进行对齐,抽样则是在保证数据质量的前提下减小数据量以便后续处理。
2. 特征提取:提取点云数据的几何特征是进行各种后续分析的前提。
如点的法向量、曲率等都是重要的几何特征。
此外,基于这些特征的高级特征如角点、边缘等也可以被提取出来以用于后续的分类和识别等任务。
3. 数据分类与分割:根据一定的准则将点云数据分为不同的类别或区域。
例如,在建筑物的重建中,需要识别并分割出墙壁、门窗等不同部分的点云数据。
这一步骤往往依赖于之前提取的特征和某些特定的算法,如聚类算法、深度学习算法等。
四、常用的三维点云数据处理工具和技术方法1. 手动处理:对于小型或特定的数据集,通常可以使用专业的软件进行手动处理。
这些软件提供了丰富的工具集,包括各种滤波器、配准工具以及特征提取和分类的算法等。
2. 自动化处理:对于大规模的点云数据集,通常需要使用自动化或半自动化的处理方法。
这包括基于机器学习或深度学习的算法,如卷积神经网络(CNN)等,这些算法可以自动提取出有用的特征并进行分类和分割等任务。
数学专业用词的英文翻译关于数学专业用词的英文翻译数学的英文篇一:数学英文词汇大全微积分第一章函数与极限Chapter1FunctionandLimit集合set元素element子集subset空集emptyset并集union交集intersection差集differenceofset基本集basicset补集complementset直积directproduct笛卡儿积Cartesianproduct开区间openinterval闭区间closedinterval半开区间halfopeninterval有限区间finiteinterval区间的长度lengthofaninterval无限区间infiniteinterval领域neighborhood领域的中心centreofaneighborhood领域的半径radiusofaneighborhood左领域leftneighborhood右领域rightneighborhood映射mappingX到Y的映射mappingofXontoY 满射surjection单射injection一一映射one-to-onemapping 双射bijection算子operator变化transformation函数function逆映射inversemapping复合映射compositemapping自变量independentvariable因变量dependentvariable定义域domain函数值valueoffunction函数关系functionrelation值域range自然定义域naturaldomain单值函数singlevaluedfunction 多值函数multiplevaluedfunction 单值分支one-valuedbranch函数图形graphofafunction绝对值函数absolutevalue符号函数sighfunction整数部分integralpart阶梯曲线stepcurve当且仅当ifandonlyif(iff)分段函数piecewisefunction上界upperbound下界lowerbound有界boundedness无界unbounded函数的单调性monotonicityofafunction 单调增加的increasing单调减少的decreasing单调函数monotonefunction函数的奇偶性parity(odevity)ofafunction 对称symmetry偶函数evenfunction奇函数oddfunction函数的周期性periodicityofafunction周期period反函数inversefunction直接函数directfunction复合函数compositefunction中间变量intermediatevariable函数的运算operationoffunction基本初等函数basicelementaryfunction 初等函数elementaryfunction幂函数powerfunction指数函数exponentialfunction对数函数logarithmicfunction三角函数trigonometricfunction反三角函数inversetrigonometricfunction 常数函数constantfunction双曲函数hyperbolicfunction双曲正弦hyperbolicsine双曲余弦hyperboliccosine双曲正切hyperbolictangent反双曲正弦inversehyperbolicsine反双曲余弦inversehyperboliccosine反双曲正切inversehyperbolictangent极限limit数列sequenceofnumber收敛convergence收敛于aconvergetoa发散divergent极限的唯一性uniquenessoflimits收敛数列的有界性boundednessofaconvergentsequence 子列subsequence函数的极限limitsoffunctions函数当x趋于x0时的极限limitoffunctionsasxapproachesx0 左极限leftlimit右极限rightlimit单侧极限one-sidedlimits水平渐近线horizontalasymptote无穷小infinitesimal无穷大infinity铅直渐近线verticalasymptote夹逼准则squeezerule单调数列monotonicsequence高阶无穷小infinitesimalofhigherorder低阶无穷小infinitesimaloflowerorder同阶无穷小infinitesimalofthesameorder等阶无穷小equivalentinfinitesimal函数的连续性continuityofafunction增量increment函数在x0连续thefunctioniscontinuousatx0左连续leftcontinuous右连续rightcontinuous区间上的连续函数continuousfunction函数在该区间上连续functioniscontinuousonaninterval不连续点discontinuitypoint第一类间断点discontinuitypointofthefirstkind第二类间断点discontinuitypointofthesecondkind初等函数的连续性continuityoftheelementaryfunctions定义区间definedinterval最大值globalmaximumvalue(absolutemaximum)最小值globalminimumvalue(absoluteminimum)零点定理thezeropointtheorem介值定理intermediatevaluetheorem第二章导数与微分Chapter2DerivativeandDifferential速度velocity匀速运动uniformmotion平均速度averagevelocity瞬时速度instantaneousvelocity圆的切线tangentlineofacircle切线tangentline切线的斜率slopeofthetangentline位置函数positionfunction导数derivative可导derivable函数的变化率问题problemofthechangerateofafunction导函数derivedfunction左导数left-handderivative右导数right-handderivative单侧导数one-sidedderivatives在闭区间【a,b】上可导isderivableontheclosedinterval[a,b] 切线方程tangentequation角速度angularvelocity成本函数costfunction边际成本marginalcost链式法则chainrule隐函数implicitfunction显函数explicitfunction二阶函数secondderivative三阶导数thirdderivative高阶导数nthderivative莱布尼茨公式Leibnizformula对数求导法log-derivative参数方程parametricequation相关变化率correlativechangerata微分differential可微的differentiable函数的微分differentialoffunction自变量的微分differentialofindependentvariable微商differentialquotient间接测量误差indirectmeasurementerror绝对误差absoluteerror相对误差relativeerror第三章微分中值定理与导数的应用Chapter3MeanValueTheoremofDifferentialsandtheApplicati onofDerivatives罗马定理Rolle’stheorem费马引理Fermat’slemma拉格朗日中值定理Lagrange’smeanvaluetheorem驻点stationarypoint稳定点stablepoint临界点criticalpoint辅助函数auxiliaryfunction拉格朗日中值公式Lagrange’smeanvalueformula柯西中值定理Cauchy’smeanvaluetheorem洛必达法则L’Hospital’sRule0/0型不定式indeterminateformoftype0/0不定式indeterminateform泰勒中值定理Taylor’smeanvaluetheorem泰勒公式Taylorformula余项remainderterm拉格朗日余项Lagrangeremainderterm麦克劳林公式Maclaurin’sformula佩亚诺公式Peanoremainderterm凹凸性concavity凹向上的concaveupward,cancaveup凹向下的,向上凸的concavedownward’concavedown拐点inflectionpoint函数的极值extremumoffunction极大值local(relative)maximum最大值global(absolute)mximum极小值local(relative)minimum最小值global(absolute)minimum目标函数objectivefunction曲率curvature弧微分arcdifferential平均曲率averagecurvature曲率园circleofcurvature曲率中心centerofcurvature曲率半径radiusofcurvature渐屈线evolute渐伸线involute根的隔离isolationofroot隔离区间isolationinterval切线法tangentlinemethod第四章不定积分Chapter4IndefiniteIntegrals原函数primitivefunction(antiderivative) 积分号signofintegration被积函数integrand数学的英文篇二:数学英文词汇代数部分1.有关基本运算:add,plus加subtract减difference差multiply,times乘product积divide除divisible可被整除的dividedevenly被整除dividend被除数divisor因子,除数quotient商remainder余数factorial阶乘power乘方radicalsign,rootsign根号roundto四舍五入tothenearest四舍五入2.有关集合union并集propersubset真子集solutionset解集3.有关代数式、方程和不等式algebraicterm代数项liketerms,similarterms同类项numericalcoefficient数字系数literalcoefficient字母系数inequality不等式triangleinequality三角不等式range值域originalequation原方程equivalentequation同解方程等价方程linearequation线性方程(e.g.5x+6=22)4.有关分数和小数properfraction真分数improperfraction假分数mixednumber带分数vulgarfraction,commonfraction普通分数simplefraction简分数complexfraction繁分数numerator分子denominator分母(least)commondenominator(最小)公分母quarter四分之一decimalfraction纯小数infinitedecimal无穷小数recurringdecimal循环小数tenthsunit十分位5.基本数学概念arithmeticmean算术平均值weightedaverage加权平均值geometricmean几何平均数exponent指数,幂base乘幂的底数,底边cube立方数,立方体squareroot平方根cuberoot立方根commonlogarithm常用对数digit数字constant常数variable变量inversefunction反函数complementaryfunction余函数linear一次的,线性的factorization因式分解absolutevalue绝对值,e.g.|-32|=32roundoff四舍五入6.有关数论naturalnumber自然数positivenumber正数negativenumber负数oddinteger,oddnumber奇数eveninteger,evennumber偶数integer,wholenumber整数positivewholenumber正整数negativewholenumber负整数consecutivenumber连续整数realnumber,rationalnumber实数,有理数irrational(number)无理数compositenumber合数e.g.4,6,8,9,10,12,14,15……primenumber质数e.g.2,3,5,7,11,13,15……reciprocal倒数commondivisor公约数multiple倍数(least)commonmultiple(最小)公倍数(prime)factor(质)因子commonfactor公因子ordinaryscale,decimalscale十进制nonnegative非负的tens十位units个位mode众数median中数commonratio公比7.数列arithmeticprogression(sequence)等差数列geometricprogression(sequence)等比数列8.其它approximate近似(anti)clockwise(逆)顺时针方向cardinal基数ordinal序数directproportion正比distinct不同的estimation估计,近似parentheses括号proportion比例数学的英文篇三:数学英文代数ALGEBRA1.数论naturalnumber自然数positivenumber正数negativenumber 负数oddinteger,oddnumber奇数eveninteger,evennumber偶数integer,wholenumber整数positivewholenumber正整数negativewholenumber负整数consecutivenumber连续整数realnumber,rationalnumber实数,有理数irrational(number)无理数inverse倒数compositenumber合数 e.g.4,6,8,9,10,12,14,15…primenumber质数e.g.2,3,5,7,11,13,15…reciprocal倒数commondivisor公约数multiple倍数(minimum)commonmultiple(最小)公倍数(prime)factor(质)因子commonfactor公因子ordinaryscale,decimalscale十进制nonnegative非负的tens十位units个位mode众数mean平均数median中值commonratio公比2.基本数学概念arithmeticmean算术平均值weightedaverage加权平均值geometricmean几何平均数exponent指数,幂base乘幂的底数,底边cube立方数,立方体squareroot 平方根cuberoot立方根commonlogarithm常用对数digit数字constant常数variable变量inversefunction 反函数complementaryfunction余函数linear一次的,线性的.factorization因式分解absolutevalue绝对值,e.g.|-32|=32roundoff四舍五入数学3.基本运算add,plus加subtract减difference差multiply,times乘product积divide除divisible可被整除的dividedevenly被整除dividend被除数,红利divisor因子,除数,公约数quotient商remainder余数factorial阶乘power乘方radicalsign,rootsign根号roundto四舍五入tothenearest四舍五入4.代数式,方程,不等式algebraicterm代数项liketerms,similarterms同类项numericalcoefficient数字系数literalcoefficient字母系数inequality不等式triangleinequality三角不等式range值域originalequation原方程equivalentequation同解方程,等价方程linearequation线性方程(e.g.5x+6=22)5.分数,小数properfraction真分数improperfraction假分数mixednumber 带分数vulgarfraction,commonfraction普通分数simplefraction简分数complexfraction繁分数numerator分子denominator分母(least)commondenominator(最小)公分母quarter四分之一decimalfraction纯小数infinitedecimal无穷小数recurringdecimal循环小数tenthsunit十分位6.集合union并集propersubset真子集solutionset解集7.数列arithmeticprogression(sequence)等差数列geometricprogression(sequence)等比数列8.其它approximate近似(anti)clockwise(逆)顺时针方向cardinal基数ordinal序数directproportion正比distinct不同的estimation估计,近似parentheses括号proportion比例permutation排列combination组合table表格trigonometricfunction三角函数unit单位,位几何GEOMETRY1.角alternateangle内错角correspondingangle同位角verticalangle对顶角centralangle圆心角interiorangle内角exteriorangle外角supplementaryangles补角complementaryangle余角adjacentangle邻角acuteangle锐角obtuseangle 钝角rightangle直角roundangle周角straightangle平角includedangle夹角2.三角形equilateraltriangle等边三角形scalenetriangle不等边三角形isoscelestriangle等腰三角形righttriangle直角三角形oblique斜三角形inscribedtriangle内接三角形3.收敛的平面图形,除三角形外semicircle半圆concentriccircles同心圆quadrilateral四边形pentagon五边形hexagon六边形heptagon七边形octagon八边形nonagon九边形decagon十边形polygon多边形parallelogram平行四边形equilateral等边形plane平面square 正方形,平方rectangle长方形regularpolygon正多边形rhombus菱形trapezoid梯形4.其它平面图形arc弧line,straightline直线linesegment线段parallellines平行线segmentofacircle弧形5.立体图形cube立方体,立方数rectangularsolid长方体regularsolid/regularpolyhedron正多面体circularcylinder圆柱体cone圆锥sphere球体solid立体的6.图形的附属概念planegeometry平面几何trigonometry三角学bisect平分circumscribe外切inscribe内切intersect相交perpendicular垂直Pythagoreantheorem 勾股定理(毕达哥拉斯定理)congruent全等的multilateral多边的altitude高depth深度side边长circumference,perimeter周长radian弧度surfacearea表面积volume体积arm直角三角形的股crosssection横截面centerofacircle圆心chord弦diameter直径radius半径anglebisector角平分线diagonal对角线化edge棱faceofasolid立体的面hypotenuse 斜边includedside夹边leg三角形的直角边median(三角形的)中线base底边,底数(e.g.2的5次方,2就是底数)opposite直角三角形中的对边midpoint中点endpoint端点vertex(复数形式vertices)顶点tangent切线的transversal截线intercept截距7.坐标coordinatesystem坐标系rectangularcoordinate直角坐标系origin原点abscissa横坐标ordinate纵坐标numberline数轴quadrant象限slope斜率complexplane复平面【关于数学专业用词的英文翻译】。
第23卷第3期重庆科技学院学报(自然科学版)2021年6月基于法向量和投影平面的点云特征提取方法贾丁凡谢晓尧刘嵩(贵州师范大学贵州省信息与计算重K实验室,贵阳550001)摘要:三维点云特征的提取,对于三维模型的表示、理解和识别都起着重要的作用。
为了提高点云特征提取的准确性和运算速度,提出了一种基于法向量和投影平面的特征提取方法。
根据矢量分布和聚类的性质提取轮廓点,使用矢量偏转角和距离对特征点进行排序,从而提取出点云特征。
在Mod-elNet数据集和三维激光扫描的佛像密集点云上进行实验,结果表明,基于法向量和投影平面的特征提取方法对物体的表面轮廓具有较好的特征识别度,可以提取更多的有效特征点,运行时间较短,运算效率较高。
关键词:三维模型;点云;特征提取;聚类;法向量中图分类号:TP391.4文献标识码:A文章编号:1673-1980(2021)03-0084-05利用3D测量技术可以获得物体的三维表面信息。
3D模型的特征提取,在数字模型的表示、理解和识别中起着重要作用[1](点云模型特征提取关键的问题是构造特征点识别算子。
目前,已经有许多学者对此进行了研究。
现有的检测算法可分为2类:一是基于曲率或表面变化的检测方法(比如刘致远等人提出的地下管廊特征线提取方法[2],首先使用LiDAR获得地下管廊原始点云数据,然后利用所提算法找出含有管廊整体轮廓信息的面状点云,最后基于PCA算法,通过设定角度阈值去提取轮廓数据。
二是基于法线量的检测方法(比如Wang L d hui等人提出的基于曲率和法向矢量的特征点检测方法[3],赵春海提出的基于法向量波动情况划分关键点的方法⑷。
为了提高点云特征提取的准确性和计算速度,现提出一种基于法向量和投影平面的特征提取方法。
首先根据矢量分布和聚类的性质提取轮廓点,然后根据矢量偏转角和距离对特征点进行排序,从而提取点云特征。
1特征提取方法首先,使用加权主成分分析法(WPCA)计算法线向量,由此构建投影平面。
第42卷第7期2019年7月测绘与空间地理信息GEOMATICS&SPATIALINFORMATIONTECHNOLOGYVol.42ꎬNo.7Jul.ꎬ2019收稿日期:2019-04-09作者简介:叶美芬(1970-)ꎬ女ꎬ广东兴宁人ꎬ高级工程师ꎬ学士ꎬ主要从事地理信息系统工程㊁地图制图㊁工程测量㊁土地管理等工作ꎮ通讯作者:郑贵洲(1963-)ꎬ男ꎬ福建屏南人ꎬ教授ꎬ博士ꎬ2005毕业于中国地质大学(武汉)地图制图学与地理信息工程专业ꎬ主要从事三维地理信息系统㊁时空数据挖掘及深度学习㊁资源与环境遥感㊁3S集成技术等相关工作ꎮ三维点云数据拾取与可视化技术叶美芬1ꎬ郑贵洲2(1.广东省地质测绘院ꎬ广东广州510800ꎻ2.中国地质大学ꎬ湖北武汉430074)摘要:对三维点云数据进行高效的组织与管理是实现对目标对象三维重建和快速可视化的关键ꎮ本文深入研究了在OSG环境下基于OpenGL计算着色器的点云拾取算法ꎬ充分利用GPU强大的并行计算能力加速点的选取ꎮ提出了一种基于屏幕像素深度值的点云拾取算法ꎬ通过计算像素深度值判断鼠标单击点周围是否存在待拾取点ꎬ以此实现点的拾取ꎮ以VS2010为开发平台ꎬOSG为三维渲染引擎ꎬ使用C++编程语言结合Qt框架设计并实现了三维点云数据交互可视化平台ꎬ可快速渲染海量点云数据ꎬ交互拾取点云数据ꎮ关键词:三维点云ꎻ点云拾取ꎻ可视化中图分类号:P237㊀㊀㊀文献标识码:A㊀㊀㊀文章编号:1672-5867(2019)07-0134-04Technologyof3DPointCloudDataPickingandVisualizationYEMeifen1ꎬZHENGGuizhou2(1.GeologySurveyingandMappingInstituteofGuangdongꎬGuangzhou510800ꎬChinaꎻ2.ChinaUniversityofGeosciencesꎬWuhan430074ꎬChina)Abstract:Efficientorganizationandmanagementof3Dpointclouddataisthekeytorealize3Dreconstructionandrapidvisualizationoftargetobjects.ThispaperhasstudiedindepththepointcloudpickingalgorithmbasedonOpenGLcomputeshaderunderOSGenvi ̄ronmentꎬwhichacceleratespointpickingbyusingthepowerfulparallelcomputingabilityofGPUꎬandproposesapointcloudpickingalgorithmbasedonthedepthvalueofthescreenpixelbycalculatingthepixeldepthvaluetodeterminewhetherthereisapointtobepickedupexistsaroundmouseclickpointinordertoachievethepointpicking.BasedonC++programminglanguageandQtframe ̄workꎬa3DpointclouddatainteractivevisualizationplatformisdesignedandimplementedbyusingVS2010asdevelopmentplatformꎬandOSGas3Drenderingengine.Theplatformcanquicklyrenderandinteractivelypickmassivepointclouddata.Keywords:3Dpointclouddataꎻpointcloudpickingꎻvisualization0㊀引㊀言激光雷达技术作为一种新型测量技术日益发展成熟ꎬ人们对于空间对象的探索也从二维空间上升到三维空间ꎮ激光雷达由于精度高㊁测量结果直观明了ꎬ已经被广泛应用于测绘㊁交通㊁应急救援㊁文化遗产等多个行业ꎮ相较于传统测量手段ꎬ激光雷达技术可以快速采集大量目标对象表面的三维点云数据ꎬ这些三维点云数据是海量离散点的数据集合ꎮ对三维点云数据进行高效的组织与管理是实现目标对象三维重建和快速可视化的关键ꎬ也是当前的研究热点之一ꎮ构建点云数据可视化系统ꎬ需要对场景中的对象执行空间变换㊁属性查询以及编辑等操作ꎬ这些操作都需要通过点云拾取来完成ꎬ点云数据快速拾取是处理海量点云数据交互操作的重要基础ꎮ目前点云数据拾取方面ꎬ比较常用的是场景几何相关的拾取方法[1-2]ꎻ三维点云数据由一系列的空间离散点组成ꎬ点是没有形状大小的ꎬ由于其特殊性ꎬ直接通过射线求交的拾取方法并不适用于点云数据ꎬ郑德炯等基于八叉树索引结构实现了三维点云的快速拾取[3]ꎻ随着GPU技术的不断发展ꎬ基于GPU的拾取算法也得以实现ꎬ张嘉华等提出了基于几何着色器的点云拾取算法[4]ꎮ国内外很多学者对点云数据可视化开展了深入的研究ꎬLevoyM等提出了一种通过对深度图形进行重采样得到不同层级金字塔的点云数据处理方法ꎬ在一定程度上解决了大数据量点云的渲染问题[5]ꎮZwicker等开发了开源的基于点采样的交互式几何处理软件PointShop3Dꎬ但不适用于海量点云数据[6]ꎮHoppe通过使用GPU来实现三维场景的实时性渲染ꎮ徐旭东等采用LOD技术实现了点云数据的高效检索和可视化ꎬ但没有进行大数据量的实验[7]ꎮ陈驰等设计了一种利用多线程分时加载的双层四叉树索引算法实现内外存储器中的点云数据管理与快速调度[8]ꎮ本文在前人研究的基础上ꎬ开展了基于OpenGL计算着色器的拾取算法和基于屏幕像素深度值的点云快速拾取算法研究ꎬ以OSG作为三维渲染引擎ꎬ结合Qt框架ꎬ使用C++编程语言实现了点云数据的三维可视化和快速拾取ꎮ1㊀基于OpenGL计算着色器的拾取算法计算着色器(ComputeShader)是OpenGL从4.3版本开始支持的新特性ꎬ独立于图形渲染管线ꎬ是一个单独的计算模块ꎮOpenGL为计算着色器提供了一组内置变量[6]ꎮgl_WorkGroupSize表示本地工作组的大小ꎬ由布局限定符local_size_x㊁local_size_y㊁local_size_z指定ꎻgl_NumWorkGroups是一个向量ꎬ包含了主程序中指定的工作组数目ꎻgl_LocalInvocationID表示当前执行单元在本地工作组中的位置ꎻgl_WorkGroupID表示当前本地工作组在全局工作组中的位置ꎻgl_GlobalInvocationID表示当前执行单元在全局工作组中的位置ꎻgl_LocalInvocationIndex则可以用一维的索引表示二维或者三维的数据ꎬ使用这些内置变量可以很方便地在并行计算过程中定位数据并进行操作ꎮ在OSG环境下基于OpenGL计算着色器的拾取方法的主要思想是将点云数据进行一系列的空间变换ꎬ得到其投影到屏幕上的坐标ꎬ然后在屏幕坐标系内计算距离鼠标点最近的点ꎬ以该点作为拾取点ꎬ如图1所示ꎬ具体实现步骤是:图1㊀基于计算着色器的拾取算法流程图Fig.1㊀Flowchartofpickupalgorithmbasedon㊀㊀㊀computationalshader1)在主程序中将点云点坐标存入顶点数组vertexArr中ꎬ该顶点数组包含4个分量ꎬ前3个表示其空间坐标ꎬ第4个分量初始化为0ꎬ表示是否满足距离判断条件ꎬ若满足ꎬ则为1.0ꎬ反之为0ꎮ申请一个osg::VertexBufferObject类型的对象vboꎬ调用函数setArray()将vertexArr绑定到vbo上ꎬ作为计算着色器的输入数据ꎮ将场景MVP矩阵即鼠标屏幕点坐标设为uniform变量用于传入计算着色器中ꎬ设置场景几何节点的属性ꎬ将其作为叶节点的子节点ꎬ并开启VBO模式ꎮ2)在主程序中申请一个osg::Program类型的变量ꎬ并绑定计算着色器ꎬ设置工作组大小ꎮ程序指定一个线程组包含256个线程ꎬ每个线程用于处理一个数据点ꎬ因此设置的工作组大小为(int)((vertexArr.size()+256-1)/256)ꎮ3)计算着色器中ꎬ首先对传入点云数据点进行空间变换ꎬ即坐标值乘以传入的空间变换矩阵VPW计算得到ꎬ将三维空间点映射到二维屏幕上ꎮ然后设定阈值Dꎬ分别计算每个点与传入的鼠标屏幕点坐标的距离ꎬ距离平方小于D的将纹理缓存写为1ꎬ反之则为0ꎮ计算着色器中ꎬ使用imageLoad()读取点的坐标ꎬ通过gl_GlobalIn ̄vocationID.x获取当前的存储位置ꎬ使用imageStore()函数更新缓存ꎮ4)在计算着色器中完成计算后ꎬ通过调用vbo->getArray(0)得到顶点数组ꎬ取出顶点数组中第4个分量为1.0的点ꎬ在这些点中求出距离鼠标单机屏幕点最近的点ꎬ即为拾取点ꎮ2㊀基于屏幕像素深度值的拾取算法像素深度是指该像素点在3D世界中距离摄像机的距离ꎬ即Z坐标ꎮZ坐标和X㊁Y坐标一样ꎬ在执行变换㊁裁切和透视操作后ꎬZ的范围为[-1.0ꎬ1.0]ꎮDepthRange映射指定Z坐标的变换ꎬ这与用于将X和Y映射到窗口坐标的视口变换类似ꎬ但由于深度缓存的硬件方案对应用程序来说是隐藏的ꎬ因此调用DepthRange的参数是[0.0ꎬ1.0]ꎬ也就是说ꎬ相机的近平面被映射为0.0ꎬ远平面被映射为1.0ꎬ深度值越大ꎬ离相机越远ꎮ深度值存储在深度缓存(ZBuffer)中ꎬ可以用深度缓存的位数衡量深度缓存的精度ꎬ位数越高ꎬ则精确度越高ꎮ本文提出一种基于屏幕像素深度值的三维点云数据拾取算法ꎬ该算法的主要思想是:如果屏幕内某像素上存在渲染对象ꎬ则其像素深度值位于(0.0ꎬ1.0)之间ꎬ反之ꎬ其深度值为1.0ꎮ对场景主相机设置回调获取以鼠标单击点的屏幕像素为中心的9ˑ9区域范围内的81个深度值ꎬ按照一定的顺序遍历这些深度值ꎬ取其中第一个值不为1.0的像素作为拾取点的像素ꎬ根据其坐标通过矩阵变换反算真实三维坐标ꎬ并将其标记框渲染出来ꎬ所标记的点即为拾取点ꎮ如图2所示ꎬ具体实现步骤如下:1)首先需要编写相机回调类ꎬ用来计算以鼠标单击点为中心的9ˑ9区域范围内的81个深度值ꎮ_x和_y是鼠标点击屏幕的像素坐标ꎬ_zValue是一个float类型的指针ꎬ指向取出的深度值ꎬ_depthImage是一个osg::Image类型的对象ꎬ用来存储屏幕像素信息ꎮ需要注意的是voidoperator()(osg::RenderInfo&renderInfo)const是一个531第7期叶美芬等:三维点云数据拾取与可视化技术const函数ꎬ_x和_y会随着鼠标单击事件改变ꎬ因此需要将其设为mutable类型ꎮ图2㊀基于屏幕像素深度值的拾取算法流程图Fig.2㊀Flowchartofpick-upalgorithmbasedon㊀㊀㊀㊀depthvalueofscreenpixel2)设置主相机回调ꎬ并将_depthImage与其关联起来ꎮ//实例化一个MasterCameraCallback类对象_masterCameraCb=newMasterCameraCallback(main ̄Camera)ꎻ//关联主相机和_depthImagemainCamera->attach(osg::Camera::DEPTH_BUFFERꎬ㊀_masterCameraCb->getDepthImage()ꎬ0ꎬ0)ꎻ//设置回调mainCamera->setPostDrawCallback(_masterCamer ̄aCb)ꎻ3)获取了以鼠标单击点为中心的9ˑ9区域范围内共81个像素的深度值ꎬ从中心点开始ꎬ其正上方的像素作为第二个遍历对象ꎬ按照顺时针的顺序依次遍历这些深度值ꎬ若所有像素的深度值均为1.0ꎬ则结束此处拾取操作ꎻ反之ꎬ取第一个深度值不为1.0的像素点作为拾取点ꎬ记录其坐标(xꎬyꎬdepthValue)ꎮ4)根据屏幕像素点坐标反算真实三维坐标ꎮ首先计算空间变换矩阵VPWꎬ用步骤3)得到的屏幕像素点坐标右乘VPW矩阵的逆矩阵inverseVPWꎬ即可得到真实的三维坐标ꎮ//计算空间变换矩阵VPWosg::MatrixVPW=camera->getViewMatrix()∗camera->getProjectionMatrix()∗camera->getViewport()->computeWindowMatrix()ꎻ//计算VPW矩阵的逆矩阵osg::MatrixinverseVPW=osg::Matrix::inverse(VPW)ꎻ//计算真实三维坐标_pointCoord=osg::Vec3f(xꎬyꎬdepthValue)∗inve ̄rseMVPWꎻ5)根据得到的三维空间坐标ꎬ将其标记框渲染在屏幕上ꎬ所标记的点即为拾取点ꎮ3㊀三维点云数据可视化在点云索引和拾取方法的研究基础上ꎬ设计并实现了三维点云数据的交互可视化平台ꎮ交互可视化平台整体架构可以划分为工程管理模块㊁三维可视化模块㊁业务功能模块以及信息显示模块ꎬ工程管理模块主要负责管理用户所创建的工程ꎬ包括新建工程㊁打开工程㊁保存工程㊁关闭工程㊁工程信息设置等功能ꎮ工程配置信息以XML文件方式存储ꎮ三维可视化模块主要负责显示三维点云数据ꎬ并实现可交互式操作ꎮ业务功能模块根据具体的业务需求进行相关的功能开发ꎬ并将其展示在三维显示窗口ꎮ信息显示模块主要负责平台信息的显示工作ꎬ主要包括数据信息㊁程序运行信息以及平台状态信息ꎬ分别对应于程序运行界面中的面板窗口㊁控制台窗口以及状态栏ꎮ三维可视化模块是主要模块之一ꎬ主要包括多线程数据调度㊁数据可视化以及用户交互三个方面ꎮ多线程数据调度通过不同的线程完成数据的读入㊁处理和渲染工作ꎮQThread是Qt的线程管理类ꎬ使用QThread将设备端数据读入过程置于一个线程中ꎬ提高读取效率ꎻ点云索引构建的线程类基于线程库pthread进行编写ꎬ应用STL模板实现ꎻ点云渲染工作则交由OSG内部的渲染线程完成ꎮ数据可视化主要是点云数据的渲染工作ꎬ以及三维窗口中相关数据的折线图更新显示ꎬ前者在索引构建的基础上通过OSG进行渲染ꎬ后者则通过构造HUD相机实现ꎮHUD节点可以在屏幕上固定位置显示ꎬ不随场景变换而变换ꎬ设备数据折线如图3所示ꎮ用户交互主要包括鼠标事件和键盘事件ꎬ具体包括场景漫游㊁六视图观察㊁点云和航迹线显隐操作及单点拾取等操作ꎮ场景漫游的实现需要编写继承自osgGA::TerrainManipulator的Scene ̄Manipulator类ꎬ并通过设置场景中心和观察方向ꎬ实现视点跟随功能和六视图观察功能ꎬ如图4所示ꎮ点云和航迹线的显示和隐藏操作主要通过osg::Switch节点实现ꎬ该节点类似于开关ꎬ通过setChildValue(constNode∗childꎬboolvalue)函数设置其子节点的显示或隐藏属性ꎻ单点拾取功能则在基于屏幕像素深度值的拾取算法基础上进行实现ꎬ如图5所示ꎮ图3㊀设备数据折线图Fig.3㊀Equipmentdatalinechart631㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀测绘与空间地理信息㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀2019年图4㊀三维场景效果图Fig.4㊀3Dscenerenderings图5㊀点云拾取效果图Fig.5㊀Pickuppointcloudrenderings4㊀结束语本文以OSG作为三维渲染引擎ꎬ结合Qt框架ꎬ使用C++编程语言实现了点云数据的三维可视化和可交互拾取功能ꎮ提出了一种基于屏幕像素深度值的点云拾取算法并加以实现ꎬ最后对算法进行了平台集成ꎬ平台展示效果良好ꎬ实现了点云的快速拾取ꎮ本文虽然实现了三维点云数据的可视化与交互拾取操作ꎬ但仍存在很多不足:如点云渲染缺乏LOD机制ꎬ所有数据点以同一分辨率显示ꎬ㊀㊀影响运行效率ꎻ场景对象和渲染效果过于单一ꎬ有必要将点云组织成以线㊁面㊁体以及三角网等方式显示的场景对象ꎬ增强平台的可操作性ꎻ交互拾取有待完善ꎬ实现多点拾取㊁框选以及套索拾取等方法是下一步的研究重点ꎮ参考文献:[1]㊀王剑ꎬ陆国栋ꎬ谭建荣.三维场景中图形对象的拾取方法[J].机械ꎬ2004ꎬ31(7):29-32.[2]㊀朱明亮ꎬ董冰ꎬ王祎ꎬ等.三维场景中基于视口空间的拾取算法[J].工程图学学报ꎬ2008ꎬ29(2):94-97.[3]㊀郑德炯ꎬ卢科青.基于自适应八叉树的三维点云快速拾取方法研究[J].JournalofMechanical&ElectricalEngi ̄neeringꎬ2016ꎬ33(4):417-420.[4]㊀张嘉华ꎬ梁成ꎬ李桂清.GPU三维图元拾取[J].工程图学学报ꎬ2009ꎬ30(1):46-52.[5]㊀LevoyMꎬPulliKꎬCurlessBꎬetal.ThedigitalMichelangeloproject:3Dscanningoflargestatues[C]//Proceedingsofthe27thannualconferenceonComputergraphicsandinter ̄activetechniques.ACMPress/Addison-WesleyPublishingCo.ꎬ2000.[6]㊀ZwickerMꎬPaulyMꎬKnollOꎬetal.Pointshop3D:Aninteractivesystemforpoint-basedsurfaceediting[C]//ACMTransactionsonGraphics(TOG).ACMꎬ2002.[7]㊀徐旭东ꎬ李泽.三维激光点云数据的可视化研究[J].计算机科学ꎬ2016ꎬ43(z1):175-178.[8]㊀陈驰ꎬ王珂ꎬ徐文学ꎬ等.海量车载激光扫描点云数据的快速可视化方法[J].武汉大学学报:信息科学版ꎬ2015ꎬ40(9):1163-1168.[编辑:任亚茹](上接第133页)㊀㊀接下来为了解释时间序列的学习内容ꎬ将LSTM这一网络层进行了相应的学习可视化ꎮ以一个格网为例ꎬ同样也是8个神经元ꎬ对应了8条线ꎬ每条曲线就代表了这个神经元的学习变化ꎬ首先是输入LSTM时刻的变化曲线ꎬ隐藏单元的可视化ꎬ可以看到输入LSTM的时间还没有太明显的特征ꎬ从隐藏单元的可视化结果来看ꎬ很容易发现隐藏单元学习到了数据中的一些特征ꎬ时间周期性效果明显ꎬ也可以进一步说明模型的有效性ꎮ4㊀结束语文章用一个长时卷积深度模型来进行交通流的预测ꎬ从交通流数据本身的特征出发ꎬ从时间和空间两个角度来进行考量ꎬ并通过实验对模型的效果进行了验证ꎬ可以看出来模型在预测精度方面有较好的表现力ꎬ而且通过对模型的可视化分析ꎬ进一步解释了模型的学习能力ꎮ在未来的工作中ꎬ会细化时间的属性信息ꎬ对模型进行进一步的优化ꎬ争取在更短的时间内得到更好的效果ꎮ参考文献:[1]㊀BengioꎬY.ꎬP.SimardꎬP.Frasconi.Learninglong-termdependencieswithgradientdescentisdifficult[J].IEEETransactionsonNeuralNetworksꎬ2002ꎬ5(2):157-166.[2]㊀ChenꎬH.ꎬS.Grant-Muller.Useofsequentiallearningforshort-termtrafficflowforecasting[J].TransportationRe ̄searchPartCEmergingTechnologiesꎬ2001ꎬ9(5):319-336.[3]㊀DingꎬQ.Y.ꎬX.F.WangꎬX.Y.Zhangꎬetal.ForecastingTrafficVolumewithSpace-TimeARIMAModel[J].Ad ̄vancedMaterialsResearchꎬ2010(156-157):979-983.[4]㊀王晓原ꎬ刘海红ꎬ王凤群ꎬ等.交通流短时预测理论研究进展[J].交通运输研究ꎬ2006(12):156-162.[5]㊀夏劲ꎬ郭红卫.国内外城市智能交通系统的发展概况与趋势及其启示[J].科技进步与对策ꎬ2003ꎬ20(1):176-179.[6]㊀郑宇.城市计算 大数据解决城市问题[J].中国孵化器ꎬ2014(6):30-35.[7]㊀朱中ꎬ杨兆升.实时交通流量人工神经网络预测模型[J].中国公路学报ꎬ1998(4):89-92.[编辑:刘莉鑫]731第7期叶美芬等:三维点云数据拾取与可视化技术。
点云算法的书籍以下是几本关于点云算法的书籍:- 《Point Cloud Data Processing》:作者为日本东京大学的教授,书中详细介绍了点云数据的获取、预处理、特征提取、配准、分割、分类、重建等方面的算法和应用。
- 《3D Point Cloud Processing and Applications》:由多位国内外专家撰写,内容涵盖了点云数据处理的各个方面,包括点云数据的获取、滤波、配准、分割、特征提取、重建等,并且结合了实际应用场景,如机器人、自动驾驶、医疗等领域的应用案例。
- 《Point Cloud Library:User Guide》:该书是关于PCL(Point Cloud Library)的使用手册,PCL是一个开源的点云数据处理库,包括了众多点云数据处理算法和工具,如配准、分割、重建、可视化等。
- 《Point Cloud Data Processing with PointScape》:该书介绍了点云数据处理的基本原理和算法,包括点云滤波、配准、分割和特征提取等方面的内容。
- 《Point Cloud Registration: Algorithms and Applications》:该书详细介绍了点云配准的算法和应用,包括刚体配准和非刚体配准等方面的内容。
- 《Point Clouds: Data Fusion and Applications》:该书讲解了点云数据融合和应用的基本原理和算法,包括点云重建、建模和分析等方面的内容。
- 《Point Clouds: Theory and Applications》:该书介绍了点云理论和应用的基本原理和算法,包括点云配准、分割和特征提取等方面的内容。
希望这些书籍能够帮助你深入了解点云算法。
三维点云的语义分割3D Point Cloud Semantic Segmentation (PCSS)在计算机视觉以及机器人领域广泛的应用,随着深度学习技术的发展在点云的语义分割领域提供了新的可能性,并受到越来越多的关注,本文将着重的介绍这一主题的相关研究,首先从遥感领域和计算机视觉的角度概述三维点云的分割,并且结合已经发表的PCSS相关的文章作为研究基础,进行总结和比较,并且对传统的以及最新的点云分割技术进行回顾和比较,最后讨论了PCSS研究中重要的问题和有待解决的问题。
分割、分类和语义分割概念区分点云语义分割是具有很长的研究历史,这里将点云分割,分类,以及语义分割做一个简短的概念区别,点云语义分割在计算机视觉领域中是广泛的使用,尤其是在深度学习的应用中。
在遥感领域PCSS通常被称之为“点云分类”,在某些情况下,也可以理解为“点云标记”,在本文中是指点云的每个点与语义的标签关联起来的任务称为PCSS。
在基于监督学习的方法中广泛的使用在语义分割领域之前,对2.5D/3D的点云数据的非监督分割是指在不考虑语义信息的情况下,对具有相似的几何或者光谱特征的点云进行分类,所以在PCSS中,PCS(点云分割)可以作为一个预分割的步骤,并且影响着最终的语义结果。
所以本文也包含了关于PCS方法的讨论。
这部分内容将再在接下来的文章中发布。
我们知道单个的物体的结构不能直接通过一帧的原始点云获取,比如城市规划和建筑信息建模(BIM)需要参考建筑物或者人造物,森林的遥感监测需要基于树木的几何结构信息,机器人的应用如同时构建地图与定位(SLAM)需要室内环境来绘制地图,在自动驾驶,目标检测,分割与分类是构建高精地图所必须的,所以点云的分割以及语义分割是3D视觉领域基本且关键的任务。
点云的获取在计算机视觉和遥感领域,点云可以通过四种主要的技术获得,(1)根据图像衍生而得,比如通过双目相机,(2)基于光探测距离和测距系统比如lidar,(3)基于RGBD相机获取点云(4)Synthetic Aperture Radar (SAR)系统获取,基于这些不同的原理系统获取的点云数据,其数据的特征和应用的范围也是多种多样。
第 23卷第 1期2024年 1月Vol.23 No.1Jan.2024软件导刊Software Guide基于KinectV2的猪体三维点云重构与体尺测量李哲,林文祉,翁智,郑志强(内蒙古大学电子信息工程学院,内蒙古呼和浩特 024005)摘要:体尺参数是评价育肥猪生长状况的重要指标,针对单目CCD相机在猪体体尺测量中受角度、光源等因素影响导致的测量参数单一、测量结果误差较大等问题。
首先利用深度相机KinectV2从正上方和左右两侧视角同步获取猪体局部点云数据;然后进行点云去噪、精简分割等处理,运用改进后的ICP点云配准技术处理点云信息;最后采用精确估算技术精简点云数据。
在不同角度比较实验测量与人工测量的结果发现,猪体数据中体长平均相对误差为2.65%、体高平均相对误差为1.87%、体宽平均相对误差为1.75%、臀高平均相对误差为2.07%、臀宽平均相对误差为1.96%,整体上误差较小,证明了所提方法的有效性,以期为猪体尺寸测量提供新的解决方法。
关键词:育肥猪;图像处理;KinectV2;三维点云;体尺测量DOI:10.11907/rjdk.232094开放科学(资源服务)标识码(OSID):中图分类号:TP391 文献标识码:A文章编号:1672-7800(2024)001-0161-06KinectV2-based 3D Point Cloud Reconstruction and Body SizeMeasurement of Pig BodyLI Zhe, LIN Wenzhi, WENG Zhi, ZHENG Zhiqiang(School of Electronic and Information Engineering, Inner Mongolia University, Hohhot 024005, China)Abstract:Body size parameter is an important indicator for evaluating the growth status of fattening pigs. It addresses the problems of single measurement parameters and large measurement errors caused by factors such as angle and light source in pig body size measurement using a monocular CCD camera. Firstly, use the depth camera KinectV2 to synchronously obtain local point cloud data of the pig body from the top and left and right perspectives; Then, point cloud denoising, simplification and segmentation are carried out, and the improved ICP point cloud registration technology is used to process point cloud information; Finally, precise estimation techniques are used to streamline point cloud da⁃ta. Comparing the results of experimental and manual measurements from different angles, it was found that the average relative error of body length was 2.65%, the average relative error of body height was 1.87%, the average relative error of body width was 1.75%, the average rela⁃tive error of hip height was 2.07%, and the average relative error of hip width was 1.96% in pig body data. Overall, the error was relatively small, proving the effectiveness of the proposed method and providing a new solution for pig body size measurement.Key Words:growing and fattening pigs; image processing; KinectV2; 3D point cloud; body size measurement0 引言育肥猪养殖生产过程中连续监测猪体尺参数,能有效掌握猪的生长状态,是反映猪体健康与否的有效手段,是保证动物福利的有力工具。
第28卷㊀第5期2023年10月㊀哈尔滨理工大学学报JOURNAL OF HARBIN UNIVERSITY OF SCIENCE AND TECHNOLOGY㊀Vol.28No.5Oct.2023㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀基于双重判别解码器的三维点云形状补全网络孙㊀进,㊀马昊天,㊀雷震霆,㊀梁㊀立(1.扬州大学机械工程学院,江苏扬州225100;2.扬州大学江都高端装备工程技术研究所,江苏扬州225263)摘㊀要:针对碗状文物模型由于碎片缺失导致的逆向几何重建保真度不高的问题,为此提出了一种基于双重判别解码器的三维点云形状补全网络㊂首先基于编码解码器构建基本点云生成网络,然后根据生成对抗网络框架优化解码器结构,通过将全局特征进行解码获取目标骨架点云,保证点云的全局特征,进而在对骨架点云的基础上进一步进行局部点云细化生成判别,保证目标点云的局部特征㊂最后面向特征缺失拼接模型搭建双分支形状补全网络㊂实验结果表明在公开数据集ShapeNet 的点云补全实验中,本文方法的平均误差更小,相较对比网络,本文方法在碗状文物模型的三维形状补全任务更好,平均倒角距离提高了20.2%,为后续的模型逼真化提供了一个基础,具有更强的性能和良好的应用价值㊂关键词:几何重建;深度学习;生成对抗网络;双重判别解码器;双分支形状补全;倒角距离DOI :10.15938/j.jhust.2023.05.009中图分类号:TP301.6文献标志码:A文章编号:1007-2683(2023)05-0068-07Two-branch Shape Complement Network for FeatureMissing Splicing ModeSUN Jin,㊀MA Haotian,㊀LEI Zhenting,㊀LIANG Li(1.School of Mechanical Engineering,Yangzhou University,Yangzhou 225263,China;2.Jiangdu High-end Equipment Engineering Technology Institute,Yangzhou University,Yangzhou 225263,China)Abstract :Aiming at the problem of low fidelity of reverse geometric reconstruction of bowl-shaped cultural relics model due to themissing fragments,a 3D point cloud shape completion network based on double discrimination decoder is proposed.Firstly,a basic point cloud generation network is built based on the codec,and then the decoder structure is optimized according to the framework of generation confrontation network.By decoding the global features,the target skeleton point cloud is obtained,and the global features of the point cloud are guaranteed.Then,on the basis of the skeleton point cloud,the local point cloud generation is further refined to ensure the local features of the target point cloud.Finally,a two-branch shape completion network is built for the feature missing splicing model.The experimental results show that the average error of this method is smaller in the point cloud completion experiment of ShapeNet,an open data pared with the comparison network,this method is better in completing the three-dimensional shape of the bowl-shaped cultural relics model,and the average chamfer distance is increased by 20.2%,which provides a foundation for thesubsequent model fidelity,and has stronger performance and good application value.Keywords :geometric reconstruction;deep learning;generative adversarial network;double discrimination decode;two-branch shape completion;chamfer distance㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀收稿日期:2022-05-17基金项目:国家自然科学基金(51775484,51475409);2020年江苏省产学研合作项目(BY2020663);2021年扬州市产业前瞻与共性关键技术项目(YZ2021020);2020年扬州大学市校合作专项(YZ2020166).作者简介:马昊天(1998 ),男,硕士研究生;雷震霆(1995 ),男,博士研究生.通信作者:孙㊀进(1973 ),男,博士,硕士研究生导师,E-mail:sunjin1001_bzr@.0㊀引㊀言我国悠久的历史使得周围的海域下埋藏着众多的文化遗迹,随着航海技术的不断发展,打捞出大量的海底沉船,其中发掘出了许多破碎的文物碎片[1],其中大多数为碗状的陶瓷碎片㊂由于破损的文物数量众多,利用计算机视觉技术将其数字化之后进行辅助生成,对文物保护有着十分重要的意义㊂目前的考古学家利用计算机辅助技术对这些文物进行数字化,进行虚拟重组与匹配实现文物模型的复现㊂在历史文物重建过程中,通常使用三维扫描仪获取目标的数字化模型,但是当目标存在缺失或缺损的情况下,这样通过三维扫描仪获取的数字化模型会不完整,对文物逆向工程的效果会产生较大的影响㊂人们可以通过双眼观察文物的现有特征,并根据经验推断出缺失部位的信息,计算机却很难推测缺失的部位的原始形状信息㊂现有的残缺点云数据的补全的方法一般分为三类,第一类是基于几何方法,这类方法是在不需要任何外部辅助数据的情况下,利用已有输入点云的几何信息来完成对整体形状的补全㊂此类方法的优点是简单,容易通过简单的算法实现㊂但是该种方法存在对输入点云数据要求高,泛化性较差的问题㊂第二类是基于对齐方法,这类方法的基本思想是通过将残缺的输入点云与点云形状数据库中的模型匹配来完成补全㊂虽然数据库先验知识的方法能够完成较大面积的模型补全,但其主要限制仍是全局结构不容易被概括,不能推广到任意的三维模型,需要昂贵的优化成本,并且对噪声不鲁棒㊂第三类方法是基于学习的方法,从前基于学习的点云补全方法通常将点云数据转换为体素网格或其他形式再使用卷积,但是,该种方法[2]对内存的需求特别大,并且不适合形状不规则的物体㊂Point-net[3]提出后,可以直接处理无序点云,节省了点云数据的处理时间㊂L-GAN[4]提出了第一个点云的深度生成模型,可以通过简单的代数运算对点云进行形状补全,但是其网络架构不是专门用于点云补全的,在点云补全任务中效果不是很好㊂Foldingnet[5]提出了一种端到端的自动编码器,它可以将2D网格变形到三维点云中的物体表面上,并且与直接使用完全连接的层相比,所提出的解码器可以保持准确性㊂PCN[6]提出了基于深度学习的形状补全网络,应用Foldingnet对生成的点云进行形状完善,通过编码器解码器产生粗输出,然后使用并行多层感知器进行细输出,这种方法能够通过点云作为输入生成密集和完整的结果,但是PCN不能产生高保真度的结果㊂在现阶段,点云生成任务中经常使用到生成对抗网络[7]的框架,例如,3D-GAN[11]第一个将体卷积网络与生成对抗网络结合从概率空间生成三维对象,能够较好的完成点云补全任务,但是,体素网格降低了精细形状的分辨率,并且需要巨大的计算量㊂2018年,Li等提出了point cloud GAN[8]适用于点的完成,然而结果却严重失真㊂为了减少细节的丢失,后续的研究[9-11]通过添加约束条件以最小化输入形状与其对应的输出区域之间的距离,上述方法都不重视局部结构信息㊂L-GAN介绍了第一个深度生成的点云模型,虽然L-GAN能够在一定程度上执行形状完成任务,但其架构主要不是为完成形状完成任务而构建的,因此其性能并不理想㊂PF-Net[12]提出将最终产生的预测点云与真实点云共同输入判别器,以达到提高生成点云的逼真度,但是,其判别器用在最终生成的点云上,产生的作用较小㊂为了提高点云补全的准确率,MGA-PT[13-15]等提出通过嵌入Transformer㊁ALL-MLP的方法提高编码器的特征提取能力,提高了点云补全的保真度㊂上述方法都使用生成器和鉴别器,这种结构的网络将把生成器中产生的点云传送给判别器,通过鉴别器确定生成点云的真假㊂总体上,基于生成对抗网络结构的点云生成模型的保真度较高㊂针对上述对点云补全网络中,生成点云保真度不高,重建方式复杂的缺点,本文提出了一种针对编码解码点云生成网络的双重判别解码器,其具体贡献为:1)提出一种双重判别的解码器结构,通过将全局特征进行解码获取目标骨架点云,进而在对骨架点云判别生成的基础上进一步进行局部点云细化生成判别,实现对存在特征缺失模型的形状重建,有效的保证了目标点云的全局特征㊂2)提出了一种针对碗状文物特征缺失模型的点云补全方法,优化了编码解码判别点云生成网络中的解码器结构,在三维物体数据集Shape Net及碗状文物数据集中取得了更优的补全效果㊂96第5期孙㊀进等:基于双重判别解码器的三维点云形状补全网络1㊀点云生成网络由于碗状文物碎片的丢失,重建碗状文物三维模型所需的点云数据会不完整,将通过多次三维扫描仪获取破损碎片的三维点云数据设为V,其中,V 是各碎片点的信息的集合{v 1,v 2,v 3, },通过点云的拼接算法将各碎片点云集V 拼接成U,通过三维建模软件或对完整碗状文物进行三维扫描获取完整模型所对应的点Y㊂如图1所示,本文将破碎碗状文物三维模型重建的任务定义为:已知点云U 求解相对于Y 的缺失部分,通过对碗状文物完整模型的点云Y 进行随机块的删除,获取所对应的训练数据X,本文采用基于学习的方法训练本文的模型N,求解X 相对于Y 的缺失部分㊂图1㊀本文的结构示意图Fig.1㊀the structure diagram of this paper1.1㊀编码器在编码器网络中,本文的输入数据为缺失点云的三维坐标㊂首先,通过最远点抽样[16]分别在256㊁512和1024的标度上采样,比例是指用于表示对象点云的点数㊂然后,对采样后获得的三个不同输入执行特征提取㊂在特征提取阶段,本文使用了PF-Net 中的组合多层感知的方法,通过将使用三个独立的组合多层感知将尺度为256㊁512和1024的点云映射为三个单独的组合潜在向量F1㊁F2㊁F3㊂每个向量代表从不同分辨率点云中提取的特征㊂最后,将所有向量连接起来,形成1920ˑ3大小的潜在特征映射F㊂本文使用的特征提取模块如图2所示,左侧输入的点云是通过最远点采样获取的256㊁512㊁1024维度的点云,组合多层感知代表了PFNet 提出的组合多层感知,三个维度的点云通过组合多层感知分别获取特征F1㊁F2㊁F3,对三个特征进行组合,通过全连接及支持向量机获取最终提取的特征F㊂图2㊀碗状点云的特征提取模块Fig.2㊀Feature extraction module of bowl-shapedpoint cloud1.2㊀判别器判别器是生成对抗网络中常用的网络结构,在点云生成任务中,将解码器生成的点云输入到判别器中,通过判别器判断生成点云的真假,进行识别和不断生成训练网络,实现生成准确的点云模型㊂因为解码器的输出是点云数据,通过线性层对鉴别器的输入进行预处理㊂处理后的结果依次通过三个卷积层,这些卷积层的输出维数分别为64㊁128和256,本文将每个卷积的输出分别Y 存储在变量Ypre _64㊁Ypre _128㊁Ypre _256中㊂这些变量分别通过最大池化并转换维度进行连接,最终的特征向量依次通过四个输出维度为256㊁128㊁16和1的全连接层,结果通过最后一个全连接的层输出㊂如图3所示,输入为生成器生成的点云,Linear 为全连接层,输出数据分别为256ˑ1,128ˑ1,16ˑ1和1ˑ1,最后输出0或1判断生成点云是否符合真实点云几何形状特征㊂图3㊀判别器结构示意图Fig.3㊀Schematic diagram of discriminator structure07哈㊀尔㊀滨㊀理㊀工㊀大㊀学㊀学㊀报㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀第28卷㊀2㊀改进的双分支形状补全网络通过使用两个判别器分别对生成的全局点云和细节点云进行判别,首先将第一分支生成的全局点云作为输入数据输入判别器,通过判别器判断的点云作为进一步生成细化点云的骨架点云,将生成的细化点云通过判别器的二次判别,将获取的结果与骨架点云进行整合,获取最终的生成模型㊂2.1㊀双重判别解码器解码器的输入为编码器网络的输出,解码器的输出是输入点云的缺失部分㊂以前的研究[5-7]表明使用全连接层的解码器能够较好的预测稀疏点集,这些生成的稀疏点集可以粗略地表示物体的三维形状㊂本文的网络解码器的思路是先生成稀疏的骨架点云集合后进行判别,获取缺失点云的骨架点云,在骨架点云的基础上进行细化点云的二次生成,并对二次生成的细化点云进一步进行判别,提高生成点云的形状信息的准确率㊂解码器的结构框图如图4所示㊂在解码器生成点云的过程中,本文采用了由全局到局部的思想进行生成,定义两个不同的全连接层Fc1㊁Fc2分别生成对应的全局特征及细节特征,输出大小分别为1024㊁256㊂以编码器获取的特征F 作为输入,依次通过Fc1㊁Fc2㊂本文将每个完全连接的层的结果存储在不同的变量中,通过这个过程,特征向量的维数降低到256,为之后的全局点云的生成做准备㊂图4㊀双重判别解码器结构图Fig.4㊀Structure diagram of double discrimination decoder图中的输入是编码器提取的特征F,Y_1代表的是生成的包含缺失部位全局形状信息的点云,Y_2代表的是生成的细节点云,判别器判别为真的Y_1作为骨架点云,在骨架点云的基础上进一步细化获取Y_2,通过判别器的二次判别获取最终包含全局特征及细节点云的缺失点云㊂解码器将编码器中提取到的全局特征和局部特征结合起来,生成一组完整的点云㊂本文通过先生成少量能描述目标模型形状特征的关键点作为描述物体的形状特征的骨架点云,其次,在此基础上进一步生成细节点云,直到最后生成密集点云数据的缺失部分㊂本文定义了两个不同的全连接层,使用FC_2的输出作为FC_1的输入,通过对两个输出的整形叠加,获取目标三维模型的生成模型㊂2.2㊀损失函数双分支缺失点云生成网络的损失函数由双分支补全损失和对抗网络损失两部分组成㊂补全损失是指缺失部位点云的真实值与预测点云之间的差值,用来减少真实值与生成点云之间的差异,对抗性损失通过优化生成器使预测点云数据更接近真实点云数据㊂CD 损失衡量的是点云缺失部分的真实值与预测值之间的差异㊂对抗性损失试图通过优化最大似然估计来使预测更真实㊂在本网络中,选择CD 损失作为衡量指标㊂CD 损失计算预测点云S 2和真实点云S 1之间的平均最近点距离:d CD (S 1,S 2)=1|S 1|ðx ɪS 1min y ɪS 2x -y 22+1S 2ðx ɪS 2min y ɪS 1y -x 22(1)双分支缺失点云生成网络的损失函数由双分支的补全损失L 1和对抗损失L 2两部分组成㊂通过最小化L 2使得生成器产生 真实 样本U 来通过判别器的判别,而D 旨在最小化L 2,并对真实样本P 和生成样本P 进行区分㊂双分支点云生成网络的损失由d CD 1和d CD 2,并使用超参数β加权:L 1=d CD 1(U 1,U ᶄ1)+βd CD 2(U 2,U ᶄ2)(2)其中:U 1为精密点云;U 2为骨架点云;U ᶄ1和U ᶄ2分别为对应的真实点云㊂对抗网络的损失函数L 2通过最小平方损失表示:L 2=12[D (U )2+(D (U ᶄ)-1)2](3)其中:U 为生成点云,U ᶄ为对应真实值㊂双分支缺失点云生成网络的损失函数定义为:L =θ1L 1+θ2L 2(4)其中:θ1和θ2分别为补全损失与对抗损失,并且θ1+θ2=1,在训练过程中,通过Adam 优化器对G 和D 交替优化㊂17第5期孙㊀进等:基于双重判别解码器的三维点云形状补全网络3㊀实㊀验3.1㊀实验环境本文的网络使用python 语言,在Windows 11系统上训练,实验的硬件环境:扫描仪为SHINING SE,CPU AMD Ryzen 54600H with Radeon Graphics,主频3.0Hz;GPU NVIDIA GeForce GTX 1650;操作系统Win10;深度学习环境为Pyorch 1.10.2,Py-thon3.7.11,初始学习率0.0001,批量4,通过Adam 优化器优化网络㊂3.2㊀实验数据本文所构建的数据集包含两个部分,第1个部分是通过三维扫描仪获取碗状文物碎片的数字化模型,通过文[17]的拼接方法获取待补全模型㊂第2个部分是通过三维建模软件绘制的三维模型,经过处理获取碗状文物的点云模型㊂如图5所示,本文主要通过三维建模软件绘制的三维模型作为网络的训练数据,三维扫描仪获取的碗状文物碎片的数字化模型作为实际验证数据㊂图5㊀数据集采样示意图Fig.5㊀Schematic diagram of data set sampling其中,图5(a)为通过三维扫描仪获取碗状文物碎片的网格模型,图5(b)为采集的点云模型;图5(c)为通过三维建模软件绘制的三维模型,图5(d)为采集的点云模型,作为网络的训练数据,图5(a)(b)作为网络验证的数据㊂3.3㊀验证集点云补全实验本文在验证集上进行验证,通过将缺失点云输入基于双重判别解码器的点云补全网络,对碗状点云缺失部分形状进行补全,补全效果如图6所示㊂图6㊀训练网络在验证集上的补全效果图Fig.6㊀Complement effect diagram of training networkon verification set本文的网络输入的数据为存在缺失的点云数据,为了满足网络输入的要求,本文从不同的视点观察构建的碗状文物的三维点云模型,如图6左侧所示,随机选取一个视点作为为球心,删除球面上以R 为半径的所有点,剩下的点视为缺失点云作为网络输入,以删除的点云作为真实点云㊂3.4㊀待补全模型缺失生成第1个部分是通过三维扫描仪获取碗状文物碎片的数字化模型,拼接后的待补全模型㊂获取现有的碗状文物碎片的数字化点云,对现有的数字化碎片模型进行拼接,获取待检测模型,如表1所示㊂表1㊀网络模型生成点云与真实点云对比Tab.1㊀Comparison between point cloud generated bynetwork model and real pointcloud27哈㊀尔㊀滨㊀理㊀工㊀大㊀学㊀学㊀报㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀第28卷㊀㊀㊀从左到右分别是碗状文物碎片边缘碎片缺失㊁内部碎片缺失及多块碎片缺失的点云生成情况,从上到下分别为待补全模型㊁缺失部位生成的点云㊁生成点云与缺失点云组合的完整点云㊁生成点云的封装模型及真实的缺失部位点云㊂相应的本文训练的生成网络能够较好的对碗状文物缺失部位的点云进行较好的生成㊂同时,对生成的点云数据进行进一步点云封装能够满足模型形状重建的需求㊂3.5㊀结果对比本文使用的评价指标[18]㊂它包含两个指标:PredңGT(预测点云与真实点云)误差和GTңPred (真实点云与预测点云)误差㊂PredңGT衡量的是预测与实际情况的差距㊂GTңPred表示预测的形状覆盖的地面真值曲面的程度㊂在表2中显示GTңPre和PreңGt误差与经典方法在公开数据集的五个类别进行对比的比较结果(显示的数字是[PredңGT误差/GTңPred误差],按比例乘以1000)㊂由于平均误差值太小,无法显示在表格中,本文将得到的GTңPre与PreңGt值乘以1000,最后保留三位小数作为最终的测试结果㊂表2㊀Shapenet-Part实验对比Tab.2㊀Comparison of ShapeNet-Part experiments种类LGAN[11]PCN[4]3D-Capsule PF-Net[6]Ours 椅子7.359/2.339 3.952/2.301 3.049/2.207 2.074/1.824 2.327/1.974台灯8.464/3.62711.610/7.1399.912/5.847 5.661/3.905 6.286/4.739杯子 6.139/4.735 3.590/3.591 5.155/5.168 3.116/3.557 2.519/2.852桌子 2.658/2.484 2.503/2.452 3.929/3.098 2.429/2.109 2.157/1.989帽子8.968/4.6087.015/4.24011.04/4.739 1.243/1.596 1.053/1.238平均 6.718/3.559 5.734/3.945 6.617/4.212 2.905/2.598 2.868/2.558㊀㊀注:表中数字代表GTңPre/PreңGt值乘以1000,加粗表示该类型中最优解㊂㊀㊀由表2可见,在给定的5个类别的模型点云补全测试中,本文的双分支点云补全网络在形状特征信息简单的模型中的补全效果更好,如表2所示在杯子㊁桌子㊁帽子中,双分支点云补全网络生成的点云补全效果更好㊂如表2所示,现有的经典网络中PF-Net在点云完成任务中效果较好,其中,本文网络在几何形状信息简单的补全任务中效果更好㊂将本文网络在碗状文物待补全模型中与PF-Net进行实验对比㊂如表3所示,通过对PF-Net在边沿块㊁内部块㊁组合块中的补全效果对比,我们可以观察到,本文的方法比PF-Net[6]生成的点云更致密㊁更均匀,由表平面部分生成的点密度更大,恢复程度也更高㊂表4表示对应边沿块㊁内部块㊁组合块的CD值(倒角距离Chamfer distance)及平均倒角距离,其中,CD值越小,最终结果越好㊂由表4可见,在边沿缺失补全㊁内部缺失补全和多块缺失补全中分别提高了18.1%㊁12.6%㊁29.9%,相对于PF-Net 本文网络在真实点云数据的补全中平均提高了20.2%㊂综上,双重判别解码器的结构提高了生成点云的精度,在形状信息简单的模型中有着较好的效果由表1所示,并且在碗状文物的形状重建任务中精度更高,如表4所示㊂表3㊀本文的网络与PF-Net碗状文物补全效果对比Tab.3㊀Comparison of the effect of network and PF-Net bowl-shaped cultural relics in thispaper 表4㊀本文的网络与PF-Net碗状文物补全实验对比Tab.4㊀Comparison between the network of this paper andPF-Net bowl-shaped cultural relics completion experiment边沿块内部块组合块平均PF-Net[6]0.3590.3360.9580.551Ours0.2940.2770.6720.414 comparison18.1%12.6%29.9%0.20237第5期孙㊀进等:基于双重判别解码器的三维点云形状补全网络4㊀结㊀论针对碗状文物拼接模型存在特征信息缺失的修复补全问题,本文提出了一种有效的双分支点云生成网络㊂结合生成对抗网络框架,在点云生成网络框架的解码器结构中使用了两次判别器,构建了一种双重判别解码器结构,分别从全局特征及细节特征对缺失部位的形状进行生成,保证点云骨架特征的同时进一步细化点云的细节特征,可以有效的提高生成点云特征的保真度㊂相较于传统的文物修复方法,本文通过实验表明深度学习的方式能够实现缺失部位的自动补全,本文的网络相较于已有网络分别提高了18.1%㊁12.6%㊁29.9%,平均提高了20.2%㊂同时在公开数据集的实验表明本文的网络在其他形状的补全任务中有着较好的泛化性能㊂参考文献:[1]㊀LI J,HE B,Liu S,Liu Q.Nondestructive Analysis ofJingdezhen and Longquan Celadon Wares Excavated fromNanhai No.1Shipwreck.Spectrosc Spect Anal36:1500.[2]㊀TCHAPMI L P,KOSARAJU V,REZATOFIGHI H,etal.Topnet:Structural Point Cloud Decoder[C]//Pro-ceedings of the IEEE Conference on Computer Vision andPattern Recognition,2019:383.[3]㊀QI C R,SU H,MO K,Guibas L J.Pointnet:DeepLearning on Point Sets for3D Classification and Segmen-tation[J].CVPR,2017:77.[4]㊀WU J,ZHANG C,XUE T,et al.Learning a Probabilis-tic Latent Space of Object Shapes Via3D Generative-Ad-versarial Modeling[J].Advances in Neural InformationProcessing Systems,2016:1.[5]㊀YANG Y,FENG C,SHEN Y,et al.Foldingnet:PointCloud Auto-Encoder Via Deep Grid Deformation[C]//Proceedings of the IEEE Conference on Computer Visionand Pattern Recognition,2018:206.[6]㊀YUAN W,T KHOT,D HELD,et al.PCN:Point Com-pletion Network[C].3DV,2018:728.[7]㊀CRESWELL A,WHITE T,DUMOULIN V,et al.Gen-erative Adversarial Networks:An Overview[J].IEEESignal Processing Magazine,2018,35(1):53. [8]㊀ACHLIOPTAS P,DIAMANTI O,MITLIAGKAS I,et al.Learning Representations and Generative Models For3dPoint Clouds[C]//International Conference on MachineLearning.PMLR,2018:40.[9]㊀LI C L,ZAHEER M,ZHANG Y,et al.Point Cloud Gan[J].arXiv Preprint arXiv:1810.05795,2018:82.[10]SARMAD M,LEE H.J,KIM Y.M.Rl-gan-net:A Rein-forcement Learning Agent Controlled Gan Network for Re-al-Time Point Cloud Shape Completion[C]//Proceedingsof the IEEE Conference on Computer Vision and PatternRecognition,2019:5898.[11]GURUMURTHY S,AGRAWAL S.High Fidelity Seman-tic Shape Completion for Point Clouds Using Latent Opti-mization[C]//Proceedings of the IEEE Winter Confer-ence on Applications of Computer Vision(WACV),IEEE,2019:1099.[12]HUANG Z,YU Y,XU J,et al.PF-Net:Point FractalNetwork for3D Point Cloud Completion[J].(CVPR),2020:7659.[13]CHEN X,LI Y.Multi-feature Fusion Point Cloud Com-pletion Network[J].World Wide Web25,2022:1551.[14]刘心溥,马燕新,许可,等.嵌入Transformer结构的多尺度点云补全[J].中国图象图形学报,2022,27(2):538.LIU Xinpu,MA Yanxin,XU Ke,et al.Multi-scale PointCloud Completion Embedded in Transformer Structure[J].Journal of Image and Graphics,2022,27(2):538.[15]张京军,郑灿,高瑞贞.学习点云邻域信息的三维物体形状补全[J].计算机应用研究,2022,39(5):1586.ZHANG Jingjun,ZHENG Can,GAO Ruizhen.ShapeComplement of3D Objects by Learning Neighborhood In-formation of Point Clouds[J].Research on ComputerApplication,2022,39(5):1586.[16]QI C R,L Yi,SU H,et al.Pointnet++:Deep Hierar-chical Feature Learning on Point Sets In A Metric Space[J].Advances in Neural Information Processing Sys-tems,2017,30:5105.[17]孙进,丁煜,王宁,等.结合点云占比和平滑度的碗状碎块内表面识别算法[J].哈尔滨理工大学学报,2020,25(3):157.SUN Jin,DING Yu,WANG Ning,et al.IdentificationAlgorithm for Inner Surface of Bowl-shaped Broken PiecesBased on Point Cloud Proportion and Smoothness[J].Journal of Harbin University of Science and Technology,2020,25(3):157.[18]GADELHA M,WANG R,MAJI S.Multiresolution TreeNetworks for3D Point Cloud Processing[C]//The15thEuropean Conference on Computer Vision,Munich,Ger-many,2018:105.(编辑:温泽宇)47哈㊀尔㊀滨㊀理㊀工㊀大㊀学㊀学㊀报㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀第28卷㊀。
c++离散点轨迹计算曲率概述及解释说明1. 引言1.1 概述本篇文章主要介绍离散点轨迹计算曲率的概念和方法,并通过C++编程实现离散点轨迹曲率的计算。
曲率是描述轨迹曲线弯曲程度的重要指标,对于路径规划、图像处理、机器人导航等领域具有广泛的应用价值。
1.2 文章结构本文分为五个部分进行叙述。
引言部分概述了文章的内容和目的,接下来是离散点轨迹计算曲率的理论定义和方法介绍,然后详细说明了如何使用C++来实现该方法。
之后是解释说明部分,包括对理论原理进行解析、实际应用场景探讨以及示例演示与结果分析。
最后,文章总结了主要观点和发现,并提出进一步研究的展望与建议。
1.3 目的本文旨在为读者提供一个全面且易于理解的指南,便于他们了解离散点轨迹计算曲率的背景知识和具体实现方法。
同时,通过C++编程实践帮助读者加深对概念和方法的理解,并引导他们将其应用于实际问题中。
通过本文的阅读,读者将能够掌握离散点轨迹曲率计算的基本原理和技巧,为后续研究和应用提供坚实的基础。
2. 离散点轨迹计算曲率2.1 曲率的定义曲率是描述曲线弯曲程度的一个重要指标。
在数学上,曲率可以通过计算曲线在某一点上的切线与该点邻近的几个点所构成的圆之间的半径来表示。
具体而言,在三维空间中,对于平面上的一条离散点轨迹,我们可以通过计算相邻两个点之间的夹角来估计曲率。
2.2 计算曲率的方法有多种方法可以用于计算离散点轨迹的曲率。
其中一种常用方法是使用测地线拟合技术。
该技术基于对局部数据进行多项式拟合,并使用拟合结果来估计切线和曲率。
具体步骤如下:- 首先,选择离散点轨迹中的一个起始点。
- 然后,选取该起始点周围一定范围内(可根据实际情况确定)的若干个相邻点。
- 接下来,将这些选取出来的相邻点作为输入,在本地坐标系中进行多项式拟合。
- 最后,在得到各项系数后,根据多项式模型求导得到对应曲线的切线和曲率。
2.3 C++实现离散点轨迹曲率计算在C++中,我们可以借助各种数学库和算法来实现离散点轨迹的曲率计算。
pcl 轮廓识别流程-回复"PCL轮廓识别流程"导言:随着计算机视觉和人工智能技术的快速发展,轮廓识别已成为图像处理和模式识别领域中重要的研究方向。
而点云库(Point Cloud Library, PCL)作为一个开源的计算机视觉库,提供了丰富的函数和算法来处理点云数据。
本文将详细介绍PCL轮廓识别的流程,为读者提供了解该技术的全面指南。
第一步:数据预处理在进行轮廓识别之前,首先需要对点云数据进行预处理。
这包括对原始点云进行滤波处理、降采样和去除离群点等步骤。
滤波处理:通过使用PCL中的滤波器,可以去除点云数据中的噪声。
例如,使用统计滤波器和均值滤波器可以分别去除孤立的点和高频噪声。
降采样:对于大规模的点云数据,为了提高计算效率,可以进行降采样操作。
常用的降采样方法有体素格网(Voxel Grid)和统计离散采样(Statistical Outlier Removal)等。
去除离群点:离群点是指与周围点云数据存在显著差异的点。
通过使用PCL 中的离群点移除滤波器,可以快速去除这些异常点。
第二步:平面分割PCL提供了多种平面分割算法,用于提取点云数据中的平面。
典型的平面分割算法包括随机样本一致性(RANSAC)、优化RANSAC(SAC-IA)、最小二乘法(Least Squares)、主成分分析(PCA)等。
平面分割是一个迭代的过程,通过选择一些随机样本点,拟合一个平面模型,并计算其他点与该模型的距离。
如果点与平面距离小于给定的阈值,则认为该点属于平面。
迭代此过程,直到满足终止条件为止。
第三步:边缘提取在得到平面之后,接下来需要提取轮廓边缘。
PCL中提供了一些常用的边缘提取算法,如深度边缘检测(DepthEdgeDetection)、基于法线变化的边缘检测(NormalBasedEdges)等。
深度边缘检测是一种基于深度图像的边缘提取方法,它可以通过计算深度图像中的梯度信息来提取表面的边缘。
cuda point cloud 3d重建原理-回复cuda point cloud 3D重建原理Point cloud是一种用于表示三维空间中的点的数据结构。
Point cloud 3D重建是指通过获取大量离散的点云数据,使用计算机算法将其转化为真实环境中的三维物体模型。
CUDA是一种由NVIDIA开发的用于并行计算的平台和编程模型,它可以充分利用GPU的计算能力,加速计算过程。
本文将介绍使用CUDA进行Point cloud 3D重建的原理和步骤。
第一步:数据获取Point cloud 3D重建的第一步是获取点云数据。
这可以通过三维激光扫描仪、摄像机或其他传感器来实现。
这些设备会在空间中采集大量点的坐标信息,并以点云的形式存储在计算机内存中。
第二步:点云预处理在进行重建之前,需要对点云数据进行预处理。
这包括去除异常点、降噪和过滤等。
异常点是指在数据采集过程中由于传感器误差或其他原因而引入的错误点。
降噪是指通过滤波方法将点云数据中的噪声去除,以减少后续计算的误差。
过滤是指根据应用需求,对点云数据进行筛选和分割,只保留关键点。
第三步:点云特征提取在进行重建之前,需要对点云数据进行特征提取。
点云特征是指描述点云数据的关键属性,它可以用来表示物体的形状、表面纹理等信息。
常用的特征包括点的法线、曲率、边缘等。
点云特征提取算法可以基于几何特征、拓扑结构或颜色信息等进行计算。
第四步:点云配准点云配准是指将多个点云数据对齐到同一个坐标系中。
由于采集点云数据的设备可能存在姿态误差或运动误差,导致不同点云之间存在位置偏移或旋转。
点云配准的目标是找到最佳的变换矩阵,将点云数据对齐到同一个坐标系中。
常用的点云配准算法包括Iterative Closest Point (ICP)等。
第五步:三维重建在点云配准后,可以开始进行三维重建。
三维重建是指根据点云数据还原出真实环境中的三维物体模型。
CUDA通过并行计算的方式加速重建过程,提高计算效率。
在Open3D中,可以使用`estimate_curvature`函数来估计点云的曲率。
该函数需要传入点云数据以及计算半径r和法向量估计方法method。
对于点云数据,可以使用Open3D库中的`PointCloud`类来创建或读取点云数据。
对于计算半径r,它表示在计算某一点曲率时使用的点云半径,其值越大,计算曲率信息的范围就越大。
对于法向量的估计方法method,可以选择两种方式:Knearest方法和Radius方法。
Knearest方法表示以一个点为中心,以其最近的k个点的平均法向量作为该点法向量的估计值,需要传入一个k值;Radius方法表示以该点为中心,半径为r的点云中的所有点的平均法向量作为该点法向量的估计值。
最终计算得到的曲率值及法向量可以用来进行点云的分割、平滑处理等操作,以及进行点云的可视化展示。
点云神经⽹络:point_net(⼀)三维数据的表述形式⼀般分为下列四种:(1)点云:由N NN个D DD维的点组成,当这个D = 3 D=3D=3的时候⼀般代表着( x , y , z ) (x,y,z)(x,y,z)的坐标,当然也可以包括⼀些法向量、强度等别的特征。
这是今天主要讲述的数据类型。
(2)Mesh:由三⾓⾯⽚和正⽅形⾯⽚组成。
(3)体素:由三维栅格将物体⽤0和1表征。
(4)多⾓度的RGB图像或者RGB-D图像。
点云优势:(1)点云更接近于设备的原始表征(即雷达扫描物体直接产⽣点云)。
(2)点云的表达⽅式更加简单,⼀个物体仅⽤⼀个N × D 的矩阵表⽰。
pointnet出现之前,点云在深度学习⾥的应⽤:(1)基于3DCNN的体素模型:先将点云映射到体素空间上,在通过3DCNN进⾏分类或者分割。
但是缺点是计算量受限制,⽬前最好的设备也⼤致只能处理32 × 32 × 32 32\times32\times3232×32×32的体素;另外由于体素⽹格的⽴⽅体性质,点云表⾯很多特征都没有办法被表述出来,因此模型效果差。
(2)将点云映射到2D空间中利⽤CNN分类(3)利⽤传统的⼈⼯点云特征分类,例如:normal 法向量intensity 激光雷达的采样的时候⼀种特性强度信息的获取是激光扫描仪接受装置采集到的回波强度,此强度信息与⽬标的表⾯材质、粗糙度、⼊射⾓⽅向,以及仪器的发射能量,激光波长有关local density 局部稠密度local curvature 局部曲率linearity, planarity and scattering propesed by Dimensionality based scale selection in 3D lidar point cloudsverticality feature proposed by Weakly supervised segmentation-aided classification of urban scenes from 3d LiDAR point clouds 1.POINTNET点云所具有的两个⾮常重要的特性:(1)permutation invariance 置换不变性point cloud is a set of unordered points.点云是⽆需点的集合(2)transformation invariancepoint cloud rotations should not alter classification results.点云旋转不改变分类结果2. 基于点云的置换不变性简单来说,置换不变性就是点的排序不影响物体的性质因此针对点云的置换不变性,其设计的⽹络必须是⼀个对称的函数。
Abstract: As the technical development of laser scanning and image based modeling, more and more point cloud data are obtained to represent 3D geometric shapes of natural objects. Calculation of differential properties of 3D discrete geometry becomes onefundamental work. Through the relation of discrete normal curvatures and principal curvatures, a new algorithm is presentedon estimating the principal curvatures and principal directions 3D point cloud surface. Based on the local fitting of eachnormal section circle properties with the position and the normal at a neighbor point, principal curvatures and principaldirections are estimated from the contribution of these neighbor points. Optimization of this estimation is converted as alinear system by least squares fitting to all discrete normal curvatures corresponding to its neighbor points. A local featurecurve, called as normal curvature index lines, is constructed to show the efficiency of this work. This curve is intuitive andequivalent to Dupin index line. Experiments are designed on Gaussian curvature, mean curvature and principal directions foran analytical surface and discrete surfaces of point cloud data. Experimental results show that this work is more advantageousthan similar approaches, ad have applications to shape analysis and measurements.Keywords: Normal section curvature, principal curvatures, principal directions, least squares fitting.1. IntroductionIn recent years, the increasing availability and power of range scanners has enabled us to scan larger and more complex objects, to obtain rich detail features of objects and to get larger quantity of point cloud data, which is helpful to the reconstruction of geometric objects, shape modeling and shape feature analysis. Some basic differential geometric properties should still be better estimated for object reconstruction, shape modeling or analysis. Two of these most important properties are the main curvatures together with principal directions on an estimated surface. If points are from a known analytic surface, the curvature at every point can be precisely calculated by classic differential geometric methods. However, if points were sampled from an unknown surface, with a laser-canner for example, estimating main curvatures and principal directions of every point would be an interesting and challengeable topic.Estimating curvatures of 3D B-Rep (Boundary Representation) models has been cared since 1980s. Conventional methods often include point cloud denoising, mesh generation and curvature estimation. Some preprocessing may be performed at first, such as denoising and alignment. According to the mathematic tools adopted for geometric models, these methods can be divided into three categories. The first category is surface fitting with a polynomial surface at a local area. The surface can be a quadric surface [Sander1990; Stokely1992; Hamann1993; Krsek1998; Krsek1997], a cubic surface [Goldfeather2004], or a general polynomial surface. The second category is to compute the curvatures at each vertex of a mesh model by measuring the angle of each polygon passing through this vertex [Dyn2001; Kim2001]. The third category is to calculate the normal curvature of a direction from neighbor points, and all the normal curvatures are weightily averaged with central angle or with of tangent vectors [Taubin1995]. These methods work well for mesh models, and they can be applied to point cloud model after an extension.We will present a new fast method for point cloud models, where both mesh reconstruction and surface fitting are all avoided. Our method just uses neighbor points and normal vectors to estimate the normal curvature, where a normal section curve is thought of as spanned by one neighbor point and corresponding normal vector there. Principal curvatures and principal directions are estimated through the least square fitting of all normal curvatures related to all neighbor points. It can be shown that this new approach is better to some degree than other similar methods, and it can be sued for shape analysis and shape measurements.To show the effect of curvature estimation and to compare different approaches, we will construct a new kind of graph, called as normal curvature index lines, abbreviated as NCIL. This graph is simple and intuitive. With NCIL, it will be illustrated that our method is more precise and faster than the method by Taubin [Taubin1995], and it is better than the approach of Goldfeather [Goldfeather2004] also.The organization of this paper is as flows. State-of-art work of this topic is described in Session 2. The main algorithm is reasoned and described in Session 3. Experiments and analysis on analytic data are presented in Session 4, and on discrete data are in Session 5. Conclusions and further work are described at last in Session 6.2. Related WorkVarious algorithms to estimate curvature have been proposed in literatures in recent years. They can be simply classified as two categories: direct curvature fitting and indirect curvature fitting though surface fitting. Two approaches are selected as representatives of two typesASIAGRAPH 2008 PROCEEDINGSCurvature Estimation of 3D Point Cloud Surfaces Through the Fitting of NormalSection CurvaturesXiaopeng Zhang*1/LIAMA-NLPR, Institute of Automation, CAS; Hongjun Li2/LIAMA-NLPR, Institute of Automation, CAS; Zhanglin Cheng3/LIAMA-NLPR, Institute of Automation, CAS*1xpzhang@, 2hjli@, 3zhanglin.cheng@approaches, Taubin’s approach [Taobin1995] and Jack Goldfeather’s approach [Goldfeather2004].The curvature tensor of a surface at each point of a polyhedral approximation is estimated in Taubin’s approach. Principal curvatures are obtained by computing the eigenvalues and eigenvectors of certain 3×3 symmetric matrices defined by integral formulas. This algorithm is a function of the number of points and it is linear in time and in space. This approach does not employ normal vector, so large errors may be produced. It will be improved in this paper.Goldfeather presented three methods in his work [Goldfeather2004]: normal curvature approximation, quadratic surface approximation and adjacent-normal cubic approximation. Since the third one is the best among these three, we will choose it for an analysis and result comparison. The objective of the adjacent-normal cubic approximation method is to fit the neighbor point with a cubic polynomial surface (1) by neighbor points and corresponding normal vectors.32232222),(gy fxy y ex dx y cbxy x a y x z ++++++= (1)For each given point p with normal N , its m neighbor points are q i with normal vector M i , i =1,2,…,m . In the coordinate system with p as the origin and N as z-axis, the coordinate of q i is (x i , y i , z i ), and M i is (A i , B i , C i ). The estimation need subject to⎩⎨⎧−=++++−=++++i i i i i i i iii i i i i i i C B gy y fx ex cy bx A fy y ex dx by ax 22223223 (2) This is an overdetermined equation system, and it can be written in the following matrix formR M =μ (3)whereT g f e d c b a )(=μ⎥⎥⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎢⎢⎣⎡=×############################222232232212217332000230i i i i i i i i i i i i i i i ii i i i i i m y y x x y x y y x x y x y y x y x x y y x x M ()Ti i i i i m C B C A z R """"−−=×13 Least square fitting will be applied to find the best solutionof (3),, where only b a , and care useful to the Weingarten matrix (4)⎥⎦⎤⎢⎣⎡=c b b a W (4) With the eigenvalues and the eigenvectors of (4), the principal curvatures and principal direction vectors all can be calculated directly. From Goldfeather’s the adjacent-normal cubic approximation method, it can be safely deduce that the normal vectors of neighbor points are important factors, but the complexity of the system (3) is as three times more complex that of the system of the input point coordinates, which will increase computer time and space for computation. Our method will improve in this complexity while maintaining the optimization.According to a comparison of all curvature estimationmethods in [Magid2007] without considering normal vectors, Taubin’s approach is neither the best and nor the worst for points from an ellipsoid. But if points are from a plane or a sphere, the Taubin’s approach is the best among all other methods indexed in [Magid2007]. Therefore, we just choose the Taubin approach as representative. Jack Goldfeather’s method [Goldfeather2004] employs normal vectors and yields much better results, and it is probably the best in recent years.The moving least square used for curvature estimation [Yang2007] is too complex in determining Gaussian parameter. The robust statistical estimation [Kalogerakis2007] needs more time for computation. The anisotropic filtering approach on normal field and curvature tensor field [Liu2007] focused more on pre-processing. Curvature-domain shape processing [Eigensatz2008] emphasized on post processing, especially geometry processing operations in the curvature domain.Most papers provide comparison between different methods. In these comparisons, error analysis is very important. Traditionally, data-error or noise-error figure and table are employed, even in special paper of comparison methods [Magid2007; Mee2000; Mokhtarian2002]. We will adopt these figures or tables too. Meanwhile, we will give a new comparison figure, which is very intuitive for the effect of normal curvature computation.3. Curvature EstimationTo estimate the curvatures at a point on a discrete surface, the distribution of neighbor points are used. Main steps of this method included using the estimation of normal section lines for normal curvature and the optimization of all these normal curvatures.Normal direction at each sample point is regarded as the input data of the method presented here. If no normal vector information is given, we can select one method, for example the Max method [Max1999] to fit the normal vectors at first, which is not discussed in this paper.3.1. PrincipleAll neighbor points of a specific point on a point cloudsurface determine the local shape. Big errors may be generated if curvatures are estimated through surface fitting. The contribution of normal vectors should be considered. To estimate the curvature on a point, we will consider the contribution of one neighbor point only. This contribution is converted as the construction of a normal section curve. We will construct a normal section circle and estimate the normal curvature from the positions and normal vectors of two points, the object point and one of its neighbors.3.2. Local Fitting for Normal CurvaturesFor each point p in the point cloud, let N be the unit normal vector obtained elsewhere. We will use point coordinates and normal vectors to estimate normal curvatures at point p . Suppose there are m points in the neighbor of the point p and let q i be the i -th (m i ,...,2,1=) neighbor point. Thenormal vector corresponding to q i is M i . Let {p , X , Y , N } be an orthogonal coordinates system, called local coordinates L at point p . N denotes the normal vector at p . X and Y are orthogonal unit vectors and they are not needed to be specified given here. In L , the coordinates of p , q i , and M i can be p is (0,0,0), q i is (x i , y i , z i ), M i is (n x,i,, n y,i,, n z,i,). Thenwe can estimate normal curvature in k of point p with an osculating circle passing through point p and q i with normal N and M i . Figure 1 shows the geometric relation of these variables.i MFigure 1 (a) Triangle defined by Osculating circle, neighbor pointand normal vectors. (b) Local coordinates system LThe normal curvature can be estimated with the radius atpoint q i .αβsin sin i in pq k −= (5)Where, α is the included angle between vectors -N and pq i , and β between vectors N and M i . An approximation of equation (5) is given by:2222i i z xy xy in y x n n n k +⋅+−= (6) where22,,i i iy i i x i xy y x n y n x n +⋅+⋅=, i z z n n ,=.This method employs chord, neighbor normal vector and osculating circle, so we call this method as Chord And Normal vectors (CAN) method. The advantage of this approach is that the normal vectors of neighboring points are used to estimate the main curvatures of a point.3.3. Least Square Fitting with Euler EquationThe relation of all normal curvatures with main curvatures is analyzed here. In order to estimate principle curvatures at a point with equation (6), all coordinates of neighbor points are transformed into the coordinates of local coordinates system. Given the normal vector N at p),,(,,,p z p y p x n n n =N and)0,cos ,sin (ϕϕ−=X (7))sin ,sin cos ,cos (cos ψϕψϕψ−=Y (8)where, )arccos(,p z n =ψ, )arctan(,,p x p y n n =ϕ. The localcoordinates system L at point p becomes {p , X , Y , N } (Figure 1 (b)).Let S be the plane through point p with normal vector N . Let e 1 and e 2 are principal directions at point p , corresponding principal curvatures k 1 and k 2, and both are unknown. Let unknown parameter θ be the included angle between vectors e 1 and X , θi be the included angle between vectors X and the vector pQ i obtained by projecting the vector pq i onto the plane S . θi can be calculated with local coordinate of point q i .We employ Euler formula )(sin )(cos 2221θθθθ+++=i i i n k k k ,m i ...,2,1= (9) The task can be written as a optimize question:[]∑−+++=mi ini i k k k k k 122221,,)(sin )(cos min21θθθθθ(10)Since)(sin )(cos 2221θθθθ+++i i k k)cos sin (sin )sin cos sin cos (sin cos 2)sin cos (cos 222121222212θθθθθθθθθθθθk k k k k k i i i i ++−++=Expression (10) can be written as the matrix form 2minR M −μμ(11)where⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎣⎡=⎥⎥⎥⎥⎥⎦⎤⎢⎢⎢⎢⎢⎣⎡=××m n i nn m m mm mi ii i m k k k R M ########1122221211123,sin sin cos 2cos sin sin cos 2cos sin sin cos 2cos θθθθθθθθθθθθ T C B A ),,(=μandθθθθθθ2221122221cos sin sin cos )(sin cos k k C k k B k k A +=−=+= After the least square fitting of (11), the estimation value of μ can be obtained accordingly. It can be deduced that=⎥⎦⎤⎢⎣⎡C B B A ⎥⎦⎤⎢⎣⎡+−−+θθθθθθθθ222112122221cos sin sin cos )(sin cos )(sin cos k k k k k k k k⎥⎦⎤⎢⎣⎡−⎥⎦⎤⎢⎣⎡⎥⎦⎤⎢⎣⎡−=θθθθθθθθcos sin sin cos 00cos sin sin cos 21k k So k 1 and k 2 are Eigen values of the matrix⎥⎦⎤⎢⎣⎡=C B B A W If we transform the unit eigenvectors of W into global coordinate system with local coordinate system L , we obtain the principal direction vectors.Experiments will be designed in the next two sections on analytic surfaces and on discrete models to show the efficiency of the new method. Differential invariant properties such as Gaussian and mean curvatures are one of the most essential features in practice. The results about Gaussian and mean curvatures will be compared with different methods.4. Experiments on Analytic DataThe precision of this approach is shown on analytic surface in this section, where the value of principal curvatures and principal directions are known before the estimation.(a) (b)Figure 2: Point cloud torus model with uniform noise. (a). Noiselevel h=0.0. (b). Noise level h=1.0.The procedure of the experiment with CAN method isperformed in two steps: calculation of normal curvaturerelated to each neighbor point in (6) and least square fitting(in section 3.3) for principal curvatures and principaldirections. Gaussian curvature and mean curvature areobtained from principal curvatures.Experiments are performed with C languageprogramming in a PC with the configuration of Intel(R)Core(TM) 2 CPU, 4400 @ 2G, 1.99GHz, and 2G memory.Figure 3: Average of the absolute error produced by differentmethods (15 neighbor points). (a). Gaussian curvature. (b). Meancurvature.4.1 Analytic SurfaceWe use a torus as the representative of analytic surfaces,since rich geometric curvature phenomena are included, likeconvexity and concavity. The equation of the torus is in (12).)sin,sin)cos(,cos)cos((),(urvurRvurRvur++=)2,20(ππ≤≤≤≤vu(12)where parameters are specified as R=2, r=1.5000points are sampled from (12) according to auniform distribution. With analytic method, normal vectorand principal curvature of each point are calculatedanalytically. Along normal direction, noise is added to eachpoint which subjects to uniform distribution U (-mh, mh),where parameter m is the median of distances of all pair ofpoints. Noise level was under the control of positive realnumber h. The values of h are 0.1, 0.2,..., 1.0 respectively.To display clearly the shape variation of the point datasurface, a mesh model is constructed and rendered filled.Topological relations of vertexes in the mesh model is neverused here for curvature estimation, the. Figure 2 shows amesh model of 1000 sample points selected from the 5000ones with two noise levels, level h=0.0 and level h=1.0.4.2 Comparison on Absolute ErrorsIn order to show a comparison of errors statistically of eachapproach, experiments are repeated 30 times at every noiselevel for each point cloud data set in section 4.1. Theaverage error will be adopted for comparison in each case.The experiment results of Taubin method (legend as theTaubin), the Adjacent-normal cubic approximation method(legend as the Goldfeath) and our method (legend as CAN)are explained in Figure 3 and Figure 4.(a)(b)Figure 4: Average of the absolute error produced by differentmethods (30 neighbor points). (a). Gaussian curvature. (b). Meancurvature.Figure 3 and Figure 4 show that the absolute error ofestimating Gaussian and mean curvature produced by theTaubin method is far bigger than that by the Goldfeathmethod and our method CAN. Both the Goldfeath and theCAN are robust to noise. Table 1 shows that the CAN tendsto produce better results than the Goldfeath, especially when the noise becomes larger.Table 1: A part of average absolute average error produced by the Goldfeath and CAN methodGaussian curvature error mean curvature error Noise level Goldfeath CAN Goldfeath CAN 0.4 0.6 0.8 1.0 0.122485 0.159127 0.197023 0.264466 0.108530 0.139515 0.167308 0.215675 0.179423 0.246997 0.303347 0.452247 0.206980 0.238619 0.272985 0.343714Absolute error levels of each point data are shown in Figure 5 and Figure 6. All points are samples from the torus (12). The redder, the bigger the error is. The blacker, the more probable that the error is zero. It is clearly that Figure 5(a) has lots of high error points. We just compare Figure 5(b) with Figure 5(c). Two blue circles in Figure 5 and 6 mean that larger absolute errors are produced by the Goldfeath at some points, but smaller error produced by the CAN.(a) (b) (c)0 = min Å error Æ max = 1 Figure 5: Absolute error of Gaussian curvature estimation in different color. (a). The Taubin. (b). The Goldfeath. (c). The CAN.(a) (b) (c)0 = min Å error Æ max = 1Figure 6: Absolute error of mean curvature estimation in differentcolor. (a). The Taubin. (b). The Goldfeath. (c). The CAN.In addition, compare with the Goldfeath method, theCAN algorithm is good in both time and memory complexity. The memory complexity can be explained from the system (43) in see section 2 with its coefficient matrix of 3m rows and 7 columns, but the system (11) (see section 3.3) with m rows and 3 columns. In an experiment to calculate curvatures of 10000 points while adopting 30 neighbor points as neighbors, the Goldfeath spent 5328 ms, but the CAN 2234 ms.4.3 Normal curvature index linesIn fact, different method uses different normal curvature estimation, which means that at each point, principal curvatures (k 1, k 2) obtained by different approaches musthave error. In order to have an intuitionistic view about theresult, an index line is defined and constructed. Inspired by Dupin index line, normal curvature index lines (NCIL) are designed here. In Dupin index line, its polar coordinates equation is ||/1n k =ρ. A polar coordinate equation of NCIL is designed as n k =ρ in Figure 7.Along any direction in tangent plane of point p on a surface, the normal curvature can be approximately calculated accordingly. The way to draw an NCIL is to take the relation of the included angle and the normal curvature corresponding to a neighbor point. The curve of NCIL comes from sample points obtained and connected.Figure 7: Normal curvature index lines.According to the above experimental data, a point p accompanied by its 30 neighbor points is randomly selected, and 30 pairs of (θ, k n ) at point pare obtained then. Principal curvatures and principal directions are estimated respectively with three methods described above. So we will get three curves when corresponding pairs (θ,k n ) are connected sequentially as NCILs for the three methods. ANCIL will be drawn with real values of (θ, k n ) for each of three approaches compared in polar system in Figure 8 andrectangular system in Figure 9.Figure 8: Normal curvature index lines of three approaches in a polar systemFigure 9: Normal curvature index lines of three approaches in an orthogonal systemFigure 8 shows that the NCIL (blue) obtained by the CAN is more close to the real curve (black). But the situation of the green one for the Taubin is very serous,which may cause large errors. The red curve for the Goldfeath is the moderate.It can be seen in Figure 9 that the Taubin method generates large errors also. One reason of these large errors is that the mean of k n is large and the amplitude is small. Normal curvature index lines can be used to at least two things. One is an analysis of the effect of curvature fitting, which helps to evaluate curvature estimation method. The other is to compare error of several normal curvature approximations, which helps to select the best one among existing algorithms.5. Experiments on discrete modelsIn order to show the accuracy and the robust of the CAN algorithm, we apply it to a discrete model hand , where the height of the model hand is 202 units. This hand model in Figure 10 (a) has 6258 points with normal vectors. This model is a mesh model and we only use the vertexes to perform experiments. The polygon information here is only adopted to visualize the principal directions estimated.We do the experiment with different noise levels, free noise in Figure 10, noise level 0.5 units (h =0.5) in Figure 11, and noise level 2.0 units (h =2.0) in Figure 12. The effect of noise level can be seen in Figure 12(a). Noises are added according to uniform distribution U (-h , h ) along the normal direction of each point. The principle curvatures and directions are estimated by the CAN approach in Figure 10(b), Figure 11(b) and Figure 12(b), and by the Goldfeath algorithm Figure 10(c), Figure 11(c) and Figure 12(c) respectively. Since the Taubin algorithm produces large curvature error, it is not used here.Figure 10 shows that the estimated principal directions are good with the Goldfeath and the CAN thanks to the point cloud hand model free of noise.(a) (b) (c)Figure 10: Point cloud hand model free of noise and principaldirections estimated by two approaches. (a). Point cloud (display asmesh only for a view). (s). CAN. (c). GoldfeathFigure 11 shows that with low noise level, both CAN and Goldfeath produce good results. The principal directions are organized in order in both cases. It can be seen that the principal directions on the surface of the middle part of thumb back in Figure 11 (c) are different from the ones in Figure 11 (b) and Figure 10 (c). Therefore, the Goldfeath does not work well for this level of noise.Figure 12 shows that with large noise level, the CAN is better than the Goldfeath. It can be seen that the principaldirections on the surface of the middle part of thumb back are in order in Figure 12 (b), which is close to the directions in Figure 10 (b) and Figure 10(c). Chaos of principal directions can be seen in Figure 12(c), which is quite different from Figure 10(b) and Figure 10(c). This means that the errors of principal directions estimated by the CAN is far smaller than that estimated by the Goldfeath. Therefore, the CAN is more robust than the Goldfeath.(a) (b) (c)Figure 11: Point cloud hand model with noise level 0.5 and principal directions estimated by two approaches. (a). Point cloud (display as mesh only for watch). (b). CAN. (c).(a) (b) (c)Figure 12: Point cloud hand model with noise level 2.0 and principal directions estimated by two approaches. (a). Point cloud (display as mesh only for watch). (b). CAN. (c). Goldfeath.Another discrete model elephant was used also, where the height of this model is 75 units. This model consisted of 6859 points with normal vectors. The experimental results of different noise levels are presented in Figure 13, Figure 13 14 and Figure 15. Mesh models in Figure 13(a), Figure14(a), and Figure 15(a) are displayed only for data visualization. From Figure 15, it can be seen that the(a) (b) (c)Figure 13: Point cloud model elephant free of noise and principal directions estimated by two approaches. (a). Point cloud surface (display as mesh only for data visualization). (b). CAN. (c). Goldfeath.principal directions on the surface of the right side of the elephant back are in order in Figure 15 (b), which is close to the directions in Figure 13 (b) and Figure 13(c). Chaos of principal directions can be seen in Figure 15 (c), which is quite different from Figure 13 (b) and Figure 13(c). This means that in this comparison, the performance of the CAN approach are significantly better than that of the Goldfeath.Above experiments illustrate that if the noise level is low, both CAN and Goldfeath methods produce accurately principal directions; if the noise level is high, the CAN has significant advantages in estimating principal curvature and direction.It is interesting and challengeable to use the CAN algorithm to scanned data of complex objects. The point data of a tree is obtained with a laser scanner of a trucked tree, and the result is range image shown in Figure 16 (a). This range image points are clustered according the difference of the distance of neighboring points, so four different branch blocks are obtained then. This height of this model is 12 meter. 6950 points are included.Figure 17 shows the estimated principal directions withthe CAN on the tree branch surface. Figure 17(a) is a globalview. Figure 17(b) shows that the gradual changes of estimated principal directions at branch ramification nodeare reasonable. If the surface of tree branch is concave, themax principal directions will sink together, which can beseen in two areas in Figure 17(c), where the two local elliptic points are on the bark surface. From Figure 17(d), itcan be seen that the blue lines as the latitude are nearly thecross-sectional directions, and the green ones as the longitude, are nearly the growth directions of branches. This example demonstrates that the CAN can be used for theshape analysis of tree branch surfaces and tree skeleton extraction [Cheng2007], which should be a bridge to tree reconstruction and measurements.(a) (b)(c) (d) Figure 17: Curvature directions estimated by the CAN. (a). Aglobal view; (b) Zoom in to the middle rectangle area of (a); (c)Zoom in to the lower rectangle area of (a); (d) Zoom in to theupper rectangle area of (a).Briefly speaking, the CAN method can be used to estimate principal curvatures and directions with a high precision from point cloud coordinates accompanied by normal vectors. This approach is robust for point cloud datawith noise.6. Conclusions and Further WorkA new algorithm is presented for estimating the principal curvatures and principal directions on a discrete point clouddata. This algorithm, called as CAN, can be used to scattered sampled point data, and mesh vertexes data as well.(a) (b) (c) Figure 14: Point model elephant with noise level 0.50 andprincipal directions estimated by two approaches. (a). Point cloudsurface. (b). CAN. (c). Goldfeath.(a) (b)(c) Figure 15: Point model elephant with noise level 2.0 and principaldirections estimated by two approaches. (a). Point cloud surface.(b). CAN. (c). Goldfeath.(a) (b) Figure 16: Point cloud tree branch model. (a). Points. (b). Rendered model when points are connected to a mesh modelaccording point neighborhood in branch positions.。