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/hydrodisparityoglsimple/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_OGL_SIMPLE_H
00012 #define HYDRO_DISPARITY_OGL_SIMPLE_H
00013 
00014 #include <vector>
00015 
00016 #include <hydroglu/glprocess.h>
00017 #include <hydrostereocamera/gldifference.h>
00018 #include <hydrointerfaces/disparity.h>
00019 
00020 #include <QApplication>
00021 
00022 
00023 
00024 namespace disparitysimple {
00025 
00026 //
00027 // An extremely simple, error prone, but fast with the right video card, stereo correspondance driver.
00028 //
00029 class Driver : public hydrointerfaces::Disparity
00030 {
00031 
00032 public:
00033 
00034     Driver( const Config &config, const hydroutil::Context &context );
00035     virtual ~Driver();
00036     virtual void process( const Data &leftImage, const Data &rightImage, Data &outputImage );
00037     virtual bool hasEventLoop();
00038     virtual int executeEventLoop();
00039 
00040 private:
00041     QApplication app_;
00042     QGLWidget* window_;
00043 
00044     std::vector<hydroglu::GLProcessPtr> processVector_;
00045     
00046     Config config_;
00047     hydroutil::Context context_;
00048     unsigned int numOfShifts_;
00049 };
00050 
00051 // Used for dynamically loading driver
00052 class Factory : public hydrointerfaces::DisparityFactory
00053 {
00054 public:
00055     hydrointerfaces::Disparity *createDriver( const hydrointerfaces::Disparity::Config &config
00056                                                                   , const hydroutil::Context &context
00057                                                                 ) const
00058     {
00059         return new Driver( config, context );
00060     }
00061 };
00062 
00063 } // namespace
00064 
00065 // Used for dynamically loading driver
00066 extern "C" {
00067     hydrointerfaces::DisparityFactory *createDisparityDriverFactory();
00068 }
00069 
00070 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5