Skip to content

Image adjustments (brightness, contrast, etc)

Video stream image adjustments

When the frame grabber is enabled, the brightness, contrast, hue and saturation of the video stream can be adjusted with:

These properties affect the whole video stream, therefore the captured frames and the recorded streams are affected too.

On the other hand, each of these image processing operations requires CPU when the corresponding property is "in use" (when its value is <> 0).

Grayscale and inverted colors

When the frame grabber is enabled:

Image adjustments and the OnFrameBitmap event

By default (OverlayAfterTransform = false), the brightness, contrast, hue, saturation, grayscale and inverted colors adjustments are applied after the OnFrameBitmap event: the bitmap received by the event is the frame before these adjustments, while the frame passed downstream (video window, recording) is adjusted.

To receive the adjusted frame in OnFrameBitmap, e.g. when the application displays this bitmap itself (WPF Image control, etc.), enable OverlayAfterTransform before starting the preview:

VideoGrabber.FrameGrabber = TFrameGrabber.fg_PreviewStream;
VideoGrabber.OverlayAfterTransform = true;
VideoGrabber.OnFrameBitmap += VideoGrabber_OnFrameBitmap;
VideoGrabber.StartPreview();
// then, at any time:
VideoGrabber.VideoProcessing_Brightness = 40;
VideoGrabber.VideoProcessing_Contrast = 20;
VideoGrabber.VideoProcessing_GrayScale = true;

With OverlayAfterTransform = true, the text and image overlays are drawn after the adjustments and keep their colors (e.g. they are not converted to grayscale). See Overlays before or after transforms.

Pixellization

To pixellize the video frames, assign to VideoProcessing_Pixellization a value greater than 1.

VMR9 display image adjustments

Unlike the video stream image adjustments above, which require CPU, the VMR9 video renderer can adjust the brightness, contrast, hue and saturation at the graphics card level.

This processing affects only the display, not the captured frames or the recorded streams.

The corresponding functions are: