MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / sobelFilter

Function sobelFilter

examples/image_processing/edge.cpp:32–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void sobelFilter(array &mag, array &dir, const array &in) {
33 array Gx, Gy;
34 sobel(Gx, Gy, in, 3);
35 // Find magnitude and direction
36 mag = hypot(Gx, Gy);
37 dir = atan2(Gy, Gx);
38}
39
40array normalize(const array &in) {
41 float mx = max<float>(in);

Callers 1

edgeFunction · 0.70

Calls 3

hypotFunction · 0.85
atan2Function · 0.85
sobelFunction · 0.50

Tested by

no test coverage detected