We\'ve learned that you can get the gradient direction with atan(dy/dx) which is the direction orthogonal to the edge. Now we had a homework where we were suppo
atan(dy/dx)
Might be late for the original question, but the following link might help anyone struggling to understand non-max suppression.
Java Demo of non-max suppression