基于图像的工件曲面重建关键技术研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
在生产实践中,表面处理工艺的方法和技术水平越来越占据重要地位。喷涂是一个典型的表面处理工艺,对于喷涂机器人离线编程系统的研究越来越引起人们的重视,研究的核心是喷涂轨迹的生成与优化模块,其前提是工件表面CAD模型已知。而在实际的生产实践中,往往会遇到未知曲面CAD模型的喷涂问题,在未知曲面情况下,关于机器人离线编程系统的研究很少。因此,基于被动机器视觉技术,对于表面处理领域中未知曲面三维重建技术的研究,在理论和实践中都具有重要的意义。本文在快速制造理念下,针对未知曲面喷涂离线编程的需求,面向喷涂领域,阐述了基于图像的立体视觉理论,提出并实现了未知曲面三维模型重建算法,首先对已标定图像进行校正,然后采用基于GPU硬件加速的并行信任传播算法进行深度图的生成,实时获取未知曲面的点云数据,从而获取曲面的CAD模型。将基于图像的立体视觉技术应用于工程喷涂领域,其关健技术在于立体视觉,具体有几个方面的因素:第一,摄像机的标定精度,直接影响了后续的深度图生成和三维空间距离的测量精度,在计算机视觉领域是一个较为关键的问题。第二,立体匹配的精度,在计算机视觉领域,立体匹配是被公认为难度非常大的问题,其匹配精度和速度往往不能两全。第三,立体匹配的速度,立体匹配算法目前很多,精度高的速度较慢,速度快的精度差,目前的立体区配算法生成一幅视差图的时间不等,从最快的几毫秒,到最慢的二十分钟以上。为了适应工程领域对立体视觉快速、精确的要求,本文的工作重点集中在立体视觉系统的标定与立体匹配算法上。本文提出了如下几个标定与立体匹配算法:
     (1)基于支持向量机的角点检测方法。摄像机标定是立体视觉测量的关键技术,标定精度直接影响着视觉测量和三维重建的精度。现已有许多摄像机标定方法,但普遍存在的一个问题是靶标图像的角点检测不很准确。本文基于支持向量机理论,利用支持向量机的学习和分类能力,将支持向量分类器用于标定图像角点的检测,实验验证可取得较好的检测结果。
     (2)结合图像梯度和亮度的并行信任传播算法。立体匹配是视觉测量的关键技术。对立体匹配问题建立马尔可夫随机场模型,使用并行的多尺度信任传播算法求解马尔可夫随机场的能量最小化问题。在传统串行算法基础上利用CUDA技术实现了并行计算,并结合图像的梯度和亮度信息计算能量函数的数据项,平滑项采用两个相邻像素视差的绝对差度量。以标准的Middlebury立体数据集作为输入,实验结果表明:算法具有很好的实时性能,运行时间远小于传统的串行算法,深度图具有良好的精度。
     (3)最近邻搜索立体匹配算法。本文提出一个高效的立体匹配算法,将常用的一维相似性度量转换为多维的相似性度量,视差搜索空间从一维空间转换为多维空间。以KD-树作为数据存贮结构,利用最近邻搜索算法,可快速生成一幅初始视差图,然后利用一个基于分割的优化算法进行优化,最终获得一幅精度较高的视差图。
     最后采用本文提出的算法对工件曲面进行了重建,验证了方法的可行性。
