MV Image Renderer DirectShow Filter
The MontiVision Image Renderer filter
is used to create single image files, taken from a video stream. It
supports the following file formats: Bitmap (*.bmp), JPEG (*.jpg),
TIFF (*.tif), TARGA (*.tga) and PNG (*.png) and provides two
working modes. All incoming images from the video stream can be
saved to a directory or, if the filter uses the trigger mode,
an image file saved on each trigger event. The names of the output
files can be defined using filename templates (see below how to use
templates). It is possible to capture a region of the video frame
instead of capturing the whole frame. Also, the output image may be
resized before it is written to disc.
This MontiVision DirectShow Filter is used in combination with
the MontiVision
Smart Control in the ImageStream Sample
Application.
| File: |
ImageRenderer.ax |
| CLSID: |
CLSID_MVImageRenderer |
Supported Interfaces
IMVImageCapture
IMVImageCapture2
IMVImageInfo
IMVTrigger
IMVFilterData
IMVAbout
IMVFilterInfo
Supported COM Events
The filter supports following events through the IMVFilterEvents interface.
Look at the filter events page
for more information.
| Event
|
Value
|
Description
|
| MV_ALGORITHM_START_EVENT |
0
|
A filter starts processing a video frame or sample. |
| MV_ALGORITHM_END_EVENT |
1
|
A filter finishes processing a video frame or sample. |
| MV_IMAGE_CAPTURE_START_EVENT |
2
|
Image capture started. |
| MV_IMAGE_CAPTURE_END_EVENT |
3
|
Image capture to disc or memory finished. |
Supported I/O Pins
| I/O Pin
|
Corresponding method
|
Discription
|
Filename
[String] |
IMVImageCapture::put_FixedFileName |
Sets the file name for the next image to be
captured, if the filter doesn't use templates to create the file
names. |
Trigger
[Boolean] |
IMVTrigger::Trigger |
Starts the capture of a snapshot, depending
on the trigger mode.
Example: If the trigger mode is
MV_TRIGGER_RISING_EDGE, a snapshot is taken after the the Control
I/O pin changes its state from FALSE to TRUE. |
Result
[String] |
IMVImageInfo::GetCurrentFileName |
Outputs the path to last captured image
file. |
Attention:
I/O Pins are dominat, what means that they have a higher
priority than the corresponding method of the filters
interface!
MV Image Renderer Property Pages

MV Image Renderer filter property page
This property page displays the image data
and the filename of the last captured image. The trigger button
activates the grabber and sets it to capture the next processed
frame. It uses the IMVTrigger and the IMVImageInfo interface.

MV
Image Renderer output file property page
This property page is used to specify the name, path and format
of the captured images. It uses the IMVImageCapture interface.
| Use filename |
If this radio button is selected, the files are named using the
text of the edit box to the right of the button. The name is
extended by a counter that is incremented for every captured
image. |
| Use templates |
If this radio button is selected, the files are named using the
template file that is specified by the edit box to the right of the
button. See below how templates are used to create filenames. |
| Output folder |
Used to specify the filters output folder. The captured image
files are written there. |
| File format |
Used to specify the file format that is used to write the
captured images to the output folder. |

MV Image Renderer capture
region property page
This property page provides region of interest functionality. It
is possible to capture a region of the video frame and resize
it to a desired output size before it is written to disc. It
uses the IMVImageCapture2 interface.
| Origin |
Used to specify the horizontal and vertical offset to the
ractangle that is to be captured. |
| Dimension |
Used to specify the width and the height
of the rectangle that is to be captured. |
| Output image dimension |
The captured image may be resized before it is written to disc.
Those settings specify the dimension of the resized image. |
|
Interpolation |
Interpolation used for resizing. |
Template files
The filter uses template files to create
the output files names. The template file is a simple text
file using the following syntax:
| Text |
Output as it is. |
|
Variable |
%Variable Name% |
| % |
%% |
Template variables
The following table shows all fixed variables for template
files.
| YEAR |
4 digit year, e.g. 2003. |
|
SHORT_YEAR |
2 digit year, e.g. 03 |
| MONTH |
2 digit month, e.g 01 |
|
MONTH_NAME |
Name of the month, e.g. January. |
| DAY |
2 ditit day, e.g 29. |
| DAY_NAME |
Weekname of the day, e.g. Monday. |
| WEEK |
2 digt week number, e.g. 45. |
| HOUR |
2 digit hour, e.g. 17. |
| MINUTE |
2 digit minute, e.g. 54. |
| SECOND |
2 digit second, e.g. 32. |
| FILE_COUNT |
Counter for the files created by the filter. |
Examples:
1. Using templates to create output filenames
The output folder "C:\Images\" is specified, the JPEG format is
selected and the specified template
file "C:\Templates\output_filename.txt" is specifidied. This
template file contains the following text:
%YEAR%-%MONTH%-%DAY%_File_%FILE_COUNT%
The resulting filenames of the captured image files
are:
c:\images\2003-02-15_File_000001.jpg
c:\images\2003-02-15_File_000002.jpg
c:\images\2003-02-15_File_000003.jpg
...
2. Video stream to single image file conversion
This example shows a filter configuration
that takes a video stream from a firewire camera, segments the
greyscale video and saves the resulting images as TIFF files
onto disc.

Video stream to single image file
conversion
|