Zivid C++ API 2.19.0+b5c53d0f-1
Zivid::ColorRGBAf Struct Reference

Color with 32-bit red, green, blue and alpha channels. More...

#include <Zivid/Color.h>

Inheritance diagram for Zivid::ColorRGBAf:
Zivid::ColorRGBABase< float >

Public Member Functions

 ColorRGBABase ()=default
 Constructor.
 ColorRGBABase (T red, T green, T blue, T alpha)
 Constructor.
Public Member Functions inherited from Zivid::ColorRGBABase< float >
 ColorRGBABase ()=default
 Constructor.
ZIVID_UTILS_EXPORT bool operator== (const ColorRGBABase &rhs) const
 Check for equality.
ZIVID_UTILS_EXPORT bool operator!= (const ColorRGBABase &rhs) const
 Check for inequality.
std::string toString () const
 Get string representation.

Additional Inherited Members

Public Types inherited from Zivid::ColorRGBABase< float >
using ValueType
 The type of the channel values.
Public Attributes inherited from Zivid::ColorRGBABase< float >
float r
 Red channel.
float g
 Green channel.
float b
 Blue channel.
float a
 Alpha channel.

Detailed Description

Color with 32-bit red, green, blue and alpha channels.

The order of the members is r, g, b, a, and each member is represented as a 32-bit float. The members have values from 0 to 1.

This format holds linear color values, which are suitable as input to computer vision algorithms. It is the floating-point counterpart of ColorRGBA, covering the same range with 0 to 255 mapped to 0 to 1. It carries more precision than ColorRGBA, which is this value quantized to 8 bits per channel, so ColorRGBAf * 255 and ColorRGBA agree only to within half a quantization step. For showing colors on a display for viewing, consider using the ColorRGBA_SRGB format.

Member Function Documentation

◆ ColorRGBABase() [1/2]

Zivid::ColorRGBABase< T >::ColorRGBABase ( )
default

Constructor.

◆ ColorRGBABase() [2/2]

Zivid::ColorRGBABase< T >::ColorRGBABase ( T red,
T green,
T blue,
T alpha )
inline

Constructor.


The documentation for this struct was generated from the following file: