Impact Acquire SDK Python
LUTParameters Class Reference

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

Inheritance diagram for LUTParameters:
[legend]

Public Member Functions

 __init__ (self, *args, **kwargs)
 

Properties

 directValues = property(lib_mvIMPACT_acquire.LUTParameters_directValues_get, doc=)
 An integer property which can be used to directly define a LUT.
 
 gamma = property(lib_mvIMPACT_acquire.LUTParameters_gamma_get, doc=)
 A float property which can be used to set the gamma value.
 
 gammaAlpha = property(lib_mvIMPACT_acquire.LUTParameters_gammaAlpha_get, doc=)
 A float property which can be used to set the gammaAlpha value.
 
 gammaInverter = property(lib_mvIMPACT_acquire.LUTParameters_gammaInverter_get, doc=)
 An enumerated integer property defining whether the calculated gamma correction function shall be inverted or not.
 
 gammaMode = property(lib_mvIMPACT_acquire.LUTParameters_gammaMode_get, doc=)
 An enumerated integer property which can be used to configure the LUT(Look Up Table) gamma mode.
 
 gammaStartThreshold = property(lib_mvIMPACT_acquire.LUTParameters_gammaStartThreshold_get, doc=)
 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.
 
 inputValues = property(lib_mvIMPACT_acquire.LUTParameters_inputValues_get, doc=)
 An integer property to define the input values for sampling points for interpolated LUT transformations.
 
 outputValues = property(lib_mvIMPACT_acquire.LUTParameters_outputValues_get, doc=)
 An integer property to define the output values for sampling points for interpolated LUT transformations.
 
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 valueCount = property(lib_mvIMPACT_acquire.LUTParameters_valueCount_get, doc=)
 An integer property to define the number of sampling points for interpolated LUT transformations.
 

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.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args,
** kwargs )

Reimplemented from ComponentCollection.

Property Documentation

◆ directValues

directValues = property(lib_mvIMPACT_acquire.LUTParameters_directValues_get, doc=)
static

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

gamma = property(lib_mvIMPACT_acquire.LUTParameters_gamma_get, doc=)
static

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

◆ gammaAlpha

gammaAlpha = property(lib_mvIMPACT_acquire.LUTParameters_gammaAlpha_get, doc=)
static

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

gammaInverter = property(lib_mvIMPACT_acquire.LUTParameters_gammaInverter_get, doc=)
static

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

Valid values for this property may be: mvIMPACT.acquire.bFalse, mvIMPACT.acquire.bTrue.

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

gammaMode = property(lib_mvIMPACT_acquire.LUTParameters_gammaMode_get, doc=)
static

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

Valid values for this property may be: mvIMPACT.acquire.LUTgmStandard, mvIMPACT.acquire.LUTgmLinearStart.

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

gammaStartThreshold = property(lib_mvIMPACT_acquire.LUTParameters_gammaStartThreshold_get, doc=)
static

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

inputValues = property(lib_mvIMPACT_acquire.LUTParameters_inputValues_get, doc=)
static

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.

◆ outputValues

outputValues = property(lib_mvIMPACT_acquire.LUTParameters_outputValues_get, doc=)
static

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.

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

◆ valueCount

valueCount = property(lib_mvIMPACT_acquire.LUTParameters_valueCount_get, doc=)
static

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:

This sample assumes a valid reference to a \b mvIMPACT::acquire::ImageProcessing object has been obtained.
def fn(ip, LUTImplementation):
ip.LUTEnable.write(acquire.bTrue)
ip.LUTMode.write(acquire.LUTmInterpolated)
ip.LUTImplementation.write(LUTImplementation)
ip.LUTInterpolationMode.write(LUTimThreshold)
if LUTImplementation == LUTiHardware:
ip.LUTMappingHardware.write(acquire.LUTm8To8)
elif LUTImplementation == LUTiSoftware:
ip.LUTMappingSoftware.write(acquire.LUTm8To8)
LUTAccess = ip.getLUTParameter(0)
LUTAccess.valueCount.write(4)
v = []
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)

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: