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:
1 Answer
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$– AvvOct 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$ Oct 30, 2022 at 18:46