1
$\begingroup$

In the Non-maximum suppression algorithm, each pixel has a total of 4 directions since there are 8 neighboring pixels. But why there is not 8 directions instead, please? I see below there are 8 directions not only 4:

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Are you asking in the context of the Canny Edge Detector? $\endgroup$
    – Royi
    Commented Oct 29, 2022 at 9:14
  • $\begingroup$ @Royi. Yes. This is part of it, which is non-max suppression algorithm. $\endgroup$
    – Avv
    Commented Oct 29, 2022 at 15:45

1 Answer 1

4
$\begingroup$

There are 8 directions to be considered in non-maximum suppression as used in the Canny edge detector. But each pair of opposite directions can be handled with the same code.

$\endgroup$
2
  • $\begingroup$ Thank you. Do you mean by taking the absolute value of pixel orientation this will leave us with only 4 directions please? $\endgroup$
    – Avv
    Commented Oct 30, 2022 at 18:44
  • $\begingroup$ @Avv You’d take the angle modulo 180 degrees. This is not the same as taking the absolute value, as that would equate 45 and -45 degrees, which are at 90 degrees to each other and are not equivalent. 0 and 180 are equivalent, 45 and 225 are equivalent, etc. $\endgroup$ Commented Oct 30, 2022 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.