howtouse.txt
来自「guide and some example with visualC++」· 文本 代码 · 共 30 行
TXT
30 行
#include <conio.h>#include <stdio.h>#include "cvcam.h"#include "..\\highgui\\highgui.h"#include "cv.h"void __cdecl callback(void* _image){ IplImage* image = (IplImage*)_image; cvLine(image, cvPoint(0, 0), cvPoint(image->width, image->height), CV_RGB(255, 0, 0), 1);}int main(){ int cameras = cvcamGetCamerasCount(); if(cameras == -1) { printf("\nNo cameras available on the system. Exiting..."); return -1; } cvcamSetProperty(0, CVCAM_PROP_CALLBACK, &callback); cvcamInit(); cvcamStart(); wait_key(0); cvcamStop(); cvcamExit(); return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?