IMVLookUpTable

The IMVLookUpTable 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.

get_LookUpTable Returns the current  look up table.
put_LookUpTable Sets the look up table.
get_LUTMarks Returns the curent LUT marks (Points).
put_LUTMarks Sets the LUT marks (Points).
PutLUTMark Sets a single LUT mark (Points).
get_LUTMode Returns the current filter mode.
put_LUTMode Sets the filter mode.
get_LUTMethod Returns the current LUT marks connection method.
put_LUTMethod Sets the LUT marks connection method.
Reset Resets the look up table (in=out).

Header file: iMVLookUpTable.h
Interface definition language file: iMVLookUpTable.idl
Typelib: MVLookUpTable
Interface ID: IID_IMVLookUpTable

 

HRESULT get_LookUpTable( [out, retval] int iLUT[256] );

Returns the currently used look up table.

Parameter:

iLUT A pointer to an array of 256 integers that receives the look up table.

 

HRESULT put_LookUpTable( [in ] int iLUT[256] );

Sets the currently used look up table.

Parameter:

iLUT A pointer to an array of 256 integers that contains the look up table.

 

HRESULT get_LUTMarks( [out, retval] int iMarks[256] );

Returns the LUT marks (Points). A LUT point is set to -1, if it is disabled. The initial LUT mark array contains the following entries: mark[0]=0, mark[1] ... mark[254]=-1, mark[255]=255.

Parameter:

iMarks A pointer to an array of 256 integers that receives the marks.

 

HRESULT put_LUTMarks( [in ] int iMarks[256] );

Sets the LUT marks (Points). Set a LUT point to -1 to disable it. The initial LUT mark array contains the following entries: mark[0]=0, mark[1] ... mark[254]=-1, mark[255]=255.

Parameter:

iMarks A pointer to an array of 256 integers that contains the marks.

 

HRESULT PutLUTMark( [in ] byte byInput, [in ] int iOutput );

Sets a single LUT mark (Point). Set a LUT point to -1 to disable it.

Parameter:

byInput The input value of the look up table. (The LUT index)
iOutput The output value of the look up table. (The LUT value at index byInput)

 

HRESULT get_LUTMode( [out, retval] int *piMode );

Returns the filter mode. Either an automatic mode ("equalize histogram" or "stretch histogram") or the manual mode ("manually modify LUT").

Parameter:

piMode A pointer to an integer value that receives the look up table filter mode as MV_LUT_MODE .

 

HRESULT put_LUTMode( [in ] int iMode );

Sets the filter mode. Either an automatic mode ("equalize histogram" or "stretch histogram") or the manual mode ("manually modify LUT").

Parameter:

iMode The filter mode as MV_LUT_MODE .

 

HRESULT get_LUTMethod( [out, retval] int *piMethod );

Returns the method that is used to connect the marks in the LUT. Either linear or by splines.

Parameter:

piMethod A pointer to an integer value that receives the connection method for the LUT marks as MV_LUT_METHOD .

 

HRESULT put_LUTMethod( [in ] int iMethod );

Sets the method that is used to connect the marks in the LUT. Either linear or by splines.

Parameter:

iMethod The connection method for the LUT marks as MV_LUT_METHOD .

 

HRESULT Reset();

Resets the look up table to its initial values ( for(int index=0; index<256; index++) LUT[index] = index; ).

 

 

Filter specific structures and enumerators

typedef enum _MV_LUT_MODE
{
    MV_LUT_EQUALIZE= 0,
    MV_LUT_STRETCH,
    MV_LUT_LUT
} MV_LUT_MODE;

typedef enum _MV_LUT_METHOD
{
    MV_LUT_LINEAR=0,
    MV_LUT_SPLINE
} MV_LUT_METHOD;

 

 

Remarks

The following sequence is used to set a user defined look up table.

IMVLookUpTable *pIMVLookUpTable;

...


//We want to create the following look up table
//
// Output   ---
//        /
//       /
//      /
//     /
// ---    Input
//
// Enable manual look up table
pIMVLookUpTable->put_LUTMode( MV_LUT_LUT );
// Reset look up table - LUT[index] = index;
pIMVLookUpTable->Reset();
// All color channel values higher than 200 are set to white (255)
pIMVLookUpTable->put_PutLUTMark( 201, 255 );
// All color channel values lower than 56 are set to black (0)
pIMVLookUpTable->put_PutLUTMark( 55, 0 );
// Connect LUT marks linear
pIMVLookUpTable->put_LUTMethod( MV_LUT_LINEAR );