mt9v.h
Go to the documentation of this file.
1 /*********************************************************************
2 * Software License Agreement (BSD License)
3 *
4 * Copyright (c) 2009, 2010 Willow Garage, Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 * * Neither the name of the Willow Garage nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 *********************************************************************/
34 
35 #ifndef __FOREARM_CAM__MT9V_H__
36 #define __FOREARM_CAM__MT9V_H__
37 
38 #include <stdlib.h>
39 #include <stdint.h>
40 #include <boost/shared_ptr.hpp>
42 
43 #define MT9V_REG_WINDOW_WIDTH 0x04
44 #define MT9V_REG_HORIZONTAL_BLANKING 0x05
45 #define MT9V_REG_VERTICAL_BLANKING 0x06
46 #define MT9V_REG_TOTAL_SHUTTER_WIDTH 0x0B
47 #define MT9V_REG_ANALOG_GAIN 0x35
48 #define MT9V_REG_AGC_AEC_ENABLE 0xAF
49 #define MT9V_COMPANDING_MODE 0x1C
50 
51 #define MT9V_CK_FREQ 16e6
52 
53 /*
54  * Imager Modes
55  */
56 #define MT9VMODE_752x480x15b1 0
57 #define MT9VMODE_752x480x12_5b1 1
58 #define MT9VMODE_640x480x30b1 2
59 #define MT9VMODE_640x480x25b1 3
60 #define MT9VMODE_640x480x15b1 4
61 #define MT9VMODE_640x480x12_5b1 5
62 #define MT9VMODE_320x240x60b2 6
63 #define MT9VMODE_320x240x50b2 7
64 #define MT9VMODE_320x240x30b2 8
65 #define MT9VMODE_320x240x25b2 9
66 #define MT9V_NUM_MODES 10
67 
68 struct MT9VMode {
69  const char *name;
70  size_t width;
71  size_t height;
72  double fps;
73  uint16_t hblank;
74  uint16_t vblank;
75 };
76 
77 extern const struct MT9VMode MT9VModes[MT9V_NUM_MODES];
78 
79 class MT9VImager;
81 
82 // Methods return true on failure.
83 class MT9VImager
84 {
85 public:
86  virtual bool setBrightness(int brightness) = 0;
87  virtual bool setAgcAec(bool agc_on, bool aec_on) = 0;
88  virtual bool setGain(int gain) = 0;
89  virtual bool setExposure(double exposure) = 0;
90  virtual bool setMaxExposure(double exposure) = 0;
91  virtual bool setMirror(bool mirrorx, bool mirrory) = 0;
92  virtual bool setMode(int x, int y, int binx, int biny, double rate, int xoffset, int yoffset) = 0;
93  virtual bool setCompanding(bool activated) = 0;
94  virtual MT9VImagerPtr getAlternateContext() = 0;
95  virtual bool setBlackLevel(bool manual_override, int calibration_value, int step_size, int filter_length) = 0;
96  virtual std::string getModel() = 0;
97  virtual uint16_t getVersion() = 0;
98 
99  static MT9VImagerPtr getInstance(IpCamList &cam);
100 };
101 
102 #endif
uint16_t hblank
Definition: mt9v.h:73
const struct MT9VMode MT9VModes[MT9V_NUM_MODES]
Definition: mt9v.cpp:41
Definition: mt9v.h:68
uint16_t vblank
Definition: mt9v.h:74
size_t height
Definition: mt9v.h:71
size_t width
Definition: mt9v.h:70
boost::shared_ptr< MT9VImager > MT9VImagerPtr
Definition: mt9v.h:79
const char * name
Definition: mt9v.h:69
#define MT9V_NUM_MODES
Definition: mt9v.h:66
double fps
Definition: mt9v.h:72


wge100_camera
Author(s): Blaise Gassend, Patrick Mihelich, Eric MacIntosh, David Palchak
autogenerated on Mon Jun 10 2019 15:44:15