Home    MontiVision DirectShow SDK Documentation Prev Next
MontiVision Development Kit
Product Release Notes
What's new?
Installation
Overview
Components
The MontiVision Workbench
How to use the Workbench
How to insert an Filter
How to make a connction between two filter
How to change filter properties
How to get mediatypes of a pin or connection
How to delete a connection
How to delete a filter
How to find a filter
How to select a filter, pin or connection
How to make a video visible
How to preview a video stream
Workbench Menus and Commands
File menu commands
Edit menu commands
View menu commands
Graph menu commands
Extras menu commands
Help menu commands
Context menu commands
Status Bar
Toolbar
Sorting Filters
MontiVision DirectShow Filter
Common filter functions
MV Absolute Difference
MV Advanced Optical Flow
MV Affine Transformation
MV Alignment
MV Audio Test Source
MV Batch Image File Source
MV Background Subtraction
MV Bayer To Gray
MV Bayer To RGB
MV Bitmap Overlay
MV Blob Counter
MV Blob Finder
MV BlockRecording
MV Buffer Access
MV Camera Calibration
MV Camera Syncronisation
MV Camera Undistortion
MV Color Filter
MV Color Channel Mixer
MV Color Space Converter
MV Color To Gray
MV Color Twist
MV Constant Framerate
MV Convolution
MV Cooccurrence
MV Crop
MV Deinterlace
MV DeInterlace Temporal
MV Delay
MV Demo Source
MV Demultiplexer
MV DPS Renderer
MV DPS Source
MV Dyadic Arithmetic
MV Dyadic Logic
MV Fast Color Filter
MV Frame Access
MV Gauge
MV GDI Overlay
MV Gray To Color
MV Image File Source
MV Image Grabber
MV Image File Renderer
MV Integral
MV Inverse
MV I/O Bool Source
MV I/O Comparator
MV I/O Logic
MV I/O Not
MV I/O Renderer
MV I/O RS232
MV I/O RS232 Trigger Source
MV I/O Switch Source
MV I/O Textfile Renderer
MV I/O Textfile Source
MV I/O To String
MV IP Camera Source
MV Look Up Table
MV Mean
MV Mean Profile
MV Merge Frames
MV Mirror
MV MJPEG Compressor
MV MJPEG Decompressor
MV Mondic Arithmetic
MV Mondic Logic
MV Morphology
MV Motion Detection
MV Motion Direction
MV Multi File Writer
MV Network Renderer
MV Network Source
MV Nonlinear Filter
MV Object Tracker
MV Optical Flow
MV Playlist Source
MV Polar
MV Presence Detection
MV Profile
MV Recording
MV ReInterlace
MV Resize
MV Resized Rotation
MV Rotate90
MV Rotation
MV Segmentation
MV Select Mediatype
MV Separate Fields
MV Smooth Sequence
MV Splitter
MV Text Overlay
MV Ticker Overlay
MV Topography
MV Trigger Source
MV Video File Overlay
MV Video Overlay
MV Video Scaler
MV Watchdog
MV Zoom
Filter Event Mechanism
MontiVision DirectShow Filter SDK
Create a new Filter SDK DLL
Implement your custom Algorithm
Register the Filter SDK DLL
Use the new DirectShow Filter
Debugging a DirectShow Filter
Configure a Filter SDK DirectShow Filter
MontiVision Smart ActiveX Control
MV Smart Control Functions
MV Smart Control Interfaces
IMVSmartControl
IMVSCFilterGraph
IMVSCFilterGraph2
IMVSCVideoWindow
IMVSCVideoWindow2
IMVSCFullScreen
IMVSCSetFile
IMVSCSetSourceFilter
IMVSCSelectInput
IMVSCSetupVideoStream
IMVSCSetupVideoStream2
IMVSCClock
IMVSCFilterProperties
IMVSCLog
IMVSCCameraControl
IMVSCFilterEvents
IMVSCMediaSeeking
IMVSCMediaSeeking2
IMVSCQualityProperties
IMVSCFilterData
IMVSCCommonProperties
IMVSCExtDeviceControl
IMVSCVideoControl
IMVSCAnalogVideoFormat
IMVSCTVTuner
IMVSCTVAudio
Application Development with the MV Smart Control
Visual Basic 6.0
Visual Basic .NET
Visual C++ 6.0
Visual C++ .NET
Borland Delphi
MV Smart Control Samples
AviPlay Sample
CropVideo Sample
DirFinder Sample
FindObject Sample
FullScreen Sample
ImageStream Sample
IP Camera Sample
LiveDraw Sample
LoadFromString Sample
LumeneraCameraProperties Sample
MotionDetection Sample
PutBitmap Sample
SendReceiveRS232 Sample
MV Smart Control How To's
How to handle Input Events (Mouse, Keyboard) of the Video Window
How to Select and Configure a Video Input Device
How to handle Multiple Video Outputs
How to use Fullscreen Functionality
How to access the Results of a MontiVsion DirectShow Filter
MontiVision Utility ActiveX Controls
Video Source Combo Box
Video Format Combo Box
Video Size Combo Box
Input Selection Combo Box
Frame Rate Combo Box
Seeking Slider
Filter Property Page Display
Trigger Button
MontiVision I/O Controls
MVIODisplay
MVIOMonitor
MVIOLed
MVIOOutput
VMR Wrapper ActiveX Control
MV VMR Wrapper Interfaces
IMVVMRWrapper
IMVVMRFilterConfig
IMVVMRMixerControl
IMVVMRMixerBitmap
MV VMR Wrapper Sample Applications
VMR Control Sample
VMR Bitmap Overlay Sample
Extended Video Source ActiveX Control
MV Extended Video Source Control Interfaces
IMVExtendedVideoSource Interface
IMVLumeneraCustomConfig Interface
_IMVExtendedVideoSourceEvents Interface
MontiVision Tools
Getting Started
Create a MontiVision Project
Create a MontiVision Project using the MontiVision Workbench
Create new DirectShow Filters using the MontiVision Filter SDK
Use the new DirectShow Filter in your MontiVision Project
Integrate the MontiVision Project into your Application
Distribute your Application
Distributing your Applications
Application Development Examples
Apply standard Image Processing Operators to a Video Stream
Process a Sequence of Still Images, Do Batch Processing
Make your Existing Algorithms DirectShow compatible
Creating your own Image/Video Processing DirectShow Filters
Access the Image Data of a Video Stream directly from within a Windows Application
Capture Still Images from a running Video Stream
Convert a Video Stream to a Sequence of Still Images or vice versa
Sample Applications using the Smart Control
Camera Calibration
Additional HowTo's
How to Set Up Visual C++ for the MontiVision Development Kit
How to Set Up Borland Delphi for the MontiVision Development Kit
How to Set Up Borland Delphi 2005 for the MontiVision Development Kit
Interface Reference
_IMVFilterPropertyControlEvents
_IMVSeekingSliderEvents
_IMVSmartControlEvents
_ISelectInputComboBoxEvents
_IVideoFormatComboBoxEvents
_IVideoSizeComboBoxEvents
_IVideoSourceComboBoxEvents
IMVAbout
IMVAdvancedOpticalFlow
IMVAdvancedOpticalFlow2
IMVAffineTransformation
IMVAlignment
IMVAudioTestSource
IMVAutoCalcSetup
IMVBackgroundSubtraction
IMVBatchFileSource2
IMVBatchFileSource3
IMVBatchFileSource
IMVBinary
IMVBitmapOverlay
IMVBitmapOverlay2
IMVBlobCounter
IMVBlobCounter2
IMVBlobCounter3
IMVBlobCounter4
IMVBlobFinder
IMVBlobFinder2
IMVBlobFinder3
IMVBlobPostProcessing
IMVBlobPreProcessing
IMVBlockRecording
IMVBufferAccess
IMVBufferAccessCallbackC
IMVBufferAccessCallbackVB
IMVCameraCalibration
IMVCameraSync
IMVCameraUndistortion
IMVColor
IMVColorChannelMixer
IMVColorTwist
IMVConstantFramerate
IMVConvolution
IMVCooccurrence
IMVCrop
IMVCrypt
IMVDeinterlace
IMVDeInterlaceTemporal
IMVDelay
IMVDemoSource
IMVDemoSource2
IMVDPSRenderer
IMVDPSSource
IMVDyArith
IMVDyLogic
IMVEnumAudioEncoder
IMVEnumVideoEncoder
IMVFastColor
IMVFilterData
IMVFilterEvents
IMVFilterInfo
IMVFilterPropertyControl
IMVFilterSDK
IMVFrameAccess
IMVFrameAccessCallbackC
IMVFrameAccessCallbackVB
IMVGauge
IMVGaugeCalculations
IMVGDIOverlay
IMVGray
IMVGrayToColor
IMVGrid
IMVHistogram
IMVHistogram2
IMVHistogram3
IMVImageCapture
IMVImageCapture2
IMVImageCapture3
IMVImageFileSource
IMVImageFileSource2
IMVImageFileSource3
IMVImageInfo
IMVIntegral
IMVIOBoolSource
IMVIOBoolSource2
IMVIOComparator
IMVIOIntRenderer
IMVIOIntSource
IMVIOIntSource2
IMVIOLogic
IMVIONot
IMVIORenderer
IMVIORS232
IMVIORS232DataASCII
IMVIORS232DataHex.htm
IMVIORS232RxTxConnection
IMVIORS232TriggerSource
IMVIOSwitchSource
IMVIOTextfileRenderer
IMVIOTextfileSource
IMVIOToString
IMVIPCameraSource
IMVIPCameraSource2
IMVLinFilter
IMVLookUpTable
IMVMask
IMVMean
IMVMeanProfile
IMVMerger
IMVMirror
IMVMonArith
IMVMonLogic
IMVMorphology
IMVMotionDetection
IMVMotionDetection2
IMVMotionDirection
IMVMultiFileWriter
IMVNetworkReceiveInfo
IMVNetworkRenderer
IMVNetworkRenderer2
IMVNetworkRenderer3
IMVNetworkSendInfo
IMVNetworkSource
IMVNetworkSource2
IMVNonLinFilter
IMVObjectTracker
IMVOpticalFlow
IMVOpticalFlow2
IMVPlaylist
IMVPlaylistSource
IMVPolar
IMVPresenceDetection
IMVProfile
IMVRecording
IMVRegionOfInterest
IMVReinterlace
IMVResize
IMVResizedRotation
IMVRotate90
IMVRotation
IMVSCAnalogVideoFormat
IMVSCCameraControl
IMVSCCommonProperties
IMVSCClock
IMVSCExtDeviceControl
IMVSCFilterData
IMVSCFilterEvents
IMVSCFilterGraph
IMVSCFilterGraph2
IMVSCFilterProperties
IMVSCFullScreen
IMVSCLog
IMVSCMediaSeeking
IMVSCMediaSeeking2
IMVSCQualityProperties
IMVSCSelectInput
IMVSCSetFile
IMVSCSetSourceFilter
IMVSCTVTuner
IMVSCTVAudio
IMVSCVideoControl
IMVSCSetupVideoStream
IMVSCSetupVideoStream2
IMVSCVideoWindow
IMVSCVideoWindow2
IMVSeekingSlider
IMVSetImageFormat
IMVSmartControl
IMVSeparateFields
IMVSmoothSequence
IMVTextOverlay
IMVTextOverlay2
IMVTextOverlay3
IMVTickerOverlay
IMVTickerOverlay2
IMVTopography
IMVTrigger
IMVTriggerFilter
IMVVideoFileOverlay
IMVVideoScaler
IMVVMRFilterConfig
IMVVMRMixerBitmap
IMVVMRMixerControl
IMVVMRWrapper
IMVWatchdog
IMVZoom
IMVZoomConfig
ISelectInputComboBox
IVideoFormatComboBox
IVideoSizeComboBox
IVideoSourceComboBox

