EasyImage::GainOffset
Transforms an image, applying a gain and offset to all pixels.
Namespace: Euresys::Open_eVision
[C++]
static void GainOffset(
const EROIBW8
* sourceImage,
EROIBW8
* destinationImage,
float gain,
float offset
)
static void GainOffset(
const EROIBW16
* sourceImage,
EROIBW16
* destinationImage,
float gain,
float offset
)
static 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#]
static void GainOffset(
EROIBW8
sourceImage,
EROIBW8
destinationImage,
float gain,
float offset
)
static void GainOffset(
EROIBW16
sourceImage,
EROIBW16
destinationImage,
float gain,
float offset
)
static void GainOffset(
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.
Module: open_evision
[Python]
@staticmethod
GainOffset(
sourceImage: EROIBW8
destinationImage: EROIBW8
gain: float
offset: float
) -> None
@staticmethod
GainOffset(
sourceImage: EROIBW8
destinationImage: EROIBW8
gain: float
) -> None
@staticmethod
GainOffset(
sourceImage: EROIBW8
destinationImage: EROIBW8
) -> None
@staticmethod
GainOffset(
sourceImage: EROIBW16
destinationImage: EROIBW16
gain: float
offset: float
) -> None
@staticmethod
GainOffset(
sourceImage: EROIBW16
destinationImage: EROIBW16
gain: float
) -> None
@staticmethod
GainOffset(
sourceImage: EROIBW16
destinationImage: EROIBW16
) -> None
@staticmethod
GainOffset(
sourceImage: EROIC24
destinationImage: EROIC24
gain: EColor
offset: EColor
) -> None
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.