|
IMVBinary
The IMVBinary interface is used to control the filter's image
processing algorithm. Read the filter
description to see how the filter is used. Read the remarks for implementation details.
Header file: iMVBinary.h
Interface definition language file: iMVBinary.idl
Typelib: MVBinary
Interface ID: IID_IMVBinary
HRESULT get_BinaryMethod(
[out, retval] int *piMethod );
Returns the currently used segmentation method as MV_BINARY_METHOD.
Parameter:
|
|
piMethod |
A pointer to an integer value that receives
the segmentation method as MV_BINARY_METHOD. |
HRESULT put_BinaryMethod( [in
] int iMethod );
Sets the desired segmentation method as MV_BINARY_METHOD.
Parameter:
HRESULT get_Threshold( [out, retval] byte
*pbyThreshold );
Returns the current threshold as byte.
Parameter:
|
|
pbyThreshold |
A pointer to an integer value that receives the
currently used threshold as a byte. |
HRESULT put_Threshold( [in ] byte byThreshold
);
Sets the manual threshold.
Parameter:
|
|
byThreshold |
The threshold as a byte. |
HRESULT get_PixelPercent(
[out, retval] int *piPercent );
Returns the threshold for the laplacian array of the Weszka
algorithm in percent.
Parameter:
|
|
piPercent |
A pointer to an integer value that receives
the laplacian array threshold for theWeska algorithm in
percent. (0-100) |
HRESULT put_PixelPercent( [in
] int iPercent );
Sets the threshold for the laplacian array of the Weszka
algorithm in percent.
Parameter:
|
|
iPercent |
The laplacian array threshold for
theWeska algorithm in percent. (0-100) |
HRESULT get_SelectedChannel( [out, retval] int
*piChannel );
Returns the currently selected color channel that is used for
the segmentation.
Parameter:
|
|
piChannel |
A pointer to an integer value that receives the
currently selected color channel that is used for segmentation as
MV_COLOR_CHANNEL
. |
HRESULT put_SelectedChannel( [in ] int iChannel
);
Sets the desired color channel that is used for the
segmentation.
Parameter:
|
|
iChannel |
The desired color channel to be used for
segmentation as MV_COLOR_CHANNEL . |
Filter specific structures and enumerators
typedef enum _MV_BINARY_METHOD
{
MV_BINARY_MANUALLY= 0,
MV_BINARY_JOHANNSEN,
MV_BINARY_LAPLACE,
MV_BINARY_TWOPEAKS
} MV_BINARY_METHOD;
The following sequence is used to set a manual, all channel
threshold.
IMVBinary *pIMVBinary;
...
// Manual thresholding
pIMVBinary->put_BinaryMethod(
MV_BINARY_MANUALLY );
// Use all color channels
pIMVBinary->put_SelectedChannel(
MV_CHANNEL_ALL );
// Set threshold to 128
pIMVBinary->put_Threshold( 128
);
|