Visual Servoing Platform
version 3.6.1 under development (2024-12-13)
|
#include <visp3/sensor/vpDirectShowGrabber.h>
Public Member Functions | |
unsigned int | getHeight () |
unsigned int | getWidth () |
vpDirectShowGrabber () | |
virtual | ~vpDirectShowGrabber () |
void | open () |
void | open (vpImage< unsigned char > &I) |
void | open (vpImage< vpRGBa > &I) |
void | acquire (vpImage< unsigned char > &I) |
void | acquire (vpImage< vpRGBa > &I) |
void | close () |
unsigned int | getDeviceNumber () |
bool | setDevice (unsigned int id) |
void | displayDevices () |
bool | setImageSize (unsigned int width, unsigned int height) |
bool | setFramerate (double framerate) |
bool | setFormat (unsigned int width, unsigned int height, double framerate) |
void | getFormat (unsigned int &width, unsigned int &height, double &framerate) |
bool | getStreamCapabilities () |
bool | setMediaType (int mediaTypeID) |
int | getMediaType () |
Public Attributes | |
bool | init |
Inherited functionalities from vpFramegrabber | |
unsigned int | getHeight () const |
unsigned int | getWidth () const |
unsigned int | height |
unsigned int | width |
class for windows direct show devices
This class' goal is to totally hide the implementation of the framegrabber from the rest of the application. This is necessary to avoid conflicts between dshow's Qedit.h and Direct3D's includes.
Definition at line 64 of file vpDirectShowGrabber.h.
vpDirectShowGrabber::vpDirectShowGrabber | ( | ) |
Constructor. Initializes COM.
Definition at line 61 of file vpDirectShowGrabber.cpp.
|
virtual |
Destructor
Definition at line 66 of file vpDirectShowGrabber.cpp.
|
virtual |
Grabs a grayscale image from the video stream. Uses a semaphore to synchronize with the framegrabber callback.
I | The image to fill with the grabbed frame |
otherError | Can't grab the frame |
Implements vpFrameGrabber.
Definition at line 93 of file vpDirectShowGrabber.cpp.
Grabs a rgba image from the video stream. Uses a semaphore to synchronize with the framegrabber callback.
I | The image to fill with the grabbed frame |
otherError | Can't grab the frame |
Implements vpFrameGrabber.
Definition at line 103 of file vpDirectShowGrabber.cpp.
|
virtual |
Stops the framegrabber
Implements vpFrameGrabber.
Definition at line 108 of file vpDirectShowGrabber.cpp.
void vpDirectShowGrabber::displayDevices | ( | ) |
Displays the list of devices on the standard output
Definition at line 127 of file vpDirectShowGrabber.cpp.
unsigned int vpDirectShowGrabber::getDeviceNumber | ( | ) |
Gets the number of capture devices
Definition at line 114 of file vpDirectShowGrabber.cpp.
void vpDirectShowGrabber::getFormat | ( | unsigned int & | width, |
unsigned int & | height, | ||
double & | framerate | ||
) |
Definition at line 165 of file vpDirectShowGrabber.cpp.
References vpFrameGrabber::height, and vpFrameGrabber::width.
BEGIN_VISP_NAMESPACE unsigned int vpDirectShowGrabber::getHeight | ( | ) |
Returns the number of rows in the grabbed image
Definition at line 50 of file vpDirectShowGrabber.cpp.
|
inherited |
Return the number of rows in the image.
Definition at line 38 of file vpFrameGrabber.cpp.
References vpFrameGrabber::height.
int vpDirectShowGrabber::getMediaType | ( | ) |
Definition at line 191 of file vpDirectShowGrabber.cpp.
bool vpDirectShowGrabber::getStreamCapabilities | ( | ) |
Get the available capture formats
Definition at line 175 of file vpDirectShowGrabber.cpp.
unsigned int vpDirectShowGrabber::getWidth | ( | ) |
Returns the number of colunms in the grabbed image
Definition at line 55 of file vpDirectShowGrabber.cpp.
|
inherited |
Return the number of columns in the image.
Definition at line 43 of file vpFrameGrabber.cpp.
References vpFrameGrabber::width.
void vpDirectShowGrabber::open | ( | ) |
Creates the filter graph and select the first available device.
initializationError |
Definition at line 71 of file vpDirectShowGrabber.cpp.
|
virtual |
Creates the filter graph and select the first available device.
initializationError |
Implements vpFrameGrabber.
Definition at line 77 of file vpDirectShowGrabber.cpp.
Creates the filter graph and select the first available device.
initializationError |
Implements vpFrameGrabber.
Definition at line 83 of file vpDirectShowGrabber.cpp.
bool vpDirectShowGrabber::setDevice | ( | unsigned int | id | ) |
Set the device (or camera) from which images will be grabbed.
id | : Identifier of the device to use. |
Definition at line 122 of file vpDirectShowGrabber.cpp.
bool vpDirectShowGrabber::setFormat | ( | unsigned int | width, |
unsigned int | height, | ||
double | framerate | ||
) |
Set capture format
width | : Image width in pixel |
height | : Image height in pixel |
framerate | : Framerate in fps |
Definition at line 154 of file vpDirectShowGrabber.cpp.
References vpFrameGrabber::height, and vpFrameGrabber::width.
bool vpDirectShowGrabber::setFramerate | ( | double | framerate | ) |
Set capture framerate
framerate | : Framerate in fps |
Definition at line 145 of file vpDirectShowGrabber.cpp.
bool vpDirectShowGrabber::setImageSize | ( | unsigned int | width, |
unsigned int | height | ||
) |
Set image Size
width | : Image width |
height | : Image height |
Definition at line 135 of file vpDirectShowGrabber.cpp.
References vpFrameGrabber::height, and vpFrameGrabber::width.
bool vpDirectShowGrabber::setMediaType | ( | int | mediaTypeID | ) |
Set capture MediaType \param mediaTypeID : mediaTypeID (available in calling
getStreamCapabilities)
\return true if successful
Definition at line 184 of file vpDirectShowGrabber.cpp.
|
protectedinherited |
Number of rows in the image.
Definition at line 134 of file vpFrameGrabber.h.
Referenced by vpDiskGrabber::acquire(), vpPylonGrabberGigE::acquire(), vpPylonGrabberUsb::acquire(), vpFlyCaptureGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vp1394TwoGrabber::dequeue(), getFormat(), vpVideoReader::getFrame(), vpFrameGrabber::getHeight(), vp1394TwoGrabber::getHeight(), vpDiskGrabber::open(), vp1394CMUGrabber::open(), vpV4l2Grabber::open(), setFormat(), vp1394TwoGrabber::setFormat7ROI(), setImageSize(), vp1394CMUGrabber::setVideoMode(), vp1394TwoGrabber::setVideoMode(), vp1394CMUGrabber::vp1394CMUGrabber(), and vp1394TwoGrabber::vp1394TwoGrabber().
|
inherited |
Set to true if the frame grabber has been initialized.
Definition at line 102 of file vpFrameGrabber.h.
Referenced by vpV4l2Grabber::acquire(), vp1394CMUGrabber::close(), vp1394TwoGrabber::close(), vpFlyCaptureGrabber::connect(), vpPylonGrabberGigE::connect(), vpPylonGrabberUsb::connect(), vpFlyCaptureGrabber::disconnect(), vpPylonGrabberGigE::disconnect(), vpPylonGrabberUsb::disconnect(), vpDiskGrabber::open(), vpV4l2Grabber::open(), vp1394TwoGrabber::resetBus(), vpFlyCaptureGrabber::startCapture(), vpPylonGrabberGigE::startCapture(), vpPylonGrabberUsb::startCapture(), vpFlyCaptureGrabber::stopCapture(), vpPylonGrabberGigE::stopCapture(), vpPylonGrabberUsb::stopCapture(), vp1394CMUGrabber::vp1394CMUGrabber(), vp1394TwoGrabber::vp1394TwoGrabber(), vpDiskGrabber::vpDiskGrabber(), and vpV4l2Grabber::vpV4l2Grabber().
|
protectedinherited |
Number of columns in the image.
Definition at line 135 of file vpFrameGrabber.h.
Referenced by vpDiskGrabber::acquire(), vpPylonGrabberGigE::acquire(), vpPylonGrabberUsb::acquire(), vpFlyCaptureGrabber::acquire(), vpV4l2Grabber::acquire(), vp1394TwoGrabber::acquire(), vp1394TwoGrabber::dequeue(), getFormat(), vpVideoReader::getFrame(), vpFrameGrabber::getWidth(), vp1394TwoGrabber::getWidth(), vpDiskGrabber::open(), vp1394CMUGrabber::open(), vpV4l2Grabber::open(), setFormat(), vp1394TwoGrabber::setFormat7ROI(), setImageSize(), vp1394CMUGrabber::setVideoMode(), vp1394TwoGrabber::setVideoMode(), vp1394CMUGrabber::vp1394CMUGrabber(), and vp1394TwoGrabber::vp1394TwoGrabber().