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:
$\begingroup$
$\endgroup$
2
-
1$\begingroup$ Are you asking in the context of the Canny Edge Detector? $\endgroup$– RoyiCommented Oct 29, 2022 at 9:14
-
$\begingroup$ @Royi. Yes. This is part of it, which is non-max suppression algorithm. $\endgroup$– AvvCommented Oct 29, 2022 at 15:45
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
2
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.
-
$\begingroup$ Thank you. Do you mean by taking the absolute value of pixel orientation this will leave us with only 4 directions please? $\endgroup$– AvvCommented 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