1 | initial version |
Basically it the output is calculated clockwise starting from the x - axis. This is dependant on how the axes in OpenCV are actually visualized. So take a look at the following picture.
This means that if a point [1,1] has a gradient angle of 45°, it will point towards the pixel that is at 45° looking from the coordinate center. In this case it will be [2,2]. An angle of 90° would point to [2,0].