Spray painting is an important process in the manufacture of many durable products,such as automobiles, furniture and appliances. Many works focus on this area when CADmodel of work piece is kown. In this paper, we focus on the surface reconstruction of workpiece based on images. The key technology of surface reconstruction is camera calibrationand stereo matching algorithm. Although, many global stereo matching methods, such asgraph cuts, belief propagation and object stereo, have achieved excellent performance, theyare troubled by computational complexity or varied parameters. Belief propagation stereomatching requires many iterations to ensure convergence of the message values. Thematching result is affected by parameters directly. However, proper parameters vary with datawhich is commonly intensity differences. Many excellent stereo matching methods are limitedto vision applications due to their computational complexity. Some algorithms take a longtime (even over20minutes) to obtain a disparity map on a pair of reasonable size images.
     In order to achive the good performance in the area of engineering, this work address thekey problem of computer vision, such as camera calibration and stereo matching. Takingaccuracy and effient of algorithm into consideration, we present a corner detection methodbased on surport vector machine and two stereo matching algorithms as follows:
     (1). Camera calibration is key process in stereo vision. There exist many stereocalibration methods at present. However, a common problem is the corner detection. Wedetect corner of calibration pattern with suport vector classification.
     (2). Stereo matching is critical technology in vision measurement. MRF models areestablished to do with stereo problem. A parallel multi-scale belief propagation algorithm isused for MRF energy minimization and generating disparity map. Parallel algorithm isimplemented based on traditional sequential algorithm with CUDA technology. In energyfunction, data term is conjugated with Gradient and intensity of images, smooth term ismeasured with the absolute difference of disparities between two adjacent pixels. Withstandard Middlebury stereo data sets as input, experiments show that the proposed algorithmhas good real-time performance;Running time is much less than the traditional sequentialalgorithm and the generated disparity map is excellent.
     (3). We present an efficient stereo matching algorithm. Given two grayscale stereoimages, each pixel of them is encoded as a multidimensional point for stereo matching problem. These multidimensional points in the right image are used to build kd-trees. Thenearest neighbor searching is performed on the multidimensional space and an initial disparitymap is generated. Furthermore, a segment-based refinement approach is applied to generate amore accurate disparity map. Experimental results show that our algorithm is efficient andquality.
     We reconstruct a workpiece surface from a pair of rectified images with proposedalgorithms. The experiments illustrate that the method is feasible.
