IC Imaging Control C++

OverlayBitmap

OverlayBitmap

The OverlayBitmap object is used to draw graphical elements like lines and text onto the video stream.

There are three possible locations where overlay objects may be inserted in the image stream:

  • Behind the device ( Device Path ): this overlay will appear in the display as well as in the sink (ring buffer, stream file)
  • In front of the display ( Display Path ): this overlay will appear in the display only
  • In front of the sink ( Sink Path ): this overlay will appear in the sink (ring buffer, stream file) only

Internally, the OverlayBitmap object uses a bitmap (HBITMAP) for drawing text and graphical elements on the video stream. Its size and color depth are dependent on the video format of the currently active video capture device and all frame filters that are inserted between the device and itself. Therefore, the internal bitmap is destroyed and recreated, if:

  • the device's video format is changed,
  • the sink's video format is changed because it may require automatic color space conversion somewhere in front of the overlay,
  • frame filters are inserted/removed between the device and the overlay
  • parameters of a frame filter that are inserted between the device and the overlay are altered in a way that the video format of the image stream is changed.

The color format of the overlay is determined by the objects that are located in front and behind it in the image stream. In addition, the color format can be forced to monochrome or RGB with a call to OverlayBitmap::setColorMode.

The functionality of the OverlayBitmap object is not available and the method OverlayBitmap::canRender returns false in two cases:

  • the sink's color format is set to YUV
  • the filter that is inserted just behind the overlay requires YUV as the input format

Pointers to instances of OverlayBitmap objects can be retrieved with a call to the Grabber's method Grabber::getOverlay.

Information

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

Methods

Method Description
beginPaint

Prepares the overlay bitmap for graphic operations.

canRender

Returns whether the framework is able to render the overly on the video stream.

drawFrameEllipse

Draws the frame of an ellipse on the live video.

drawFrameRect

Draws the frame of a rectangle on the live video.

drawLine

Draws a line on the live video.

drawSolidEllipse

Draws a solid ellipse on the live video.

drawSolidRect

Draws a solid rectangle on the live video.

drawText

Draws a text on the live video.

endPaint

Releases the overlay bitmap from the internal device context.

fill

Fills the entire overlay bitmap with the specified color.

getColorMode

Returns the currently selected color mode of this OverlayBitmap.

getColorformat

Returns the current color format used for the overlay.

getDC

Returns the device context.

getDropOutColor

Returns the currently used dropout color.

getEnable

Returns whether the overlay is visible on the live video stream.

getFlipVertical

Returns whether the overlay bitmap is displayed vertically flipped on the video.

getFont

Retrieves a pointer to an IFont COM font object pointer.

getFontBKColor

Returns the background color for text drawings.

getFontTransparent

Returns the background mode for text drawings.

getFrameType

Returns a FrameTypeInfo object describing the current format of this OverlayBitmap.

getHeight

Returns the height of the OverlayBitmap.

getPathPosition

Returns the path position of this OverlayBitmap.

getWidth

Returns the width of the OverlayBitmap.

setColorMode

Set the color mode of this OverlayBitmap. The color mode determines, whether the overlay bitmap is painted in color or grayscale. The images provided by the video capture device are converted into the selected format before drawing the overlay.

setDropOutColor

Sets the dropout color.

setEnable

Enables or disables the display of the overlay bitmap on the live video.

setFlipVertical

Enables or disables the vertical flip of the overlay bitmap.

setFont

Sets the OverlayBitmaps object font to the specified font.

setFontBKColor

Sets the background color for drawing text to the specified color value, or to the nearest physical color if the device cannot represent the specified color value.

setFontTransparent

Sets the background mode for text drawings.

Enumerations

Enumeration Description
tOVBColorMode

The members of this enumeration are used to set the color format of the OverlayBitmap, using setColorMode.

<< 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