IC Imaging Control C++

Grabber

Grabber

This is the main class of the IC Imaging Control Class Library. It provides the basic functionality to control the flow of image buffers in an image stream from the source (a video capture device) to the sink (a collection of image buffers or a media file). The display of a live image can be toggled on and off. The idea behind this class is to provide the functionality of a standard frame grabber to users of WDM streaming devices.

Using this class, programmers can:

  • select a video source
  • change parameters of a video source
  • display a live image
  • prepare, start and stop the image stream from the device to the sink (image buffers / media file)
  • specify the sink (image buffers / media file)
  • apply one or more frame filters to the image stream
  • apply overlays at 3 different locations to the image stream

Information

Header File: tisudshl.h
Namespace: DShowLib
Introduced in version 1.x

Methods

Method Description
Grabber

Constructs a new Grabber object.

addListener

This method registers a callback handler object for the specified events.

closeDev

Closes the currently active video capture device.

execI2COperation

Performs a read/write operation on the I²C bus of the currently used video capture device.

getAcqSizeMaxX

Returns the width in pixels of the currently selected video format.

getAcqSizeMaxY

Returns the height in pixels of the currently selected video format.

getActiveMemBuffer

[Deprecated] Returns the MemBuffer to which the current image is grabbed.

getActiveMemBufferCollection

[Deprecated] This method returns a pointer to the currently active MemBufferCollection.

getAvailableFPS

Returns the available frame rates.

getAvailableFrameRates

Returns the frame rates supported by the device.

getAvailableInputChannels

Returns a list of input channels supported by the current device.

getAvailableVCDProperties

Returns a collection of the IVCDPropertyItems of the currently opened device.

getAvailableVideoCaptureDevices

Returns a list of all currently available video capture devices.

getAvailableVideoCompressors

[Deprecated] Returns a list of all video compressors available for avi output.

getAvailableVideoFormatDescs

Returns a list of VideoFormatDesc objects describing all video formats supported by the current video capture device according to the current video norm.

getAvailableVideoFormats

Returns a list of all video formats supported by the current video capture device according to the current video norm.

getAvailableVideoNorms

Returns a list of all video norms supported by the current video capture device.

getCallback

[Deprecated] Returns a pointer to the currently active callback function

getCountOfFramesDropped

Returns the number of frames that were dropped by the video capture device.

getCountOfFramesNotDropped

Returns the number of frames that were delivered by the device.

getCurReferenceTime

Retrieves the current reference time.

getCurrentActualFPS

Retrieves the actual frame rate achieved by the device.

getCurrentActualFrameRate

Returns the current actual frame rate.

getCurrentMaxAvailableFPS

Returns the current maximal frames per second (FPS) that the device can achieve on the bus.

getDeBayerTransform

Returns a pointer to a DeBayerTransform object. If a BY8 Bayer video format is selected, the image data will be debayered automatically. The DeBayerTransform class allows the debayering to be checked.

getDefaultWindowPosition

This method returns the current value of the grabber's default window position flag.

getDev

Returns the currently active video capture device.

getDeviceFrameFilters

Returns the list of frame filters that are currently set behind the device.

getDisplayFrameFilters

Returns the list of frame filters that are currently set in front of the display.

getExternalTransportMode

Returns the current mode of the external transport control.

getExternalTrigger

Returns true, if the external trigger is enabled.

getFPS

Returns the frame rate currently set.

getFlipH

This method returns whether horizontal flipping is enabled.

getFlipV

This method returns whether vertical flipping is enabled.

getFrameCount

Read the internal frame counter.

getFrameRate

Returns the currently set time between two frames.

getGraphStartReferenceTime

This method retrieves the reference time at which the image stream (the filter graph) was started.

getHWND

This method returns a handle to the window, which is used to display the live image.

getInputChannel

Returns the currently active input channel. This method will fail, if there is no video capture device open.

getLastError

Returns information about an error that occurred, during the last library-method call.

getOverlay

