Registering a generic video module to the video input module

Before you can get a video buffer, you have to subscribe to the Video Input Module, providing the image format your process requires.

// First you have to choose a name for your GVM string GVM_name = "tutorial_GVM"; // Then specify the resolution among : kVGA ( 640 * 480 ), kQVGA ( 320 * 240 ), // kQQVGA ( 160 * 120 ). // (For definitions, have a look at alvisiondefinitions.h and alimage.h) int resolution = kVGA; // Then specify the color space desired among : kYuvColorSpace, kYUVColorSpace, // kYUV422InterlacedColorSpace, kRGBColorSpace. int colorSpace = kRGBColorSpace; // Finally, select the minimal number of frames per second (fps) that your // vision module required among : 5, 10, 15, and 30 fps. // (note: this field has no effect right now but will be implemented in a future version) int fps = 15; // You only have to call the "subscribe" function with those parameters and the // VIM will be responsible for driver initialisation and buffer's management. GVM_name = cameraProxy->call<std::string>( "subscribe", GVM_name, resolution, colorSpace, fps ); // Or use the specific video proxy for better efficiency GVM_name = cameraProxy->subscribe(GVM_name, resolution, colorSpace, fps);





Copyright © 2010 Aldebaran-Robotics - All rights reserved