MayaFlux 1.0.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 231 of file PixelOps.cpp.

232{
233 std::vector<float> out(gray.size());
234 threshold(gray, out, value);
235 return out;
236}
std::vector< float > * out
glm::vec3 value
float threshold

References out, threshold, and value.