MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ rgba_to_hsv() [2/2]

MAYAFLUX_API std::vector< float > MayaFlux::Kinesis::Vision::rgba_to_hsv ( std::span< const float >  rgba,
uint32_t  w,
uint32_t  h 
)

Convert RGBA to HSV.

Output is interleaved HSV, 3 floats per pixel. H in [0, 1] (mapped from [0, 360]), S and V in [0, 1]. Alpha channel is discarded.

Parameters
rgbaInterleaved RGBA span, size must be w * h * 4.
wImage width in pixels.
hImage height in pixels.
Returns
Interleaved HSV float vector of length w * h * 3.

Definition at line 131 of file PixelOps.cpp.

132{
133 std::vector<float> out(static_cast<size_t>(w) * h * 3);
134 rgba_to_hsv(rgba, out, w, h);
135 return out;
136}
uint32_t h
Definition InkPress.cpp:28
void rgba_to_hsv(std::span< const float > rgba, std::span< float > dst, uint32_t w, uint32_t h)
Convert RGBA to HSV writing into caller-supplied buffer.
Definition PixelOps.cpp:94

References h, and rgba_to_hsv().

+ Here is the call graph for this function: