摘要:
在OpenCV中大量使用了模板编程,因为图像的数据类型有8字节,16字节,32字节,float,double等多种数据类型,如果对每一种数据类型都写一遍函数,这是很糟糕的,像Point_,Rect_等等很多的基础类都是用模板写出来的,现在补一下C++模板在OpenCV中的使用方式。1.模板函数基本写法templateT fuc(T x, T y){T x;//……}typename或class没有... 阅读全文
posted @ 2014-04-25 10:52
fireae
阅读(3035)
评论(0)
推荐(0)

浙公网安备 33010602011771号