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

◆ erode() [2/2]

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

Morphological erosion with square structuring element.

A pixel is 1.0f only if all pixels within radius are foreground.

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
Eroded binary float vector of length w * h.

Definition at line 91 of file Morphology.cpp.

92{
93 std::vector<float> out(static_cast<size_t>(w) * h);
94 erode(mask, out, w, h, radius);
95 return out;
96}
uint32_t h
Definition InkPress.cpp:28
uint32_t radius
void erode(std::span< const float > mask, std::span< float > dst, uint32_t w, uint32_t h, uint32_t radius)
Erosion writing into dst.

References erode(), h, and radius.

+ Here is the call graph for this function: