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

◆ dilate() [2/2]

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

Morphological dilation with square structuring element.

A pixel is 1.0f if any pixel within radius is 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
Dilated binary float vector of length w * h.

Definition at line 104 of file Morphology.cpp.

105{
106 std::vector<float> out(static_cast<size_t>(w) * h);
107 dilate(mask, out, w, h, radius);
108 return out;
109}
uint32_t h
Definition InkPress.cpp:28
uint32_t radius
void dilate(std::span< const float > mask, std::span< float > dst, uint32_t w, uint32_t h, uint32_t radius)
Dilation writing into dst.

References dilate(), h, and radius.

+ Here is the call graph for this function: