/home/fwph/code/wurde/modules/visionModule/resetCameras.cpp

Go to the documentation of this file.
00001 #include <1394Camera.H>
00002 #include <visionModule.H>
00003 #include <iostream>
00004 #include <vector>
00005 #include <Logger.H>
00006 
00007 using namespace RobotVision;
00008 using namespace WURDE;
00009 using namespace std;
00010 
00011 int main(int argc, char *argv[]){
00012 
00013        WURDECameraFinder cameraSource;
00014 
00015        Logger myLogger("VisionTester");
00016        int channel=0;
00017 
00018        u_int64_t id;
00019        cameraSource.init();
00020               
00021        g_debug("Getting cameras");
00022        std::vector<RobotVision::WURDE1394Camera *> cameras=cameraSource.getAllCameras();
00023        vector<WURDE1394Camera *>::iterator iter;
00024        int val=0;
00025               
00026        for(int i=0; i<cameras.size();i++){
00027                g_loginfo << "Stopping camera with id " << cameras[i]->getID() << endl;
00028                cameras[i]->stopCapture();
00029                delete cameras[i];
00030        }
00031        
00032        cameras.clear();
00033               
00034               /*
00035               WURDE1394Camera *cam=cameraSource.getCameraByID(id);
00036        g_debug("starting capture");
00037        if(!cam){
00038               g_debug("No camera");
00039        }
00040        if(cam->startCapture()){
00041               sleep(1);
00042               g_debug("Capture started successfully");
00043               for(int i=0;i<30;i++){
00044                      g_debug("Grabbing");
00045                      if(!cam->captureYUV24()){
00046                             g_debug("Shit.");
00047                      }
00048                      cam->resetFrame();                    
00049                      g_debug("Captured a frame");
00050               }       
00051        }
00052 
00053        cam->stopCapture();
00054               */
00055        return 0;
00056 
00057 }

Generated on Thu Feb 1 15:31:52 2007 for WURDE by  doxygen 1.5.1