Class BrickletThermalImaging


  • public class BrickletThermalImaging
    extends Device
    80x60 pixel thermal imaging camera
    • Field Detail

      • DEVICE_DISPLAY_NAME

        public static final java.lang.String DEVICE_DISPLAY_NAME
        See Also:
        Constant Field Values
      • FUNCTION_GET_HIGH_CONTRAST_IMAGE_LOW_LEVEL

        public static final byte FUNCTION_GET_HIGH_CONTRAST_IMAGE_LOW_LEVEL
        See Also:
        Constant Field Values
      • FUNCTION_GET_TEMPERATURE_IMAGE_LOW_LEVEL

        public static final byte FUNCTION_GET_TEMPERATURE_IMAGE_LOW_LEVEL
        See Also:
        Constant Field Values
      • FUNCTION_GET_STATISTICS

        public static final byte FUNCTION_GET_STATISTICS
        See Also:
        Constant Field Values
      • FUNCTION_SET_RESOLUTION

        public static final byte FUNCTION_SET_RESOLUTION
        See Also:
        Constant Field Values
      • FUNCTION_GET_RESOLUTION

        public static final byte FUNCTION_GET_RESOLUTION
        See Also:
        Constant Field Values
      • FUNCTION_SET_SPOTMETER_CONFIG

        public static final byte FUNCTION_SET_SPOTMETER_CONFIG
        See Also:
        Constant Field Values
      • FUNCTION_GET_SPOTMETER_CONFIG

        public static final byte FUNCTION_GET_SPOTMETER_CONFIG
        See Also:
        Constant Field Values
      • FUNCTION_SET_HIGH_CONTRAST_CONFIG

        public static final byte FUNCTION_SET_HIGH_CONTRAST_CONFIG
        See Also:
        Constant Field Values
      • FUNCTION_GET_HIGH_CONTRAST_CONFIG

        public static final byte FUNCTION_GET_HIGH_CONTRAST_CONFIG
        See Also:
        Constant Field Values
      • FUNCTION_SET_IMAGE_TRANSFER_CONFIG

        public static final byte FUNCTION_SET_IMAGE_TRANSFER_CONFIG
        See Also:
        Constant Field Values
      • FUNCTION_GET_IMAGE_TRANSFER_CONFIG

        public static final byte FUNCTION_GET_IMAGE_TRANSFER_CONFIG
        See Also:
        Constant Field Values
      • FUNCTION_SET_FLUX_LINEAR_PARAMETERS

        public static final byte FUNCTION_SET_FLUX_LINEAR_PARAMETERS
        See Also:
        Constant Field Values
      • FUNCTION_GET_FLUX_LINEAR_PARAMETERS

        public static final byte FUNCTION_GET_FLUX_LINEAR_PARAMETERS
        See Also:
        Constant Field Values
      • FUNCTION_SET_FFC_SHUTTER_MODE

        public static final byte FUNCTION_SET_FFC_SHUTTER_MODE
        See Also:
        Constant Field Values
      • FUNCTION_GET_FFC_SHUTTER_MODE

        public static final byte FUNCTION_GET_FFC_SHUTTER_MODE
        See Also:
        Constant Field Values
      • FUNCTION_RUN_FFC_NORMALIZATION

        public static final byte FUNCTION_RUN_FFC_NORMALIZATION
        See Also:
        Constant Field Values
      • FUNCTION_GET_SPITFP_ERROR_COUNT

        public static final byte FUNCTION_GET_SPITFP_ERROR_COUNT
        See Also:
        Constant Field Values
      • FUNCTION_SET_BOOTLOADER_MODE

        public static final byte FUNCTION_SET_BOOTLOADER_MODE
        See Also:
        Constant Field Values
      • FUNCTION_GET_BOOTLOADER_MODE

        public static final byte FUNCTION_GET_BOOTLOADER_MODE
        See Also:
        Constant Field Values
      • FUNCTION_SET_WRITE_FIRMWARE_POINTER

        public static final byte FUNCTION_SET_WRITE_FIRMWARE_POINTER
        See Also:
        Constant Field Values
      • FUNCTION_WRITE_FIRMWARE

        public static final byte FUNCTION_WRITE_FIRMWARE
        See Also:
        Constant Field Values
      • FUNCTION_SET_STATUS_LED_CONFIG

        public static final byte FUNCTION_SET_STATUS_LED_CONFIG
        See Also:
        Constant Field Values
      • FUNCTION_GET_STATUS_LED_CONFIG

        public static final byte FUNCTION_GET_STATUS_LED_CONFIG
        See Also:
        Constant Field Values
      • FUNCTION_GET_CHIP_TEMPERATURE

        public static final byte FUNCTION_GET_CHIP_TEMPERATURE
        See Also:
        Constant Field Values
      • RESOLUTION_0_TO_6553_KELVIN

        public static final int RESOLUTION_0_TO_6553_KELVIN
        See Also:
        Constant Field Values
      • RESOLUTION_0_TO_655_KELVIN

        public static final int RESOLUTION_0_TO_655_KELVIN
        See Also:
        Constant Field Values
      • FFC_STATUS_NEVER_COMMANDED

        public static final int FFC_STATUS_NEVER_COMMANDED
        See Also:
        Constant Field Values
      • IMAGE_TRANSFER_MANUAL_HIGH_CONTRAST_IMAGE

        public static final int IMAGE_TRANSFER_MANUAL_HIGH_CONTRAST_IMAGE
        See Also:
        Constant Field Values
      • IMAGE_TRANSFER_MANUAL_TEMPERATURE_IMAGE

        public static final int IMAGE_TRANSFER_MANUAL_TEMPERATURE_IMAGE
        See Also:
        Constant Field Values
      • IMAGE_TRANSFER_CALLBACK_HIGH_CONTRAST_IMAGE

        public static final int IMAGE_TRANSFER_CALLBACK_HIGH_CONTRAST_IMAGE
        See Also:
        Constant Field Values
      • IMAGE_TRANSFER_CALLBACK_TEMPERATURE_IMAGE

        public static final int IMAGE_TRANSFER_CALLBACK_TEMPERATURE_IMAGE
        See Also:
        Constant Field Values
      • SHUTTER_LOCKOUT_INACTIVE

        public static final int SHUTTER_LOCKOUT_INACTIVE
        See Also:
        Constant Field Values
      • BOOTLOADER_MODE_BOOTLOADER

        public static final int BOOTLOADER_MODE_BOOTLOADER
        See Also:
        Constant Field Values
      • BOOTLOADER_MODE_FIRMWARE

        public static final int BOOTLOADER_MODE_FIRMWARE
        See Also:
        Constant Field Values
      • BOOTLOADER_MODE_BOOTLOADER_WAIT_FOR_REBOOT

        public static final int BOOTLOADER_MODE_BOOTLOADER_WAIT_FOR_REBOOT
        See Also:
        Constant Field Values
      • BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_REBOOT

        public static final int BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_REBOOT
        See Also:
        Constant Field Values
      • BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_ERASE_AND_REBOOT

        public static final int BOOTLOADER_MODE_FIRMWARE_WAIT_FOR_ERASE_AND_REBOOT
        See Also:
        Constant Field Values
      • BOOTLOADER_STATUS_INVALID_MODE

        public static final int BOOTLOADER_STATUS_INVALID_MODE
        See Also:
        Constant Field Values
      • BOOTLOADER_STATUS_NO_CHANGE

        public static final int BOOTLOADER_STATUS_NO_CHANGE
        See Also:
        Constant Field Values
      • BOOTLOADER_STATUS_ENTRY_FUNCTION_NOT_PRESENT

        public static final int BOOTLOADER_STATUS_ENTRY_FUNCTION_NOT_PRESENT
        See Also:
        Constant Field Values
      • BOOTLOADER_STATUS_DEVICE_IDENTIFIER_INCORRECT

        public static final int BOOTLOADER_STATUS_DEVICE_IDENTIFIER_INCORRECT
        See Also:
        Constant Field Values
      • BOOTLOADER_STATUS_CRC_MISMATCH

        public static final int BOOTLOADER_STATUS_CRC_MISMATCH
        See Also:
        Constant Field Values
      • STATUS_LED_CONFIG_SHOW_HEARTBEAT

        public static final int STATUS_LED_CONFIG_SHOW_HEARTBEAT
        See Also:
        Constant Field Values
      • STATUS_LED_CONFIG_SHOW_STATUS

        public static final int STATUS_LED_CONFIG_SHOW_STATUS
        See Also:
        Constant Field Values
    • Constructor Detail

      • BrickletThermalImaging

        public BrickletThermalImaging​(java.lang.String uid,
                                      IPConnection ipcon)
        Creates an object with the unique device ID \c uid. and adds it to the IP Connection \c ipcon.
    • Method Detail

      • getHighContrastImageLowLevel

        public BrickletThermalImaging.HighContrastImageLowLevel getHighContrastImageLowLevel()
                                                                                      throws TinkerforgeException
        Returns the current high contrast image. See `here <https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Thermal_Imaging.html#high-contrast-image-vs-temperature-image>`__ for the difference between High Contrast and Temperature Image. If you don't know what to use the High Contrast Image is probably right for you. The data is organized as a 8-bit value 80x60 pixel matrix linearized in a one-dimensional array. The data is arranged line by line from top left to bottom right. Each 8-bit value represents one gray-scale image pixel that can directly be shown to a user on a display. Before you can use this function you have to enable it with setImageTransferConfig(int).
        Throws:
        TinkerforgeException
      • getTemperatureImageLowLevel

        public BrickletThermalImaging.TemperatureImageLowLevel getTemperatureImageLowLevel()
                                                                                    throws TinkerforgeException
        Returns the current temperature image. See `here <https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Thermal_Imaging.html#high-contrast-image-vs-temperature-image>`__ for the difference between High Contrast and Temperature Image. If you don't know what to use the High Contrast Image is probably right for you. The data is organized as a 16-bit value 80x60 pixel matrix linearized in a one-dimensional array. The data is arranged line by line from top left to bottom right. Each 16-bit value represents one temperature measurement in either Kelvin/10 or Kelvin/100 (depending on the resolution set with setResolution(int)). Before you can use this function you have to enable it with setImageTransferConfig(int).
        Throws:
        TinkerforgeException
      • getStatistics

        public BrickletThermalImaging.Statistics getStatistics()
                                                        throws TinkerforgeException
        Returns the spotmeter statistics, various temperatures, current resolution and status bits. The spotmeter statistics are: * Index 0: Mean Temperature. * Index 1: Maximum Temperature. * Index 2: Minimum Temperature. * Index 3: Pixel Count of spotmeter region of interest. The temperatures are: * Index 0: Focal Plain Array temperature. * Index 1: Focal Plain Array temperature at last FFC (Flat Field Correction). * Index 2: Housing temperature. * Index 3: Housing temperature at last FFC. The resolution is either `0 to 6553 Kelvin` or `0 to 655 Kelvin`. If the resolution is the former, the temperatures are in Kelvin/10, if it is the latter the temperatures are in Kelvin/100. FFC (Flat Field Correction) Status: * FFC Never Commanded: Only seen on startup before first FFC. * FFC Imminent: This state is entered 2 seconds prior to initiating FFC. * FFC In Progress: Flat field correction is started (shutter moves in front of lens and back). Takes about 1 second. * FFC Complete: Shutter is in waiting position again, FFC done. Temperature warning bits: * Index 0: Shutter lockout (if true shutter is locked out because temperature is outside -10°C to +65°C) * Index 1: Overtemperature shut down imminent (goes true 10 seconds before shutdown)
        Throws:
        TinkerforgeException
      • setResolution

        public void setResolution​(int resolution)
                           throws TinkerforgeException
        Sets the resolution. The Thermal Imaging Bricklet can either measure * from 0 to 6553 Kelvin (-273.15°C to +6279.85°C) with 0.1°C resolution or * from 0 to 655 Kelvin (-273.15°C to +381.85°C) with 0.01°C resolution. The accuracy is specified for -10°C to 450°C in the first range and -10°C and 140°C in the second range.
        Throws:
        TinkerforgeException
      • setSpotmeterConfig

        public void setSpotmeterConfig​(int[] regionOfInterest)
                                throws TinkerforgeException
        Sets the spotmeter region of interest. The 4 values are * Index 0: Column start (has to be smaller then Column end). * Index 1: Row start (has to be smaller then Row end). * Index 2: Column end (has to be smaller then 80). * Index 3: Row end (has to be smaller then 60). The spotmeter statistics can be read out with getStatistics().
        Throws:
        TinkerforgeException
      • setHighContrastConfig

        public void setHighContrastConfig​(int[] regionOfInterest,
                                          int dampeningFactor,
                                          int[] clipLimit,
                                          int emptyCounts)
                                   throws TinkerforgeException
        Sets the high contrast region of interest, dampening factor, clip limit and empty counts. This config is only used in high contrast mode (see setImageTransferConfig(int)). The high contrast region of interest consists of four values: * Index 0: Column start (has to be smaller or equal then Column end). * Index 1: Row start (has to be smaller then Row end). * Index 2: Column end (has to be smaller then 80). * Index 3: Row end (has to be smaller then 60). The algorithm to generate the high contrast image is applied to this region. Dampening Factor: This parameter is the amount of temporal dampening applied to the HEQ (history equalization) 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. Clip Limit Index 0 (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. Clip Limit Index 1 (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. Any 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. 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.
        Throws:
        TinkerforgeException
      • setFluxLinearParameters

        public void setFluxLinearParameters​(int sceneEmissivity,
                                            int temperatureBackground,
                                            int tauWindow,
                                            int temperaturWindow,
                                            int tauAtmosphere,
                                            int temperatureAtmosphere,
                                            int reflectionWindow,
                                            int temperatureReflection)
                                     throws TinkerforgeException
        Sets the flux linear parameters that can be used for radiometry calibration. See FLIR document 102-PS245-100-01 for more details. .. versionadded:: 2.0.5$nbsp;(Plugin)
        Throws:
        TinkerforgeException
      • setFFCShutterMode

        public void setFFCShutterMode​(int shutterMode,
                                      int tempLockoutState,
                                      boolean videoFreezeDuringFFC,
                                      boolean ffcDesired,
                                      long elapsedTimeSinceLastFFC,
                                      long desiredFFCPeriod,
                                      boolean explicitCmdToOpen,
                                      int desiredFFCTempDelta,
                                      int imminentDelay)
                               throws TinkerforgeException
        Sets the FFC shutter mode parameters. See FLIR document 110-0144-03 4.5.15 for more details. .. versionadded:: 2.0.6$nbsp;(Plugin)
        Throws:
        TinkerforgeException
      • runFFCNormalization

        public void runFFCNormalization()
                                 throws TinkerforgeException
        Starts the Flat-Field Correction (FFC) normalization. See FLIR document 110-0144-03 4.5.16 for more details. .. versionadded:: 2.0.6$nbsp;(Plugin)
        Throws:
        TinkerforgeException
      • getSPITFPErrorCount

        public BrickletThermalImaging.SPITFPErrorCount getSPITFPErrorCount()
                                                                    throws TinkerforgeException
        Returns the error count for the communication between Brick and Bricklet. The errors are divided into * ACK checksum errors, * message checksum errors, * framing errors and * overflow errors. The errors counts are for errors that occur on the Bricklet side. All Bricks have a similar function that returns the errors on the Brick side.
        Throws:
        TinkerforgeException
      • setBootloaderMode

        public int setBootloaderMode​(int mode)
                              throws TinkerforgeException
        Sets the bootloader mode and returns the status after the requested mode change was instigated. You can change from bootloader mode to firmware mode and vice versa. A change from bootloader mode to firmware mode will only take place if the entry function, device identifier and CRC are present and correct. This function is used by Brick Viewer during flashing. It should not be necessary to call it in a normal user program.
        Throws:
        TinkerforgeException
      • setWriteFirmwarePointer

        public void setWriteFirmwarePointer​(long pointer)
                                     throws TinkerforgeException
        Sets the firmware pointer for writeFirmware(int[]). The pointer has to be increased by chunks of size 64. The data is written to flash every 4 chunks (which equals to one page of size 256). This function is used by Brick Viewer during flashing. It should not be necessary to call it in a normal user program.
        Throws:
        TinkerforgeException
      • writeFirmware

        public int writeFirmware​(int[] data)
                          throws TinkerforgeException
        Writes 64 Bytes of firmware at the position as written by setWriteFirmwarePointer(long) before. The firmware is written to flash every 4 chunks. You can only write firmware in bootloader mode. This function is used by Brick Viewer during flashing. It should not be necessary to call it in a normal user program.
        Throws:
        TinkerforgeException
      • setStatusLEDConfig

        public void setStatusLEDConfig​(int config)
                                throws TinkerforgeException
        Sets the status LED configuration. By default the LED shows communication traffic between Brick and Bricklet, it flickers once for every 10 received data packets. You can also turn the LED permanently on/off or show a heartbeat. If the Bricklet is in bootloader mode, the LED is will show heartbeat by default.
        Throws:
        TinkerforgeException
      • getChipTemperature

        public int getChipTemperature()
                               throws TinkerforgeException
        Returns the temperature as measured inside the microcontroller. The value returned is not the ambient temperature! The temperature is only proportional to the real temperature and it has bad accuracy. Practically it is only useful as an indicator for temperature changes.
        Throws:
        TinkerforgeException
      • reset

        public void reset()
                   throws TinkerforgeException
        Calling this function will reset the Bricklet. All configurations will be lost. After a reset you have to create new device objects, calling functions on the existing ones will result in undefined behavior!
        Throws:
        TinkerforgeException
      • writeUID

        public void writeUID​(long uid)
                      throws TinkerforgeException
        Writes a new UID into flash. If you want to set a new UID you have to decode the Base58 encoded UID string into an integer first. We recommend that you use Brick Viewer to change the UID.
        Throws:
        TinkerforgeException
      • getIdentity

        public Device.Identity getIdentity()
                                    throws TinkerforgeException
        Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier. The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port). A Bricklet connected to an :ref:`Isolator Bricklet <isolator_bricklet>` is always at position 'z'. The device identifier numbers can be found :ref:`here <device_identifier>`. |device_identifier_constant|
        Specified by:
        getIdentity in class Device
        Throws:
        TinkerforgeException
      • getHighContrastImage

        public int[] getHighContrastImage()
                                   throws TinkerforgeException
        Returns the current high contrast image. See `here <https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Thermal_Imaging.html#high-contrast-image-vs-temperature-image>`__ for the difference between High Contrast and Temperature Image. If you don't know what to use the High Contrast Image is probably right for you. The data is organized as a 8-bit value 80x60 pixel matrix linearized in a one-dimensional array. The data is arranged line by line from top left to bottom right. Each 8-bit value represents one gray-scale image pixel that can directly be shown to a user on a display. Before you can use this function you have to enable it with setImageTransferConfig(int).
        Throws:
        TinkerforgeException
      • getTemperatureImage

        public int[] getTemperatureImage()
                                  throws TinkerforgeException
        Returns the current temperature image. See `here <https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Thermal_Imaging.html#high-contrast-image-vs-temperature-image>`__ for the difference between High Contrast and Temperature Image. If you don't know what to use the High Contrast Image is probably right for you. The data is organized as a 16-bit value 80x60 pixel matrix linearized in a one-dimensional array. The data is arranged line by line from top left to bottom right. Each 16-bit value represents one temperature measurement in either Kelvin/10 or Kelvin/100 (depending on the resolution set with setResolution(int)). Before you can use this function you have to enable it with setImageTransferConfig(int).
        Throws:
        TinkerforgeException