opt_nm33_camera.h
Go to the documentation of this file.
1 /* */
2 /* This code is based on luvcview_wr_100823 from Opt corp. */
3 /* */
4 /* 2010/09/15 k-okada@jsk.t.u-tokyo.ac.jp */
5 
6 #include "opt_nm33_uvc.h"
7 
8 #include <opencv/cv.h>
9 #include <opencv/highgui.h>
10 
12 {
13 private:
14  struct buffer {
15  void *start;
16  size_t length;
17  } *buffers;
18  unsigned int n_buffers;
20  int width, height;
21  int fd;
22 
23  bool v4l2_set_ioctl(int selector, int value);
24  int v4l2_get_ioctl(int selector);
25 
26  bool getXuValue(int selector, const char *str);
27  bool getXuValue(int selector, short *value);
28  bool setXuValue(int selector, char value);
29  bool setXuValue(int selector, short v1, short v2);
30  bool setXuValue(int selector, short v1, short v2, short v3, short v4, short v5);
31  bool xu_ioctl(int selector, int ctrl, void* value);
32 
33 public:
34  OptNM3xCamera(int camera_index);
36 
37  void device_open(int camera_index);
38  void device_close();
39  IplImage *read_frame();
40 
41  // obtaining images
42  IplImage *queryFrame ();
43  IplImage *queryOmniFrame ();
44  IplImage *queryWideFrame ();
45  IplImage *queryMiddleFrame ();
46  IplImage *queryNarrowFrame ();
47 
48  void getOmniImage (IplImage *frame, CvMat &subframe);
49  void getWideImage (IplImage *frame, CvMat &subframe);
50  void getMiddleImage (IplImage *frame, CvMat &subframe);
51  void getNarrowImage (IplImage *frame, CvMat &subframe);
52 
53  // set commands
54  bool setMode (int mode);
55 
56  // ct command
57  bool setAutoExposure(bool mode);
58  bool setExposure (int value);
59  bool setIris(int value);
60  bool setBrightness(int value);
61  bool setSharpness(int value);
62  bool setWhitebalance(int value);
63  bool setAutoWhitebalance(bool mode);
64  bool setPanAbsolute(double value);
65  bool setTiltAbsolute(double value);
66  bool setRollAbsolute(double value);
67  bool setZoomAbsolute(double value);
68  bool setPanAbsolute(int value);
69  bool setTiltAbsolute(int value);
70  bool setRollAbsolute(int value);
71  bool setZoomAbsolute(int value);
72 
73  // xu command
74  std::string getFirmwareVersion();
75  bool setFlipScreen(char value);
76  bool setSmallHemisphere(char value);
77  bool setMedianFilter(bool mode);
78  bool setJpegQuality(char value);
79  std::string getSerialID();
80  bool setInfoDisplay(bool mode);
81  bool setCaptureFPS(short value);
82  short getActualFPS();
83  bool setLensType(char value);
84  bool setPanAbsolute(int no, int value);
85  bool setTiltAbsolute(int no, int value);
86  bool setRollAbsolute(int no, int value);
87  bool setZoomAbsolute(int no, int value);
88  bool setLocationAbsolute(int no, int pan, int tilt, int roll, int zoom);
89  //
90 };
std::string getFirmwareVersion()
bool getXuValue(int selector, const char *str)
bool setTiltAbsolute(double value)
bool setXuValue(int selector, char value)
bool setRollAbsolute(double value)
bool setLensType(char value)
IplImage * queryFrame()
IplImage * queryOmniFrame()
IplImage * frame_omni
IplImage * queryWideFrame()
IplImage * read_frame()
bool xu_ioctl(int selector, int ctrl, void *value)
bool setWhitebalance(int value)
bool setBrightness(int value)
bool setFlipScreen(char value)
std::string getSerialID()
IplImage * queryNarrowFrame()
IplImage * frame_narrow
bool setCaptureFPS(short value)
bool setAutoExposure(bool mode)
bool setExposure(int value)
bool setMode(int mode)
void getOmniImage(IplImage *frame, CvMat &subframe)
bool setSharpness(int value)
IplImage * frame
int v4l2_get_ioctl(int selector)
void getNarrowImage(IplImage *frame, CvMat &subframe)
bool setZoomAbsolute(double value)
void device_open(int camera_index)
bool setPanAbsolute(double value)
void getMiddleImage(IplImage *frame, CvMat &subframe)
IplImage * frame_middle
bool v4l2_set_ioctl(int selector, int value)
bool setLocationAbsolute(int no, int pan, int tilt, int roll, int zoom)
bool setJpegQuality(char value)
void getWideImage(IplImage *frame, CvMat &subframe)
bool setSmallHemisphere(char value)
struct OptNM3xCamera::buffer * buffers
bool setInfoDisplay(bool mode)
OptNM3xCamera(int camera_index)
IplImage * frame_wide
bool setIris(int value)
bool setMedianFilter(bool mode)
bool setAutoWhitebalance(bool mode)
unsigned int n_buffers
IplImage * queryMiddleFrame()


opt_camera
Author(s): Kei Okada
autogenerated on Wed Jul 10 2019 03:47:11