EasyImage::GainOffset

Transforms an image, applying a gain and offset to all pixels.

Namespace: Euresys::Open_eVision

[C++]

void GainOffset(
   const EROIBW8* sourceImage,
   EROIBW8* destinationImage,
   float gain,
   float offset
)

void GainOffset(
   const EROIBW16* sourceImage,
   EROIBW16* destinationImage,
   float gain,
   float offset
)

void GainOffset(
   const EROIC24* sourceImage,
   EROIC24* destinationImage,
   EColor gain,
   EColor offset
)

Parameters

sourceImage

Pointer to the source image/ROI.

destinationImage

Pointer to the destination image/ROI.

gain

Constant gain. By default (argument omitted) 1, i.e. no change.

offset

Constant offset. By default (argument omitted) 0, i.e. no change.

Remarks

The gain should remain close to 1, and allows contrast adjustment of the image.

The offset can be positive or negative, and allows to adjust the image intensity. The resulting values are always saturated to range [0..255].

For color images, the separate gain and offset values are specified as triple of values stored in a EColor. The default values leave the image unchanged.

Internally, the computations are achieved through fixed-point arithmetic with 5 bits of precision for the fractional part. This can result in loss of precision with small gains.

EasyImage.GainOffset

Transforms an image, applying a gain and offset to all pixels.

Namespace: Euresys.Open_eVision

[C#]

void GainOffset(
   Euresys.Open_eVision.EROIBW8 sourceImage,
   Euresys.Open_eVision.EROIBW8 destinationImage,
   float gain,
   float offset
)

void GainOffset(
   Euresys.Open_eVision.EROIBW16 sourceImage,
   Euresys.Open_eVision.EROIBW16 destinationImage,
   float gain,
   float offset
)

void GainOffset(
   Euresys.Open_eVision.EROIC24 sourceImage,
   Euresys.Open_eVision.EROIC24 destinationImage,
   Euresys.Open_eVision.EColor gain,
   Euresys.Open_eVision.EColor offset
)

Parameters

sourceImage

Pointer to the source image/ROI.

destinationImage

Pointer to the destination image/ROI.

gain

Constant gain. By default (argument omitted) 1, i.e. no change.

offset

Constant offset. By default (argument omitted) 0, i.e. no change.

Remarks

The gain should remain close to 1, and allows contrast adjustment of the image.

The offset can be positive or negative, and allows to adjust the image intensity. The resulting values are always saturated to range [0..255].

For color images, the separate gain and offset values are specified as triple of values stored in a EColor. The default values leave the image unchanged.

Internally, the computations are achieved through fixed-point arithmetic with 5 bits of precision for the fractional part. This can result in loss of precision with small gains.