1 | initial version |
If you want it to work like OpenGL, you would convert your 3D position Vec6f to two 2D coordinates, then use something like Bresenham's line algorithm in 2D to draw a line between the points. I believe that there is a line function in OpenCV, which can be used as a shortcut.
2 | No.2 Revision |
If you want it to work like OpenGL, you would convert your 3D position Vec6f to two 2D coordinates, then use something like Bresenham's line algorithm in 2D to draw a line between the points. I believe that there is a line line()
function in OpenCV, which can be used as a shortcut.
If you want to draw a line in 3D, you need to draw a cylinder, capped with spheres or circles.