This method returns a pointer to an instance of the OverlayBitmap object. The OverlayBitmap is used to draw text and graphics on the video stream.

getOverlayBitmapPathPosition

Returns the current position of OverlayBitmap objects in the graph.

getPauseLive

Returns whether pause mode is enabled.

getProperty

Returns the actual value of a property of the current video capture device.

getPropertyDefault

This method returns the default value of a property.

getPropertyRange

Returns a tsPropertyRange structure specifying the range of possible property values.

getSignalDetected

Returns whether a signal was detected by the device.

getSinkType

Returns the current output method of image streams.

getSinkTypePtr

Returns a pointer to the currently selected sink.

getUserMemBufferSize

[Deprecated] Calculates the required size for a user allocated memory buffer.

getVideoDataDimension

Returns the actual dimension of the image data which is passed to the display. This may be different from the video format of the currently active video capture device, if you have used setDeviceFrameFilters or setDisplayFrameFilters to insert frame filters in the image stream behind the device or in front of the display. If IFrameFilter objects are used by the FrameHandlerSink, the dimension of the MemBufferCollection may be different from the video data dimension as well.

getVideoFormat

This method returns the currently selected video format or an invalid object, if no video format is set (ie. the device is not open).

getVideoNorm

This method returns the currently selected video norm or an invalid object, if no video norm is selected.

getWindowPosition

This method retrieves the current position and size of the grabber's live video window.

hasExternalTransport

Returns true, if the device has an external transport control.

hasExternalTrigger

Returns true, if the current device has an external trigger.

hasI2CInterface

Checks whether the currently opened video capture device supports access to its on-board I²C bus.

isCountOfFramesDroppedAvailable

Returns whether the device supports retrieving the current dropped frames counter.

isDevOpen

Checks whether a video capture device is opened.

isDevValid

Checks whether the video capture device associated with this object still exists. A video capture device may become invalid at any time (e.g. if the device has been unplugged).

isFlipHAvailable

This method returns whether horizontal flipping is available.

isFlipVAvailable

This method returns whether vertical flipping is available.

isFrameRateListAvailable

Checks whether the currently selected video capture device supports different frame rates that can be set by the user.

isInputChannelAvailableWithCurDev

This method checks whether the currently active video capture device supports input channels.

isListenerRegistered

This method checks whether the specified callback handler is registered for the specified events.

isLive

Checks whether the current video capture device is in live mode.

isLivePrepared

Returns whether the image stream is in 'prepared' state.

isPropertyAutomationAvailableWithCurDev

Checks whether the current video capture device is capable of setting a specific property automatically.

isPropertyAutomationEnabled

Checks whether the automation for a specific property is enabled.

isPropertyAvailableWithCurDev

Checks whether the current video capture device supports the manual setting of a specific property.

isSignalDetectedAvailable

Checks whether a device can be queried for a list of available video stream.

isVideoNormAvailableWithCurDev

Checks whether the current video capture device supports the selection of the video norm.

loadDeviceState

Restores grabber settings that were saved by saveDeviceState.

loadDeviceStateFromFile

Restores the device settings from a file that was previously saved by saveDeviceStateToFile.

newMemBufferCollection

[Deprecated] Creates a new memory buffer collection.

openDev

Opens a video capture device for grabbing.

openDevByDisplayName

Opens a device by its display name.

openDevByUniqueName

Opens a device by its unique name.

prepareLive

Tries to setup the image stream by connecting the device with the display and the sink and inserting frame filters and overlays.

removeListener

This method unregisters a callback handler object for the specified events.

saveDeviceState

Saves the state of the opened device. A saved state can be restored using loadDeviceState.

saveDeviceStateToFile

Saves the state of the currently opened device to a file. The grabber state can be restored using loadDeviceStateFromFile.

setActiveMemBufferCollection

[Deprecated] Sets the MemBufferCollection in which the grabbed images will be stored.

setCallback

[Deprecated] Sets a callback function.

setDefaultWindowPosition

Enables or disables the default window size lock of the video window.

setDeviceFrameFilters

