Impact Acquire SDK C++
LUTParameters Class Reference

Properties for configuring settings belonging to a certain LUT (Look Up Table) to be applied to a captured image. More...

#include <mvIMPACT_acquire.h>

Inheritance diagram for LUTParameters:
[legend]

Public Member Functions

HOBJ hObj (void) const
 Returns a unique identifier for the component collection referenced by this object.
 
const ComponentCollectionrestoreDefault (void) const
 Restores the default for every component of this collection.
 

Public Attributes

PropertyI directValues
 An integer property which can be used to directly define a LUT.
 
PropertyF gamma
 A float property which can be used to set the gamma value.
 
PropertyF gammaAlpha
 A float property which can be used to set the gammaAlpha value.
 
PropertyIBoolean gammaInverter
 An enumerated integer property defining whether the calculated gamma correction function shall be inverted or not.
 
PropertyILUTGammaMode gammaMode
 An enumerated integer property which can be used to configure the LUT(Look Up Table) gamma mode.
 
PropertyI gammaStartThreshold
 An integer property which can be used to define a start threshold above which the gamma correction formula shall be used in mvIMPACT::acquire::LUTParameters::gammaMode mvIMPACT::acquire::LUTgmLinearStart.
 
PropertyI inputValues
 An integer property to define the input values for sampling points for interpolated LUT transformations.
 
PropertyI outputValues
 An integer property to define the output values for sampling points for interpolated LUT transformations.
 
PropertyI valueCount
 An integer property to define the number of sampling points for interpolated LUT transformations.
 

Protected Attributes

HOBJ m_hRoot
 

Friends

class ImageProcessing
 

Detailed Description

Properties for configuring settings belonging to a certain LUT (Look Up Table) to be applied to a captured image.

Note
Objects of this class can't be constructed directly. Its parameters can be accessed via an instance of a class derived from mvIMPACT::acquire::ImageProcessing.

Member Function Documentation

◆ hObj()

HOBJ hObj ( void ) const
inlineinherited

Returns a unique identifier for the component collection referenced by this object.

This handle will always reference an object of type mvIMPACT::acquire::ComponentList.

Returns
A unique identifier for the component referenced by this object.

◆ restoreDefault()

const ComponentCollection & restoreDefault ( void ) const
inlineinherited

Restores the default for every component of this collection.

Calling this function will restore the default value for every component belonging to this collection.

Note
The caller must have the right to modify the component. Otherwise an exception will be thrown.
Returns
A const reference to the component.

Friends And Related Symbol Documentation

◆ ImageProcessing

friend class ImageProcessing
friend

Member Data Documentation

◆ directValues

PropertyI directValues

An integer property which can be used to directly define a LUT.

Note
This property will be invisible when mvIMPACT::acquire::ImageProcessing::LUTEnable is set to mvIMPACT::acquire::bFalse or if mvIMPACT::acquire::ImageProcessing::LUTMode is NOT set to mvIMPACT::acquire::LUTmDirect.

This property will provide a complete LUT thus e.g. in a LUT mapping to a 10 bit output this property will store 2^10 (1024) values that can be accessed and modified by the user.

◆ gamma

PropertyF gamma

A float property which can be used to set the gamma value.

Gamma correction is explained e.g. in this Wikipedia article: http://en.wikipedia.org/wiki/Gamma_correction.

Note
This property will be invisible when mvIMPACT::acquire::ImageProcessing::LUTEnable is set to mvIMPACT::acquire::bFalse or if mvIMPACT::acquire::ImageProcessing::LUTMode is NOT set to mvIMPACT::acquire::LUTmGamma.

The gamma value will be used to calculate the corresponding input -> output transformation LUT.

The following formula will be used:

( ( 1 + gammaAlpha ) * inputValue^(1/gamma) ) - gammaAlpha
PropertyF gammaAlpha
A float property which can be used to set the gammaAlpha value.
Definition mvIMPACT_acquire.h:12921
PropertyF gamma
A float property which can be used to set the gamma value.
Definition mvIMPACT_acquire.h:12911

◆ gammaAlpha

PropertyF gammaAlpha

A float property which can be used to set the gammaAlpha value.

Refer to mvIMPACT::acquire::LUTParameters::gamma to see how this parameter affects the resulting LUT data.

Note
This property will be invisible when mvIMPACT::acquire::ImageProcessing::LUTEnable is set to mvIMPACT::acquire::bFalse or if mvIMPACT::acquire::ImageProcessing::LUTMode is NOT set to mvIMPACT::acquire::LUTmGamma.