MV I/O RS232 Serial Port DirectShow Filter

The MontiVision I/O RS232 Input and Output Filter is used to communicate with an device via the RS232 port.

It has three major tasks:

  • send I/O data from it`s I/O input pins to the RS232 device
  • receive data from the the RS232 device and deliver it to the corresponding I/O outputpins
  • send periodically custom commands to the RS232 device (e.g. sending ALIVE or polling messages).

The filter supports following I/O pin types:

I/O Pin Type min. value max. value size in bytes

UINT8

0 255 1
INT8 -128 128 1
UINT16 0 65535 2
INT16 -32768 32767 2
UINT32 0 4294967295 4
INT32 -2147483648 2147483647 4
UINT64 0 18446744073709551615 8
INT64 -9223372036854775808 9223372036854775807 8
FLOAT ca. 3.4E-38 3.4E+38 4
DOUBLE ca. 1.7E-308 1.7E+308 8
BOOL FALSE = 0 TRUE = 1

1 (RS232)
4 (PC)

STRING - - max. 4096

The filter connects to pins with these I/O pin types. It converts each received or sent data (ASCII into hexadecimal and vice versa) on this basis. So be sure to generate and receive (parse) the data properly. A wrong bytesize used for e.g. UINT8 (1 byte length) in combination with numbers higher 255 will create a wrong result.

This MontiVision DirectShow Filter is used in combination with the MontiVision Smart Control in the SendReceiveRS232 Sample Application.

 

File: MVIORS232.ax
CLSID: CLSID_MVIORS232

 

Supported Interfaces

IMVIORS232

IMVIORS232DataASCII

IMVIORS232DataHex

IMVIORS232RXTXConnection

IMVFilterData

IMVAbout

 

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_CANT_WRITE_TO_COM_PORT_EVENT

11

The filter wasn't able to write data to the COM port.
MV_CANT_OPEN_COM_PORT_EVENT

10

The filter couldn't open the COM port.
MV_CANT_READ_FROM_COM_PORT_EVENT

12

The filter wasn't able to read data from the COM port.
MV_CANT_GET_EVENT_FROM_COM_PORT_EVENT

13

The filter didn't get any reply from the COM port.
MV_IO_DATA_RECEIVE_EVENT

5

Signals the receipt of new data from the COM port.
MV_RXTXCONNECTION_ON_EVENT

28

Singnals that the Rx and Tx lines are connected.
MV_RXTXCONNECTION_OFF_EVENT

29

Singnals that the Rx and Tx lines are disconnected.

 

MV I/O RS232 Interface Configuration Property Page

Implements a part of the IMVIORS232 configuartion interface. You can set the com port, baud rate and state information strings.

MontiVision I/O RS232 DirectShow Filter COM Port Configuration Property Page

 

Select COM port

Selects the COM port.
Select baud rate Selects the Baud Rate. Be sure that your hardware supports this speed.
On Pause send... Enter the data which will be send to the RS232 device when the graph switches into pause state.
On Start send... Enter the data which will be send to the RS232 device when the graph switches into running state.
On Stop send... Enter the data which will be send to the RS232 device when the graph switches into stop state.
Transfer Type: ASCII Enter data in ASCII chars.
Transfer Type: Binary Enter data in hexadecimal values (You may use prefix 0x for hexadecimal input. All entered data will be interpreted as hexadecimal values. Valid chars are: 0-9, A-F, a-f).

 

Transfer Type:
The Transfer Type can be set to ASCII or Binary. All entered data (implicates all propertypages) will be interpreted as ASCII if you set it to ASCII. And the same counts for setting the type to Binary: all data will be interpreted as binary (hexadecimal) values. You need to add at least a prefix to deliver data to an outputpin. You may add prefixes and postfixes to all pins (here).

ASCII:
The data received by the filter`s input pins will be converted to ASCII. So if your pin uses e.g. an UINT8 MediaType connection, each UINT8 will be converted to a string and delivered to the RS232 device. The String has a variable length. It is terminated by a 0x00 (for c programmers: '\0') or by a given postfix (here).
The data received by the RS232 port will be delivered to the outputpins. The ASCII data will be converted to the MediaType used by the outputpin, e.g. INT32. The data must have a prefix and must be terminated by 0x00 (for c programmers: '\0') or with a given postfix(here) to deliver it to an outputpin.

