Start » Filter Reference » Camera Support » WebCamera » WebCamera_GrabImage
Module: | ThirdParty |
---|
Captures a frame from a camera using Direct Show interface.
Applications
Name | Type | Range | Description | |
---|---|---|---|---|
inCameraIndex | Integer* | 0 - + | Index number of camera device to connect with | |
inFrameSize | Size* | Requested size of source frame in pixels selected from camera output formats | ||
inPixelType | WebCameraInputFormat | Requested specific pixel type from camera (may change image quality) | ||
outFrame | Image | Captured frame |
Description
Filter uses DirectShow API to acquire images from devices registered in system. Images can be acquired from many sources like: web cameras with support for DirectShow , video grabbers and system video streams.
Input inCameraIndex selects device in order provided by the operational system.
Input inFrameSize selects output image size in pixels. If an image in requested size is not available an error occurs. If value of inFrameSize is not provided filter returns image with first available size found.
Examples
Remarks
Best quality of images can be achieved using inPixelType with values RGB24 or RGB32. Format YUY2 stores two RGB pixels using only 4 bytes.
To check which pixel types are supported you can use application GraphStudioNext
.Parallel execution
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
"Unable to connect with chosen Web Camera." - error will occur when provided inCameraIndex is not valid device number.
"Unable to connect with media type of Web Camera. Required image format may not be supported. " - selected inFrameSize is not supported by selected device.
Complexity Level
This filter is available on Basic Complexity Level.