Class ColorSpec
Defined in File ColorSpec.hpp
Class Documentation
-
class ColorSpec
Class for color specification.
This class encapsulates various properties related to color space and encoding.
Public Functions
-
inline constexpr ColorSpec(NVCVColorSpec cspec)
Construct a new ColorSpec object.
- Parameters:
cspec – Existing NVCVColorSpec object.
-
inline ColorSpec(ColorSpace cspace, YCbCrEncoding encoding, ColorTransferFunction xferFunc, ColorRange range, ChromaLocation locHoriz, ChromaLocation locVert)
Construct a new ColorSpec object.
- Parameters:
cspace – Color space.
encoding – YCbCr encoding.
xferFunc – Color transfer function.
range – Color range.
locHoriz – Horizontal chroma location.
locVert – Vertical chroma location.
-
constexpr operator NVCVColorSpec() const
Get the NVCVColorSpec object.
- Returns:
NVCVColorSpec object.
-
inline ColorSpec chromaLoc(ChromaLocation locHoriz, ChromaLocation locVert) const
Set the chroma location and return a new ColorSpec.
- Parameters:
locHoriz – Horizontal chroma location.
locVert – Vertical chroma location.
- Returns:
A new ColorSpec with the specified chroma location.
-
inline ChromaLocation chromaLocHoriz() const
Get the horizontal chroma location.
- Returns:
Horizontal chroma location.
-
inline ChromaLocation chromaLocVert() const
Get the vertical chroma location.
- Returns:
Vertical chroma location.
-
inline ColorSpec colorSpace(ColorSpace cspace) const
Set the color space and return a new ColorSpec.
- Parameters:
cspace – Color space.
- Returns:
A new ColorSpec with the specified color space.
-
inline ColorSpace colorSpace() const
Get the color space.
- Returns:
Color space.
-
inline ColorSpec yCbCrEncoding(YCbCrEncoding encoding) const
Set the YCbCr encoding and return a new ColorSpec.
- Parameters:
encoding – YCbCr encoding.
- Returns:
A new ColorSpec with the specified YCbCr encoding.
-
inline YCbCrEncoding yCbCrEncoding() const
Get the YCbCr encoding.
- Returns:
YCbCr encoding.
-
inline ColorSpec colorTransferFunction(ColorTransferFunction xferFunc) const
Set the color transfer function and return a new ColorSpec.
- Parameters:
xferFunc – Color transfer function.
- Returns:
A new ColorSpec with the specified color transfer function.
-
inline ColorTransferFunction colorTransferFunction() const
Get the color transfer function.
- Returns:
Color transfer function.
-
inline ColorSpec colorRange(ColorRange range) const
Set the color range and return a new ColorSpec.
- Parameters:
range – Color range.
- Returns:
A new ColorSpec with the specified color range.
-
inline ColorRange colorRange() const
Get the color range.
- Returns:
Color range.
Public Static Functions
-
static constexpr ColorSpec ConstCreate(ColorSpace cspace, YCbCrEncoding encoding, ColorTransferFunction xferFunc, ColorRange range, ChromaLocation locHoriz, ChromaLocation locVert)
Create a ColorSpec object.
- Parameters:
cspace – Color space.
encoding – YCbCr encoding.
xferFunc – Color transfer function.
range – Color range.
locHoriz – Horizontal chroma location.
locVert – Vertical chroma location.
- Returns:
A ColorSpec object.
-
inline constexpr ColorSpec(NVCVColorSpec cspec)