Binary:
The data received by the filter`s input pins will be delivered without any conversion to the RS232 device. So if you have a UINT8 MediaType connection, the UINT8 (one byte) will be sent to the RS232 device. The data uses the length of the used MediaType plus the otpional postfix and prefix (here).
The data received by the RS232 port will be delivered without any conversion to the outputpins. It depends on the outpupin MediaType, which datasize is used for each data. The data must have a prefix and may have postfix (here) to deliver it to an outputpin.

State information strings:
The state information strings will be sent to the RS232 device once if the graph changes the state. If the graph changes its state from e.g. State_Stopped to State_Paused the entered string (in the upper example picture "pause") will be sent. If you don`t need the state information leave the edit boxes blank.

 

MV I/O RS232 Pin Configuration Property Page

Implements a part of the IMVIORS232 configuartion interface. The I/O input- and output pins are using the same configuration page. In this case we use the inputpin page to explain the usage. Below you see two propertypages. Both pages show the inputpin configuration propertypage. But in the left picture you can see that no inputpin is connected to another filter. In the right picture you see three connected inputpins. We are in ASCII Mode. The pin "Input0" is selected and it`s prefix is set to "In0" and the postfix is set to "0In".

 

I/O RS232 Filter - Pin Configuration I/O RS232 Filter - Pin Configuration

 

Input Pins

This list shows the currently connected pins of type input or output (type input pin type is used here). The list is empty if no pin is connected (see left picture).

Prefix

Input Pins : Enter the data which will be sent previous to the input pin data to the RS232 device. Leave it blank if no data should be sent.
Output Pins: Enter the preceding data which is followed by the output pin data received from the RS232 device. If nothing is entered here, the pin won`t get any data.

