Implement your own Algorithm into a DirectShow Filter
A MontiVision Filter SDK
DLL contains one function which is provided for the
implementation of custom algorithms, the TransformSample()
function. This function is called for every
frame passing the filter in a started filter
configuration. The function provides two pointers
to arrays of bytes, one array contains the
input and the other one the output image. The
arrays are of the same size. Your new DirectShow filter reads
the data from the input image buffer, processes it and writes the
resulting data into the output image buffer.To help you navigating
through the image, a couple of additional parameters are
passed to the function. The iWidth and the iHeight parameters
contain the dimension of the image. It is not possible
to change the input image to a smaller or larger output
image size. The iBytePerPixel parameter defines the
number of bytes used per pixel. There are three possible values: 1
(grayscale), 3 (RGB in byte order B G R) or 4 (ARGB in byte
order B G R A). The input and output images have the same
number of bytes per pixel. It is not possible to change the color
depth of the output image. The global variable g_dwTypes sets the
possible video formats the filter accepts.
Image Organization |