2012年4月23日
摘要: 本文将总结一些在使用opencv+vs过程中碰到的error。 1.程序编译通过,运行时出现如下错误: 解决方法: a.可能是读取文件时出现错误,比如说读图片,视频等文件名字或路径弄错了。 2. 编译程序通过,运行时出现如下错误: 解决方法: a.可能是数据类型不对,比如说在该语句中gray_diff.at<unsigned char>(i,j)=255; 本来gray_diff中的数据类型是unsigned char的,如果你写成了gray_diff.at< int>(i,j)=255;或者是写成其它的就会报类似的错误。 3. 当编译通过,运行程序一段时间后出现如下提 阅读全文
posted @ 2012-04-23 22:11 tornadomeet 阅读(5941) 评论(0) 推荐(0) 编辑
摘要: 本文中将列出opencv需常用的最小工程,以方便今后做测试用。 工程环境为vs2010+opencv2.3.1一、opencv读取图片并显示出来: 代码为: 1 #include "stdafx.h" 2 #include <opencv2/highgui/highgui.hpp> 3 4 using namespace cv; 5 6 int main(int argc,unsigned char* argv[]) 7 { 8 Mat img_src; 9 for (;;)10 {11 img_src=imread("lena.jpg"); 阅读全文
posted @ 2012-04-23 22:01 tornadomeet 阅读(3675) 评论(0) 推荐(0) 编辑

阿萨德发斯蒂芬