Postfix

Input Pins: Enter the data which is sent after the input pin data to the RS232 device. ASCII Mode: If the field is blank, a null character (0x00, '\0') will be added behind the converted pin value automatically.
Output Pins: Enter the data which follows the output pin data received from the RS232 device.

 

Transfer mode information: you are able to set the transfer mode to BINARY or ASCII MODE (see her here). This setting will be shown above the prefix and postfix.

ASCII MODE

Enter data to be sent or to be received in ASCII chars.

BINARY MODE
(shown in the picture below)

Enter data to be sent or to be received  in hexadecimal chars (you may enter a prefix 0x. All entered characters are interpreted as hexadecimal values. Valid chars are 0-9, A-F, a-f).

I/O RS232 Filter - Pin Configuration

 

 

MV I/O RS232 Timer Property Page

Implements a part of the IMVIORS232 configuartion interface. Timers are useful for polling or sending alive messages to you RS232 device. You may add up to 16 timers (multimediatimers) with 1ms resolution. All timers are started the time the graph enters the State_Running. After a timer timed out the entered string will be sent to the RS232 device. You can change each timer`s name. 

I/O RS232 Filter - Pin Configuration

 

Timer List of defined timers.
Add timer Creates a new timer with a default timer name.
Delete timer Deletes the selected timer.
Timer name Enter a custom timer name for the selected timer.
String This data will be sent periodically to the RS232 device after the given timeout. ASCII MODE: a null (0x00, '\0') will be added after the entered characters to terminate this string.
Timeout in ms Enter the timer interval in ms from 1...9999999 ms.

Transfer mode information: you are able to set the transfer mode to BINARY or ASCII MODE (see here). This setting will be shown above the string.

ASCII MODE

Enter data to be sent or to be received in ASCII chars.

BINARY MODE
(shown in the picture below)

Enter data to be sent or to be received  in hexadecimal chars (you may enter a prefix 0x. All entered characters are interpreted as hexadecimal value. Valid chars are 0-9, A-F, a-f).