OpenCV Error: Bad argument (unrecognized or unsupported array type) in u unction
摘要:今天遇到个错误: 在程序退出的时候 提示报错OpenCV Error: Bad argument (unrecognized or unsupported array type) in uunction, file ..\..\..\src\opencv\modules\core\src\array.cpp, line 996然后上代码int _tmain(int argc, _TCHAR* argv[]){ IplImage* src = 0; //原图 IplImage* graySrc = 0; //灰度图 int key = 0...
阅读全文
posted @
2013-04-13 16:51
mathore
阅读(2431)
推荐(0)
opencv 获取按键cvWaitkey()
摘要:cvWaitKey()是opencv中经常用到而且很好用的一个函数函数定义CV_EXPORTS_W int waitKey(int delay=0);Highgui_c.h中/* wait for key event infinitely (delay<=0) or for "delay" milliseconds */CVAPI(int) cvWaitKey(int delay CV_DEFAULT(0));waitkey灵活运用注意如下几点1.当参数delay中为负,则无穷等待2.否则等待delay ms.3.返回值是按键值 否则返回-14.当参数为空,则一直等待
阅读全文
posted @
2013-04-12 17:22
mathore
阅读(10018)
推荐(0)
opencv 从摄像头获取图片并显示灰度图
摘要:opencv关于摄像头的几个api/* start capturing frames from camera: index = camera_index + domain_offset (CV_CAP_*) */CVAPI(CvCapture*) cvCreateCameraCapture( int index );/* grab a frame, return 1 on success, 0 on fail. this function is thought to be fast */CVAPI(int) cvGrabFrame( CvCapture* capt...
阅读全文
posted @
2013-04-08 22:00
mathore
阅读(3609)
推荐(0)