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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

cameralogger.h

00001 // /*
00002 //  * Orca-Robotics Project: Components for robotics 
00003 //  *               http://orca-robotics.sf.net/
00004 //  * Copyright (c) 2004-2008 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 // camera logging is broken. all of image stuff requires a major overhaul
00012 #if 0
00013 
00014 #ifndef ORCA_ORCALOGFACTORY_CAMERA_LOGGER_H
00015 #define ORCA_ORCALOGFACTORY_CAMERA_LOGGER_H
00016 
00017 #include <orcaice/context.h>
00018 #include <orca/camera.h>
00019 #include <orcalog/logger.h>
00020 
00021 #ifdef OPENCV_FOUND
00022     #include <cv.h>
00023 #endif
00024 
00025 namespace orcalogfactory
00026 {
00027 
00028 class CameraLogger : public orca::CameraConsumer, public orcalog::Logger
00029 {
00030 public:
00031     CameraLogger( orcalog::LogMaster *master, 
00032                 const std::string & typeSuffix,
00033                 const std::string & format,
00034                 const std::string & filenamePrefix,
00035                 const orcaice::Context & context );
00036     virtual ~CameraLogger();
00037 
00038     // from Logger
00039     virtual void init();
00040 
00041     // reimplement from Logger because we have a custom log format
00042     virtual void createLogFile();
00043 
00044     // from *Consumer
00045     virtual void setData(const orca::CameraDataPtr& data, const Ice::Current&);
00046     
00047 private:
00048     // utility function
00049     void writeDescription( const orca::CameraDescriptionPtr& obj );
00050     
00051     // custom function to mirror ice_writeCameraData()
00052     void orca_writeCameraData( Ice::OutputStreamPtr outStreamPtr, const orca::CameraDataPtr& data, const std::string & filename );
00053 
00054     // alexm: 'data' cannot be const because we are changing it's format
00055     void writeCameraDataAsJpeg( const orca::CameraDataPtr& data, const std::string & filename );
00056 
00057     // use opencv to convert to jpg
00058    #ifdef OPENCV_FOUND
00059         IplImage* cvImage_;
00060                 //alen: directory prefix length
00061     #endif
00062 
00063         //alen: directory prefix for jpeg images
00064         std::string directoryPrefix_;
00065         int directoryPrefixLength_;
00066     int nChannels_;
00067 };
00068 } // namespace
00069 
00070 #endif
00071 
00072 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5