Ask Your Question
0

How to draw a line vec6f

asked 2017-12-26 12:22:00 -0600

Ahmed gravatar image

Hi All, I wonder how would I draw a line that is used by Vec6f using fitline

                    Vec6f lineOutput;
                    cv::fitLine(lines, lineOutput, CV_DIST_L2, 0, 0.01, 0.01);
edit retag flag offensive close merge delete

Comments

Use doc. Vec6f means a 3d line you would need viz or ogre3d to draw a 3d line

LBerger gravatar imageLBerger ( 2017-12-26 12:30:28 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-12-26 19:55:34 -0600

sjhalayka gravatar image

updated 2017-12-26 20:00:04 -0600

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.

If you want to draw a line in 3D, you need to draw a cylinder, capped with spheres or circles.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-12-26 12:22:00 -0600

Seen: 203 times

Last updated: Dec 26 '17