Overview
ColorProcessor is a C++ library that implements various color processing operations, including palette adjustments, brightness, contrast, saturation and white balance. The supported palettes for thermal cameras are Inverse (grayscale inversion), Ironbow, Rainbow, and Arctic. Other operations are adjusted in percentage centered in 50% which means no effect. The library depends on VFilter library (provides interface for video filter, source code included, Apache 2.0 license). The library doesn’t have third-party dependencies to be installed in OS. Additionally test application depends on OpenCV library (version >= 4.5, linked, Apache 2.0 license) to provide user interface. The library uses C++17 standard.
Documentation
Documentation: GO TO DOCUMENTATION
Simple interface
class ColorProcessor : public VFilter
{
public:
/// Get the version of the ColorProcessor class.
static std::string getVersion();
/// Initialize ColorProcessor filter with parameters.
bool initVFilter(VFilterParams& params) override;
/// Set ColorProcessor filter parameter.
bool setParam(VFilterParam id, float value) override;
/// Get the value of a specific ColorProcessor filter parameter.
float getParam(VFilterParam id) override;
/// Get the parameters of the ColorProcessor filter.
void getParams(VFilterParams& params) override;
/// Execute a ColorProcessor filter action command.
bool executeCommand(VFilterCommand id) override;
/// Process frame (Perform ColorProcessor filters : palette, brightness, contrast, white-balance).
bool processFrame(cr::video::Frame& frame) override;
/// Set mask for filter. Not supported by ColorProcessor filter.
bool setMask(cr::video::Frame mask) override;
/// Decode and execute command.
bool decodeAndExecuteCommand(uint8_t* data, int size) override;
};