The Overlay class provides methods for controlling the overlay data of the camera's live image without flicker. The graphics card functions of the OpenGL library are supported under Windows and Linux. The Direct3D library are supported only under Windows.
Note on system requirements •To use the Direct3D functionality, the appropriate version of the Microsoft DirectX Runtime has to be installed in your PC. •When you are using high-resolution cameras, the maximum texture size supported by the graphics card should be at least 4096 x 4096 pixels. You can check the maximum texture size by GetMaxSize(). •The Direct3D mode automatically uses the Windows Desktop color depth setting for the display. Please also read the notes on graphics cards which are provided in the "System requirements" chapter in the uEye manual. |
Note on displaying monochrome or raw data formats To display monchrome or Bayer raw data in Direct3D, please set the appropriate display mode constants using Set(). |
Methods
Method |
Description |
---|---|
Deletes the data of the overlay area by filling it with black color. |
|
Disables the semi-transparent display of the overlay area. |
|
Enables a semi-transparent display of the overlay area. |
|
Returns the device context (DC) handle to the overlay area of the graphics card. |
|
Returns the overlay graphics. |
|
Returns the RGB values of the current key color (default: black). |
|
Returns the width and height of the maximum overlay area supported by the graphics card. |
|
Returns the size of the overlay area. |
|
Disables overlay display. |
|
Loads a bitmap image (*.BMP file) into the overlay area. |
|
Releases the device context (DC) handle and updates the overlay data. |
|
Releases the device context (DC) handle. |
|
Defines the RGB values of the key color. |
|
Defines the position of the overlay area. |
|
Enables/disabled the semi-transparent display of the overlay area. |
|
Defines the size of the overlay area (default: current camera image size). |
|
Sets the overlay to visible. |
|
Enables overlay display on top of the current camera image. |
Example 1
// DC-Handle
// Get DC handle for Overlay
int hDC;
uEye.DirectRendererOverlay overlay = new uEye.DirectRendererOverlay(hCam);
overlay.GetDC(out hDC);
// Release DC handle
overlay..ReleaseDC();
Example 2
// Overlay size and position
// Query maximum size of overlay area
uEye.Types.Size<uint> size;
uEye.DirectRendererOverlay overlay = new uEye.DirectRendererOverlay(hCam);
overlay.GetMaxSize(out size);
// Set size of overlay area
uEye.Types.Size<uint> newSize = new uEye.Types.Size<uint>();
newSize.Width = 100;
newSize.Height = 120;
overlay.SetSize(newSize);
// Set position of overlay area
hCam.DirectRenderer.Overlay.SetPosition(20, 0);
Example 3
// Key color
// Get current key color
System.Drawing.Color color;
uEye.DirectRendererOverlay overlay = new uEye.DirectRendererOverlay(hCam);
overlay.GetKeyColor(out color);
// Set new key color
overlay.SetKeyColor(System.Drawing.Color.Red);
Example 4
// Example display
uEye.DirectRendererOverlay overlay = new uEye.DirectRendererOverlay(hCam);
// Show overlay
overlay.Show();
// Hide overlay
overlay.Hide();
Example 5
// Example transparency
uEye.DirectRendererOverlay overlay = new uEye.DirectRendererOverlay(hCam);
// Enable semi-transparent overlay
overlay.EnableSemiTransparent();
// Disable semi-transparent overlay
overlay.DisableSemiTransparent();
Example 6
// Example overlay with BMP
uEye.DirectRendererOverlay overlay = new uEye.DirectRendererOverlay(hCam);
// Load overlay from BMP file
overlay.LoadImage("c:\test.bmp");
// Delete overlay area
overlay.Clear();