Flir Camera Adjustments
Flir Camera Adjustments
Flir Camera Adjustments
Table of Contents
FLIR Camera Adjustments ........................................................................................................................... 1
LWIR Video Camera .................................................................................................................................... 1
Application Note ........................................................................................................................................... 1
Document Number: 102-PS242-100-01 ....................................................................................................... 1
1.0
Document .......................................................................................................................................... 4
1.1
1.2
Scope ............................................................................................................................................. 4
2.0
2.1
2.2
2.3
2.4
2.5
2.5
3.0
4.0
Table of Figures
Figure 1: 14-bit Histogram............................................................................................................................ 6
Figure 2: Image of scene ............................................................................................................................... 7
Figure 3: Linear AGC, ITT Mean: 127, Max Gain: 8 ................................................................................... 7
Figure 4: Illustration of the Linear-Histogram Mapping Function ............................................................. 8
Figure 5: Plateau: 150, ITT Mean: 127, Max Gain: 8 ................................................................................... 9
Figure 6: Image Transform Table for Linear and Plateau algorithms......................................................... 10
Figure 7: Plateau: 250, ITT: 110, Max Gain: 8 ........................................................................................... 11
Figure 8: Plateau: 250, ITT: 150, Max Gain: 8 ........................................................................................... 11
Figure 9: Low contrast scene in 14-bit space. ............................................................................................. 12
Figure 10: Plateau: 250, ITT: 127, Max Gain: 8 ......................................................................................... 12
Figure 11: Low contrast Scene: default settings ......................................................................................... 12
Figure 12: Plateau: 250, ITT: 127, Max Gain: 25 ....................................................................................... 13
Figure 13: Low contrast scene: high gain ................................................................................................... 13
Figure 14: Plateau: 250, ITT: 127, Max Gain: 50 ....................................................................................... 13
Figure 15: Low Contrast Scene: very high gain ......................................................................................... 13
Figure 16: Illustration of Plateau Value .................................................................................................... 14
Figure 17: Illustration of Maximum Gain in a Bland Image .................................................................... 15
Figure 18: Illustration of ITT Midpoint .................................................................................................... 16
102-PS242-100-01 Rev110
June 2014
Page 3 of 28
1.0 Document
1.1 Revision History
Version
Date
Comments
100
10/25/2011
Initial Release
110
6/20/2014
1.2 Scope
This note is intended to provide a better understanding of FLIR image processing algorithms. Once these
are well understood by the user, the camera can be optimized to give the best possible image for a given
scenario. This document applies to the FLIR Quark, Quark 2, Tau, Tau 2 and Neutrino cameras. These
cores can be found in most FLIR Commercial Systems products.
The FLIR website will have the newest version of this document as well as offer access to many other
supplemental resources: http://www.flir.com/cvs/cores/resources/
Here is a sample of some of the resources that can be found:
Document Title
Tau Quick Start Guide
Quark Quick Start Guide
FLIR Camera Controller GUI
Users Guide
Document
Number
102-PS242-01
102-PS241-01
102-PS242-02
Description
102-PS242-100-01 Rev110
June 2014
Page 4 of 28
Plateau equalization
o Plateau value
o Maximum gain
o ITT midpoint
o ACE threshold
o SSO value
o Tail rejection
o Region of Interest (ROI)
o IIR filter
Information-based and Information-based equalization
o Information-based Threshold
Linear histogram
o ITT midpoint
o ROI
o IIR filter
Manual
o Brightness
o Contrast
o IIR filter
102-PS242-100-01 Rev110
June 2014
Page 5 of 28
Auto-bright
o Brightness
o Contrast
o IIR filter
Once-bright
o Brightness bias
o Contrast
o IIR filter
Note: FLIR highly recommends that each customer optimize AGC settings for each particular
application. Preferred AGC settings are highly subjective and vary considerably depending upon
scene content and user preferences. Generally speaking, FLIR recommends the plateau equalization
algorithm, but there are scenarios where each of the other algorithms may be better suited. The FLIR
GUI provides auto presets that can be used to tune AGC to the specific scene.
102-PS242-100-01 Rev110
June 2014
Page 6 of 28
1
2
2
3
June 2014
Page 7 of 28
The slope of the transformation is computed automatically based on the ROI histogram:
m = 255 / (14bit_(100 Tail Rejection)% - 14bit_(Tail Rejection)%),
where 14bit_(Tail Rejection)% is the 14-bit value corresponding to the user selectable tail rejection
percentage point on the cumulative ROI histogram and 14bit_(100 Tail Rejection)% is the value
corresponding to the difference between 100% and the user selectable tail rejection percentage point in
Tau 2.7 and Quark 2.0.
The offset is then computed as
b = ITT midpoint - avg(14bit_(100 Tail Rejection)%, 14bit_(Tail Rejection)%),* m
In other words, the algorithm attempts to map the midway point between the top and bottom tail rejection
points on the cumulative histogram to the specified ITT midpoint, as shown in Figure 4 for the case in
which the tail rejection parameter selected is 5%. The 8-bit values resulting from the above equations are
clipped to a minimum value of 0 and a maximum value of 255.
specified
ITT Midpoint
14bit_5%
specified
ITT Midpoint
14bit_5%
14bit_95%
14bit_95%
Avg(14bit_5%, 14bit_95%)
Avg(14bit_5%, 14bit_95%)
June 2014
Page 8 of 28
The following plot shows the Image Transform Table for both Linear and Plateau Histogram
Equalization. The 14-bit value on the x-axis will map to the 8-bit value on the y-axis where the
conversion is plotted. In 14-bit regions with low contrast, the curve is much flatter and there are not as
many 8-bit values consumed. In high detail regions, the curve is steep and more 8-bit values are used.
102-PS242-100-01 Rev110
June 2014
Page 9 of 28
Low Contrast
Histogram Equalized
Low Contrast
conversion
Linear 14 to 8 bit
Lots of Contrast
102-PS242-100-01 Rev110
June 2014
Page 10 of 28
102-PS242-100-01 Rev110
June 2014
Page 11 of 28
His
tog
June 2014
Page 12 of 28
Lo
ts
of
co
nt
ra
st
The plateau equalization algorithm performs a non-linear transformation from 14-bit to 8-bit based on
image histogram. It is a variant of classic histogram equalization, an algorithm that maps 14-bit to 8-bit
using the cumulative histogram of the 14-bit image as the mapping function. In classic histogram
equalization, an image comprised of 60% sky will devote 60% of the available 8-bit shades to the sky,
leaving only 40% for the remainder of the image. Plateau equalization limits the maximum number of
gray shades devoted to any particular portion of the scene by clipping the histogram (via the plateau
value) and limiting the maximum slope of the mapping function (via the maximum gain value). It also
provides an ITT midpoint value that allows mean brightness of the 8-bit image to be specified. The Tau
2.7 release includes the ability to allot a linear portion to the histogram (via Smart Scene Optimization),
include an irradiance dependent contrast adjustment (via Active Contrast Enhancement), and specify
outlier rejection (via Tail Rejection). The description below provides explanations of each of these
parameters.
102-PS242-100-01 Rev110
June 2014
Page 13 of 28
102-PS242-100-01 Rev110
June 2014
Page 14 of 28
Maximum Gain. For scenes with high dynamic range (that is, wide 14-bit histogram), the maximum gain
parameter has little effect. For a very bland scene, on the other hand, it can significantly affect the
contrast of the resulting image. Figure 17 provides an example.
102-PS242-100-01 Rev110
June 2014
Page 15 of 28
ITT Midpoint. The ITT Midpoint can be used to shift the 8-bit histogram darker or brighter. The
nominal value is 128. A lower value causes a darker image, as shown in Figure 18. A darker image can
help improve the perceived contrast, but it is important to note that more of the displayed image may be
railed (8bit value = 0 or 255) by moving the midpoint away from 128. This can be seen in the histogram
of Figure 18.
102-PS242-100-01 Rev110
June 2014
Page 16 of 28
SSO Value. The Smart Scene Optimization (SSO) value defines the percentage of the histogram that will
be allotted a linear mapping. Enabling this feature facilitates the avoidance of irradiance level
compression, which is specifically important for bi-modal scenes. With SSO enabled, the radiometric
aspects of an image are better preserved (i.e. the difference in gray shades between two objects is more
representative of the difference in temperature). While radiometry is better preserved with this feature, the
compromise is the optimization in local contrast. Figure 20 illustrates the effects of SSO. In the left
image, SSO is disabled and the hot object and person get mapped to two shades of gray next to one
another causing a washed out effect and making it appear as though the person and fire are similar in
temperature. In the right image, SSO is enabled, and the hot object and person are decompressed with
gray shades separating them.
102-PS242-100-01 Rev110
June 2014
Page 17 of 28
Tail Rejection. The tail rejection parameter defines the percentage of the total number of pixels in the
array that will be excluded prior to histogram equalization. The user-selected percentage of pixels will be
removed from both the bottom and top of the 14-bit histogram prior to AGC. This feature is useful for
excluding outliers and the most extreme portions of the scene that may be of less interest. FLIR
recommends tail rejection settings less than 1% to avoid the exclusion of important scene content.
Region of Interest (ROI). In some situations, it is desirable to have the AGC algorithm ignore a portion
of the scene when collecting the histogram. For example, if the Tau 2 core is rigidly mounted such that
the sky will always appear in the upper portion of the image, it may be desirable to leave that portion of
the scene out of the histogram so that the AGC can better optimize the display of the remainder of the
image. This is illustrated in Figure 21. Similarly for a hand-held application, it may be desirable to
optimize the display of the central portion of the image. For those applications, it is possible to specify a
region of interest (ROI) beyond which data is ignored when collecting the image histogram. Any scene
content located outside of the ROI will therefore not affect the AGC algorithm. (Note: this does not mean
the portion outside of the ROI is not displayed, just that the portion outside does not factor into the
optimization of the image.)
102-PS242-100-01 Rev110
June 2014
Page 18 of 28
Top / Bottom: 0 = center of the display, negative values are above center, positive values are below center,
units are in pixels
Left / Right: 0 = center of display, negative values are left of center, positive values are right of center,
units are in pixels
For Tau 2.1 and later, a single ROI is specified regardless of zoom (see product specification).
Coordinates for the ROI are as follows:
Top / Bottom: 0 = center of the window, negative values are above center, positive values are below
center, units are percentage of zoom window size (-512 = -50%, +512 = + 50%).
Left / Right: 0 = center of display, negative values are left of center, positive values are right of center,
units are percentage of zoom window size (-512 = -50%, +512 = + 50%).
(Notice the image on the right has more contrast in the portion of the image below the sky.)
102-PS242-100-01 Rev110
June 2014
Page 19 of 28
If the AGC filter value is set to a low value, then if a hot object enters the field of view, the AGC will
adjust more slowly to the hot object, resulting in a more gradual transition. In some applications, this can
be more pleasing than a sudden change to background brightness. For the Tau 2.7 release, a filter
coefficient of 255 is a special case for immediate updates, a value of 1 provides the most filtering or
slowest refresh rate, and a value of 0 indicates no further updates to AGC. For previous releases of Tau 2,
a filter coefficient of 0 was a special case for immediate updates, a value of 1 was the most filtering or
slowest refresh rate, and the case for no AGC updates was unavailable.
The differences between the Information-based and Information-based Equalization algorithms are
noteworthy as both have advantages. The Information-based algorithm completely excludes pixels from
histogram equalization if they are below the information threshold (described later in this section). This is
advantageous in that noise is completely removed from areas of the image determined by the algorithm to
not contain information, but scenarios in which the user is attempting to detect small temperature or
emissivity variations are not ideal for this mode because desired information may be lost depending on
the threshold. The Information-based Equalization algorithm includes every pixel independent of scene
information in the histogram equalization process, but simply weights each pixel based on the information
threshold. This mode shows more moderate improvements in scenes with large areas void of information,
but the advantage over the Information-based mode is that scene content will never be removed. Figure
22 shows the Plateau Equalization algorithm on the left for reference and the Information-based and
Information-based Equalization algorithms center and right respectively with information threshold set to
40.
102-PS242-100-01 Rev110
June 2014
Page 20 of 28
(b) Information-based
(c) Information-based
Equalization
Figure 22: Illustration of the difference between Plateau Equalization, Information-based, and
Information-based Equalization algorithms
Information Threshold. The information threshold parameter defines the difference between neighboring
pixels used to determine whether the local area contains information or not. Lower thresholds result in
the algorithm determining that more of the scene contains information, resulting in more areas included in
the Information-based algorithm and given a higher weighting in the Information-based Equalization
algorithm. Decreasing the threshold will result in imagery approaching the appearance of the Plateau
Equalization algorithm. Increasing the threshold will result in a more information-dependent image, that
is the flat portions of the scene (e.g. sky or sea) are given less contrast and the pixels exceeding the
information threshold will be given more contrast.
June 2014
Page 21 of 28
Auto Bright
The auto-bright algorithm is identical to the manual algorithm except that brightness value is
automatically and dynamically updated to equal array mean. In other words, the array mean is
automatically mapped to an 8-bit value of 127.
Once Bright
The once bright algorithm is identical to the auto-bright algorithm except that the offset of the linear
transformation, b, is computed only at the time the algorithm is selected and is not dynamically updated.
It is computed as
b = 127 (frame mean brightness bias)*m,
where brightness bias is a user-specified parameter.
2.5
The Tau 2 core provides an optional digital-data-enhancement (DDE) algorithm which can be used to
enhance image details and/or suppress fixed pattern noise. Two modes are available, manual and
dynamic. The descriptions of each mode are as follows:
Dynamic mode: DDE parameters are computed automatically based on scene contents. DDE
index (which supplants the spatial-threshold parameter used in the manual algorithm) is the only
controlling parameter and ranges from -20 to 100 for Tau 2.7 and later releases, with higher
values representing higher degrees of detail enhancement. If no enhancement is desired, the
value should be set to 0. Values less than 0 soften the image and filter fixed pattern noise, as
exemplified in the figures below. Values greater than 0 sharpen the details in the image. For
previous Tau 1 and Tau 2 releases, the DDE index ranged from 0 to 63, where 0 to 16 softened
the image, 17 was neutral, and 18 to 63 sharpened detail.
102-PS242-100-01 Rev110
June 2014
Page 22 of 28
102-PS242-100-01 Rev110
June 2014
Page 23 of 28
3.0
DDE Gain: ranges from 0 to 65535 for Tau 2.7 and later releases and represents the
magnitude of high-frequency boost
For gain > 0, details are enhanced by gain/2048. In other words, a value of 1
represents a 1/2048 attenuation of details whereas a value of 8192 represents a
4X enhancement of details. Note that gain is also applied globally and locally to
the low frequency portion of the image, and therefore the DDE gain is relative
(therefore users are strongly discouraged from using manual DDE mode).
DDE threshold: ranges from 0 to 255 and represents the maximum detail magnitude that
is boosted. Details with variance exceeding the threshold are not enhanced. Details with
variance less than the thresholds are enhanced. Values greater than 255 will place the
camera in Dynamic DDE mode with a DDE index of x-255. In this case, DDE Gain and
DDE spatial threshold are adjusted dynamically.
DDE spatial threshold: ranges from 0 to 15, and represents the threshold of the pre-filter
(smoothing filter) applied to the signal prior to high-frequency boost. The pre-filter
prevents low-magnitude fixed-pattern noise from being amplified. Note that the DDE
spatial threshold also represents the DDE index when in automatic DDE mode.
Another topic to discuss is the image LUT (Lookup Table). There are a number of lookup tables that
make the image colored. This is called false color, or pseudocolor. The color is not actually related to
wavelengths of light, but rather the grayscale intensity. The most useful might be the option for White
Hot and Black Hot, which is also called the polarity of the image. The Black Hot palette is a pure
inversion of the 8-bit data where zero becomes the hottest and 255 becomes the coldest. There are some
applications where a Black Hot image allows for more perceived contrast in the image. This is primarily
due to concept discussed earlier about low luminance changes.
102-PS242-100-01 Rev110
June 2014
Page 24 of 28
Cold
Cold
Cold
Hot
Hot
Hot
Hot
White Hot
Black Hot
Fusion
Rainbow
Cold
Cold
Cold
Cold
Hot
Hot
Hot
Hot
Glowbow
Ironbow1
Ironbow2
Sepia
Cold
Cold
Cold
Cold
Hot
Hot
Hot
Hot
Color1
Color2
Ice Fire
Rain
Figure 28: Look-Up Table Options (Without Isotherms)
The Tau 2.4 and Quark 2.0 releases and later added a second set of palettes associated with isotherms.
The cameras detect and image the temperatures in a given scene. Within the camera, these temperatures
are mapped (as determined by the AGC algorithm selected) to a range of 0 to 255 values. When Isotherms
are enabled, the camera uses the first 128 values of the AGC data which is relative to the scene and the
upper 128 palette values are linearly mapped to absolute temperatures.
The first Isotherm temperatures are mapped to 128 to 175, the second Isotherm temperatures are mapped
to 176 to 223 and the third Isotherm temperatures are mapped to 224 to 255.
The two MidRangeIso LUTs scale 0 to 127 for the first half of the gray scale, then the first two Isotherm
values use 128 to 175 to map yellow and then the scale continues on in gray scale until reaching the max
value of 255.
102-PS242-100-01 Rev110
June 2014
Page 25 of 28
WhiteHotIso
102-PS242-100-01 Rev110
June 2014
Page 26 of 28
Cold
Hot
Cold
Hot
Cold
Hot
Cold
Hot
WhiteHotIso
Cold
BlackHotIso
GlowboIso
Hot
Cold IronbowWhiteHotIso
MidRangeWHIso
Hot
Cold
MidRangeBHIso
RedHotIso
Hot
Cold
GreenHotIso
Cold
FusionIso
Cold
RainbowIso
Hot
Cold IronbowBlackHotIso
Hot
Cold
SepiaIso
Hot
Hot
Cold
IceFireIso
Hot
Cold
RainbowHCIso
Hot
Hot
Figure 30: Look-Up Table Options (with Isotherms)
June 2014
Page 27 of 28
102-PS242-100-01 Rev110
June 2014
Page 28 of 28