摘要:
1、Mat::typeReturns the type of a matrix element.C++: int Mat::type() constThe method returns a matrix element type. This is an identifier compatible with the CvMat type system, like CV_16SC3or 16-bit signed 3-channel array, and so on.2、Mat::depthReturns the depth of a matrix element.C++: int Mat::de 阅读全文
随笔档案-2012年03月
OpenCV计算sobel算子梯度值(2范数)(调试问题及分析)
2012-03-21 12:13 by 星空下, 5000 阅读, 收藏,
摘要:
先贴源代码,及问题;src=imread("lena.jpg");//转换为灰度图像cvtColor(src,src_gray,CV_RGB2GRAY);//创建X、Y方向梯度图像变量Matgrad_x,grad_y;Matabs_grad_x,abs_grad_y;//梯度绝对值//X方向梯度并取绝对值Sobel(src_gray,grad_x,ddepth,1,0,3,scale,delta,BORDER_DEFAULT);convertScaleAbs(grad_x,abs_grad_x);//Y方向梯度并取绝对值Sobel(src_gray,grad_y,ddept 阅读全文
OpenCV2.3.1在Ubuntu11.10下Qt配置
2012-03-20 09:07 by 星空下, 1116 阅读, 收藏,
摘要:
早期版本配置(可参考资源)在保证Opencv安装配置正确的前提下 ,安装配置可参考Opencv中文论坛,以及google、百度。qt先配置的核心是设置qmake环境;具体有两种设置方法,一种是在工程文件中设置;另一种是在默认qmake配置中设置;两种方式设置的内容是一致的,具体如下:方式一:直接打开工程文件.pro,添加设置; 方式二:首先编辑qmake.conf配置文件; sudogedit/usr/share/qt4/mkspecs/default/qmake.conf添加设置(针对2.3.1,具体添加内容可参见文件夹/usr/local/include和/usr/local/lib下Op 阅读全文
浙公网安备 33010602011771号