◆ gammaInverter

PropertyIBoolean gammaInverter

An enumerated integer property defining whether the calculated gamma correction function shall be inverted or not.

Valid values for this property are defined by the enumeration mvIMPACT::acquire::TBoolean.

Note
This property will be invisible when mvIMPACT::acquire::ImageProcessing::LUTEnable is set to mvIMPACT::acquire::bFalse or if mvIMPACT::acquire::ImageProcessing::LUTMode is NOT set to mvIMPACT::acquire::LUTmGamma.
Attention
This property is mainly provided for compatibility reasons since the original implementation of the Impact Acquire framework and the implementation inside Balluff GmbH GenICam devices introduced later differ. The default behaviour of the Impact Acquire results in the reverse function of the gamma function inside the device firmware thus the gamma value specified here results in the same response as if applying (1/gamma value) to a device. So a gamma value of 2.2 with the inverter switched off this would result in the same response as a gamma value of 0.45 with the inverter switched on. In order not to change the default behaviour of this filter the default value for this property will be mvIMPACT::acquire::bTrue and can be set to mvIMPACT::acquire::bFalse to achieve the same behaviour as implemented for GenICam devices and specified in the SFNC (GenICam Standard Features Naming Convention).
Since
2.38.0

◆ gammaMode

An enumerated integer property which can be used to configure the LUT(Look Up Table) gamma mode.

Valid values for this property are defined by the enumeration mvIMPACT::acquire::TLUTGammaMode.

Note
This property will be invisible when mvIMPACT::acquire::ImageProcessing::LUTEnable is set to mvIMPACT::acquire::bFalse or if mvIMPACT::acquire::ImageProcessing::LUTMode is NOT set to mvIMPACT::acquire::LUTmGamma.

◆ gammaStartThreshold

PropertyI gammaStartThreshold

An integer property which can be used to define a start threshold above which the gamma correction formula shall be used in mvIMPACT::acquire::LUTParameters::gammaMode mvIMPACT::acquire::LUTgmLinearStart.

Values below that threshold will be calculated using linear interpolation.

Note
This property will be invisible when mvIMPACT::acquire::ImageProcessing::LUTEnable is set to mvIMPACT::acquire::bFalse or if mvIMPACT::acquire::ImageProcessing::LUTMode is NOT set to mvIMPACT::acquire::LUTmGamma or if mvIMPACT::acquire::LUTParameters::gammaMode is NOT set to mvIMPACT::acquire::LUTgmLinearStart.

◆ inputValues

PropertyI inputValues

An integer property to define the input values for sampling points for interpolated LUT transformations.

Note
This property will be invisible when mvIMPACT::acquire::ImageProcessing::LUTEnable is set to mvIMPACT::acquire::bFalse or if mvIMPACT::acquire::ImageProcessing::LUTMode is NOT set to mvIMPACT::acquire::LUTmInterpolated.

The number of values stored by this property can be changed by writing to the property mvIMPACT::acquire::LUTParameters::valueCount. The documentation of this property also provides some example values and resulting transfer characteristics.

◆ m_hRoot

HOBJ m_hRoot
protectedinherited

◆ outputValues

PropertyI outputValues

An integer property to define the output values for sampling points for interpolated LUT transformations.

Note
This property will be invisible when mvIMPACT::acquire::ImageProcessing::LUTEnable is set to mvIMPACT::acquire::bFalse or if mvIMPACT::acquire::ImageProcessing::LUTMode is NOT set to mvIMPACT::acquire::LUTmInterpolated.

The number of values stored by this property can be changed by writing to the property mvIMPACT::acquire::LUTParameters::valueCount. The documentation of this property also provides some example values and resulting transfer characteristics.

◆ valueCount

PropertyI valueCount

An integer property to define the number of sampling points for interpolated LUT transformations.

Note
This property will be invisible when mvIMPACT::acquire::ImageProcessing::LUTEnable is set to mvIMPACT::acquire::bFalse or if mvIMPACT::acquire::ImageProcessing::LUTMode is NOT set to mvIMPACT::acquire::LUTmInterpolated.

At least 2 sampling points are needed, the max. number of sampling points is defined by the bit depth of the input image, thus a 8 bit input image can have no more than 2^8 (256) sampling points. if the max. number of sampling points is used, the behaviour is the same a when working with mvIMPACT::acquire::ImageProcessing::LUTMode set to mvIMPACT::acquire::LUTmDirect.

