![]() |
Visual Servoing Platform
version 3.2.0
|
#include <vpDiskGrabber.h>
Public Member Functions | |
vpDiskGrabber () | |
vpDiskGrabber (const std::string &genericName) | |
vpDiskGrabber (const std::string &dir, const std::string &basename, long number, int step, unsigned int noz, const std::string &ext) | |
virtual | ~vpDiskGrabber () |
void | acquire (vpImage< unsigned char > &I) |
void | acquire (vpImage< vpRGBa > &I) |
void | acquire (vpImage< float > &I) |
void | acquire (vpImage< unsigned char > &I, long image_number) |
void | acquire (vpImage< vpRGBa > &I, long image_number) |
void | acquire (vpImage< float > &I, long image_number) |
void | close () |
long | getImageNumber () |
void | open (vpImage< unsigned char > &I) |
void | open (vpImage< vpRGBa > &I) |
void | open (vpImage< float > &I) |
void | setBaseName (const std::string &name) |
void | setDirectory (const std::string &dir) |
void | setExtension (const std::string &ext) |
void | setGenericName (const std::string &genericName) |
void | setImageNumber (long number) |
void | setNumberOfZero (unsigned int noz) |
void | setStep (long step) |
Inherited functionalities from vpFramegrabber | |
unsigned int | getHeight () const |
unsigned int | getWidth () const |
Public Attributes | |
bool | init |
Protected Attributes | |
unsigned int | height |
unsigned int | width |
Class to grab (ie. read) images from the disk.
Defined a virtual video device. "Grab" the images from the disk. Derived from the vpFrameGrabber class.
Here an example of capture from the directory "/local/soft/ViSP/ViSP-images/cube". We want to acquire 10 images from the first named "image.0001.pgm" by steps of 2.
Definition at line 107 of file vpDiskGrabber.h.
vpDiskGrabber::vpDiskGrabber | ( | ) |
Elementary constructor.
Definition at line 43 of file vpDiskGrabber.cpp.
|
explicit |
Constructor that takes a generic image sequence as input.
Definition at line 53 of file vpDiskGrabber.cpp.
|
explicit |
Constructor.
dir | : Location of the image sequence. |
basename | : Base name of each image. |
number | : Initial image number. |
step | : Increment between two images. |
noz | : Number of zero to code the image number. |
ext | : Extension of the image file. |
Definition at line 71 of file vpDiskGrabber.cpp.
|
virtual |
void vpDiskGrabber::acquire | ( | vpImage< float > & | I | ) |
Acquire an image reading the next pfm image from the disk. After this call, the image number is incremented considering the step.
I | : The image read from a file. |
Definition at line 198 of file vpDiskGrabber.cpp.
void vpDiskGrabber::acquire | ( | vpImage< float > & | I, |
long | img_number | ||
) |
Acquire an image reading the pfm image with number img_number from the disk. After this call, the image number is incremented considering the step.
I | : The image read from a file. |
img_number | : The number of the desired image. |
Definition at line 282 of file vpDiskGrabber.cpp.
|
virtual |
Acquire an image reading the next image from the disk. After this call, the image number is incremented considering the step.
I | : The image read from a file. |
Implements vpFrameGrabber.
Definition at line 143 of file vpDiskGrabber.cpp.
void vpDiskGrabber::acquire | ( | vpImage< unsigned char > & | I, |
long | img_number | ||
) |
Acquire an image reading the image with number img_number from the disk. After this call, the image number is incremented considering the step.
I | : The image read from a file. |
img_number | : The number of the desired image. |
Definition at line 226 of file vpDiskGrabber.cpp.
Acquire an image reading the next image from the disk. After this call, the image number is incremented considering the step.
I | : The image read from a file. |
Implements vpFrameGrabber.
Definition at line 170 of file vpDiskGrabber.cpp.
Acquire an image reading the image with number img_number from the disk. After this call, the image number is incremented considering the step.
I | : The image read from a file. |
img_number | : The number of the desired image. |
Definition at line 254 of file vpDiskGrabber.cpp.
|
virtual |
Not useful.
Here for compatibility issue with the vpFrameGrabber class.
Implements vpFrameGrabber.
Definition at line 308 of file vpDiskGrabber.cpp.
|
inlineinherited |
Return the number of rows in the image.
Definition at line 113 of file vpFrameGrabber.h.
|
inline |
Return the current image number.
Definition at line 142 of file vpDiskGrabber.h.
|
inlineinherited |
Return the number of columns in the image.
Definition at line 115 of file vpFrameGrabber.h.
void vpDiskGrabber::open | ( | vpImage< float > & | I | ) |
Read the first image of the sequence. The image number is not incremented.
Definition at line 121 of file vpDiskGrabber.cpp.
|
virtual |
Read the first image of the sequence. The image number is not incremented.
Implements vpFrameGrabber.
Definition at line 83 of file vpDiskGrabber.cpp.
Read the first image of the sequence. The image number is not incremented.
Implements vpFrameGrabber.
Definition at line 101 of file vpDiskGrabber.cpp.
void vpDiskGrabber::setBaseName | ( | const std::string & | name | ) |
Set the image base name.
Definition at line 328 of file vpDiskGrabber.cpp.
void vpDiskGrabber::setDirectory | ( | const std::string & | dir | ) |
Set the main directory name (ie location of the image sequence)
Definition at line 323 of file vpDiskGrabber.cpp.
void vpDiskGrabber::setExtension | ( | const std::string & | ext | ) |
Set the image extension.
Definition at line 333 of file vpDiskGrabber.cpp.
void vpDiskGrabber::setGenericName | ( | const std::string & | genericName | ) |
Definition at line 353 of file vpDiskGrabber.cpp.
void vpDiskGrabber::setImageNumber | ( | long | number | ) |
Set the number of the image to be read.
Definition at line 338 of file vpDiskGrabber.cpp.
void vpDiskGrabber::setNumberOfZero | ( | unsigned int | noz | ) |
Set the step between two images.
Definition at line 351 of file vpDiskGrabber.cpp.
void vpDiskGrabber::setStep | ( | long | step | ) |
Set the step between two images.
Definition at line 347 of file vpDiskGrabber.cpp.
|
protectedinherited |
Number of rows in the image.
Definition at line 106 of file vpFrameGrabber.h.
Referenced by vpDirectShowGrabber::getFormat().
|
inherited |
Set to true if the frame grabber has been initialized.
Definition at line 103 of file vpFrameGrabber.h.
|
protectedinherited |
Number of columns in the image.
Definition at line 107 of file vpFrameGrabber.h.
Referenced by vpDirectShowGrabber::getFormat().