HighGUI常见操作:
窗口:
cvNamedWindow 新建窗口
cvGetWindowHandel
cvGetWindowName
cvResizeWindow 调整窗口大小
cvMoveWindow
cvDestroyWindow
cvDestroyAllWindows
cvStartWindowThread
图像:
cvLoadImage
cvSaveImage
cvShowImage
WaitKey:
waitKey
eg. waitKey(0); 无限制等待,直到用户按下一个键。
if(waitKey(100)==27) break; 告诉用户等待100ms, 当用户按Esc键(ASCII码为27)时退出。
鼠标:
cvSetMouseCallback
注:回调函数必须符合的格式
void CvMouseCallback(int event, int x, int y, int flags, void* param);
Sliders, Trackbars, Switches:
cvCreateTrackbar
cvGetTrackbarPos
cvSetTrackbarPos
注:回调函数必须符合的格式
void (*callback)(int position)
无按钮:
switch 开关
switch_off_function();
switch_on_function();
视频处理:
CvCapture* cvCreateFileCapture(const char* filename);
CvCapture* cvCreateCameraCapture(int index);
IplImage* cvQueryFrame(CvCapture* capture);
void cvReleaseCapture(CvCapture* capture);
double cvGetCaptureProperty(CvCapture* capture, int property_id);
double cvSetCaptureProperty(CvCapture* capture, int property_id, double value);
CvVideoWriter* cvCreateVideoWriter ( const char* filename, int fourcc, double fps, CvSize frame_size, int is_color=1 );
int cvWriteFrame( CvVideoWriter* writer, const IplImage* image );
void cvReleaseVideoWriter(CvVideoWriter** writer);
ConvertImage函数:
void cvConvertImage( const CvArr* src, CvArr* dst, int flags=0 );