EXAMPLE

Assuming 4 sampling points in mvIMPACT::acquire::LUTimThreshold mode for an 8 to 8 bit transformation where the following values are used:

indexinput valueoutput value
0064
1128255
21920
32550

This will result in the following transfer function characteristic:

The following C++ code would be needed to achieve this behaviour for mono video sources:

//-----------------------------------------------------------------------------
void fn( ImageProcessing& ip, TLUTImplemention LUTImplementation )
//-----------------------------------------------------------------------------
{
ip.LUTImplementation.write( LUTImplementation );
switch( LUTImplementation )
{
break;
break;
}
LUTParameters& LUTAccess = ip.getLUTParameter( 0 );
LUTAccess.valueCount.write( 4 );
vector<int> v(4);
v[0] = 0;
v[1] = 128;
v[2] = 192;
v[3] = 255;
LUTAccess.inputValues.write( v );
v[0] = 64;
v[1] = 255;
v[2] = 0;
v[3] = 0;
LUTAccess.outputValues.write( v );
}
const EnumPropertyI & write(ZYX value, int index=0) const
Writes one value to the property.
Definition mvIMPACT_acquire.h:4426
Base class for image processing related properties.
Definition mvIMPACT_acquire.h:13205
PropertyILUTImplementation LUTImplementation
An enumerated integer property which can be used to configure the LUT (Look Up Table) implementation.
Definition mvIMPACT_acquire.h:13993
PropertyILUTInterpolationMode LUTInterpolationMode
An enumerated integer property which can be used to configure the LUT (Look Up Table) interpolation m...
Definition mvIMPACT_acquire.h:13985
PropertyILUTMapping LUTMappingHardware
An enumerated integer property which can be used to configure the LUT (Look Up Table) mapping mode fo...
Definition mvIMPACT_acquire.h:14002
PropertyILUTMapping LUTMappingSoftware
An enumerated integer property which can be used to configure the LUT (Look Up Table) mapping mode fo...
Definition mvIMPACT_acquire.h:14011
PropertyIBoolean LUTEnable
An enumerated integer property which can be used to enable LUT (Look Up Table) transformations.
Definition mvIMPACT_acquire.h:13968
LUTParameters & getLUTParameter(unsigned int index) const
Returns a reference to a set of user definable parameters to configure LUT (Look Up Table) operations...
Definition mvIMPACT_acquire.h:14331
PropertyILUTMode LUTMode
An enumerated integer property which can be used to configure the LUT (Look Up Table) transformation ...
Definition mvIMPACT_acquire.h:13976
Properties for configuring settings belonging to a certain LUT (Look Up Table) to be applied to a cap...
Definition mvIMPACT_acquire.h:12873
PropertyI valueCount
An integer property to define the number of sampling points for interpolated LUT transformations.
Definition mvIMPACT_acquire.h:13122
PropertyI inputValues
An integer property to define the input values for sampling points for interpolated LUT transformatio...
Definition mvIMPACT_acquire.h:13132
PropertyI outputValues
An integer property to define the output values for sampling points for interpolated LUT transformati...
Definition mvIMPACT_acquire.h:13142
@ LUTm8To8
8 bit input data will be mapped to 8 bit output data.
Definition mvDriverBaseEnums.h:4154
@ LUTimThreshold
Maps an image by applying intensity transformation based on a set of given threshold values.
Definition mvDriverBaseEnums.h:4140
@ bTrue
On, true or logical high.
Definition mvDriverBaseEnums.h:591
@ LUTmInterpolated
Maps an image by applying interpolated intensity transformation between a set of given sampling point...
Definition mvDriverBaseEnums.h:4182
@ LUTiHardware
The mapping of the image data will be done in hardware.
Definition mvDriverBaseEnums.h:4128
@ LUTiSoftware
The mapping of the image data will be done with an optimized software algorithm.
Definition mvDriverBaseEnums.h:4130

Assuming 3 sampling points in mvIMPACT::acquire::LUTimLinear mode for an 8 to 8 bit transformation where the following values are used:

indexinput valueoutput value
0064
1128255
22550

This will result in the following transfer function characteristic:

Assuming 4 sampling points in mvIMPACT::acquire::LUTimCubic mode for an 8 to 8 bit transformation where the following values are used:

indexinput valueoutput value
000
1128255
2192192
32550

This will result in the following transfer function characteristic: