FlirTau2Camera C++ lib. Software controller for Flir Tau 2 cameras.

€400.00

The FlirTau2Camera C++ library is a software controller for Flir Tau 2 camera. The FlirTau2Camera inherits Camera interface.

LICENSE: We sell source code of this library as is, without future updates and technical support according to perpetual non-exclusive royalty-free license. You pay once and can use this library in your software and hardware products without limits. Please read the license agreement before purchasing: LICENSE.

The FlirTau2Camera C++ library is a software controller for Flir Tau 2 camera. The FlirTau2Camera inherits Camera interface.

LICENSE: We sell source code of this library as is, without future updates and technical support according to perpetual non-exclusive royalty-free license. You pay once and can use this library in your software and hardware products without limits. Please read the license agreement before purchasing: LICENSE.

Overview

The FlirTau2Camera C++ library is a software controller for Flir Tau 2 camera. The FlirTau2Camera library inherits Camera interface. It depends on libraries: Camera interface library (provides interface and data structures to control cameras, source code included, Apache 2.0 license), Logger logging library (provides function to print log information in console and files, source code included, Apache 2.0 license), SerialPort library (provides functions to work with serial ports, source code included, Apache 2.0 license) and FlirTau2Parser (provides functions to encode / decode commands and responses from camera, source code included). The FlirTau2Camera library provides simple interface to be integrated in any C++ project. The library repository (folder) is provided by source code and doesn’t have third-party dependencies to be specially installed in OS. It built C++17 standard and compatible with Linux and Windows.

Documentation

Documentation: GO TO DOCUMENTATION

Camera control interface

class FlirTau2Camera : public cr::camera::Camera
{
public:
  /// Get Camera class version.
  static std::string getVersion();

  /// Init camera controller.
  bool openCamera(std::string initString) override;

  /// Init camera controller by parameters class.
  bool initCamera(CameraParams& params) override;

  /// Close camera serial port.
  void closeCamera() override;

  /// Get camera open status.
  bool isCameraOpen() override;

  /// Get camera connection status.
  bool isCameraConnected() override;

  /// Set the camera controller param.
  bool setParam(CameraParam id, float value) override;

  /// Get the camera controller param.
  float getParam(CameraParam id) override;

  /// Get the camera controller params.
  void getParams(CameraParams& params) override;

  /// Execute camera controller action command.
  bool executeCommand(CameraCommand id) override;

  /// Decode and execute command.
  bool decodeAndExecuteCommand(uint8_t* data, int size) override;
};

Simple example

#include <iostream>
#include "FlirTau2Camera.h"

int main(void)
{
    // Init camera controller.
    cr::camera::FlirTau2Camera controller;
    if (!controller.openCamera("/dev/ttyUSB0;57600"))
        return -1;

    while (true)
    {
        // Main dialog.
        int option = -1;
        std::cout << "Options (1: Brightness+1, 2: Brightness-1 " << std::endl;
        std::cin >> option;

        // Get all camera params.
        cr::camera::CameraParams cameraParams;
        controller.getParams(cameraParams);

        switch (option)
        {
        case 1:
            controller.setParam(cr::camera::CameraParam::BRIGHTNESS,
            cameraParams.brightness + 1);
            break;
        case 2:
            controller.setParam(cr::camera::CameraParam::BRIGHTNESS,
            cameraParams.brightness - 1);
            break;
        default:
            break;
        }
    }
    return 1;
}