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

◆ threshold() [1/2]

MAYAFLUX_API std::vector< float > MayaFlux::Kinesis::Vision::threshold ( std::span< const float >  gray,
float  value 
)

Global threshold: output is 1.0f where input >= value, else 0.0f.

Parameters
graySingle-channel float span, size must be w * h.
valueThreshold value in [0, 1].
Returns
Binary float vector of length w * h.

Definition at line 251 of file PixelOps.cpp.

252{
253 std::vector<float> out(gray.size());
254 threshold(gray, out, value);
255 return out;
256}
float value
float threshold

References threshold, and value.