Lepton Software Interface Desc Doc Datasheet by FLIR Lepton

The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON®
Software Interface Description Document (IDD)
Document Number: 110-0144-04 Rev 303
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Table of Contents
1 Document Description .......................................................................................................................... 6
1.1 Revision History............................................................................................................................. 6
1.2 Scope ............................................................................................................................................. 6
1.3 References .................................................................................................................................... 7
1.3.1 FLIR Systems Documents ...................................................................................................... 7
1.3.2 External Documents .............................................................................................................. 7
1.3.3 Acronyms / Abbreviations ..................................................................................................... 8
1.3.4 Factory Defaults vs. Software Defaults ................................................................................. 8
2 Communications Protocol .................................................................................................................... 9
2.1 CCI/TWI Register Protocol............................................................................................................. 9
2.1.1 I2C Command Interface Start-Up ........................................................................................ 11
2.1.1.1 Start-up command sequence .......................................................................................... 11
2.1.2 CCI/TWI Interface ................................................................................................................ 17
2.1.2.1 Reading from the camera ............................................................................................... 17
2.1.2.2 Writing to the camera ..................................................................................................... 18
2.1.3 CCI/TWI Command Register................................................................................................ 19
2.1.3.1 Protection Bits ................................................................................................................. 19
2.1.3.2 Module ID ........................................................................................................................ 20
2.1.3.3 Command ID ................................................................................................................... 21
2.1.3.4 Command Type ............................................................................................................... 21
2.1.4 CCI/TWI Power ON Register ................................................................................................ 21
2.1.5 CCI/TWI Status Register ...................................................................................................... 21
2.1.5.1 Boot Status Bit (Bit 2) ...................................................................................................... 22
2.1.5.2 Boot Mode Bit (Bit 1) ...................................................................................................... 22
2.1.6 CCI/TWI Data Length Register ............................................................................................. 22
2.1.7 CCI/TWI Data Registers ....................................................................................................... 22
2.1.8 CCI/TWI Byte Order ............................................................................................................. 22
2.1.8.1 Multi-Word Transfers ...................................................................................................... 23
2.1.8.2 CCI/TWI Data Block Buffer .............................................................................................. 23
2.2 CRC Handling ............................................................................................................................... 23
2.2.1 Message CRC Bytes ............................................................................................................. 23
2.3 Lepton SDK Error Codes .............................................................................................................. 25
3 Startup and Port Configuration........................................................................................................... 26
3.1 Port Selection .............................................................................................................................. 27
4 SDK camera Modules .......................................................................................................................... 28
4.1 Data Types ................................................................................................................................... 28
4.2 Command Format ....................................................................................................................... 29
4.3 Command Word Generation Example ........................................................................................ 29
4.3.1 AGC, VID, and SYS Module Command ID Generation ......................................................... 29
4.3.2 OEM and RAD Module Command ID Generation ............................................................... 30
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4 SDK Module: AGC 0x100 .......................................................................................................... 31
4.4.1 AGC Enable and Disable ...................................................................................................... 32
4.4.2 AGC Policy Select ................................................................................................................. 34
4.4.3 AGC ROI Select .................................................................................................................... 35
4.4.4 AGC Histogram Statistics ..................................................................................................... 37
4.4.5 AGC HEQ Dampening Factor ............................................................................................... 39
4.4.6 AGC HEQ Clip Limit High ..................................................................................................... 40
4.4.7 AGC HEQ Clip Limit Low ...................................................................................................... 42
4.4.8 AGC HEQ Empty Counts ...................................................................................................... 43
4.4.9 AGC HEQ Output Scale Factor ............................................................................................. 44
4.4.10 AGC Calculation Enable State .............................................................................................. 46
4.4.11 AGC HEQ Linear Percent ..................................................................................................... 47
4.5 SDK Module: SYS 0x200 ............................................................................................................ 49
4.5.1 SYS Ping Camera .................................................................................................................. 50
4.5.2 SYS Status ............................................................................................................................ 51
4.5.3 SYS FLIR Serial Number ....................................................................................................... 52
4.5.4 SYS Camera Uptime ............................................................................................................. 53
4.5.5 SYS AUX Temperature Kelvin .............................................................................................. 54
4.5.6 SYS FPA Temperature Kelvin ............................................................................................... 55
4.5.7 SYS Telemetry Enable State ................................................................................................ 56
4.5.8 SYS Telemetry Location ....................................................................................................... 57
4.5.9 SYS Frame Average .............................................................................................................. 58
4.5.10 SYS Number of Frames to Average ..................................................................................... 59
4.5.11 SYS Camera Customer Serial Number ................................................................................. 61
4.5.12 SYS Camera Video Scene Statistics ..................................................................................... 62
4.5.13 SYS Scene ROI Select ........................................................................................................... 64
4.5.14 SYS Thermal Shutdown Count ............................................................................................. 66
4.5.15 SYS Shutter Position Control ............................................................................................... 67
4.5.16 SYS FFC Mode Control ......................................................................................................... 68
4.5.17 SYS Run FFC Normalization ................................................................................................. 71
4.5.18 SYS FFC Status ..................................................................................................................... 72
4.5.19 SYS Gain Mode .................................................................................................................... 73
4.5.20 SYS FFC States ..................................................................................................................... 75
4.5.21 SYS Gain Mode Object......................................................................................................... 76
4.5.22 SYS Average Frames Aggregate Command ...................................................................... 79
4.5.23 SYS AUX Temperature Celsius helper function ................................................................. 80
4.5.24 SYS FPA Temperature Celsius helper function ................................................................. 81
4.6 SDK Module: VID 0x300 ............................................................................................................ 82
4.6.1 VID Pseudo-Color Look-Up Table Select ............................................................................. 83
4.6.2 VID User Pseudo-Color Look-Up Table Upload/Download ................................................. 85
4.6.3 VID Focus Calculation Enable State ..................................................................................... 87
4.6.4 VID Focus ROI Select ........................................................................................................... 89
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.6.5 VID Focus Metric Threshold ................................................................................................ 91
4.6.6 VID Focus Metric ................................................................................................................. 93
4.6.7 VID Video Freeze Enable State ............................................................................................ 94
4.6.8 VID Video Output Format ................................................................................................... 95
4.6.9 VID Low Gain Pseudo-Color Look-Up Table Select ............................................................. 97
4.7 SDK Module: OEM 0x800 ......................................................................................................... 99
4.7.1 Setting the OEM Protection Bit ........................................................................................... 99
4.7.2 OEM Power On .................................................................................................................. 100
4.7.3 OEM Power Down ............................................................................................................. 101
4.7.4 OEM FLIR Systems Part Number ....................................................................................... 102
4.7.5 OEM Camera Software Revision ....................................................................................... 103
4.7.6 OEM Video Output Enable ................................................................................................ 104
4.7.7 OEM Video Output Format Select .................................................................................... 106
4.7.8 OEM Video Output Source Select ..................................................................................... 108
4.7.9 OEM Customer Part Number ............................................................................................ 110
4.7.10 OEM Video Output Source Constant Value ...................................................................... 111
4.7.11 OEM Run Camera Re-Boot ................................................................................................ 113
4.7.12 OEM FFC Normalization Target ......................................................................................... 114
4.7.13 OEM Status ........................................................................................................................ 116
4.7.14 OEM Frame Mean Intensity .............................................................................................. 117
4.7.15 OEM GPIO Mode Select .................................................................................................... 118
4.7.16 OEM GPIO VSync Phase Delay .......................................................................................... 120
4.7.17 OEM User Defaults ............................................................................................................ 122
4.7.18 OEM Restore User Defaults .............................................................................................. 124
4.7.19 OEM Shutter Profile .......................................................................................................... 125
4.7.20 OEM Thermal Shutdown Enable ....................................................................................... 127
4.7.21 OEM Bad Pixel Replacement Control ................................................................................ 129
4.7.22 OEM Temporal Filter Control ............................................................................................ 131
4.7.23 OEM Column Noise Filter (SCNR) Control ......................................................................... 133
4.7.24 OEM Pixel Noise Filter (SPNR) Control .............................................................................. 135
OEM Run FFC Normalization Frames Aggregate Command .......................................................... 136
4.8 SDK Module: RAD 0xE00 ......................................................................................................... 137
4.8.1 Setting the OEM Protection Bit ......................................................................................... 137
4.8.2 RAD RBFO External Parameters ........................................................................................ 138
4.8.3 RAD Radiometry Control Enable ....................................................................................... 140
4.8.4 RAD TShutter Mode .......................................................................................................... 142
4.8.5 RAD TShutter Temperature............................................................................................... 144
4.8.6 RAD FFC Normalization ..................................................................................................... 145
4.8.7 RAD Run Status ................................................................................................................. 146
4.8.8 RAD Flux Linear Parameters .............................................................................................. 147
4.8.9 RAD T-Linear Enable State ................................................................................................ 149
4.8.10 RAD T-Linear Resolution ................................................................................................... 151
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.8.11 RAD T-Linear Auto Resolution ........................................................................................... 153
4.8.12 RAD Spotmeter Region of Interest (ROI) .......................................................................... 155
4.8.13 RAD Spotmeter Value ....................................................................................................... 157
4.8.14 RAD Low Gain RBFO External Parameters ........................................................................ 159
List of Tables
Table 1 CCI/TWI Device Parameters ........................................................................................................... 17
Table 2 Lepton SDK Modules ...................................................................................................................... 28
Table 3 Command Types ............................................................................................................................. 28
List of Figures
Figure 1 Lepton CCI/TWI Registers ............................................................................................................. 11
Figure 2 Lepton CCI/TWI Get or Read Attribute Sequence......................................................................... 14
Figure 3 Lepton CCI/TWI Set or Write Sequence ........................................................................................ 15
Figure 4 Lepton CCI/TWI Run Command Sequence .................................................................................... 16
Figure 5 CCI/TWI Single READ from random location reads 16-bit DATA .................................................. 17
Figure 6 CCI/TWI Setting the camera's CCI/TWI current address ............................................................... 17
Figure 7 CCI/TWI Reading sequentially from the camera's CCI/TWI current address ................................ 18
Figure 8 CCI/TWI Single WRITE to random location writes 16-bit DATA ................................................... 18
Figure 9 CCI/TWI Writing sequentially ........................................................................................................ 18
Figure 10 Lepton Command Word Format ................................................................................................. 20
Figure 11 CCI/TWI Status Register Definition ............................................................................................ 22
Figure 12 Lepton SDK Response Error Codes ............................................................................................. 25
The Wur‘d‘s Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
1 Document Description
1.1 Revision History
Rev. #
Date
Comments
100
December 8, 2016
Official release for Lepton and Lepton with Radiometry configurations
200
April 4, 2017
Updates to include Lepton 3 (160x120) Release
300
Updates to include Lepton 3 with Radiometry Release
Other minor updates including:
Removal of the Lepton configuration compatibility with TAux in Kelvin
command
301
July 2, 2018
Updated reference to Lepton Engineering Datasheet.
Updated Lepton nomenclature to 1.5, 1.6, 2.0, 2.5, 3.0 and 3.5.
Updated table under “4.4.27 SYS FFC Mode Control”.
LEP_GetOemVideoOutputSource()/LEP_SetOemVideoOutputSource() not
supported.
LEP_GetOemTemporalFilterControl()/LEP_SetOemTemporalFilterControl() not
supported in Lepton 2.5.
LEP_GetOemShutterProfileObj()/LEP_SetOemShutterProfileObj() not supported in
Lepton 2.5.
LEP_GetOemThermalShutdownEnable()/LEP_SetOemThermalShutdownEnable()
not supported in Lepton 2.5.
LEP_GetOemBadPixelReplaceControl()/LEP_SetOemBadPixelReplaceControl() not
supported in Lepton 2.5.
LEP_GetOemPixelNoiseSettings()/LEP_SetOemPixelNoiseSettings() not supported
in Lepton 2.5.
302
July 12, 2018
Updated table of contents
303
August 27, 2018
Updated EAR statement
Changed support for TAux to Lepton 2.5 and 3.5
Clarified use of the camera’s DATA Length Register
1.2 Scope
This interface description document (IDD) defines software interface requirements and software
commands available to a Host for Lepton 1.5, 1.6, 2.0, 2.5, 3.0 and 3.5 configurations. The term “Lepton”
is often utilized in this document to refer to the entire product-line, but each configuration is explicitly
referenced in the “Compatbility” field of each command description for clarity. This version of the IDD
includes AGC, SYS, VID, OEM and RAD module commands.
The Wur‘d's Sixth Sense‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
1.3 References
The following documents form a part of this specification to the extent specified herein.
1.3.1 FLIR Systems Documents
500-0659-00-09
Lepton Engineering Datasheet
1.3.2 External Documents
UM10204
The Wufld's Suth Sense crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
1.3.3 Acronyms / Abbreviations
AGC
Automatic Gain Control
BIT
Built -In Test
CCI
Command and Control Interface
CMD
Command
CRC
Cyclic Redundancy Check
FFC
Flat Field Correction
FPA
Focal Plane Array
I2C
Inter-Integrated Circuit a multi-master serial single-ended
computer bus invented by Philips
LSB
Least Significant Byte
LUT
Look-Up Table
MSB
Most Significant Byte
ROI
Region of Interest
RX
Receive
SN
Serial Number
SPI
Serial Peripheral Interface
SW
Software
TBD
To Be Determined
TWI
Two-Wire Interface supporting I2C
TX
Transmit
1.3.4 Factory Defaults vs. Software Defaults
For each API, there may be an associated default value for any particular attribute. However,
depending on the camera configurations or version, the actual defaults may be different than the
ones listed. You will find the actual defaults for a particular configuration under columns labelled
as “Factory Default”.
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
2 Communications Protocol
Lepton supports Host command and control over a Two-Wire Interface (CCI/TWI). The SDK provides
layering to isolate the operations and Lepton protocol from the Data link physical transport.
2.1 CCI/TWI Register Protocol
The Lepton camera module supports a command and control interface (CCI) hosted on a Two-Wire
Interface (TWI) similar to I2C. The interface consists of a small number of registers through which a Host
issues commands to, and retrieves responses from the Lepton camera module. See Figure 1.
crLIR The World's Sixth Sense
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Block DATA Buffer 1
0xFC00
Range 0xFC00 : 0xFFFF
Power On/Off Register
16-bits
Lepton CCI / TWI Interface
Block DATA Buffer 0
0xF800
1024 BYTES
Range 0xF800 : 0xFBFF
STATUS Register
0x0000
Command ID Register
0x0002
Command STATUS read
here. BUSY Bit is 0
Command ID’s written here
Command DATA I/O here
Up to 16 registers
DATA Length Register
0x0004
DATA 0 Register
DATA 1 Register
0x0006
DATA 2 Register
0x0008
DATA 3 Register
0x000A
DATA 4 Register
0x000C
DATA 5 Register
0x000E
DATA 6 Register
0x0010
DATA 7 Register
0x0012
DATA 8 Register
0x0014
DATA 9 Register
0x0016
DATA 10 Register
0x0018
DATA 11 Register
0x001A
DATA 12 Register
0x001C
DATA 13 Register
0x001E
DATA 14 Register
0x0020
DATA 15 Register
0x0022
0x0024
Length of DATA to read/
write goes here
0x0026
Sub-Address
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Figure 1 Lepton CCI/TWI Registers
Typical transmission requires the sequence of:
1. Polling the status register until camera is ready for a new command (BUSY bit clear).
2. Polling the SYS FFC Status command (see 4.5.18) to verify the system is ready to process a new
command (System Ready returned).
3. Writing data to send to the camera if required into the DATA Registers or block Data buffer.
4. Writing the number of data words written (16-bit data words) to the Data Length Register.
5. Writing the desired command ID to the Command Register.
6. Polling the Status Register to determine when the command is completed (busy bit cleared).
7. Read the success code from the status register.
8. Retrieve any responses as required from the Data registers or block Data buffer.
There are three basic operations capable of being commanded via the CCI. The first is a “get” or read of
data, the second is a “set” or write of data and the third is a “run” or execution of a routine. A typical
get sequence is illustrated in Figure 2, a typical set in Figure 3, and a typical run in Figure 4.
2.1.1 I2C Command Interface Start-Up
The I2C interface in the Lepton camera becomes available for Host access after the camera is brought
out of reset or power cycling. It is imperative that the Host does not attempt to read or write this
interface until it is available to avoid the camera from blocking further access attempts. The Host must
wait a minimum of 950 milliseconds after releasing RESET_L.
2.1.1.1 Start-up command sequence
The Lepton camera requires power to be applied first, clocks applied, then RESET_L de-asserted. After
this, the Host must wait a minimum of 950 milliseconds before attempting to access the I2C interface.
When accessing the I2C interface, the following sequence is recommended:
a. Wait 950 milliseconds minimum after power on, clocks applied, and RESET_L de-asserted
If the camera has an attached shutter, the minimum wait period should be
extended to 5 seconds to allow the camera’s automatic execution of a flat-field
correction (Auto FFC mode).
b. Read the STATUS register (register address 0x0002) bit 2
If Bit 2 is 0, then the camera has not booted yet, extend the wait period.
If Bit 2 is 1, then the camera has booted, I2C interface is available
c. Read the STATUS register (register address 0x0002) bit 0
If Bit 0 is 1, then the interface is busy, poll until Bit 0 becomes 0
If Bit 0 is 0, then the interface is ready for receiving commands.
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
d. Poll the SYS FFC Status command (see 4.5.18), to verify the system is ready to process a
new command (System Ready returned).
% g (:3 (:3 sum The Wur‘d's Sixth Sensa‘
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Host Writes Number of DATA words to read into the
DATA Length Register
Host Reads Command Status Register
Command
BUSY
Host Reads Command Status Register
Command
BUSY
Host Reads DATA from the DATA registers
HOST READ
ATTRIBUTE
NO
NO
DONE
YES
YES
Host Processes the Command Error Response from
the STATUS register
Command
Error
NO
YES
Host Writes Command ID to the Command Register
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Figure 2 Lepton CCI/TWI Get or Read Attribute Sequence
v‘. FL I R ‘ The Wur‘d's Sixth Sensa‘
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Host Writes the number of DATA registers written to
the DATA Length Register
Host Reads Command Status Register
Command
BUSY
Host Reads Command Status Register
Command
BUSY
Host Processes the Command Error Response from
the STATUS register
HOST WRITE
ATTRIBUTE
NO
NO
DONE
YES
YES
Host Writes DATA to the DATA Register(s)
Host Writes Command ID to the Command Register
Figure 3 Lepton CCI/TWI Set or Write Sequence
crLIR The Wur‘d's Sixth Sensa‘
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Host Writes Command ID to the COMMAND Register
Host Reads STATUS Register
Command
BUSY
Host Reads STATUS Register
Command
BUSY
Host Processes Command Error Response in the
STATUS register
HOST
RUN
COMMAND
NO
NO
DONE
YES
YES
Figure 4 Lepton CCI/TWI Run Command Sequence
‘ ‘ ‘+,4:| crLIR The World's Sixth Sense‘
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
2.1.2 CCI/TWI Interface
The CCI/TWI interface is similar to the I2C standard; however, Lepton registers are all 16-bits wide and
consequently only 16-bit transfers are allowed. This is illustrated in Figure 5. Device parameters are
listed in Table 1.
Table 1 CCI/TWI Device Parameters
Device ID
0x2A (7-bit addressing)
Transfer DATA Bit Width
16-bits
Clock
100Kbaud, 400Kbaud & 1M baud.
2.1.2.1 Reading from the camera
Reading DATA from the camera using the CCI/TWI interfaces follows the I2C standard except the DATA is
all 16-bit wide. All camera CCI/TWI Registers are 16-bits wide, and the larger DATA buffer is organized
as 512 x 16-bits. The camera supports access to random locations in which the transmission includes
the starting Register address in the transmission, access to the current address, and address auto-
increment. Figure 5 illustrates typical CCI/TWI Register Read access transmission. The camera accepts
the Repeated START condition to combine specifying the register address with register access in a single
transmission. Alternatively, one can separate a write transmission to set the current address, then issue
READ transmissions that start at this current address. A read is stopped by sending a Not Acknowledge
signal followed by a Stop sequence. A sequential read can be stopped after reading the last byte by
sending a Not Acknowledge signal followed by a Stop sequence.
Single READ from random location 16-Bit words
SDEVICE ADDRESS [7:1] 0 A REGISTER ADDRESS [15:8] REGISTER ADDRESS [7:0]A A R
SDEVICE ADDRESS [7:1] 1 PAA DATA [15:8] A DATA [7:0]
MSB LSB
Figure 5 CCI/TWI Single READ from random location reads 16-bit DATA
Set Base Address Register current location to random location
S DEVICE ADDRESS [7:1] 0 A REGISTER ADDRESS [15:8] REGISTER ADDRESS [7:0]A A P
NEW BASE ADDRESS VALID AS THE CURRENT ADDRESSPREVIOUS ADDRESS VALID
Use STOP condition
Figure 6 CCI/TWI Setting the camera's CCI/TWI current address
I:I:|:|:|:|]F //fi ——I 11: \— g \—;C I \ \ \ \ \ \ \ \ \ \ :x x: I \ \ \ \ \ \ \ \ \ // |:|]] x X. X X—X: _’ 8 FL I R The World‘s Sixth Sense‘
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Sequential READ from current location byte at a time, 16-Bit words
SDEVICE ADDRESS [7:1] 1 A DATA [15:8] A PDATA [7:0] DATA [7:0]A
Last Byte [N]First Byte Second Byte
CURRENT ADDRESS VALID ADDRESS +1 ADDRESS +2
Auto-Increment Address
ADDRESS +[ N 1 ]
A
Figure 7 CCI/TWI Reading sequentially from the camera's CCI/TWI current address
2.1.2.2 Writing to the camera
Writing DATA to the camera using CCI/TWI interfaces follows the I2C standard except the DATA are all
16-bits wide. All camera CCI/TWI Registers are 16-bits wide, and a larger DATA buffer is organized as
512 x 16-bits. The camera’s DATA Length Register must specify lengths as the number of 16-bit DATA
words to be transferred.
The camera supports access to a random 16-bit aligned location in which the starting register address is
specified in the transmission with post-access address auto-increment for sequential reads or writes.
The camera also supports access to the current address with post-access address auto-increment.
Typical register writes are illustrated in Figure 8, and sequential writes are illustrated in Figure 9.
Single WRITE to random location 16-bit words
SDEVICE ADDRESS [7:1] 0 A REGISTER ADDRESS [15:8] REGISTER ADDRESS [7:0] AA DATA [15:8] A DATA [7:0] A P
NEW BASE ADDRESS VALIDPREVIOUS ADDRESS VALID BASE ADDRESS +1 BASE ADDRESS +2
Auto-Increment Address
MSB LSB
Figure 8 CCI/TWI Single WRITE to random location writes 16-bit DATA
Sequential WRITE to random location byte at a time, 16-Bit words
SDEVICE ADDRESS [7:1] 0 A REGISTER ADDRESS [15:8] REGISTER ADDRESS [7:0] AA DATA [15:8] A PDATA [7:0] DATA [7:0]A A
Last Byte [N]First Byte Second Byte
NEW BASE ADDRESS VALIDPREVIOUS ADDRESS VALID ADDRESS +1 ADDRESS +2
Auto-Increment Address
ADDRESS +[N-1]
Figure 9 CCI/TWI Writing sequentially
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
2.1.3 CCI/TWI Command Register
The Lepton Command Register is a 16-bit register located at Register Address 0x0004. This register is
used to issue a command to the Lepton camera. Writing a value to this register initiates the camera’s
command processing. It is important to make sure the Command BUSY bit in the Lepton Status Register
(Register Address 0x0002) indicates that the camera is ready to accept a new command (BUSY bit
cleared) before initiating a new command; otherwise the camera communication may become
compromised, necessitating a restart or reboot of the camera.
The Command Register Word register bit definitions are illustrated in Figure 10. The Command Register
Word is composed of 4 fields, each described in more detail in the sections that follow:
1. Protection Bit OEM.
2. A Module ID designating which camera subsystem to access (see Table 2)
3. A Command ID that specifies a unique element or command base, for that subsystem.
4. A command type designating the command is one of Get or Set data type or Run type (see Table
3).
2.1.3.1 Protection Bits
Certain commands require the setting of an associated protection bit such as RAD and OEM commands,
because if inadvertently or incorrectly called, may compromise the camera operation.The camera uses
these protection bits to verify that the camera is in the proper mode to accept these commands. If the
camera is not in the correct mode, the command will not execute and the return code will indicate an
invalid command. When executing the OEM and RAD interfaces, it is required that the OEM Bit (bit 14)
is also set in the command register.
crLIR The World’s smn Sense’
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Module
ID
Public
Module
Command IDs
(up to 64 per module)
Command
Type
OEM
BIT
Undefined
BITs
0 0 GET
0 1 SET
1 0 RUN
1 1 undefined
0 0 0 0 undefined
0 0 0 1 AGC
0 0 1 0 SYS
0 0 1 1 VID
0 1 0 0 undefined
0 1 0 1 undefined
0 1 1 0 undefined
0 1 1 1 undefined
1 0 0 0 OEM
1 0 0 1 undefined
1 0 1 0 undefined
1 0 1 1 undefined
1 1 0 0 reserved
1 1 0 1 reserved
1 1 1 0 RAD
1 1 1 1 reserved
Lepton Command Word (I2C Register)
Undefined
BITs
Figure 10 Lepton Command Word Format
2.1.3.2 Module ID
The Lepton camera Module ID designates which camera module to address. The camera modules
encapsulate properties or attributes and methods of a camera sub-system. Currently, Lepton defines
five sub-systems and the SDK exposes their associated module as follows:
AGC Automatic Gain Control, affects image contrast and quality
SYS System information
VID Video processing control
OEM Camera configuration for OEM customers
RAD Radiometry
The Module IDs and their location in the Lepton command word are illustrated in Figure 10.
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
2.1.3.3 Command ID
For each of the Lepton camera modules, a unique Lepton Command ID identifies an element of the
module, either an attribute or property, or an action. Each camera module exposes up to 64 Command
IDs assigned to attributes and/or methods of that module.
2.1.3.4 Command Type
A command type specifies what the command does.
0x00 Get a module property or attribute value
0x01 Set a module property or attribute value
0x02 Run execute a camera operation exposed by that module
2.1.4 CCI/TWI Power ON Register
The Power ON register islocated at Register Address 0x0000, and is used to turn the camera ON (only if
the camera was previously turned OFF by software command). To turn the camera ON, write a ZERO
(0x0000) to this register. See 4.7.2.
2.1.5 CCI/TWI Status Register
The Status register, located at Register Address 0x0002 and illustrated in Figure 11, is used to
communicate command status and camera boot status. Whenever a Host issues a command to the
camera by writing to the Command Register, the camera automatically asserts (sets to 1) the command
BUSY bit (Bit 0) in the Status register. When the command is completed, the response code is written
into the upper 8-bits of the Status register (Bits 15-8). Then the camera de-asserts (sets to 0) the BUSY
bit to signal the Host the command is complete. See Figure 12 for the possible responses from the
camera to a command.
crLIR' The World’s Sixth Sm'
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
BITs
Lepton Status Word (I2C Register)
BUSY
Bit
Response Error Code
Range: -128 to 0
Boot
Status
Bit
Boot
Mode
Bit
Figure 11 CCI/TWI Status Register Definition
2.1.5.1 Boot Status Bit (Bit 2)
If the camera successfully boots up, this bit is set to 1. If this bit is 0, then the camera has not booted. A
host can monitor this bit to learn when the camera has booted.
2.1.5.2 Boot Mode Bit (Bit 1)
For normal operation, this bit will be set to 1, indicating successful boot from internal ROM.
2.1.6 CCI/TWI Data Length Register
The DATA Length register, located at Register Address 0x0006, is used to specify the number of 16-bit
words being transferred (or number of 16-bit DATA registers used in the transfer). For example, if a
command is to transfer a 32-bit value to the camera, the Host would set the Data Length register to 2
(two 16-bit registers used to transfer 32-bits).
2.1.7 CCI/TWI Data Registers
The DATA registers [0-15], located at Register Addresses 0x0008 thru 0x0026, are used to transfer Data
to and from the camera. Each register is 16-bits wide and there are 16 independent registers. Auto-
increment mode is used whenever reading and writing these registers. Thus if the first register (DATA 0)
is specified, consecutive reads or writes are made to the next DATA register automatically using I2C
multi-byte transfer mechanisms.
2.1.8 CCI/TWI Byte Order
Since the CCI/TWI interface transfers DATA in 16-bit words, byte order becomes important. The Lepton
CCI/TWI interface only supports MSB first (Big Endian). Within each 16-bit word, bits 15:8 contain the
MSB and bits 7:0 contain the LSB.
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
2.1.8.1 Multi-Word Transfers
When transmitting DATA that are larger than a single word (16-bits), the larger DATA is divided into
multiple 16-bit words; each word is then placed into multiple DATA registers with the least significant
word in the lower DATA register. Thus for a 32-bit transfer, a Host would place the lower 16-bits into
DATA 0 (Least Significant Word first) and the upper 16-bits into DATA 1.
2.1.8.2 CCI/TWI Data Block Buffer
For transfers that exceed the 16 DATA registers, the camera provides a 1k Byte buffer. It is used for
transferring larger blocks of DATA such as user-defined color look-up tables. These buffers are also
addressed as 16-bit words, so the total length of a single buffer is 512 words. Access is treated as a
multi-word transfer as well with the least significant words in the lower memory addresses. Auto-
increment access is also supported.
2.2 CRC Handling
2.2.1 Message CRC Bytes
On all incoming and outgoing messages, a cyclical redundancy check (CRC) is calculated using CRC-CCITT-
16 initialized to 0. Polynomial = x16 + x12 + x5 + 1 or 0x11021. The CRC is calculated using all previous
bytes in the packet (i.e. bytes 0 through N).
Below is an example showing a CRC calculation for the single byte 0x6E.
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Data = 0x6E = 01101110 (binary); Polynomial = 10001000000100001 (binary)
011011100000000000000000 [data is right-padded with 16 zeros]
10001000000100001
--------------------------
011011100000000000000000
010001000000100001
----------------------------
001010100000100001000000
0010001000000100001
-----------------------------
000010000000110001100000
00010001000000100001
-------------------------------
000010000000110001100000
000010001000000100001
---------------------------------
000000001000110101101000
0000010001000000100001
----------------------------------
000000001000110101101000
00000010001000000100001
-----------------------------------
000000001000110101101000
000000010001000000100001
-------------------------------------
000000001000110101101000 = 0x8D68
The Wur‘d's Sixth Sense crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
2.3 Lepton SDK Error Codes
All Lepton SDK functions will return an error code. If the function is successful, the response is LEP_OK.
Otherwise the return code will be one from the enum listed below in Figure 12.
/*
* Represents the different result codes the camera can return.
*/
typedef enum Result
{
LEP_OK = 0, /* Camera ok */
LEP_COMM_OK = LEP_OK, /* Camera comm ok (same as LEP_OK) */
LEP_ERROR = -1, /* Camera general error */
LEP_NOT_READY = -2, /* Camera not ready error */
LEP_RANGE_ERROR = -3, /* Camera range error */
LEP_CHECKSUM_ERROR = -4, /* Camera checksum error */
LEP_BAD_ARG_POINTER_ERROR = -5, /* Camera Bad argument error */
LEP_DATA_SIZE_ERROR = -6, /* Camera byte count error */
LEP_UNDEFINED_FUNCTION_ERROR = -7, /* Camera undefined function error */
LEP_FUNCTION_NOT_SUPPORTED = -8, /* Camera function not yet supported error */
LEP_DATA_OUT_OF_RANGE_ERROR = -9, /* Camera input DATA is out of valid range error */
LEP_COMMAND_NOT_ALLOWED = -11, /* Camera unable to execute command due to current camera
state */
/* OTP access errors */
LEP_OTP_WRITE_ERROR = -15, /*!< Camera OTP write error */
LEP_OTP_READ_ERROR = -16, /* double bit error detected (uncorrectible) */
LEP_OTP_NOT_PROGRAMMED_ERROR = -18, /* Flag read as non-zero */
/* I2C Errors */
LEP_ERROR_I2C_BUS_NOT_READY = -20, /* I2C Bus Error - Bus Not Avaialble */
LEP_ERROR_I2C_BUFFER_OVERFLOW = -22, /* I2C Bus Error - Buffer Overflow */
LEP_ERROR_I2C_ARBITRATION_LOST = -23, /* I2C Bus Error - Bus Arbitration Lost */
LEP_ERROR_I2C_BUS_ERROR = -24, /* I2C Bus Error - General Bus Error */
LEP_ERROR_I2C_NACK_RECEIVED = -25, /* I2C Bus Error - NACK Received */
LEP_ERROR_I2C_FAIL = -26, /* I2C Bus Error - General Failure */
/* Processing Errors */
LEP_DIV_ZERO_ERROR = -80, /* Attempted div by zero */
/* Comm Errors */
LEP_COMM_PORT_NOT_OPEN = -101, /* Comm port not open */
LEP_COMM_INVALID_PORT_ERROR = -102, /* Comm port no such port error */
LEP_COMM_RANGE_ERROR = -103, /* Comm port range error */
LEP_ERROR_CREATING_COMM = -104, /* Error creating comm */
LEP_ERROR_STARTING_COMM = -105, /* Error starting comm */
LEP_ERROR_CLOSING_COMM = -106, /* Error closing comm */
LEP_COMM_CHECKSUM_ERROR = -107, /* Comm checksum error */
LEP_COMM_NO_DEV = -108, /* No comm device */
LEP_TIMEOUT_ERROR = -109, /* Comm timeout error */
LEP_COMM_ERROR_WRITING_COMM = -110, /* Error writing comm */
LEP_COMM_ERROR_READING_COMM = -111, /* Error reading comm */
LEP_COMM_COUNT_ERROR = -112, /* Comm byte count error */
/* Other Errors */
LEP_OPERATION_CANCELED = -126, /* Camera operation canceled */
LEP_UNDEFINED_ERROR_CODE = -127 /* Undefined error */
} LEP_RESULT;
Figure 12 Lepton SDK Response Error Codes
C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
3 Startup and Port Configuration
Using the Lepton SDK to communicate with the Lepton camera requires opening a supported
communication port before issuing any other calls. The port open operation specifies the desired baud
rate for the port and returns a port descriptor for use with all other SDK APIs. A host needs to open a
port for every port-camera connection they are supporting. Typically, this is only once, but the SDK does
not impose any limitations.
The port open operation also identifies the Device ID automatically freeing the Host application from
needing to specify the Device ID. The port descriptor returns the selected Device ID.
C-SDK Commands
Description
LEP_OpenPort()
Opens a communications port if available. Supported Lepton
communication ports are TWI and SPI. Only TWI is supported in
the current release. (SPI support is planned for a later release.)
C SDK Interface:
LEP_RESULT LEP_OpenPort(LEP_UINT16 portID,
LEP_CAMERA_PORT_E portType,
LEP_UINT16 portBaudRate,
LEP_CAMERA_PORT_DESC_T_PTR portDescPtr )
portID - User defined value to identify a specific comm port.
Useful when multiple cameras are attached to a single Host.
portBaudRate Port-specific Units: kHz. Supported TWI: 400
Supported SPI: 20000 max (20 MHz)
/* Lepton physical transport interfaces
*/
typedef enum LEP_CAMERA_PORT_E_TAG
{
LEP_CCI_TWI=0,
LEP_CCI_SPI,
LEP_END_CCI_PORTS
}LEP_CAMERA_PORT_E, *LEP_CAMERA_PORT_E_PTR;
/* Communications Port Descriptor Type
*/
typedef struct LEP_CAMERA_PORT_DESC_T_TAG
{
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
LEP_UINT16 portID;
LEP_CAMERA_PORT_E portType;
LEP_UINT16 portBaudRate;
}LEP_CAMERA_PORT_DESC_T, *LEP_CAMERA_PORT_DESC_T_PTR;
3.1 Port Selection
The Lepton SDK provides a mechanism to communicate with specific communication ports.
Communication ports are uniquely identified by the port descriptor returned from a successful port
open operation. Each Lepton SDK function requires a valid port descriptor as a parameter to identify
which port to issue the command to. Typically, only one port is opened and this port descriptor is
passed with each Lepton SDK call. It is readily possible to route commands to different cameras using
each camera’s unique port descriptor. This routing is performed in the device driver, not in the SDK.
The World's Sixkh Sansa' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4 SDK camera Modules
The Lepton SDK partitions the software interfaces into independent sub-systems or modules. A module
is a collection of interfaces supporting common camera elements, for example the AGC module presents
interfaces that affect the video output contrast and brightness processing. Each module is identified by
a unique ID; see Table 2. The individual interfaces within each module are also uniquely identified using
a command ID Base. Modules present interfaces to retrieve (Get) or modify (Set) attributes or
properties of that module. Some modules also provide operations or methods as well, these are called
run commands. See Table 3.
Table 2 Lepton SDK Modules
Modules
ID
Name
Description
0x100
AGC
Automatic Gain Control for image Brightness and Contrast
0x200
SYS
System Information
0x300
VID
Video Control
0x800
OEM
OEM System Configuration
0xE00
RAD
Radiometry Module
Table 3 Command Types
Command Types
Get
Set
Run
Invalid
Type Value to Add to the
Command ID Base
0x0
0x1
0x2
0x3
4.1 Data Types
Data types used in the Lepton SDK are defined in the file LEPTON_Types.h. Data widths are specified
in the data type used, for example: LEP_UINT16 specifies an unsigned integer with a data width of 16-
bits.
Enumeration bit-width is typically compiler-dependent; however, in the Lepton SDK, the width of 32-bits
is used and the value is a signed integer, thus the equivalent is a signed 32-bit integer. For all Lepton
SDK functions that pass enumerations, the data size is two 16-bit words per enumeration.
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
When issuing commands to the Lepton camera, the data transmitted uses 16-bit registers making the
data size granularity 16-bits. As such, when specifying the data size, it is always interpreted as the
number of 16-bit words to transmit.
4.2 Command Format
As described in 2.1.3, Lepton commands are contained in a single 16-bit command word. This 16-bit
command word consists of 4 fields:
1. Protection Bit OEM.
2. A Module ID designating which camera subsystem to access (see Table 2),
3. A Command ID that specifies a unique element or command base, for that subsystem
4. A command type designating the command is one of Get or Get data type or an execution or run
type (see Table 3).
4.3 Command Word Generation Example
To specify to the camera which action to take, the Module ID is added with the Command ID base and
with the Command Type and if required, a protection bit value, to synthesize the Command Word.
4.3.1 AGC, VID, and SYS Module Command ID Generation
AGC, VID, and SYS modules no not require a protection bit to be set before the camera will
recognize it as a valid command so the protection bit value is 0x0000. For example, the AGC
Module ID is 0x0100; the ACG Enable command ID Base is 0x00. To retrieve the current AGC
enable state, issue a Get command specifying command type of 0x0. The AGC module protection
bit not defined so the value is 0x0000. The Command ID is synthesized as follows: Module ID +
Command ID Base + Type + Protection Bit value= Command ID. So in this example, 0x0100 + 0x00
+ 0x0 + 0x0000 = 0x0100 and this is the Get AGC Enable State Command ID. To set the AGC enable
state to enabled, the command type is 0x1 and thus the Command ID is 0x100 + 0x00 + 0x1 +
0x0000 = 0x0101.
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.3.2 OEM and RAD Module Command ID Generation
OEM and Radiometry (RAD) modules require a protection bit to be set before the camera will
recognize it as a valid command. This ensures that these commands cannot be sent accidentally.
The OEM/RAD protection bit is Bit-14 or referenced as 0x4000. This must be added to the
Command ID generated as above. Thus, to power down the camera, the Command ID is
synthesized as follows: Module ID + Command ID Base + Type + Protection Bit value = Command
ID. For example the OEM module ID is 0x800, the Command Base ID for power down is 0x00, and
we want to do a run command so the command type is 0x2, and the Protection Bit is 0x4000. So
in this example, 0x0800 + 0x00 + 0x2 + 0x4000= 0x4802 and this is the LEP_RunOemPowerDown()
Command ID.
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4 SDK Module: AGC 0x100
This module provides command and control of the video output Automatic Gain Control (AGC) operation. The
camera’s video data may be processed to provide an optimum scene contrast using one of two policies: HEQ-
Histogram Equalization, or by Linear Histogram stretching. This module provides commands to enable, select, and
control the AGC processing.
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.1 AGC Enable and Disable
To turn AGC ON is to enable AGC processing. Disabling the AGC will turn the AGC processing OFF and the video
data will not be optimized for scene contrast. This command sets and retrieves the AGC state.
Note that the Focus metric (see 4.6.3) must be disabled when AGC is enabled.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
LEP_AGC_DISABLE
LEP_AGC_ENABLE
LEP_AGC_DISABLE
N/A
N/A
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x00
With Get 0x00
With Set 0x01
SDK Data Length: Get 2 size on an enum data type on a 32-bit machine
Set 2 size on an enum data type on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetAgcEnableState()
Updates agcEnableStatePtr with
the Camera’s current AGC enable
state.
All Lepton Configurations
LEP_SetAgcEnableState()
Sets Camera’s current AGC enable
state to agcEnableState
C SDK Interface:
LEP_RESULT LEP_GetAgcEnableState(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_ENABLE_E_PTR agcEnableStatePtr)
LEP_RESULT LEP_SetAgcEnableState(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_ENABLE_E agcEnableState)
/* AGC Enable Enum
*/
typedef enum LEP_AGC_ENABLE_TAG
{
LEP_AGC_DISABLE=0,
LEP_AGC_ENABLE,
LEP_END_AGC_ENABLE
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
}LEP_AGC_ENABLE_E, *LEP_AGC_ENABLE_E_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.2 AGC Policy Select
The camera supports 2 AGC policies to process incoming video data, histogram equalization (HEQ) and linear
histogram stretch. This command sets and retrieves the AGC policy.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
LEP_AGC_LINEAR
LEP_AGC_HEQ
LEP_AGC_HEQ
N/A
N/A
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x04
With Get 0x04
With Set 0x05
SDK Data Length: Get 2 size on an enum data type on a 32-bit machine
Set 2 size on an enum data type on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetAgcPolicy()
Updates agcPolicyPtr with the
Camera’s current AGC policy.
All Lepton Configurations
LEP_SetAgcPolicy()
Sets Camera’s current AGC policy to
agcPolicy.
C SDK Interface:
LEP_RESULT LEP_GetAgcPolicy(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_POLICY_E_PTR agcPolicyPtr)
LEP_RESULT LEP_SetAgcPolicy(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_POLICY_E agcPolicy)
/* AGC Policy Enum
*/
typedef enum LEP_AGC_POLICY_TAG
{
LEP_AGC_LINEAR=0,
LEP_AGC_HEQ,
LEP_END_AGC_POLICY
}LEP_AGC_POLICY_E, *LEP_AGC_POLICY_E_PTR;
C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.3 AGC ROI Select
The AGC algorithms utilize a histogram, which is collected from within a specified rectangular window or Region of
Interest (ROI). This region is defined by 4 parameters: start column, start row, end column, and end row. The
region is adjustable from full window to a sub-window.
Lepton 1.5, 1.6, 2.0, 2.5
Dimension
Minimum
Value
Maximum
Value
Default
Value
Units
Scale factor
start column
0
< = endCol
0
pixels
1
start row
0
< endRow
0
pixels
1
end column
>= startCol
79
79
pixels
1
end row
>= startRow
59
59
pixels
1
Lepton 3.0, 3.5
Dimension
Minimum
Value
Maximum
Value
Default
Value
Units
Scale factor
start column
0
< = endCol
0
pixels
1
start row
0
< endRow
0
pixels
1
end column
>= startCol
159
159
pixels
1
end row
>= startRow
119
119
pixels
1
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x08
With Get 0x08
With Set 0x09
SDK Data Length: Get 4 size of LEP_AGC_ROI_T data type
Set 4 size of LEP_AGC_ROI_T data type
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetAgcROI()
Updates agcROIPtr with the
Camera’s current AGC ROI
All Lepton Configurations
LEP_SetAgcROI()
Sets Camera’s current AGC ROI to
agcROI
C SDK Interface:
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
LEP_RESULT LEP_GetAgcROI(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_ROI_T_PTR agcROIPtr)
LEP_RESULT LEP_SetAgcROI(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_ROI_T agcROI)
/* AGC ROI Structure
*/
typedef struct LEP_AGC_ROI_TAG
{
LEP_UINT16 startCol;
LEP_UINT16 startRow;
LEP_UINT16 endCol;
LEP_UINT16 endRow;
}LEP_AGC_ROI_T, *LEP_AGC_ROI_T_PTR;
C SDK Interface: The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.4 AGC Histogram Statistics
The AGC algorithms use the image histogram as input. This attribute returns the current Histogram statistics of
minimum intensity, maximum intensity, mean intensity, and the number of pixels processed within the defined
AGC ROI. This command is Read-only.
Lepton 1.5, 1.6, 2.0, 2.5
Dimension
Minimum Value
Maximum Value
Units
Scale factor
minimum intensity
0
2^14 -1
pixels
1
maximum intensity
0
2^14 -1
pixels
1
mean intensity
0
2^14 -1
pixels
1
number of pixels
0
4,800
pixels
1
Lepton 3.0, 3.5
Dimension
Minimum Value
Maximum Value
Units
Scale factor
minimum intensity
0
2^14 -1
pixels
1
maximum intensity
0
2^14 -1
pixels
1
mean intensity
0
2^14 -1
pixels
1
number of pixels
0
19,200
pixels
1
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x0C
With Get 0x0C
SDK Data Length: Get 4 size of LEP_AGC_HISTOGRAM_STATISTICS_T data type
Compatibility
C-SDK Commands
Description
All Lepton
Configurations
LEP_GetAgcHistogramStatistics()
Updates
agcHistogramStatisticsPtr with
the Camera’s current AGC Histogram
statistics
C SDK Interface:
LEP_RESULT LEP_GetAgcHistogramStatistics(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_HISTOGRAM_STATISTICS_T_PTR
*agcHistogramStatisticsPtr)
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
/* AGC Histogram Statistics Structure
*/
typedef struct LEP_AGC_HISTOGRAM_STATISTICS_TAG
{
LEP_UINT16 minIntensity;
LEP_UINT16 maxIntensity;
LEP_UINT16 meanIntensity;
LEP_UINT16 numPixels;
}LEP_AGC_HISTOGRAM_STATISTICS_T, *LEP_AGC_HISTOGRAM_STATISTICS_T_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.5 AGC HEQ Dampening Factor
This parameter is the amount of temporal dampening applied to the HEQ transformation function. An IIR filter of
the form (N/256) * previous + ((256-N)/256) * current is applied , and the HEQ dampening factor represents the
value N in the equation, i.e., a value that applies to the amount of influence the previous HEQ transformation
function has on the current function. . The lower the value of N the higher the influence of the current video
frame whereas the higher the value of N the more influence the previous damped transfer function has.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
0
256
64
N/A
1
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x24
With Get 0x24
With Set 0x25
SDK Data Length: Get 1 size of LEP_UINT16 data type
Set 1 size of LEP_UINT16 data type
Compatibility
C-SDK Commands
Description
All Lepton
Configurations
LEP_GetAgcHeqDampingFactor()
Updates agcHeqDampingFactorPtr
with the Camera’s current HEQ
dampening factor
All Lepton
Configurations
LEP_SetAgcHeqDampingFactor()
Sets Camera’s current HEQ dampening
factor to agcHeqDampingFactor
C SDK Interface:
LEP_RESULT LEP_GetAgcHeqDampingFactor(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT16 *agcHeqDampingFactorPtr)
LEP_RESULT LEP_SetAgcHeqDampingFactor(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT16 gcHeqDampingFactor)
Fm FF“ C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.6 AGC HEQ Clip Limit High
This parameter defines the maximum number of pixels allowed to accumulate in any given histogram bin. Any
additional pixels in a given bin are clipped. The effect of this parameter is to limit the influence of highly-populated
bins on the resulting HEQ transformation function.
Lepton 1.5, 1.6, 2.0, 2.5
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
0
4,800
4,800
pixels
1
Lepton 3.0, 3.5
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
0
19,200
19,200
pixels
1
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x2C
With Get 0x2C
With Set 0x2D
SDK Data Length: Get 1 size of LEP_UINT16 data type
Set 1 size of LEP_UINT16 data type
Compatibility
C-SDK Commands
Description
All Lepton
Configurations
LEP_GetAgcHeqClipLimitHigh()
Updates agcHeqClipLimitHighPtr
with the Camera’s current HEQ level
high value
All Lepton
Configurations
LEP_SetAgcHeqClipLimitHigh()
Sets Camera’s current HEQ level high
value to agcHeqClipLimitHigh
C SDK Interface:
LEP_RESULT LEP_GetAgcHeqClipLimitHigh(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT16 *agcHeqClipLimitHighPtr)
LEP_RESULT LEP_SetAgcHeqClipLimitHigh(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT16 agcHeqClipLimitHigh)
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.7 AGC HEQ Clip Limit Low
This parameter defines an artificial population that is added to every non-empty histogram bin. In other words, if
the Clip Limit Low is set to L, a bin with an actual population of X will have an effective population of L + X. y empty
bin that is nearby a populated bin will be given an artificial population of L. The effect of higher values is to
provide a more linear transfer function; lower values provide a more non-linear (equalized) transfer function. This
command is deprecated for Lepton 3 (replaced by Linear Percent).
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
0
1024
512
pixels
1
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x30
With Get 0x30
With Set 0x31
SDK Data Length: Get 1 size of LEP_UINT16 data type
Set 1 size of LEP_UINT16 data type
Compatibility
C-SDK Commands
Description
Lepton 1.5, 1.6, 2.0, 2.5
LEP_GetAgcHeqClipLimitLow()
Updates agcHeqClipLimitLowPtr
with the Camera’s current HEQ level
Low value
Lepton 1.5, 1.6, 2.0, 2.5
LEP_SetAgcHeqClipLimitLow()
Sets Camera’s current HEQ level Low
value to agcHeqClipLimitLow
C SDK Interface:
LEP_RESULT LEP_GetAgcHeqClipLimitLow(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT16 *agcHeqClipLimitLowPtr)
LEP_RESULT LEP_SetAgcHeqClipLimitLow(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT16 agcHeqClipLimitLow)
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.8 AGC HEQ Empty Counts
This parameter specifies the maximum number of pixels in a bin that will be interpreted as an empty bin.
Histogram bins with this number of pixels or less will be processed as an empty bin.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
0
2^14 -1
2
pixels
1
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x3C
With Get 0x3C
With Set 0x3D
SDK Data Length: Get 1 size of LEP_UINT16 data type
Set 1 size of LEP_UINT16 data type
Compatibility
C-SDK Commands
Description
Lepton 1.5, 1.6, 2.0, 2.5
LEP_GetAgcHeqEmptyCount()
Updates emptyCountPtr with the
Camera’s current HEQ transfer
function’s bin empty count
Lepton 1.5, 1.6, 2.0, 2.5
LEP_SetAgcHeqEmptyCount()
Sets Camera’s current HEQ transfer
function’s bin empty count to
emptyCount
C SDK Interface:
LEP_RESULT LEP_GetAgcHeqEmptyCount(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_HEQ_EMPTY_COUNT_T_PTR emptyCountPtr)
LEP_RESULT LEP_SetAgcHeqEmptyCount(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_HEQ_EMPTY_COUNT_T emptyCount)
C SDK Interface: The World's Sixkh Sanse' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.9 AGC HEQ Output Scale Factor
This parameter specifies the output format for HEQ as either 8-bits (values range 0 to 255), or 14-bit (values range
from 0 to 16383).
Minimum Value
Maximum Value
Default Setting
Units
Scale
factor
LEP_AGC_SCALE_TO_8_BITS
LEP_AGC_SCALE_TO_14_BITS
LEP_AGC_SCALE_TO_8_BITS
N/A
N/A
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x44
With Get 0x44
With Set 0x45
SDK Data Length: Get 2 size on an enum data type on a 32-bit machine
Set 2 size on an enum data type on a 32-bit machine
Compatibility
C-SDK Commands
Description
Lepton 1.5, 1.6, 2.0, 2.5
LEP_GetAgcHeqScaleFactor()
Updates scaleFactorPtr with
the Camera’s current AGC HEQ
Output Scale Factor
Lepton 1.5, 1.6, 2.0, 2.5
LEP_SetAgcHeqScaleFactor()
Sets Camera’s current AGC HEQ
Output Scale Factor to
scaleFactor
C SDK Interface:
LEP_RESULT LEP_GetAgcHeqScaleFactor (LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_HEQ_SCALE_FACTOR_E_PTR scaleFactorPtr)
LEP_RESULT LEP_SetAgcHeqScaleFactor (LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_HEQ_SCALE_FACTOR_E scaleFactor)
/* AGC Output Scale Factor Structure
*/
typedef enum LEP_AGC_SCALE_FACTOR_E_TAG
{
LEP_AGC_SCALE_TO_8_BITS = 0,
LEP_AGC_SCALE_TO_14_BITS,
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
LEP_AGC_END_SCALE_TO
}LEP_AGC_HEQ_SCALE_FACTOR_E, *LEP_AGC_HEQ_SCALE_FACTOR_E_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.4.10 AGC Calculation Enable State
This parameter controls the camera AGC calculations operations. If enabled, the current video histogram and AGC
policy will be calculated for each input frame. If disabled, then no AGC calculations are performed and the current
state of the ITT is preserved. For smooth AGC on /off operation, it is recommended to have this enabled.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
LEP_AGC_DISABLE
LEP_AGC_ENABLE
LEP_AGC_DISABLE
N/A
N/A
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x48
With Get 0x48
With Set 0x49
SDK Data Length: Get 2 size on an enum data type on a 32-bit machine
Set 2 size on an enum data type on a 32-bit machine
Compatibility
C-SDK Commands
Description
Lepton 1.5, 1.6, 2.0, 2.5
LEP_GetAgcCalcEnableState()
Updates
agcCalculationEnableStatePtr with
the Camera’s current AGC Calculation
enable state
Lepton 1.5, 1.6, 2.0, 2.5
LEP_SetAgcCalcEnableState()
Sets Camera’s current AGC Calculation
enable state to
agcCalculationEnableState
C SDK Interface:
LEP_RESULT LEP_GetAgcCalcEnableState( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_ENABLE_E_PTR agcCalculationEnableStatePtr )
LEP_RESULT LEP_SetAgcCalcEnableState( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_AGC_ENABLE_E agcCalculationEnableState )
/* AGC Enable Enum
*/
typedef enum LEP_AGC_ENABLE_TAG
{
LEP_AGC_DISABLE=0,
LEP_AGC_ENABLE,
C SDK Interface: The World's Sixkh Sanse' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
LEP_END_AGC_ENABLE
}LEP_AGC_ENABLE_E, *LEP_AGC_ENABLE_E_PTR;
4.4.11 AGC HEQ Linear Percent
This parameter controls the camera AGC HEQ algorithm’s linear percent. The linear percent parameter fills holes in
the histogram with pixels to avoid undesirable compression in 8-bit irradiance levels. Similar to the low clip limit,
pixels are added to each full bin and to an additional number of empty bins following full bins. The linear percent
parameter is more automatic than allowing the user to specify the low clip limit; the linear percent adjusts low clip
limit based on the scene content and the desired percentage of total pixels in the histogram.
Minimum
Value
Maximum Value
Default Setting
Units
Scale factor
0
100
20
percent
1
SDK Module ID: AGC 0x0100
SDK Command ID: Base 0x4C
With Get 0x4C
With Set 0x4D
SDK Data Length: Get 1 size of LEP_UINT16 data type
Set 1 size of LEP_UINT16 data type
Compatibility
C-SDK Commands
Description
Lepton 3.0
LEP_GetAgcHeqLinearPercent()
Updates agcHeqLinearPercentPtr with
the Camera’s current AGC HEQ Linear
Percent value
Lepton 3.0
LEP_SetAgcHeqLinearPercent()
Sets Camera’s current AGC HEQ Linear
Percent to agcHeqLinearPercent
C SDK Interface:
LEP_RESULT LEP_GetAgcHeqLinearPercent( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT16 *agcHeqLinearPercentPtr)
LEP_RESULT LEP_SetAgcHeqLinearPercent( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT16 agcHeqLinearPercent)
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5 SDK Module: SYS 0x200
This module provides information and status of the camera system. This includes the camera serial number,
current camera status, a method to ping the camera to verify communication, and Telemetry row enable and
location control.
C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.1 SYS Ping Camera
This function sends the ping command to the camera. The camera will respond with LEP_OK if command received
correctly.
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x00
With Run 0x02
SDK Data Length: Run 0 size a run command argument is zero
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_RunSysPing()
Issues a ping command to the
Camera to check if communication is
up.
C SDK Interface:
LEP_RESULT LEP_RunSysPing(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr);
Ffl C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.2 SYS Status
This command returns the system status: System Ready, System Initializing, System in Low-Power Mode, System
Going into Standby, and FFC in Progress.
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x04
With Get 0x04
SDK Data Length: Get 4 size of the LEP_STATUS_T data type
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysStatus()
Updates sysStatusPtr with the
Camera’s current system status
C SDK Interface:
LEP_RESULT LEP_GetSysStatus(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_STATUS_T_PTR sysStatusPtr)
typedef struct
{
LEP_SYSTEM_STATUS_STATES_E camStatus;
LEP_UINT16 commandCount;
LEP_UINT16 reserved;
}LEP_STATUS_T, *LEP_STATUS_T_PTR;
typedef enum LEP_SYSTEM_STATUS_STATES_E_TAG
{
LEP_SYSTEM_READY=0,
LEP_SYSTEM_INITIALIZING,
LEP_SYSTEM_IN_LOW_POWER_MODE,
LEP_SYSTEM_GOING_INTO_STANDBY,
LEP_SYSTEM_FLAT_FIELD_IN_PROCESS,
LEP_SYSTEM_END_STATES
}LEP_SYSTEM_STATUS_STATES_E, *LEP_SYSTEM_STATUS_STATES_E_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.3 SYS FLIR Serial Number
This command returns the Lepton Camera’s serial number as a 64-bit unsigned long integer (unsigned long long).
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x08
With Get 0x08
SDK Data Length: Get 4 size of the LEP_UINT64 data type
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysFlirSerialNumber()
Returns the Lepton Camera’s
serial number as a 64-bit unsigned
long integer (unsigned long long).
C SDK Interface:
LEP_RESULT LEP_GetSysFlirSerialNumber(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_FLIR_SERIAL_NUMBER_T_PTR sysSerialNumberBufPtr)
typedef LEP_UINT64 LEP_SYS_FLIR_SERIAL_NUMBER_T, *LEP_SYS_FLIR_SERIAL_NUMBER_T_PTR;
C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.4 SYS Camera Uptime
This command returns the Lepton Camera’s current uptime in milliseconds. The uptime is the time since the
camera was brought out of Standby. The uptime counter is implemented as a 32-bit counter and as such will roll-
over after the maximum count of 0xFFFFFFFF (1193 hours) is reached and restart at 0x00000000.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
0
4294967295
N/A
milliseconds
1
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x0C
With Get 0x0C
SDK Data Length: Get 2 size of the LEP_UINT32 data type
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysCameraUpTime()
Updates sysCameraUpTimePtr with
the Camera’s current uptime in
milliseconds
C SDK Interface:
LEP_RESULT LEP_GetSysCameraUpTime(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT32 *sysCameraUpTimePtr)
”PM W C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.5 SYS AUX Temperature Kelvin
This command returns the Lepton Camera’s AUX Temperature in Kelvin.
Minimum Value
Maximum Value
Units
Scale factor
0
16383
Kelvin
100
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x10
With Get 0x10
SDK Data Length: Get 1 size of the LEP_SYS_AUX_TEMPERATURE_KELVIN_T data type
Compatibility
C-SDK Commands
Description
Lepton 2.5, 3.5
LEP_GetSysAuxTemperatureKelvin()
Returns the Lepton Camera’s AUX
Temperature in Kelvin
C SDK Interface:
LEP_RESULT LEP_GetSysAuxTemperatureKelvin(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_AUX_TEMPERATURE_KELVIN_T_PTR auxTemperaturePtr);
typedef LEP_UINT16 LEP_SYS_AUX_TEMPERATURE_KELVIN_T, *LEP_SYS_AUX_TEMPERATURE_KELVIN_T_PTR;
W W C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.6 SYS FPA Temperature Kelvin
This command returns the Lepton Camera’s FPA Temperature in Kelvin.
Minimum Value
Maximum Value
Units
Scale factor
0
65535
Kelvin
100
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x14
With Get 0x14
SDK Data Length: Get 1 size of the LEP_SYS_FPA_TEMPERATURE_KELVIN_T data type
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysFpaTemperatureKelvin()
Returns the Lepton Camera’s FPA
Temperature in Kelvin
C SDK Interface:
LEP_RESULT LEP_GetSysFpaTemperatureKelvin(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_FPA_TEMPERATURE_KELVIN_T_PTR fpaTemperaturePtr)
typedef LEP_UINT16 LEP_SYS_FPA_TEMPERATURE_KELVIN_T, *LEP_SYS_FPA_TEMPERATURE_KELVIN_T_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.7 SYS Telemetry Enable State
This command returns the Telemetry Enabled State as an Enum.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
LEP_TELEMETRY_DISABLED
LEP_TELEMETRY_ENABLED
LEP_TELEMETRY_DISABLED
N/A
N/A
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x18
With Get 0x18
With Set 0x19
SDK Data Length: Get 2 size of an Enum on a 32-bit machine
Set 2 size of an Enum on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_ GetSysTelemetryEnableState()
Returns the Lepton Camera’s
Telemetry Enable State
All Lepton Configurations
LEP_ SetSysTelemetryEnableState()
Sets the Lepton Camera’s
Telemetry Enabled State
C SDK Interface:
LEP_RESULT LEP_GetSysTelemetryEnableState(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_TELEMETRY_ENABLE_STATE_E_PTR enableStatePtr)
LEP_RESULT LEP_SetSysTelemetryEnableState(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_TELEMETRY_ENABLE_STATE_E enableState)
typedef enum LEP_SYS_TELEMETRY_ENABLE_STATE_E_TAG
{
LEP_TELEMETRY_DISABLED=0,
LEP_TELEMETRY_ENABLED,
LEP_END_TELEMETRY_ENABLE_STATE
}LEP_SYS_TELEMETRY_ENABLE_STATE_E, *LEP_SYS_TELEMETRY_ENABLE_STATE_E_PTR;
C SDK Interface: The World's Sixkh Sanse' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.8 SYS Telemetry Location
This command Sets and Gets the Telemetry Location.
Minimum Value
Maximum Value
Default Setting
Units
Scale
factor
LEP_TELEMETRY_LOCATION_HEADER
LEP_TELEMETRY_LOCATION_FOOTER
LEP_TELEMETRY_LOCATION_FOOTER
N/A
N/A
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x1C
With Get 0x1C
With Set 0x1D
SDK Data Length: Get 2 size of an Enum on a 32-bit machine
Set 2 size of an Enum on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_ GetSysTelemetryLocation()
Returns the location of Telemetry
data as an enum
All Lepton Configurations
LEP_ SetSysTelemetryLocation()
Sets the location of Telemetry data
as an enum
C SDK Interface:
LEP_RESULT LEP_GetSysTelemetryLocation(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_TELEMETRY_LOCATION_E_PTR telemetryLocationPtr)
LEP_RESULT LEP_SetSysTelemetryLocation(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_TELEMETRY_LOCATION_E telemetryLocation)
typedef enum LEP_SYS_TELEMETRY_LOCATION_E_TAG
{
LEP_TELEMETRY_LOCATION_HEADER=0,
LEP_TELEMETRY_LOCATION_FOOTER,
LEP_END_TELEMETRY_LOCATION
}LEP_SYS_TELEMETRY_LOCATION_E, *LEP_SYS_TELEMETRY_LOCATION_E_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.9 SYS Frame Average
This command executes the average frames command. Executing this command causes the camera to sum
together a number of frames, divide the summed frame by the number of frames summed and generate a result
frame containing the average of the summed frames.
For Lepton 1.5, 1.6, 2.0 and 2.5, the number of frames to average is set by LEP_SYS_SetFramesToAverage(). For
Lepton 3.0 and 3.5, the number of frames is currently fixed at 8.
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x20
With Run 0x22
SDK Data Length: Run 0 size a run command argument
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_RunFrameAverage()
Executes the frame average command.
The number of frames to average is set by
separate command:
LEP_SYS_SetFramesToAverage().
C SDK Interface:
LEP_RESULT LEP_RunFrameAverage(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr);
C SDK Interface: The World's Sixkh Sanse' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.10 SYS Number of Frames to Average
This command Gets or Sets the number of frames to average when executing either a frame Average command
(see 4.5.9) or a Flat-Field Correction (FFC) (see 4.7.12).
For Lepton 1.5, 1.6, 2.0 and 2.5, the number of frames to average is set by LEP_SYS_SetFramesToAverage(). For
Lepton 3.0 and 3.5, the number of frames is currently fixed at 8.
Minimum Value
Maximum Value
Default Setting
Units
Scale
factor
LEP_SYS_FA_DIV_1
LEP_SYS_FA_DIV_128
LEP_SYS_FA_DIV_8
N/A
N/A
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x24
With Get 0x24
With Set 0x25
SDK Data Length: Get 2 size of an Enum on a 32-bit machine
Set 2 size of an Enum on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_SYS_GetFramesToAverage()
Gets the number of frames to
average
Lepton 1.5, 1.6, 2.0, 2.5
LEP_SYS_SetFramesToAverage()
Sets number of frames to average
C SDK Interface:
LEP_RESULT LEP_SYS_GetFramesToAverage(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_FRAME_AVERAGE_DIVISOR_E_PTR numFrameToAveragePtr);
LEP_RESULT LEP_SYS_SetFramesToAverage(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_FRAME_AVERAGE_DIVISOR_E numFrameToAverage);
typedef enum LEP_SYS_FRAME_AVERAGE_DIVISOR_E_TAG
{
LEP_SYS_FA_DIV_1 = 0,
LEP_SYS_FA_DIV_2,
LEP_SYS_FA_DIV_4,
LEP_SYS_FA_DIV_8,
LEP_SYS_FA_DIV_16,
LEP_SYS_FA_DIV_32,
LEP_SYS_FA_DIV_64,
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
LEP_SYS_FA_DIV_128,
LEP_SYS_END_FA_DIV
}LEP_SYS_FRAME_AVERAGE_DIVISOR_E, *LEP_SYS_FRAME_AVERAGE_DIVISOR_E_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.11 SYS Camera Customer Serial Number
This command returns the Lepton Camera’s Customer serial number as a 32-byte character string. The Customer
Serial Number is a (32 byte string) identifier unique to a specific configuration of module; essentially a module
Configuration ID. This serial number is unwritten in the current release.
This command requires the Host to allocate the memory buffer before calling this function. The address to this
memory block should be passed in as sysSerialNumberPtr
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x28
With Get 0x28
SDK Data Length: Get 16 32-byte string Data type
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysCustSerialNumber()
Updates sysSerialNumberPtr
with the Camera’s 32-byte serial
number.
C SDK Interface:
LEP_RESULT LEP_GetSysCustSerialNumber( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_CUST_SERIAL_NUMBER_T_PTR sysSerialNumberPtr )
typedef LEP_CHAR8 *LEP_SYS_CUST_SERIAL_NUMBER_T, *LEP_SYS_CUST_SERIAL_NUMBER_T_PTR;
C SDK Interface: The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.12 SYS Camera Video Scene Statistics
This command returns the current scene statistics for the video frame defined by the SYS ROI (see section 4.5.13 ).
The statistics captured are scene mean intensity in counts, minimum and maximum intensity in counts, and the
number of pixels in the ROI. Lepton scene intensities range from 0 to 16383. The range drops to 0 to 255 when in
8-bit AGC mode. Maximum number of pixels in the scene depends upon which camera, see below tables. When
TLinear mode is enabled (available in the Radiometric releases), the camera output represents temperature values,
and the scene statistics are reported in Kelvin x 100.
Lepton 1.5, 1.6, 2.0, 2.5
Dimension
Minimum Value
Maximum Value
Units
Scale factor
minimum intensity
0
2^14 -1
pixels
1
maximum intensity
0
2^14 -1
pixels
1
mean intensity
0
2^14 -1
pixels
1
number of pixels
0
4,800
pixels
1
Lepton 3.0, 3.5
Dimension
Minimum Value
Maximum Value
Units
Scale factor
minimum intensity
0
2^14 -1
pixels
1
maximum intensity
0
2^14 -1
pixels
1
mean intensity
0
2^14 -1
pixels
1
number of pixels
0
19,200
pixels
1
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x2C
With Get 0x2C
SDK Data Length: Get 4 Returns four 16-bit values
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysSceneStatistics()
Updates sceneStatisticsPtr
with the Camera’s current scene
statistics.
C SDK Interface:
LEP_RESULT LEP_GetSysSceneStatistics( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_SCENE_STATISTICS_T_PTR sceneStatisticsPtr )
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
typedef struct LEP_SYS_SCENE_STATISTICS_T_TAG
{
LEP_UINT16 meanIntensity;
LEP_UINT16 maxIntensity;
LEP_UINT16 minIntensity;
LEP_UINT16 numPixels;
} LEP_SYS_SCENE_STATISTICS_T, *LEP_SYS_SCENE_STATISTICS_T_PTR;
C SDK Interface: The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.13 SYS Scene ROI Select
The camera supports processing of pixels contained within a specified rectangular window or Region of Interest
(ROI) to calculate scene statistics (See 4.5.12). This region is defined by 4 parameters: start column, start row, end
column, and end row. The region is adjustable to a sub-window. Maximum extents must exclude a 1-pixel
boundary from any edge.
Lepton 1.5, 1.6, 2.0, 2.5
Dimension
Minimum Value
Maximum Value
Default Value
Units
Scale factor
start column
0
< end column
0
pixels
1
start row
0
< end row
0
pixels
1
end column
> start column
79
79
pixels
1
end row
> start row
59
59
pixels
1
Lepton 3.0, 3.5
Dimension
Minimum Value
Maximum Value
Default Value
Units
Scale factor
start column
0
< end column
0
pixels
1
start row
0
< end row
0
pixels
1
end column
> start column
159
159
pixels
1
end row
> start row
119
119
pixels
1
SDK Module ID: VID 0x0200
SDK Command ID: Base 0x30
With Get 0x30
With Set 0x31
SDK Data Length: Get 4 size of LEP_SYS_VIDEO_ROI_T data type
Set 4 size of LEP_SYS_VIDEO_ROI_T data type
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysSceneRoi()
Updates sceneRoiPtr with the
Camera’s current Scene ROI
All Lepton Configurations
LEP_ SetSysSceneRoi()
Sets Camera’s current Scene ROI to
sceneRoi
C SDK Interface:
LEP_RESULT LEP_GetSysSceneRoi(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
LEP_SYS_VIDEO_ROI_T_PTR sceneRoiPtr)
LEP_RESULT LEP_SetSysSceneRoi(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_VIDEO_ROI_T sceneRoi)
/* SYS Scene ROI Structure
*/
typedef struct LEP_SYS_VIDEO_ROI_T_TAG
{
LEP_UINT16 startCol;
LEP_UINT16 startRow;
LEP_UINT16 endCol;
LEP_UINT16 endRow;
} LEP_SYS_VIDEO_ROI_T, *LEP_SYS_VIDEO_ROI_T_PTR;
C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.14 SYS Thermal Shutdown Count
This command returns the current number of frames remaining before a thermal shutdown is executed once the
camera temperature exceeds a high-temperature threshold (around 80 degrees C). Once the camera detects the
camera exceeded the thermal threshold, this counter begins to count down until zero. When the count reaches
ZERO, the camera will shut itself down. A host can use this value to determine when the camera shuts down due
to thermal conditions. The default value of 270 is just over 10 seconds at 26 Hz video.
Dimension
Minimum Value
Maximum Value
Default Value
Units
Scale factor
thermalCounts
0
65535
270
pixels
1
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x34
With Get 0x34
SDK Data Length: Get 1 Returns one 16-bit value
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysThermalShutdownCount()
Updates thermalCountsPtr with
the Camera’s current thermal shut
down count value.
C SDK Interface:
LEP_RESULT LEP_GetSysThermalShutdownCount(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_THERMAL_SHUTDOWN_COUNTS_T_PTR thermalCountsPtr)
typedef LEP_UINT16 LEP_SYS_THERMAL_SHUTDOWN_COUNTS_T, *LEP_SYS_THERMAL_SHUTDOWN_COUNTS_T_PTR
C SDK Interface: The World's Sixkh Sansa' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.15 SYS Shutter Position Control
This command is used to manually control the position of the attached shutter if one exists. If there is an attached
shutter, then this command will return its current position. If there is no shutter attached, it will return
LEP_SYS_SHUTTER_POSITION_UNKNOWN.
Minimum Value
Maximum Value
Default Value
Units
Scale
factor
LEP_SYS_SHUTTER_POSITION_UNKNOWN
LEP_SYS_SHUTTER_POSITION_BRAKE_ON
LEP_SYS_SHUTTER_POSITION_UNKNOWN
N/A
1
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x38
With Get 0x38
With Set 0x39
SDK Data Length: Get 2 size of an Enum on a 32-bit machine
Set 2 size of an Enum on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetShutterPosition()
Updates shutterPositionPtr with
the Camera’s attached shutter
current position.
All Lepton Configurations
LEP_SetShutterPosition()
Sets the Camera’s attached shutter
current position to shutterPosition
C SDK Interface:
LEP_RESULT LEP_GetShutterPosition(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_SHUTTER_POSITION_E_PTR shutterPositionPtr)
LEP_RESULT LEP_SetShutterPosition(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_SHUTTER_POSITION_E shutterPosition)
typedef enum LEP_SYS_SHUTTER_POSITION_E_TAG
{
LEP_SYS_SHUTTER_POSITION_UNKNOWN = -1,
LEP_SYS_SHUTTER_POSITION_IDLE = 0,
LEP_SYS_SHUTTER_POSITION_OPEN,
LEP_SYS_SHUTTER_POSITION_CLOSED,
LEP_SYS_SHUTTER_POSITION_BRAKE_ON,
The World's Sixkh Sansa' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
LEP_SYS_SHUTTER_POSITION_END
}LEP_SYS_SHUTTER_POSITION_E, *LEP_SYS_SHUTTER_POSITION_E_PTR;
4.5.16 SYS FFC Mode Control
This command controls the FFC mode and shutter control during an FFC. FFC modes allow for manual control,
automatic control based upon time or temperature changes, and external control. If a shutter is attached this
command controls the shutter activity profile.
Dimension
Minimum Value
Maximum Value
Default Value
Lepton
Radiometric Releases
Factory Default
shutterMode
LEP_SYS_FFC_SHUTTER
_MODE_MANUAL
LEP_SYS_FFC_SHUTTER
_MODE_EXTERNAL
LEP_SYS_FFC_SHUTTER
_MODE_EXTERNAL*
LEP_SYS_FFC_SHUTTER
_MODE_AUTO
shutterLockout
tempLockoutState
LEP_SYS_SHUTTER
_LOCKOUT_INACTIVE
LEP_SYS_SHUTTER
_LOCKOUT_LOW
LEP_SYS_SHUTTER
_LOCKOUT_INACTIVE
LEP_SYS_SHUTTER
_LOCKOUT_INACTIVE
videoFreezeDuringFFC
LEP_SYS_DISABLE
LEP_SYS_ENABLE
LEP_SYS_ENABLE
LEP_SYS_ENABLE
ffcDesired
LEP_SYS_DISABLE
LEP_SYS_ENABLE
LEP_SYS_DISABLE
LEP_SYS_DISABLE
* If the camera contains an internal shutter, then the default mode is LEP_SYS_FFC_SHUTTER_MODE_AUTO
Dimension
Minimum Value
Maximum Value
Software Value
Radiometric
Releases
Factory
Default
Units
Scale
elapsedTimeSinceLastFfc
0
4294967295
0
0
milliseconds
1
desiredFfcPeriod
0
4294967295
300000
180000
milliseconds
1
explicitCmdToOpen
0 (false)
1 (true)
0 (false)
0 (false)
N/A
1
desiredFfcTempDelta
0
65535
300
150
Kelvin
100
imminentDelay
0
65535
52
52
frames
1
SDK Module ID: VID 0x0200
SDK Command ID: Base 0x3C
With Get 0x3C
With Set 0x3D
SDK Data Length: Get 16 size of LEP_SYS_FFC_SHUTTER_MODE_OBJ_T data type
Set 16 size of LEP_SYS_FFC_SHUTTER_MODE_OBJ_T data type
C SDK Interface: The Wur‘d's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetFfcShutterModeObj()
Updates shutterModeObjPtr with
the Camera’s current FFC mode and
shutter control
All Lepton Configurations
LEP_SetFfcShutterModeObj()
Sets Camera’s current FFC mode and
shutter control to shutterModeObj
C SDK Interface:
LEP_RESULT LEP_GetFfcShutterModeObj( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_FFC_SHUTTER_MODE_OBJ_T_PTR shutterModeObjPtr )
LEP_RESULT LEP_SetFfcShutterModeObj( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_FFC_SHUTTER_MODE_OBJ_T shutterModeObj )
/* SYS FFC Shutter Mode Structure
*/
typedef struct LEP_SYS_FFC_SHUTTER_MODE_OBJ_T_TAG
{
LEP_SYS_FFC_SHUTTER_MODE_E shutterMode; /* defines current mode */
LEP_SYS_SHUTTER_TEMP_LOCKOUT_STATE_E tempLockoutState;
LEP_SYS_ENABLE_E videoFreezeDuringFFC;
LEP_SYS_ENABLE_E ffcDesired; /* status of FFC desired */
LEP_UINT32 elapsedTimeSinceLastFfc; /* in milliseconds x1 */
LEP_UINT32 desiredFfcPeriod; /* in milliseconds x1 */
LEP_BOOL explicitCmdToOpen; /* true or false */
LEP_UINT16 desiredFfcTempDelta; /* in Kelvin x100 */
LEP_UINT16 imminentDelay; /* in frame counts x1 */
}LEP_SYS_FFC_SHUTTER_MODE_OBJ_T, *LEP_SYS_FFC_SHUTTER_MODE_OBJ_T_PTR;
typedef enum LEP_SYS_FFC_SHUTTER_MODE_E_TAG
{
LEP_SYS_FFC_SHUTTER_MODE_MANUAL = 0,
LEP_SYS_FFC_SHUTTER_MODE_AUTO,
LEP_SYS_FFC_SHUTTER_MODE_EXTERNAL,
LEP_SYS_FFC_SHUTTER_MODE_END
}LEP_SYS_FFC_SHUTTER_MODE_E, *LEP_SYS_FFC_SHUTTER_MODE_E_PTR;
typedef enum LEP_SYS_SHUTTER_TEMP_LOCKOUT_STATE_E_TAG
{
LEP_SYS_SHUTTER_LOCKOUT_INACTIVE = 0, /* not locked out */
LEP_SYS_SHUTTER_LOCKOUT_HIGH, /* lockout due to high temp */
LEP_SYS_SHUTTER_LOCKOUT_LOW, /* lockout due to low temp */
}LEP_SYS_SHUTTER_TEMP_LOCKOUT_STATE_E,*LEP_SYS_SHUTTER_TEMP_LOCKOUT_STATE_E_PTR;
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
typedef enum LEP_SYS_ENABLE_E_TAG
{
LEP_SYS_DISABLE = 0,
LEP_SYS_ENABLE,
LEP_END_SYS_ENABLE
}LEP_SYS_ENABLE_E, *LEP_SYS_ENABLE_E_PTR;
* C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.17 SYS Run FFC Normalization
This command executes the camera’s Flat-Field Correction (FFC) normalization. This command executes
synchronously. Internally this command polls the camera status to determine when this command completes (see
LEP_GetSysFFCStatus() ), and only returns when completed.
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x40
With Run 0x42
SDK Data Length: Run 0 size a run command argument
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_RunSysFFCNormalization()
Executes the FFC command.
C SDK Interface:
LEP_RESULT LEP_RunSysFFCNormalization(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr);
W W C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.18 SYS FFC Status
This command returns the Flat-Field Correction normalization (FFC) status.
Dimension
Minimum Value
Maximum Value
Default Value
ffcStatusPtr
LEP_SYS_STATUS_WRITE_ERROR
LEP_SYS_FRAME_AVERAGE_COLLECTING_FRAMES
LEP_SYS_STATUS_READY
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x44
With Get 0x44
SDK Data Length: Get 2 size of an Enum on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysFFCStatus()
Returns the current status of the
FFC operation in ffcStatusPtr
C SDK Interface:
LEP_RESULT LEP_GetSysFFCStatus( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_STATUS_E_PTR ffcStatusPtr ))
typedef enum
{
LEP_SYS_STATUS_WRITE_ERROR = -2, //
LEP_SYS_STATUS_ERROR = -1,
LEP_SYS_STATUS_READY = 0,
LEP_SYS_STATUS_BUSY,
LEP_SYS_FRAME_AVERAGE_COLLECTING_FRAMES,
LEP_SYS_STATUS_END
} LEP_SYS_STATUS_E, *LEP_SYS_STATUS_E_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.19 SYS Gain Mode
This command sets the gain state of the camera. High gain mode provides higher responsivity and lower noise
metrics for normal operation (default). Low gain mode provides lower responsivity and higher noise metrics, but
with the benefit of increased intra-scene range necessary to view hotter scenes. Auto gain mode allows the
camera to automatically switch the gain mode based on the temperature of the scene and thresholds configurable
by the user in the “SYS Gain Mode Object” command. Auto gain mode can only be enabled when radiometry mode
is enabled due to the temperature measurement dependency.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
LEP_SYS_GAIN_MODE_HIGH
LEP_SYS_GAIN_MODE_AUTO
LEP_SYS_GAIN_MODE_HIGH
N/A
N/A
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x48
With Get 0x48
With Set 0x49
SDK Data Length: Get 2 size of an Enum on a 32-bit machine
Set 2 size of an Enum on a 32-bit machine
Compatibility
C-SDK Commands
Description
Lepton 2.5, 3.5
LEP_GetSysGainMode()
Returns the Lepton Camera’s
current Gain mode in
gainModePtr
Lepton 2.5, 3.5
LEP_SetSysGainMode()
Sets the Lepton Camera’s current
Gain mode to gainMode
C SDK Interface:
LEP_RESULT LEP_GetSysGainMode( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_GAIN_MODE_E_PTR gainModePtr)
LEP_RESULT LEP_SetSysGainMode( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_GAIN_MODE_E gainMode)
typedef enum LEP_SYS_GAIN_MODE_E_TAG
{
LEP_SYS_GAIN_MODE_HIGH = 0,
LEP_SYS_GAIN_MODE_LOW,
LEP_SYS_GAIN_MODE_AUTO,
LEP_SYS_END_GAIN_MODE,
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
} LEP_SYS_GAIN_MODE_E, *LEP_SYS_GAIN_MODE_E_PTR;;
W C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.20 SYS FFC States
This command gets the current FFC state in the camera.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
LEP_SYS_FFC_NEVER_COMMANDED
LEP_SYS_FFC_IN_PROCESS
LEP_SYS_FFC_NEVER_COMMANDED
N/A
N/A
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x4C
With Get 0x4C
With Set 0x4D
SDK Data Length: Get 2 size of an Enum on a 32-bit machine
Set 2 size of an Enum on a 32-bit machine
Compatibility
C-SDK Commands
Description
Lepton 2.5, 3.0, 3.5
LEP_GetSysFFCStates()
Returns the Lepton Camera’s
current FFC state ffcStatePtr
C SDK Interface:
LEP_RESULT LEP_GetSysFFCStates( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_FFC_STATES_E_PTR ffcStatePtr )
/* SYS FFC States Enum
Captures the current camera FFC operation state
*/
typedef enum LEP_SYS_FFC_STATES_E_TAG
{
LEP_SYS_FFC_NEVER_COMMANDED = 0,
LEP_SYS_FFC_IMMINENT,
LEP_SYS_FFC_IN_PROCESS,
LEP_SYS_FFC_DONE,
LEP_SYS_END_FFC_STATES
}LEP_SYS_FFC_STATES_E, *LEP_SYS_FFC_STATES_E_PTR;
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.21 SYS Gain Mode Object
This command gets or sets the gain mode object. Set the ROI, temperature thresholds (in Celsius for TLinear
disabled mode and Kelvin for TLinear enabled mode), and percentages of the ROI that must meet the temperature
threshold criteria for both high to low and low to high automatic gain mode switching.
Lepton 1.5, 1.6, 2.0, 2.5
Field
Minimum
Value
Maximum
Value
Default
Setting
Lepton 2.5
Factory
Default
Units
Scale factor
sysGainModeROI
0,0,0,0
59,59,79,79
0,0,59,79
0,0,59,79
Pixels
1
sys_P_high_to_low
0
100
20
25
Percent
1
sys_P_low_to_high
0
100
95
90
Percent
1
sys_C_high_to_low
0
600
110
115
Celsius
1
sys_C_low_to_high
0
600
90
85
Celsius
1
sys_T_high_to_low
0
900
383
388
Kelvin
1
sys_T_low_to_high
0
900
363
358
Kelvin
1
sysGainRoiPopulation
0
4800
4800
4800
Pixels
1
sysGainModeTempEnabled
0
1
0
0
Boolean
1
sysGainModeFluxThresholdLow
0
16383
8765
Calibrated
per camera
Counts
1
sysGainModeFluxThresholdHigh
0
16383
9876
Calibrated
per camera
Counts
1
Lepton 3.0, 3.5
Field
Minimum
Value
Maximum Value
Default
Setting
Lepton 3.5
Factory
Default
Units
Scale factor
sysGainModeROI
0,0,0,0
119,119,159,159
0,0,119,159
0,0,119,159
Pixels
1
sys_P_high_to_low
0
100
20
25
Percent
1
sys_P_low_to_high
0
100
95
90
Percent
1
sys_C_high_to_low
0
600
110
115
Celsius
1
sys_C_low_to_high
0
600
90
85
Celsius
1
sys_T_high_to_low
0
900
383
388
Kelvin
1
sys_T_low_to_high
0
900
363
358
Kelvin
1
sysGainRoiPopulation
0
19200
19200
19200
Pixels
1
sysGainModeTempEnabled
0
1
0
0
Boolean
1
C SDK Interface: The Wur‘d‘s Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
sysGainModeFluxThresholdLow
0
16383
8765
Calibrated
per camera
Counts
1
sysGainModeFluxThresholdHigh
0
16383
9876
Calibrated
per camera
Counts
1
SDK Module ID: SYS 0x0200
SDK Command ID: Base 0x50
With Get 0x50
With Set 0x51
SDK Data Length: Get 14 size of LEP_SYS_GAIN_MODE_OBJ_T data type
Set 14 size of LEP_SYS_GAIN_MODE_OBJ_T data type
Compatibility
C-SDK Commands
Description
Lepton 2.5, 3.5
LEP_GetSysGainModeObj()
Returns the Lepton Camera’s
current Gain mode in
gainModeObjPtr
Lepton 2.5, 3.5
LEP_SetSysGainModeObj()
Sets the Lepton Camera’s current
Gain mode to gainModeObj
C SDK Interface:
LEP_RESULT LEP_GetSysGainModeObj( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_GAIN_MODE_OBJ_T_PTR gainModeObjPtr )
LEP_RESULT LEP_SetSysGainModeObj( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_GAIN_MODE_OBJ_T gainModeObj )
/* Gain Mode Object
*/
typedef struct LEP_SYS_GAIN_MODE_OBJ_T_TAG
{
FLR_SYS_GAIN_MODE_ROI_T sysGainModeROI; /* Specified ROI to use for Gain Mode switching */
FLR_SYS_GAIN_MODE_THRESHOLDS_T sysGainModeThresholds; /* Set of threshold triggers */
FLR_UINT16 sysGainRoiPopulation; /* Population size in pixels within the ROI */
FLR_UINT16 sysGainModeTempEnabled; /* True if T-Linear is implemented */
FLR_UINT16 sysGainModeFluxThresholdLowToHigh; /* calculated from desired temp */
FLR_UINT16 sysGainModeFluxThresholdHighToLow; /* calculated from desired temp */
}LEP_SYS_GAIN_MODE_OBJ_T, *LEP_SYS_GAIN_MODE_OBJ_T_PTR;
/* System Gain Mode ROI Structure
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
*/
typedef struct LEP_SYS_GAIN_MODE_ROI_T_TAG
{
LEP_UINT16 startCol;
LEP_UINT16 startRow;
LEP_UINT16 endCol;
LEP_UINT16 endRow;
}LEP_SYS_GAIN_MODE_ROI_T, *LEP_SYS_GAIN_MODE_ROI_T_PTR;
/* Gain Mode Support
*/
typedef struct LEP_SYS_GAIN_MODE_THRESHOLDS_T_TAG
{
LEP_SYS_THRESHOLD_T sys_P_high_to_low; /* Range: [0 - 100], percent */
LEP_SYS_THRESHOLD_T sys_P_low_to_high; /* Range: [0 - 100], percent */
LEP_SYS_THRESHOLD_T sys_C_high_to_low; /* Range: [0 - 600], degrees C */
LEP_SYS_THRESHOLD_T sys_C_low_to_high; /* Range: [0 - 600], degrees C */
LEP_SYS_THRESHOLD_T sys_T_high_to_low; /* Range: [0 - 900], Kelvin */
LEP_SYS_THRESHOLD_T sys_T_low_to_high; /* Range: [0 - 900], Kelvin */
}LEP_SYS_GAIN_MODE_THRESHOLDS_T, *LEP_SYS_GAIN_MODE_THRESHOLDS_T_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.22 SYS Average Frames Aggregate Command
This is an SDK aggregate command that executes the frame average command using a parameter to specify the
number of frames to average.
Executing this command causes the camera to sum together a number of frames, divide the summed frame by the
number of frames summed and generate a result frame containing the average of the summed frames. The
number of frames to average is specified by parameter to this function.
Compatibility
C-SDK Commands
Description
Lepton 1.5, 1.6, 2.0
LEP_RunSysAverageFrames()
Executes the frame average
command using the number of
frames to average is specified by
parameter to this function.
Aggregate command.
C SDK Interface:
LEP_RESULT LEP_RunSysAverageFrames (LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_FRAME_AVERAGE_DIVISOR_E numFrameToAverage);
typedef enum LEP_SYS_FRAME_AVERAGE_DIVISOR_E_TAG
{
LEP_SYS_FA_DIV_1 = 0,
LEP_SYS_FA_DIV_2,
LEP_SYS_FA_DIV_4,
LEP_SYS_FA_DIV_8,
LEP_SYS_FA_DIV_16,
LEP_SYS_FA_DIV_32,
LEP_SYS_FA_DIV_64,
LEP_SYS_FA_DIV_128,
LEP_SYS_END_FA_DIV
}LEP_SYS_FRAME_AVERAGE_DIVISOR_E, *LEP_SYS_FRAME_AVERAGE_DIVISOR_E_PTR;
w C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.23 SYS AUX Temperature Celsius helper function
This is a SDK command that returns the Lepton Camera’s AUX Temperature in degrees Celsius. This function has
no command ID since it is a helper function and uses the function LEP_GetSysAuxTemperatureKelvin()to get
the current temperature in Kelvin before converting to degrees Celsius.
Minimum Value
Maximum Value
Units
Scale factor
-
-
Degrees Celsius
N/A (float value)
Compatibility
C-SDK Commands
Description
Lepton 2.5, 3.5
LEP_GetSysAuxTemperatureCelcius()
Returns the Lepton Camera’s
AUX Temperature in degrees
Celsius
C SDK Interface:
LEP_RESULT LEP_GetSysAuxTemperatureCelcius( LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_AUX_TEMPERATURE_CELCIUS_T_PTR auxTemperaturePtr )
typedef LEP_FLOAT32 LEP_SYS_AUX_TEMPERATURE_CELCIUS_T, *LEP_SYS_AUX_TEMPERATURE_CELCIUS_T_PTR;
FFF! FF! C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.5.24 SYS FPA Temperature Celsius helper function
This is a SDK command that returns the Lepton Camera’s FPA Temperature in degrees Celsius. This function has no
command ID since it is a helper function and uses the function LEP_GetSysFpaTemperatureKelvin()to get the
current temperature in Kelvin before converting to degrees Celsius.
Minimum Value
Maximum Value
Units
Scale factor
-
-
Degrees Celsius
N/A (float value)
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetSysFpaTemperatureCelcius()
Returns the Lepton Camera’s FPA
Temperature in degrees Celsius
C SDK Interface:
LEP_RESULT LEP_GetSysFpaTemperatureCelcius(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_SYS_FPA_TEMPERATURE_CELCIUS_T_PTR fpaTemperaturePtr)
typedef LEP_FLOAT32 LEP_SYS_FPA_TEMPERATURE_CELCIUS_T, *LEP_SYS_FPA_TEMPERATURE_CELCIUS_T_PTR;
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.6 SDK Module: VID 0x300
This module provides command and control of the video data. Selection of the video polarity (white-hot or black-
hot), video output color look-up table, and access to reading the focus metric are available through this module.
C SDK Interface: The World's Sixkh Sanse' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.6.1 VID Pseudo-Color Look-Up Table Select
This function allows selection of the video output pseudo-color LUT. This LUT applies to the video processed by
camera post AGC application before output. Color LUTs do not apply to raw video output of any format. Requires
using the video output format of 24-bit R, G, B (See 4.7.7), AGC enabled and scaled to 8-bit output (See 4.4.1).
Minimum Value
Maximum Value
Default Setting
Units
Scale
factor
LEP_VID_GREYSCALE_LUT
LEP_VID_USER_LUT
LEP_VID_GREYSCALE_LUT
N/A
N/A
SDK Module ID: VID 0x0300
SDK Command ID: Base 0x04
With Get 0x04
With Set 0x05
SDK Data Length: Get 2 size on an Enum data type on a 32-bit machine
Set 2 size on an Enum data type on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetVidPcolorLut()
Updates vidPcolorLutPtr with the
Camera’s current video pseudo-color
LUT selection.
All Lepton Configurations
LEP_SetVidPcolorLut()
Sets Camera’s current video pseudo-
color LUT selection to vidPcolorLut
C SDK Interface:
LEP_RESULT LEP_GetVidPcolorLut(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_PCOLOR_LUT_E_PTR vidPcolorLutPtr)
LEP_RESULT LEP_SetVidPcolorLut(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_PCOLOR_LUT_E vidPcolorLut)
/* Video Pseudo-Color LUT Enum
*/
typedef enum LEP_PCOLOR_LUT_E_TAG
{
LEP_VID_WHEEL6_LUT=0,
LEP_VID_FUSION_LUT,
LEP_VID_RAINBOW_LUT,
LEP_VID_GLOBOW_LUT,
LEP_VID_SEPIA_LUT,
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
LEP_VID_COLOR_LUT,
LEP_VID_ICE_FIRE_LUT,
LEP_VID_RAIN_LUT,
LEP_VID_USER_LUT,
LEP_VID_END_PCOLOR_LUT
}LEP_PCOLOR_LUT_E, *LEP_PCOLOR_LUT_E_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.6.2 VID User Pseudo-Color Look-Up Table Upload/Download
This function allows uploading (SET to the camera), and downloading (GET from the camera) a user-defined video
output pseudo-color LUT. This LUT applies to the video processed by camera post AGC application before output.
Does not apply to raw video output. The format of the pseudo-color LUT is 256 x 32-bits.
Parameter
Minimum Value
Maximum Value
Default Setting
Units
Scale
factor
reserved
0
0
N/A
N/A
1
red
0
255
N/A
N/A
1
green
0
255
N/A
N/A
1
blue
0
255
N/A
N/A
1
SDK Module ID: VID 0x0300
SDK Command ID: Base 0x08
With Get 0x08
With Set 0x09
SDK Data Length: Get 512 size of LEP_VID_LUT_BUFFER_T data type
Set 512 size of LEP_VID_LUT_BUFFER_T data type
Compatibility
C-SDK Commands
Description
All Lepton
Configurations
LEP_GetVidUserLut()
Updates vidUserLutBufPtr with the Camera’s
current user-defined video pseudo-color LUT data.
Length of the LUT is 1024 bytes supporting a 256 x 32-
bit LUT format and passed as value in
vidUserLutBufLen.
All Lepton
Configurations
LEP_SetVidUserLut()
Updates the Camera’s current user-defined video
pseudo-color LUT data with the contents of
vidUserLutBufPtr. Length of the LUT is 1024 bytes
supporting 256 x 32-bit LUT format and passed as
value in vidUserLutBufLen.
C SDK Interface:
LEP_RESULT LEP_GetVidUserLut(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT8 *vidUserLutBufPtr, LEP_UINT16 vidUserLutBufLen)
LEP_RESULT LEP_SetVidUserLut(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_UINT8 *vidUserLutBufPtr, LEP_UINT16 vidUserLutBufLen)
/* User-Defined color look-up table (LUT)
*/
typedef struct LEP_VID_LUT_PIXEL_T_TAG
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
{
LEP_UINT8 reserved;
LEP_UINT8 red;
LEP_UINT8 green;
LEP_UINT8 blue;
} LEP_VID_LUT_PIXEL_T, *LEP_VID_LUT_PIXEL_T_PTR;
typedef struct LEP_VID_LUT_BUFFER_T_TAG
{
LEP_VID_LUT_PIXEL_T bin[256];
} LEP_VID_LUT_BUFFER_T, *LEP_VID_LUT_BUFFER_T_PTR;
C SDK Interface: The World's Sixkh Sanse' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.6.3 VID Focus Calculation Enable State
The camera can calculate a video scene focus metric (also useful as a metric of contrast). This function specifies
whether or not the camera is to make these calculations on the input video. When enabled, the camera will
calculate the video scene focus metric on each frame processed and make the result available in the focus metric.
See section 4.6.6. When disabled, the camera does not execute the focus metric calculation.
Note that AGC (See 4.4.1) must be disabled when the focus metric is enabled.
Minimum Value
Maximum Value
Default Setting
Units
Scale
factor
LEP_VID_FOCUS_CALC_DISABLE
LEP_VID_FOCUS_CALC_ENABLE
LEP_VID_FOCUS_CALC_DISABLE
N/A
N/A
SDK Module ID: VID 0x0300
SDK Command ID: Base 0x0C
With Get 0x0C
With Set 0x0D
SDK Data Length: Get 2 size on an Enum data type on a 32-bit machine
Set 2 size on an Enum data type on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton
Configurations
LEP_GetVidFocusCalcEnableState()
Updates
vidEnableFocusCalcStatePtr with
the Camera’s current video focus
calculation enable state.
All Lepton
Configurations
LEP_SetVidFocusCalcEnableState()
Updates the Camera’s current video
focus calculation enable state with the
contents of
vidFocusCalcEnableState.
C SDK Interface:
LEP_RESULT LEP_GetVidFocusCalcEnableState(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_VID_FOCUS_CALC_ENABLE_E_PTR
vidEnableFocusCalcStatePtr)
LEP_RESULT LEP_SetVidFocusCalcEnableState(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_VID_FOCUS_CALC_ENABLE_E
vidFocusCalcEnableState)
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
/* Video Focus Metric Calculation Enable Enum
*/
typedef enum LEP_VID_ENABLE_TAG
{
LEP_VID_FOCUS_CALC_DISABLE=0,
LEP_VID_FOCUS_CALC_ENABLE,
LEP_VID_END_FOCUS_CALC_ENABLE
}LEP_VID_FOCUS_CALC_ENABLE_E, *LEP_VID_FOCUS_CALC_ENABLE_E_PTR;
C SDK Interface: The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.6.4 VID Focus ROI Select
The camera supports processing of pixels contained within a specified rectangular window or Region of Interest
(ROI) to calculate a focus metric. This region is defined by 4 parameters: start column, start row, end column, and
end row. The region is adjustable to a sub-window. Maximum extents must exclude a 1-pixel boundary from any
edge.
Lepton 1.5, 1.6, 2.0, 2.5
Dimension
Minimum Value
Maximum Value
Default Value
Units
Scale factor
start column
1
< end column-1
1
pixels
1
start row
1
< end row-1
1
pixels
1
end column
> start column+1
78
78
pixels
1
end row
> start row+1
58
58
pixels
1
Lepton 3.0, 3.5
Dimension
Minimum Value
Maximum Value
Default Value
Units
Scale factor
start column
1
< end column-1
1
pixels
1
start row
1
< end row-1
1
pixels
1
end column
> start column+1
158
158
pixels
1
end row
> start row+1
118
118
pixels
1
SDK Module ID: VID 0x0300
SDK Command ID: Base 0x10
With Get 0x10
With Set 0x11
SDK Data Length: Get 4 size of LEP_VID_FOCUS_ROI_T data type
Set 4 size of LEP_VID_FOCUS_ROI_T data type
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetVidFocusROI()
Updates vidFocusROIPtr with the
Camera’s current video focus ROI
All Lepton Configurations
LEP_SetVidFocusROI()
Sets Camera’s current video focus ROI
to vidFocusROI
C SDK Interface:
LEP_RESULT LEP_GetVidFocusROI(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
LEP_VID_FOCUS_ROI_T_PTR vidFocusROIPtr)
LEP_RESULT LEP_SetVidFocusROI(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_VID_FOCUS_ROI_T vidFocusROI)
/* VIDFOCUS ROI Structure
*/
typedef struct LEP_VID_FOCUS_ROI_TAG
{
LEP_USHORT startCol;
LEP_USHORT startRow;
LEP_USHORT endCol;
LEP_USHORT endRow;
}LEP_VID_FOCUS_ROI_T, *LEP_VID_FOCUS_ROI_T_PTR;
C SDK Interface: The World's Sixkh Sanse' crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.6.5 VID Focus Metric Threshold
This function specifies the focus metric threshold. The focus metric evaluates image gradients and counts the
number of gradient magnitudes that exceed the focus metric threshold. Therefore, larger values of the threshold
imply the focus metric is counting gradients with larger magnitudes in effect filtering out small gradients in the
image (pixel noise, for example). The Focus Metric uses the Tenengrad method which is an edge-based metric that
measures the sum of the horizontal and vertical gradients using Sobel operators. The Focus Metric Threshold is
applied to the sum of gradients. Gradients that exceed this threshold are then summed and counted and the
Focus metric is computed from these.
Minimum Value
Maximum Value
Default Setting
Units
Scale
factor
0
4294967295
30
N/A
N/A
SDK Module ID: VID 0x0300
SDK Command ID: Base 0x14
With Get 0x14
With Set 0x15
SDK Data Length: Get 2 size of LEP_VID_FOCUS_METRIC_THRESHOLD_T data type
Set 2 size of LEP_VID_FOCUS_METRIC_THRESHOLD_T data type
Compatibility
C-SDK Commands
Description
All Lepton
Configurations
LEP_GetVidFocusMetricThreshold()
Updates vidFocusMetricThresholdPtr
with the Camera’s current video focus
metric threshold.
All Lepton
Configurations
LEP_SetVidFocusMetricThreshold()
Updates the Camera’s current video
focus metric threshold with the
contents of vidFocusMetricThreshold.
C SDK Interface:
LEP_RESULT LEP_GetVidFocusMetricThreshold(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_VID_FOCUS_METRIC_THRESHOLD_T_PTR vidFocusMetricThresholdPtr)
LEP_RESULT LEP_SetVidFocusMetricThreshold(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_VID_FOCUS_METRIC_THRESHOLD_T vidFocusMetricThreshold)
The Wur‘d's Sixth Sensa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
typedef LEP_UINT32 LEP_VID_FOCUS_METRIC_THRESHOLD_T, *LEP_VID_FOCUS_METRIC_THRESHOLD_T_PTR;
C SDK Interface: The World's Sixth Sansa’ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.6.6 VID Focus Metric
This function returns the most recently calculated scene focus metric. The focus metric calculation counts image
gradients that exceed the focus metric threshold. Larger values imply better scene focus due the presence of more
large gradients. The focus metric is not defined if the video scene focus metric calculations are not enabled. . The
focus metric uses the Tenengrad method, an edge-based metric that measures the sum of the horizontal and
vertical gradients using Sobel operators. The focus metric threshold is applied to the sum of gradients. Gradients
that exceed this threshold are then summed and counted and the Focus metric is computed from these.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
0
4294967295
N/A
none
1
SDK Module ID: VID 0x0300
SDK Command ID: Base 0x18
With Get 0x18
SDK Data Length: Get 2 size of LEP_VID_FOCUS_METRIC_T data type
Compatibility
C-SDK Commands
Description
All Lepton Configurations
LEP_GetVidFocusMetric()
Updates vidFocusMetricPtr with
the Camera’s current video focus
value. Not defined if focus calculation
is not enabled.
C SDK Interface:
LEP_RESULT LEP_GetVidFocusMetric(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_VID_FOCUS_METRIC_T_PTR vidFocusMetricPtr)
typedef LEP_UINT32 LEP_VID_FOCUS_METRIC_T, *LEP_VID_FOCUS_METRIC_T_PTR;
C SDK Interface: The World's Sixth Sansa‘ crLIR
FLIR LEPTON® Software IDD
The information contained herein does not contain technology as defined by the EAR, 15 CFR 772, is publicly available,
and therefore, not subject to EAR. NSR (6/14/2018).
Information on this page is subject to change without notice.
110-0144-04, Lepton Software IDD, Rev: 303
4.6.7 VID Video Freeze Enable State
This function allows the current frame to be repeated in lieu of a live video stream. When enabled, live video is
halted from the camera. When disabled, live video resumes.
Minimum Value
Maximum Value
Default Setting
Units
Scale factor
LEP_VID_FREEZE_DISABLE
LEP_VID_FREEZE_ENABLE
LEP_VID_FREEZE_DISABLE
N/A
N/A
SDK Module ID: VID 0x0300
SDK Command ID: Base 0x24
With Get 0x24
With Set 0x25
SDK Data Length: Get 2 size on an Enum data type on a 32-bit machine
Set 2 size on an Enum data type on a 32-bit machine
Compatibility
C-SDK Commands
Description
All Lepton
Configurations
LEP_GetVidFreezeEnableState()
Updates vidFreezeEnableStatePtr
with the Camera’s current Video Freeze
enable state
All Lepton
Configurations
LEP_SetVidFreezeEnableState()
Updates the Camera’s current Video
Freeze enable state with the contents of
vidFreezeEnableState.
C SDK Interface:
LEP_RESULT LEP_GetVidFreezeEnableState(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_VID_FREEZE_ENABLE_E_PTR vidFreezeEnableStatePtr)
LEP_RESULT LEP_SetVidFreezeEnableState(LEP_CAMERA_PORT_DESC_T_PTR portDescPtr,
LEP_VID_FREEZE_ENABLE_E vidFreezeEnableState)
/* Video Freeze Output Enable Enum
*/
typedef enum LEP_VID_FREEZE_ENABLE_TAG
{