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

Function sobelFilter

examples/image_processing/filters.cpp:105–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void sobelFilter(array &mag, array &dir, const array &in) {
106 // Find the gradients
107 array Gy, Gx;
108 af::sobel(Gx, Gy, in);
109
110 // Find magnitude and direction
111 mag = hypot(Gx, Gy);
112 dir = atan2(Gy, Gx);
113}
114
115void normalizeImage(array &in) {
116 float min = af::min<float>(in);

Callers 1

mainFunction · 0.70

Calls 3

hypotFunction · 0.85
atan2Function · 0.85
sobelFunction · 0.50

Tested by

no test coverage detected