引文
[1] Conner D C, Greenfield A, Atkar P N, et al. Paint deposition modeling fortrajectory planning on automotive surfaces[J]. Automation Science andEngineering, IEEE Transactions on,2005,2(4):381–392.
    [2] Chen H, Sheng W, Xi N, et al. CAD-based automated robot trajectory planningfor spray painting of free-form surfaces[J]. Industrial Robot: An InternationalJournal,2002,29(5):426–433.
    [3]曾勇,龚俊,陆保印.面向直纹曲面的喷涂机器人喷枪轨迹优化[J].中国机械工程,2010,17.
    [4]曾勇,龚俊.面向自然二次曲面的喷涂机器人喷枪轨迹优化[J].中国机械工程,2011,22(003):282–290.
    [5] Szeliski R, Zabih R, Scharstein D, et al. A comparative study of energyminimization methods for markov random fields with smoothness-basedpriors[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence,2007:1068–1080.
    [6] Boykov Y, Veksler O, Zabih R. Fast approximate energy minimization viagraph cuts[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence,2001,23(11):1222–1239.
    [7] Kolmogorov V, Zabih R. What energy functions can be minimized via graphcuts?[J]. Computer Vision—ECCV2002,2002:185–208.
    [8] Boykov Y, Kolmogorov V. An experimental comparison of min-cut/max-flowalgorithms for energy minimization in vision[J]. Pattern Analysis and MachineIntelligence, IEEE Transactions on,2004,26(9):1124–1137.
    [9] Tappen M F, Freeman W T. Comparison of graph cuts with belief propagationfor stereo, using identical MRF parameters[A]. Ninth IEEE InternationalConference on Computer Vision,2003. Proceedings[C].2003:900–906.
    [10] Wainwright M J, Jaakkola T S, Willsky A S. MAP estimation via agreement ontrees: message-passing and linear programming[J]. Information Theory, IEEETransactions on,2005,51(11):3697–3717.
    [11] Kolmogorov V. Convergent tree-reweighted message passing for energyminimization[J]. IEEE Transactions on Pattern Analysis and MachineIntelligence,2006,28(10):1568–1583.
    [12] Zach C, Gallup D, Frahm J M. Fast gain-adaptive KLT tracking on the GPU[J].2008.
    [13] Zach C. Fast and high quality fusion of depth maps[A]. Proc. of InternationalSymposium on3D Data Processing, Visualization, and Transmission[C].2008.
    [14] Zach C, Pock T, Bischof H. A globally optimal algorithm for robust TV-L1range image integration[J].2007.
    [15] Sormann M, Zach C, Bauer J, et al. Watertight multi-view reconstruction basedon volumetric graph-cuts[J]. Image Analysis,2007:393–402.
    [16] Lempitsky V, Blake A, Rother C. Image segmentation by branch-and-mincut[J].Computer Vision–ECCV2008,2008:15–29.
    [17] Campbell N, Vogiatzis G, Hernández C, et al. Using multiple hypotheses toimprove depth-maps for multiview stereo[A]. Proc.10th Europ. Conf. onComputer Vision (ECCV)[C].2008.
    [18] Vogiatzis G, Torr P H., Cipolla R. Multi-view stereo via volumetricgraph-cuts[J].2005.
    [19] Campbell N D F, Vogiatzis G, Hernandez C, et al. Automatic3D objectsegmentation in multiple views using volumetric graph-cuts[J]. Image andVision Computing,2010,28(1):14–25.
    [20] Motai Y, Kak A. An interactive framework for acquiring vision models of3-Dobjects from2-D images[J]. Systems, Man, and Cybernetics, Part B:Cybernetics, IEEE Transactions on,2004,34(1):566–578.
    [21]张永军,张祖勋,张剑清.基于序列图像的工业钣金件三维重建与视觉检测[J].清华大学学报:自然科学版,2004,44(004):534–537.
    [22]张可.基于双目立体视觉原理的自由曲面三维重构[D].武汉,华中科技大学,2005.
    [23] Hartley R I. Theory and practice of projective rectification[J]. InternationalJournal of Computer Vision,1999,35(2):115–127.
    [24] Hartley R, Zisserman A. Multiple view geometry in computer vision[J].2000.
    [25] Loop C, Zhang Z. Computing rectifying homographies for stereo vision[A].Computer Vision and Pattern Recognition,1999. IEEE Computer SocietyConference on.[C].1999,1.
    [26] Fusiello A, Trucco E, Verri A. A compact algorithm for rectification of stereopairs[J]. Machine Vision and Applications,2000,12(1):16–22.
    [27] Isgro F, Trucco E. Projective rectification without epipolar geometry[A].cvpr[C].1999:1094.
    [28] Mallon J, Whelan P F. Projective rectification from the fundamental matrix[J].Image and Vision Computing,2005,23(7):643–650.
    [29]林国余,张为公.一种无需基础矩阵的鲁棒性极线校正算法[J].中国图象图形学报,2006,11(002):203–209.
    [30] Gao S, Lu H Q. A Fast Algorithm for Delaunay based SurfaceReconstruction[A]. the11th International Conference in Central Europe onComputer Graphics, Visualization and Computer Vision (WSCG2003)[C].2003.
    [31] He L, Luo C, Zhu F, et al. Depth map regeneration via improved graph cutsusing a novel omnidirectional stereo sensor[J].2007.
    [32]韦虎,张丽艳,张辉.双目立体测量中多视角深度图同时融合算法[J].计算机辅助设计与图形学学报,2008,20(011):1446–1451.
    [33]王永波,盛业华,闾国年, et al.基于Delaunay规则的无组织采样点集表面重建方法[J].中国图象图形学报,2007,12(9).
    [34]佘彦杰.基于多幅图像序列的三维重建[D].吉林大学,2006.
    [35] Roberts L G. Machine perception of three-dimensional objects[J]. Optical andelectro-optical information processing,1965.
    [36] Mackworth A K. Model-driven interpretation in intelligent vision systems[J].Perception,1976,5(3):349–390.
    [37] Marr D. Vision[M]. WH Freeman and Company, New York,1982.
    [38] Binford T O. Visual perception by computer[A]. IEEE conference on Systemsand Control[C].1971,261:262.
    [39]张广军.机器视觉[M].科学出版社,2005.
    [40] Abdel-Aziz Y I, Karara H M. Direct linear transformation from comparatorcoordinates into object space coordinates[A]. Proc. ASP/UI Symposium onClose-range Photogrammetry[C].1971:1–18.
    [41] Tsai R Y. An efficient and accurate camera calibration technique for3Dmachine vision[A]. Proc. IEEE Conf. on Computer Vision and PatternRecognition,1986[C].1986.
    [42] Zhang Z. A flexible new technique for camera calibration[J]. Pattern Analysisand Machine Intelligence, IEEE Transactions on,2000,22(11):1330–1334.
    [43]杨长江,孙凤梅,胡占义.基于平面二次曲线的摄像机标定[J]. CHINESEJOURNAL OF COMPUTERS,2000,23(5).
    [44] Vapnik V N. Statistical learning theory[J].1998.
    [45] Vapnik V N. The nature of statistical learning theory[M]. Springer Verlag,2000.
    [46]何俊学.基于支持向量机的软件可靠性模型研究[D].兰州理工大学,2009.
    [47] Garage W. OpenCV[EB/OL].2011/2011-09-20.http://sourceforge.net/projects/opencvlibrary/.
    [48] Velizhev A. The GML C++Camera Calibration Toolbox[EB/OL].2011/2011-09-20.http://research.graphicon.ru/calibration/gml-c-camera-calibration-toolbox-5.html.
    [49] Loper M. CamChecker[EB/OL].2011/2011-09-20.http://matt.loper.org/CamChecker/CamChecker_docs/html/index.html.
    [50] Bouguet J-Y. Camera Calibration Toolbox for Matlab[EB/OL].2011/2011-09-20. http://www.vision.caltech.edu/bouguetj/calib_doc/.
    [51] Seitz S M, Curless B, Diebel J, et al. A comparison and evaluation ofmulti-view stereo reconstruction algorithms[J].2006.
    [52] Felzenszwalb P F, Huttenlocher D P. Efficient belief propagation for earlyvision[J]. International journal of computer vision,2006,70(1):41–54.
    [53] Chai D, Peng Q. Bilayer stereo matching[A]. Computer Vision,2007. ICCV2007. IEEE11th International Conference on[C].2007:1–8.
    [54] Chai D, Peng Q. Bilayer stereo matching[A]. Computer Vision,2007. ICCV2007. IEEE11th International Conference on[C].2007:1–8.
    [55]郑志刚.高精度摄像机标定和鲁棒立体匹配算法研究[D].中国科学技术大学,2008.
    [56]王昕,马岩,杨剑, et al.区域立体匹配算法的实现及改进[J].光学精密工程,2008,16(10):2002.
    [57] Freeman W T, Pasztor E C, Carmichael O T. Learning low-level vision[J].International journal of computer vision,2000,40(1):25–47.
    [58] Besag J. On the statistical analysis of dirty images[J]. Journal of RoyalStatistics Society,1986,48(3):259–302.
    [59] German S, German D. Stochastic relaxation, Gibbs distribution, and theBayesian restoration of images[J]. IEEE Trans. Pattern Anal. Mach. Intell,1984,6(9):721–741.
    [60] Barnard S T. Stochastic stereo matching over scale[J]. International Journal ofComputer Vision,1989,3(1):17–32.
    [61] Harris C, Stephens M. A combined corner and edge detector[A]. Alvey visionconference[C].1988,15:50.
    [62] Kolmogorov V, Zabih R. Computing visual correspondence with occlusions viagraph cuts[A]. International Conference on Computer Vision[C].2001,2:508–515.
    [63] Yedidia J S, Freeman W T, Weiss Y. Generalized belief propagation[J]. In NIPS13,2001.
    [64] Yedidia J S, Freeman W T, Weiss Y. Understanding belief propagation and itsgeneralizations[J]. Exploring artificial intelligence in the new millennium,2003,8:236–239.
    [65] Yedidia J S, Freeman W T, Weiss Y. Constructing free-energy approximationsand generalized belief propagation algorithms[J]. IEEE Transactions onInformation Theory,2005,51(7):2282–2312.
    [66] Scharstein D, Szeliski R. A taxonomy and evaluation of dense two-frame stereocorrespondence algorithms[J]. International journal of computer vision,2002,47(1):7–42.
    [67] Chou P B, Brown C M. The theory and practice of Bayesian image labeling[J].International Journal of Computer Vision,1990,4(3):185–210.
    [68] Boykov Y Y, Jolly M P. Interactive graph cuts for optimal boundary®ionsegmentation of objects in ND images[A]. Computer Vision,2001. ICCV2001.Proceedings. Eighth IEEE International Conference on[C].2001,1:105–112.
    [69] Rother C, Kolmogorov V, Blake A. Grabcut: Interactive foreground extractionusing iterated graph cuts[A]. ACM Transactions on Graphics (TOG)[C].2004,23:309–314.
    [70] Agarwala A, Dontcheva M, Agrawala M, et al. Interactive digitalphotomontage[A]. ACM Transactions on Graphics (TOG)[C].2004,23:294–302.
    [71] NVIDIA. NVIDIA CUDA C Programming Guide Version3.3[EB/OL].2011/2011-10-01. http://www.nvidia.com/object/cuda.
    [72] Brunton A, Shu C, Roth G. Belief propagation on the GPU for stereo vision[A].Third Canadian Conference on Computer and Robot Vision[C].2006.
    [73] Yang Q, Wang L, Yang R, et al. Real-time global stereo matching usinghierarchical belief propagation[A]. The British Machine Vision Conference[C].2006:989–998.
    [74] Veksler O. Stereo correspondence with compact windows via minimum ratiocycle[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence,2002:1654–1660.
    [75] Veksler O. Fast variable window for stereo correspondence using integralimages[J].2003.
    [76] Agrawal M, Davis L S. Window-based, discontinuity preserving stereo[J].2004.
    [77] Bleyer M, Rhemann C, Rother C. PatchMatch Stereo-Stereo Matching withSlanted Support Windows[J]..
    [78] Hong L, Chen G. Segment-based stereo matching using graph cuts[J].2004.
    [79] Kolmogorov V, Zabih R. Multi-camera scene reconstruction via graph cuts[J].Computer Vision—ECCV2002,2002:8–40.
    [80] Sun J, Shum H Y, Zheng N N. Stereo matching using belief propagation[J].Computer Vision—ECCV2002,2002:450–452.
    [81] Klaus A, Sormann M, Karner K. Segment-based stereo matching using beliefpropagation and a self-adapting dissimilarity measure[A]. Pattern Recognition,2006. ICPR2006.18th International Conference on[C].2006,3:15–18.
    [82] Veksler O. Stereo correspondence by dynamic programming on a tree[J].2005.
    [83] Forstmann S, Kanou Y, Ohya J, et al. Real-time stereo by using dynamicprogramming[J].2004.
    [84] Lei C, Selzer J, Yang Y H. Region-tree based stereo using dynamicprogramming optimization[A]. Computer Vision and Pattern Recognition,2006IEEE Computer Society Conference on[C].2006,2:2378–2385.
    [85] Lee S H, Leou J J. A dynamic programming approach to line segment matchingin stereo vision[J]. Pattern Recognition,1994,27(8):961–986.
    [86] Pascual Starink J, Backer E. Finding point correspondences using simulatedannealing[J]. Pattern Recognition,1995,28(2):231–240.
    [87] Barnard S T. Stereo matching by hierarchical, microcanonical annealing[R].DTIC Document,1987.
    [88] Bleyer M, Rother C, Kohli P, et al. Object Stereo—Joint Stereo Matching andObject Segmentation[A]. Proceedings of IEEE International Conference onComputer Vision and Pattern Recognition. Los Alamitos: IEEE ComputerSociety Press[C].2011.
    [89] Bentley J L. Multidimensional divide-and-conquer[J]. Communications of theACM,1980,23(4):214–229.
    [90] Bentley J L. Multidimensional binary search trees used for associativesearching[J]. Communications of the ACM,1975,18(9):509–517.
    [91] Friedman J H, Bentley J L, Finkel R A. An algorithm for finding best matches inlogarithmic expected time[J]. ACM Transactions on Mathematical Software(TOMS),1977,3(3):209–226.
    [92] Arya S, Mount D M. Algorithms for fast vector quantization[A]. DataCompression Conference,1993. DCC’93.[C].1993:381–390.
    [93] Comaniciu D, Meer P. Mean shift: A robust approach toward feature spaceanalysis[J]. Pattern Analysis and Machine Intelligence, IEEE Transactions on,2002,24(5):603–619.
    [94] Felzenszwalb P F, Huttenlocher D P. Efficient graph-based imagesegmentation[J]. International Journal of Computer Vision,2004,59(2):167–181.
    [95] Yaniv Z. Random Sample Consensus (RANSAC) Algorithm, A GenericImplementation[J]. Imaging,2010.
    [96] Egnal G, Wildes R P. Detecting binocular half-occlusions: Empiricalcomparisons of five approaches[J]. Pattern Analysis and Machine Intelligence,IEEE Transactions on,2002,24(8):1127–1133.
    [97] Hirschmuller H, Scharstein D. Evaluation of cost functions for stereomatching[A]. IEEE Conference on Computer Vision and Pattern Recognition,2007. CVPR’07[C].2007:1–8.
    [98] Okada S, Imade M, Miyauchi H, et al.3-D shape measurement of free-formmachined surfaces by optical ring imaging system[A]. Industrial ElectronicsSociety,1998. IECON’98. Proceedings of the24th Annual Conference of theIEEE[C].1998,3:1284–1289.
    [99] Rodella R, Sansoni G.3D Shape Recovery and Registration based on theProjection of Non Coherent Structured Light[A].3dim[C].1999:0077.
    [100]单东日,柯映林.反求工程中复杂曲面测量规划研究[J].中国机械工程,2003,14(001):9–12.
    [101]石照耀,谢华锟,费业泰.复杂曲面测量模式与关键技术[J].工具技术,2000,34(11):31–34.
    [102]丁汉,朱利民,熊振华.复杂曲面快速测量,建模及基于测量点云的RP和NC加工[J].机械工程学报,2003,39(011):28–37.
    [103]刘祚时,倪潇娟.三坐标测量机(CMM)的现状和发展趋势[J].机械制造,2004,42(008):32–34.
    [104]汪平平,费业泰,林慎旺.柔性三坐标测量臂的标定技术研究[J].西安交通大学学报,2006,40(3):284–288.
    [105]杨洪涛,费业泰,陈晓怀.纳米三坐标测量机不确定度分析与精度设计[J].重庆大学学报(自然科学版),2006,29(8).
    [106]陈飞.基于三坐标测量机的曲面逆向工程研究[J].机床与液压,2007,35(008):172–174.
    [107] Pauly M, Gross M, Kobbelt L P. Efficient simplification of point-sampledsurfaces[A]. Visualization,2002. VIS2002. IEEE[C].2002:163–170.
    [108] Moenning C, Dodgson N A. A new point cloud simplification algorithm[A].Proceedings3rd IASTED Conference on Visualization, Imaging and ImageProcessing[C].2003.
    [109] Moenning C, Dodgson N A. Intrinsic point cloud simplification[J]. Proc.14thGrahiCon,2004,14.
    [110] Sindhwani V, Niyogi P, Belkin M. Beyond the point cloud: from transductive tosemi-supervised learning[A]. Proceedings of the22nd international conferenceon Machine learning[C].2005:824–831.
    [111] Mémoli F, Sapiro G. A theoretical and computational framework for isometryinvariant recognition of point cloud data[J]. Foundations of ComputationalMathematics,2005,5(3):313–347.
    [112] Remondino F. From point cloud to surface: the modeling and visualizationproblem[J]. International Archives of Photogrammetry, Remote Sensing andSpatial Information Sciences,2003,34(5/W10):11.
    [113] De Berg M, Cheong O, Van Kreveld M. Computational geometry: algorithmsand applications[M]. Springer-Verlag New York Inc,2008.
    [114] Ben-Kiki O, Evans C, Ingerson B. YAML Ain’t Markup Language (YAMLTM)Version1.1[J]. yaml. org, Tech. Rep,2005.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700