|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API GradientResult MayaFlux::Kinesis::Vision::sobel | ( | std::span< const float > | gray, |
| uint32_t | w, | ||
| uint32_t | h | ||
| ) |
Sobel gradient operator.
3x3 Sobel kernels applied separably. dx and dy are in [-1, 1]. Magnitude is normalised by the theoretical maximum (4 * 255 / 255 = 4 for uint8 sources, but since input is already [0,1] the max magnitude is sqrt(2) which is divided out). Angle via atan2(dy, dx).
| gray | Single-channel float span, size must be w * h. |
| w | Image width in pixels. |
| h | Image height in pixels. |
Definition at line 74 of file Gradient.cpp.
References MayaFlux::Kinesis::Vision::GradientResult::angle, MayaFlux::Kinesis::Vision::GradientResult::dx, MayaFlux::Kinesis::Vision::GradientResult::dy, h, MayaFlux::Kinesis::Vision::GradientResult::magnitude, MayaFlux::peak(), and sobel().
Here is the call graph for this function: