Rendering or visualising 3D images

asked 2018-04-10 06:27:41 -0600

shsh gravatar image

How do I get to visualize or 3D image in python. I have been able to create a pipeline to get point clouds from pair of stereo frames using openCV. I am writing them as PCD files after calculating disparity and reprojecting image to 3D. It takes lot of time to write it to a file.

Is it possible to get something like this.

https://www.youtube.com/watch?v=B2pEb...

what things I will need to do to achieve that? I am using python 3 and openCV 3

edit retag flag offensive close merge delete

Comments

There has to be some kind of support for OpenGL in Python (yes, there is... http://pyopengl.sourceforge.net).

Rainbow colouring by distance is also pretty straightforward (I have C++ code for it anyway: https://gist.github.com/sjhalayka/1cb...).

Are you sure you need to use Python?

sjhalayka gravatar imagesjhalayka ( 2018-04-10 10:35:16 -0600 )edit

Yes, I need to get it done with Python. I have seen there is something called Viz that can be used with C++ but unfortunately it is not available for Python. So it seems I need to look at rendering point cloud with OpenGL.

shsh gravatar imageshsh ( 2018-04-10 11:00:12 -0600 )edit

I recommend that you buy The Red Book, The Blue Book, and The Orange Book. You can use OpenGL 1.x (ie. glVertex3f()-- http://www.glprogramming.com/red/), which is super easy to use, or OpenGL 4.x (ie. glDrawArrays()), which lies a little closer to the metal, and is a little more difficult to use.

sjhalayka gravatar imagesjhalayka ( 2018-04-10 11:03:50 -0600 )edit

If you need any help with OpenGL, my email address is available in my profile -- [email protected]

sjhalayka gravatar imagesjhalayka ( 2018-04-10 17:05:54 -0600 )edit

Thank you, I will look into that.

shsh gravatar imageshsh ( 2018-04-11 02:28:57 -0600 )edit

Found a great set of tutorials at: http://pyopengl.sourceforge.net/conte...

sjhalayka gravatar imagesjhalayka ( 2018-04-11 20:43:28 -0600 )edit

The Gamedev.net forums are also a great resource.

sjhalayka gravatar imagesjhalayka ( 2018-04-13 10:26:43 -0600 )edit