|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API void MayaFlux::Kinesis::Vision::threshold_adaptive | ( | std::span< const float > | gray, |
| std::span< float > | dst, | ||
| uint32_t | w, | ||
| uint32_t | h, | ||
| uint32_t | block_size, | ||
| float | offset | ||
| ) |
Adaptive threshold writing into caller-supplied buffer.
Each pixel is thresholded against the mean of its block_size x block_size neighbourhood minus offset. Pixels at the border use a clamped neighbourhood.
| gray | Input span, size must be w * h. |
| dst | Output span, size must be w * h. |
| w | Image width in pixels. |
| h | Image height in pixels. |
| block_size | Neighbourhood size in pixels. Must be odd and >= 3. |
| offset | Subtracted from local mean before comparison. |
Definition at line 258 of file PixelOps.cpp.
References block_size, count, h, MayaFlux::mean(), and offset.
Referenced by MayaFlux::Kinesis::Vision::VisionExecutor::run(), and threshold_adaptive().
Here is the call graph for this function:
Here is the caller graph for this function: