INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydrodrivers/hydrodisparitysimple/driver.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 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 
00011 #ifndef HYDRO_DISPARITY_SIMPLE_H
00012 #define HYDRO_DISPARITY_SIMPLE_H
00013 
00014 #include <cassert>
00015 
00016 #include <hydrointerfaces/disparity.h>
00017 
00018 namespace disparitysimple {
00019 
00020 //
00021 // An extremely simple, slow, and error prone stereo correspondance driver.
00022 //
00023 class Driver : public hydrointerfaces::Disparity
00024 {
00025 
00026 public:
00027 
00028     Driver( const Config &config, const hydroutil::Context &context );
00029     virtual ~Driver();
00030 
00031     // Computes the disparity of the two given input images
00032     virtual void process( const Data &leftImage, const Data &rightImage, Data &outputImage );
00033 
00034     virtual bool hasEventLoop() { return false; }
00035     virtual int executeEventLoop() { assert(false && "Simple Disparity Driver doesn't have an event loop"); return 0; }
00036 
00037 private:
00038     Config config_;
00039     hydroutil::Context context_;
00040 };
00041 
00042 // Used for dynamically loading driver
00043 class Factory : public hydrointerfaces::DisparityFactory
00044 {
00045 public:
00046     hydrointerfaces::Disparity *createDriver( const hydrointerfaces::Disparity::Config &config
00047                                                                   , const hydroutil::Context &context
00048                                                                 ) const
00049     {
00050         return new Driver( config, context );
00051     }
00052 };
00053 
00054 } // namespace
00055 
00056 // Used for dynamically loading driver
00057 extern "C" {
00058     hydrointerfaces::DisparityFactory *createDisparityDriverFactory();
00059 }
00060 
00061 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5