Inserts a list of frame filters in the device path of the image stream. If an overlay is present in the device path, the filter list is inserted in front it. This means that the filter list is located between the device and the overlay.

setDisplayFrameFilters

Inserts a list of frame filters in the display path of the image stream. If an overlay is present in the display path, the filter list is inserted in front of it. This means that the overlay is located between the filter list and the display. If there is no overlay in the display path, the filter list is inserted in front of the the display.

setExternalTransportMode

Sets a new mode for the external transport control.

setExternalTrigger

Enables/disables the external trigger.

setFPS

Sets the frame rate of the device.

setFlipH

Specifies whether all frames of an image stream should be flipped horizontally.

setFlipV

Specifies whether all frames of an image stream will be flipped vertically.

setFrameRate

Sets the time between two frames.

setHWND

Sets the handle to the window in which the live image will be displayed.

setInputChannel

Sets the input channel of the currently active video capture device.

setOverlayBitmapPathPosition

Sets the positions of OverlayBitmap objects in the graph.

setPauseLive

Pauses the live mode.

setProperty

This method sets the value for a device property of the current video capture device to a specific value or activates/deactivates the "automatic mode" for this property.

setSinkType

Sets the format of the sink. A sink specifies the output target of an image stream. A sink may only be set, if the image stream is in neither live mode, nor prepared mode.

setVideoFormat

This method sets the video format to be used by the currently active video capture device.

setVideoNorm

This method sets the video of the currently active video capture device. A list of available video norms may be retrieved by calling Grabber::getAvailableVideoNorms.

setWindowPosition

Sets the position of the grabber's live video window.

setWindowSize

Sets the size of the video window.

showDevicePage

Shows a device settings page.

showVCDPropertyPage

Shows the property page for this device. With the property page, the user can adjust property settings like brightness.

snapImages

[Deprecated] Snaps images from the live stream to the current active MemBuffer.

startLive

Puts the grabber in live mode.

stopLive

Stops the grabber

suspendLive

Suspends an image stream and puts it into prepared state.

Enumerations

Enumeration Description
tCameraPropertyEnum

tCameraPropertyEnum enumerates the properties of a video camera.

tVideoPropertyEnum

tVideoPropertyEnum specifies video property types. This enumeration comes directly from DirectX 8.

Type Definitions

Type Description
tCompressorItems

A tCompressorItem describes an AVI-Compressor.

tCompressorList

A list of tCompressorItems

tCompressorListPtr

A pointer to a list of tCompressorItems.

tFPSList

An array of double values that describe the number of frames per second.

tFPSListPtr

A pointer to a tFPSList.

tFrameRateList

An array of long values that describe the time between two frames in milliseconds.

tFrameRateListPtr

A pointer to a tFrameRateList.

tInChnList

A list of AnalogChannelItems.

tInChnListPtr

A pointer to a list of tVideoFormatItems.

tInputChannelItem

A AnalogChannelItem.

tMemBufferCollectionPtr

A pointer to a MemBufferCollection.

tMemBufferPtr

A pointer to a MemBuffer.

tVidCapDevList

A list of tVideoCaptureDeviceItems.

tVidCapDevListPtr

A pointer to a list of tVideoCaptureDeviceItems.

tVidFmtDescList

A tVidFmtDescList is a std::vector of smart pointers to VideoFormatDesc objects.

tVidFmtDescListPtr

A tVidFmtDescListPtr is smart pointer to a tVidFmtDescList. objects.

tVidFmtDescPtr

A tVidFmtDescPtr is a smart pointer to a VideoFormatDesc object.

tVidFmtList

A list of tVideoFormatItems.

tVidFmtListPtr

A pointer to a list of tVideoFormatItems.

tVidNrmList

A list of tVideoNormItems.

tVidNrmListPtr

A pointer to a list of tVideoNormItems.

tVideoCaptureDeviceItem

A VideoCaptureDeviceItem.

tVideoFormatItem

A VideoFormatItem.

tVideoNormItem

A VideoNormItem.

<< Classes

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us