You are here: Start » FIL.NET » Function Reference » Image » Image Point Transforms » FIL.LogarithmImage
Computes a natural logarithm of each pixel.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void LogarithmImage ( FilNet.Image inImage, NullableRef<FilNet.Region> inRoi, float? inScale, float inOffset, bool inNormalizeZero, FilNet.Image outImage, FilNet.Profile diagLutProfile )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | inRoi | FilNet.NullableRef<FilNet.Region> | Region of interest. Default value: ftl::NIL. | ||
![]() | inScale | float? | Scaling factor (default: 255). Default value: ftl::NIL. | ||
![]() | inOffset | float | <1.0f, INF> | 1.0f | Offset factor. Default value: 1.0f. |
![]() | inNormalizeZero | bool | Specifies whether the output range should be rescaled to start from 0. | ||
![]() | outImage | FilNet.Image | Output image. | ||
![]() | diagLutProfile | FilNet.Profile | Profile depicting the resulting look-up table of the logarithm transform. |
Description
The operation applies logarithmic operator to each pixel of an image. Logarithmic operator is defined as follows:
\[inScale \cdot \frac{log(inOffset + |P(x,y)|)}{log(inOffset + M)}\]
where:
- M is the maximum of the inImage type (i.e. 255 for UInt8, 127 for Int8).
- inScale is the expected maximum value of the transformation. If set to Auto it will result in value 127 for Int8 image and 255 for other image types.
- inOffset value corresponds to the camera's black level. Its default value is equal 1 and causes the strongest possible transform.
When inNormalizeZero is set to True, the result is not only scaled, but also normalized so that pixel value 0 is still transformed into value 0. This assures that the entire output value range is utilized.
Examples
![]() |
![]() |
![]() |
The LogarithmImage performed on the sample image with parameters inScale = 250, inOffset = 50. The middle image inNormalizeZero = False and the left image has inNormalizeZero = True.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Hardware acceleration settings may be manipulated with Settings class.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not supported inImage pixel format in LogarithmImage. Supported formats: Int8, UInt8, Int16, UInt16, Int32. |
Function Overrides
- LogarithmImage(Image, Single, Boolean, Image)
- LogarithmImage(Image, NullableRef<Region>, Nullable<Single>, Single, Boolean, Image)