cam.h
来自「一个linux下的摄像头编程」· C头文件 代码 · 共 64 行
H
64 行
#ifndef _CCAMERA_H_#define _CCAMERA_H_// include video4linux#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <sys/ioctl.h>#include <linux/types.h>#include <linux/videodev.h>#include "pwc-ioct.h"// include opencv#include <cv.h>#include <ipl.h>struct pwc_leds{ int led_on; /* Led on-time; range = 0..25000 */ int led_off; /* Led off-time; idem. */};class CCamera{ public : CCamera(); ~CCamera(); bool connect(int i); void disconnect(); void capture(IplImage*); bool setSize(CvSize sz); CvSize& getSize() {return camsize;}; bool setFrameRate(int newframerate) ; bool setBlinkMode(int m) ; private: CvSize camsize; struct video_window vwin; struct video_capability vcap; int cam_fd; char* buffer; };#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?