IMVBarcodeDecoder Interface

The IMVBarcodeDecoder interface contains methods and properties to configure the MontiVision Barcode Decoder filter.

 

Methods:
Decoder Select the desired decoders.
DrawBoundingRect Draw the bounding rect.
DrawString Draw the decoded code string.
Environment Barcode decoding environment.
GetColor Get the colour for drawing.
IsAvailable Check if the desired decoder is available.
IsInterfaceSet Is a callback interface pointer set?.
LineWidth Line width for drawing.
NumOfIterations Maximum number of optimization iterations.
OptimizationMode Dot Peen optimization operation mode.
OptimizeDotPeen Optimize dot peen mark decoding.
ReleaseInterface Release IUnknown interface pointer.
SetColor Set the colour for drawing.
SetInterface Set IUnknown interface pointer for callback.

 

Header file: IMVBarcodeDecoder.h
Interface Definition Language file: IMVBarcodeDecoder.idl
Type Library: MVBarcodeDecoderStandard, MVBarcodeDecoderAdvanced
Interface ID: IID_IMVBarcodeDecoder

 

Methods:
 

Property IMVBarcodeDecoder::Decoder

Declaration: Property  Get/Put Decoder As Long

Select the desired decoders. Decoders can be combined by logical or operator, e.g MV_BARCODE_DATA_MATRIX | MV_BARCODE_LINEAR. See _MV_BARCODE_TYPE for possible values.

C Prototype:

HRESULT put_Decoder(LONG);
HRESULT get_Decoder(LONG*);

Enumeration _MV_BARCODE_TYPE

Member name Member value
MV_BARCODE_DATA_MATRIX 1
MV_BARCODE_LINEAR 2
MV_BARCODE_PDF_417 4
MV_BARCODE_QR_CODE 8
MV_BARCODE_ALL 255

 

Property IMVBarcodeDecoder::DrawBoundingRect

Declaration: Property Get/Put DrawBoundingRect As Boolean

Draw a bounding rectangle around the decoded barcode.

C Prototype:

HRESULT put_DrawBoundingRect(BOOLEAN);
HRESULT get_DrawBoundingRect(BOOLEAN*);

 

Property IMVBarcodeDecoder::DrawString

Declaration: Property Get/Put DrawString As Boolean

Draw the decoded code string above the decoded barcode.

C Prototype:

HRESULT put_DrawString(BOOLEAN);
HRESULT get_DrawString(BOOLEAN*);

 

Property IMVBarcodeDecoder::Environment

Declaration: Property Get/Put Environment As Long

Barcode decoding environment. Used to switch from normal background mode to curved backgrounds like round steel. See _MV_BARCODE_MODE for possible values.

C Prototype:

HRESULT put_Environment(LONG);
HRESULT get_Environment(LONG*);

Enumeration _MV_BARCODE_ENVIRONMENT

Member name Member value
MV_BARCODE_ENV_NORMAL 0
MV_BARCODE_ENV_POOR 1
MV_BARCODE_ENV_LIMITED 2

 

Method IMVBarcodeDecoder::GetColor

Declaration: Sub GetColor(pbyRed As Byte, pbyGreen As Byte, pbyBlue As Byte)

Get the color for drawing.

Parameter:
pbyRed Red intensity 0 - 255
pbyGreen Green intensity 0 - 255
pbyBlue Blue intensity  0-255

C Prototype:

HRESULT GetColor(BYTE pbyRed, BYTE pbyGreen, BYTE pbyBlue);

 

Method IMVBarcodeDecoder::IsAvailable

Declaration: Function IsAvailable(iType As Long) As Boolean

Check if the desired decoder is available. See _MV_BARCODE_TYPE for possible values.

Parameter:
iType Decoder to check.

C Prototype:

BOOLEAN IsAvailable(LONG iType);

 

Method IMVBarcodeDecoder::IsInterfaceSet

Declaration: Function IsInterfaceSet As Long

Is a callback interface pointer set?

C Prototype:

LONG IsInterfaceSet();

 

Property IMVBarcodeDecoder::LineWidth

Declaration: Property Get/Put LineWidth As Long

Line width for drawing.

C Prototype:

HRESULT put_LineWidth(LONG);
HRESULT get_LineWidth(LONG*);

 

Property IMVBarcodeDecoder::NumOfIterations

Declaration: Property Get/Put NumOfIterations As Long

Maximum number of optimization iterations for dot peen mark optimization.

C Prototype:

HRESULT put_NumOfIterations(LONG);
HRESULT get_NumOfIterations(LONG*);

 

Property IMVBarcodeDecoder::OptimizationMode

Declaration: Property Get/Put OptimizationMode As Long

Dot Peen optimization operation mode. Dot peen mark optimization for bright codes on dark surfaces or vice versa. See _MV_BARCODE_DOTPEEN_MODE for possible values.

C Prototype:

HRESULT put_OptimizationMode(LONG);
HRESULT get_OptimizationMode(LONG*);

Enumeration _MV_BARCODE_DOTPEEN_MODE

Member name Member value
MV_BARCODE_DARK_CODE 0
MV_BARCODE_BRIGHT_CODE 1

 

Property IMVBarcodeDecoder::OptimizeDotPeen

Declaration: Property Get/Put OptimizeDotPeen As Boolean

Optimize dot peen mark decoding.

C Prototype:

HRESULT put_OptimizeDotPeen(BOOLEAN);
HRESULT get_OptimizeDotPeen(BOOLEAN*);

 

Method IMVBarcodeDecoder::ReleaseInterface

Declaration: Sub ReleaseInterface

Release IUnknown interface pointer.

C Prototype:

HRESULT ReleaseInterface();

 

Method IMVBarcodeDecoder::SetColor

Declaration: Sub SetColor(byRed As Byte, byGreen As Byte, byBlue As Byte)

Set the color for drawing.

Parameter:
byRed Red intensity 0 - 255
byGreen Green intensity 0 - 255
byBlue Blue intensity 0 - 255

C Prototype:

HRESULT SetColor(BYTE byRed, BYTE byGreen, BYTE byBlue);

 

Method IMVBarcodeDecoder::SetInterface

Declaration: Sub SetInterface(pIUnknown As Unknown)

Set IUnknown interface pointer for callback.

Parameter:
pIUnknown IUnknown interface pointer

C Prototype:

HRESULT SetInterface(UNKNOWN pIUnknown);