non-maximum-suppression

Non-max suppression

梦想与她 提交于 2019-11-29 12:26:09
问题 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 supposed to discretize this direction into four classes (x- and y-direction and both diagonals) and then check both pixel neighbors in the best matching direction for non-max suppression . I didn't fully get the solution though. Obviously we had four cases: abs(angle) < pi/8 , so the gradient (roughly) points in x-direction, thus we check