Home
FAQ
Player
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

captureCamera.h

Go to the documentation of this file.
00001 #ifndef __CAPTURECAMERA_H__
00002 #define __CAPTURECAMERA_H__
00003 
00004 // Desc: Capture method for using CMVision with the player camera interface 
00005 // Author: Ben Grocholsky
00006 // Date: 24 Feb 2004
00007 // CVS: $Id: captureCamera.h,v 1.3 2004/09/07 00:20:39 gerkey Exp $
00008 
00009 #include <sys/mman.h>
00010 #include <sys/ioctl.h>
00011 #include <sys/time.h>
00012 #include <fcntl.h>
00013 
00014 #include <stdlib.h>
00015 #include <unistd.h>
00016 #include <stdio.h>
00017 #include <errno.h>
00018 
00019 #include "capture.h"
00020 #include "device.h"
00021 #include "devicetable.h"
00022 #include "drivertable.h"
00023 
00024 class captureCamera : public capture
00025 {
00026 
00027 /*************************
00028     CAMERA VARIABLES
00029 *************************/
00030    private: 
00031      int camera_index;
00032      player_device_id_t camera_id;
00033      Driver *camera;
00034      bool camera_open;
00035      int width,height,depth,image_size;
00036      //unsigned char * current_rgb;
00037      unsigned char * YUV;
00038      player_camera_data_t data;
00039      double camera_time;
00040   
00041  public: 
00042      captureCamera(int camera_index);
00043      virtual ~captureCamera(); 
00044 
00045      virtual bool initialize(int nwidth,int nheight);
00046      unsigned char *captureFrame();
00047      unsigned char *convertImageRgb2Yuv422(unsigned char *RGB,int NumPixels);
00048      virtual void close(){};
00049      // P2CMV needs to be able to get the image geometry
00050      int Width(){return(width);}
00051      int Height(){return(height);}
00052 };
00053 
00054 #endif

Generated on Tue May 3 14:15:33 2005 for Player by doxygen 1.3.6