orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

camera.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Tom Burdick, Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This distribution is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 #ifndef HYDRO_INTERFACES_CAMERA_H
00011 #define HYDRO_INTERFACES_CAMERA_H
00012 
00013 #include <string>
00014 #include <vector>
00015 #include <hydroutil/context.h>
00016 #include <hydroimage/imageformats.h>
00017 
00018 namespace hydrointerfaces 
00019 {
00020 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 class SOEXPORT Camera 
00045 {
00046 
00047 public:
00048 
00052     class Config
00053     {   
00054     public:
00055         Config(uint32_t numOfCameras);
00056         bool validate() const;
00057         std::string toString() const;
00058         bool operator==( const Config & other );
00059         bool operator!=( const Config & other );
00060 
00062         std::vector<uint32_t> widths;
00064         std::vector<uint32_t> heights;
00066         std::vector<uint32_t> sizes;
00068         std::vector<hydroimage::ImageFormat> formats;
00070         uint32_t numOfCameras;
00071     };
00072 
00074     class Data
00075     {
00076     public:
00077         Data()
00078             : haveWarnings(false)
00079             {}
00080 
00081         std::vector<unsigned char*> data;
00082         int            timeStampSec;
00083         int            timeStampUsec;
00084         bool           haveWarnings;
00086         std::string    warnings;
00087     };
00088 
00089     virtual ~Camera() {};
00090 
00094     virtual void read( Data &data )=0;
00095 
00100     virtual uint32_t availableCameras()=0;
00101 
00104     virtual std::vector<hydroimage::ImageFormat> cameraImageFormats(uint32_t camera)=0;
00105 
00106 private:
00107 
00108 };
00109 
00111 class SOEXPORT CameraFactory {
00112 public:
00113     virtual ~CameraFactory() {};
00115     virtual Camera *createDriver( const Camera::Config &config,
00116                                   const hydroutil::Context &context ) const=0;
00117 };
00118 
00120 } // namespace
00121 
00122 // Function for dynamically instantiating drivers.
00123 // A driver must have a function like so:
00124 // extern "C" {
00125 //     hydrointerfaces::LaserScanner2dFactory *createDriverFactory();
00126 // }
00127 typedef hydrointerfaces::CameraFactory *DriverFactoryMakerFunc();
00128 
00129 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5