Non-max suppression

后端 未结 3 1352
庸人自扰
庸人自扰 2020-12-30 06:47

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

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-30 07:18

    Non-max suppression is a way to eliminate points that do not lie in important edges. In your first case if the gradient is close to zero degrees at a given point, that means the edge is to the north or to the south, and that point will be considered to be on the edge if the magnitude of this point is greater than both magnitudes of the points to its left and right (as in your example). In your second case you are checking for gradient at 45 degrees, so the edge is at 135 degrees, and so you keep the point if it is greater than the points along the gradient direction, i.e. (-1, -1) and (1, 1). Rotating the coordinate system doesn't affect this.

    enter image description here

提交回复
热议问题