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

◆ open() [2/2]

MAYAFLUX_API std::vector< float > MayaFlux::Kinesis::Vision::open ( std::span< const float >  mask,
uint32_t  w,
uint32_t  h,
uint32_t  radius 
)

Morphological opening: erode then dilate.

Removes small foreground regions and smooths boundaries.

Parameters
maskSingle-channel float span, size must be w * h.
wImage width in pixels.
hImage height in pixels.
radiusStructuring element half-size in pixels.
Returns
Opened binary float vector of length w * h.

Definition at line 118 of file Morphology.cpp.

119{
120 std::vector<float> tmp(static_cast<size_t>(w) * h);
121 std::vector<float> out(tmp.size());
122 open(mask, tmp, out, w, h, radius);
123 return out;
124}
uint32_t h
Definition InkPress.cpp:28
uint32_t radius
void open(std::span< const float > mask, std::span< float > tmp, std::span< float > dst, uint32_t w, uint32_t h, uint32_t radius)
Morphological opening writing into dst.

References h, open(), and radius.

+ Here is the call graph for this function: