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

 

         

imageviewocv/viewer.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp, 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 
00011 #ifndef IMAGEVIEW_OCV_VIEWER_H
00012 #define IMAGEVIEW_OCV_VIEWER_H
00013 
00014 #include <orcaice/context.h>
00015 #include <orca/image.h>
00016 
00017 // opencv headers
00018 #include <highgui.h>
00019 #include <cv.h>
00020 
00021 #include <string>
00022 
00023 namespace imageviewocv {
00025 class Viewer
00026 {
00027 public:
00028     Viewer( const int width,
00029             const int height,
00030             const std::string& format,
00031             const orcaice::Context& context );
00032     ~Viewer();
00033     
00035     void display( orca::ImageDataPtr& image );
00036 
00037 private:
00043     IplImage* cvDisplayImage_;
00044     // image structure that stores the original image format
00045     IplImage* cvSrcImage_;
00046     
00048     const char* name_;
00049     
00051     void displayFrameRate();
00052     
00054     void resize( orca::ImageDataPtr& image );
00055     
00057     orca::Time oldFrameTime_;
00058     orca::Time currentFrameTime_;
00059     double diff_;
00060     double fps_;
00062     CvFont font_;
00063 
00071     bool isPadded_;
00072         
00075     int32_t orcaByteWidth_;
00076     
00077     orcaice::Context context_;
00078 };
00079 
00080 } //namespace
00081 
00082 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5