orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
digiclopsgrabber.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Alex Brooks, Ben Upcroft 00005 * 00006 * This copy of Orca is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 #ifndef ORCA_DIGICLOPS_GRABBER_H 00011 #define ORCA_DIGICLOPS_GRABBER_H 00012 00013 #include "imagegrabber.h" 00014 #include "digiclops/digiclops.h" 00015 #include "triclops/triclops.h" 00016 00017 #include <vector> 00018 00019 namespace orcaimage { 00020 00021 /* 00022 @brief Wrapper for grabbing images using the the digiclops library. 00023 00024 @author Ben Upcroft b.upcroft at cas.edu.au 00025 */ 00026 00027 class DigiclopsGrabber : public ImageGrabber 00028 { 00029 00030 public: 00031 DigiclopsGrabber( const orcaice::Context& context ); 00032 virtual ~DigiclopsGrabber(); 00033 00034 // grabs frame from camera 00035 virtual int grabFrame(); 00036 // load the image grabbed from grabFrame() into a byte array 00037 virtual char* retrieveFrame(); 00038 // grabFrame() and retrieveFrame() in one. 00039 virtual char* queryFrame(); 00040 00041 // get and set properties 00042 virtual int format() const; 00043 virtual void setFormat( int format ); 00044 virtual int mode() const; 00045 virtual void setMode( int mode ); 00046 virtual double fps() const; // frames per second 00047 virtual void setFps( double fps ); 00048 00049 virtual double brightness() const; 00050 virtual void setBrightness( double brightness ); 00051 virtual double contrast() const; 00052 virtual void setContrast( double contrast ); 00053 virtual double saturation() const; 00054 virtual void setSaturation( double saturation ); 00055 virtual double hue() const; 00056 virtual void setHue( double hue ); 00057 virtual double gain() const; 00058 virtual void setGain( double gain ); 00059 00060 virtual int width() const; 00061 // this set function automatically also sets the height since there are 00062 // only 2 enumerated types which set the resolution 00063 virtual void setWidth( int width ); 00064 virtual int height() const; 00065 // this set function automatically also sets the height since there are 00066 // only 2 enumerated types which set the the resolution 00067 virtual void setHeight( int height ); 00068 // image size in bytes 00069 virtual int size() const; 00070 00071 // Not implemented yet. 00072 virtual double zoom() const { return -1.0; }; 00073 virtual void setZoom( double zoom ) {}; 00074 virtual double minZoom() const { return -1.0; }; 00075 virtual double maxZoom() const { return -1.0; }; 00076 00077 virtual double focus() const { return -1.0; }; 00078 virtual void setFocus( double zoom ) {}; 00079 virtual double minFocus() const { return -1.0; }; 00080 virtual double maxFocus() const { return -1.0; }; 00081 00082 virtual double shutter() const { return -1.0; }; 00083 virtual void setShutter( double zoom ) {}; 00084 virtual double minShutter() const { return -1.0; }; 00085 virtual double maxShutter() { return -1.0; }; 00086 00087 private: 00088 // Video capturing structure 00089 DigiclopsContext digiclopsContext_; 00090 00091 // Triclops image structure to access raw data 00092 TriclopsInput triclopsInput_; 00093 // raw data 00094 std::vector<unsigned char> data_; 00095 // raw image data size 00096 int imageSize_; 00097 00098 // digiclops errors 00099 DigiclopsError error_; 00100 00101 }; 00102 00103 } 00104 00105 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)