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 <opencv2/opencv.hpp>
9 #if ( CV_MAJOR_VERSION >= 4)
10 #include <opencv2/highgui.hpp>
11 #include <opencv2/core/core_c.h>
12 #include <opencv2/core/types_c.h>
13 #endif
14 
16 {
17 private:
18  struct buffer {
19  void *start;
20  size_t length;
21  } *buffers;
22  unsigned int n_buffers;
24  int width, height;
25  int fd;
26 
27  bool v4l2_set_ioctl(int selector, int value);
28  int v4l2_get_ioctl(int selector);
29 
30  bool getXuValue(int selector, const char *str);
31  bool getXuValue(int selector, short *value);
32  bool setXuValue(int selector, char value);
33  bool setXuValue(int selector, short v1, short v2);
34  bool setXuValue(int selector, short v1, short v2, short v3, short v4, short v5);
35  bool xu_ioctl(int selector, int ctrl, void* value);
36 
37 public:
38  OptNM3xCamera(int camera_index);
40 
41  void device_open(int camera_index);
42  void device_close();
43  IplImage *read_frame();
44 
45  // obtaining images
46  IplImage *queryFrame ();
47  IplImage *queryOmniFrame ();
48  IplImage *queryWideFrame ();
49  IplImage *queryMiddleFrame ();
50  IplImage *queryNarrowFrame ();
51 
52  void getOmniImage (IplImage *frame, CvMat &subframe);
53  void getWideImage (IplImage *frame, CvMat &subframe);
54  void getMiddleImage (IplImage *frame, CvMat &subframe);
55  void getNarrowImage (IplImage *frame, CvMat &subframe);
56 
57  // set commands
58  bool setMode (int mode);
59 
60  // ct command
61  bool setAutoExposure(bool mode);
62  bool setExposure (int value);
63  bool setIris(int value);
64  bool setBrightness(int value);
65  bool setSharpness(int value);
66  bool setWhitebalance(int value);
67  bool setAutoWhitebalance(bool mode);
68  bool setPanAbsolute(double value);
69  bool setTiltAbsolute(double value);
70  bool setRollAbsolute(double value);
71  bool setZoomAbsolute(double value);
72  bool setPanAbsolute(int value);
73  bool setTiltAbsolute(int value);
74  bool setRollAbsolute(int value);
75  bool setZoomAbsolute(int value);
76 
77  // xu command
78  std::string getFirmwareVersion();
79  bool setFlipScreen(char value);
80  bool setSmallHemisphere(char value);
81  bool setMedianFilter(bool mode);
82  bool setJpegQuality(char value);
83  std::string getSerialID();
84  bool setInfoDisplay(bool mode);
85  bool setCaptureFPS(short value);
86  short getActualFPS();
87  bool setLensType(char value);
88  bool setPanAbsolute(int no, int value);
89  bool setTiltAbsolute(int no, int value);
90  bool setRollAbsolute(int no, int value);
91  bool setZoomAbsolute(int no, int value);
92  bool setLocationAbsolute(int no, int pan, int tilt, int roll, int zoom);
93  //
94 };
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 Tue May 11 2021 02:55:43