Using Audio and Video Processing Filters (Delphi 6.0)

The ltmmCaptureCtrl, ltmmConvertCtrl, and ltmmPlayCtrl objects all have the ability to use audio and video processing filters. These filters can be used to obtain special effects or corrections during capture, conversion, or playback. Using the following steps:

1.

The filters currently shipped with the toolkit are listed below:

 

Video Filter Name

Description

 

LEAD Video Resize Filter

A DirectShow transform filter for resizing a video stream. The resize filter offers three types of resizing algorithms; Resample, Bicubic interpolation, and normal. The user interface, as will as the programming interface, friendly enable the selection of the filter parameters; Width, Height, Keep aspect ratio, etc. In addition to the ability to select any desired size through specifying the width and height, the user can select a ratio size (i.e. 2X, Normal, X/2, ...).

 

LEAD Video Crop Filter

A DirectShow transform filter for cropping a video stream. A graphical representation is provided to show and modify the desired rectangle position and size. The cropped rectangle can be as small as 1x1.~

 

LEAD Video Emboss Filter

A DirectShow transform filter that applies the emboss effect on a video stream The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor Also known as a decoder, this is a module or algorithm to decompress data. before you can play (see) it.. The emboss effect is controlled by the Light angle, Elevation, and Depth. The filter has a Bump Map option but currently the used image is the stream buffer itself, external image selection is not supported yet. The emboss effect can be applied to a selected rectangle only.

 

LEAD Video Mosaic Filter

A DirectShow transform filter that applies the mosaic effect on a video stream with the ability to set the mosaic square size. The mosaic effect can be applied to a selected rectangle only.

 

LEAD Video Gamma Correction Filter

A DirectShow transform filter that performs gamma correction on a video stream. Possible gamma value are between 0.01 5.0

 

LEAD Video Histogram Equalize Filter

A DirectShow transform filter that performs histogram equalization on a video stream. Equalization can be applied on a single channel (Red, Green, or Blue) or to all channels (gray).

 

LEAD Video Histogram View Filter

A DirectShow transform filter that draws the running histogram of a video stream. The filter also provides access to the histogram array through its programming interface. The histogram can be viewed for a single channel or for all channels.

 

LEAD Video Add Filter

A DirectShow transform filter that adds video frames to achieve a brightening of the image.

 

LEAD DirectShow Color Filter

A DirectShow transform filter for color manipulation of a video stream. The filter can change the video brightness, contrast, hue, and saturation, in addition to an invert colors option. The above changes can be applied to a selected rectangle only.

 

Audio Filter Name

Description

 

LEAD Volume Control Filter

A simple DirectShow audio transform filter to change the volume of an audio stream The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor before you can play (hear) it..

2.

The ltmmCaptureCtrl, ltmmConvertCtrl, and ltmmPlayCtrl all contain the same objects and functions for managing audio and video processors. The registered video and audio processor collections can be obtained by calling the get_AudioProcessors and get_VideoProcessors functions. Through the returned interface, you can enumerate all of the filters available. The user can then enumerate through all of the processors available for use. The user can then add individual processors through the SelectedAudioProcessors and SelectedVideoProcessors collections. However, every object contains helper dialog boxes for managing processors. For example, you can invoke the dialog boxes to add video and audio processors to the convert object with the following code:

ltmmConvertCtrl1.ShowDialog ( ltmmConvert_Dlg_VideoProcessors, Handle );

3.

The processor list will initially be empty.

image\jtaudio03.gif

4.

Click on "Insert…" to add a processor to the list.

image\jtaudio04.gif

5.

Select any processor in the list and click on "OK".

image\jtaudio05.gif

6.

Insert more processors into the list, delete processors, or set the individual processor properties. Click on "OK" when you are done.

7.

Any filter with a single input and output can be used by the multimedia toolkit. However, the filter must be registered as being compatible with the toolkit. The "LEADTOOLS Multimedia Filter Manager" can be used to mark filters as compatible with the toolkit.

8.

List the video processors available to LEADTOOLS click on "LTMM Video Processors".

image\jtaudio08.gif

9.

To add another DirecShow filter to the list, click on "Add…".

image\jtaudio09.gif

10.

Select the filter to be added and click "OK".

image\jtaudio10.gif

11.

The filter is now available for use by LEADTOOLS.