Ask Your Question
0

Using Wavefront OBJ/SPL "meshes" directly in OpenCV

asked 2015-01-09 15:20:31 -0500

updated 2015-01-09 16:42:18 -0500

berak gravatar image

I have a need to "render" a 3d MeshLab produced mesh in OpenCV directly - this can be exported in Waveform obj, ply, stl, off, wrf, dxf, dae, ctm, xyz, gts, json, u3d, idtf or x3d "formats").

At the moment, I'm having to load a .obj file into my C++ application using OpenGL which then "insists" on having a windowing environment to render to (which cannot be provided on the server) - however, I just need a Jpeg or similar file produced (I'll be really happy with having a standard cv::Mat produced)

My question, therefore, is: Is there any way of producing an image file with a 3d mesh within OpenCV itself without the use of third party libraries? [I do have the need to be able to plot it, and other details, in "3d" space]?

edit retag flag offensive close merge delete

Comments

why use opencv for this ? do you just need some basic 3d->2d rendering, and did not find anything else ?

berak gravatar imageberak ( 2015-01-09 15:51:14 -0500 )edit

wavefront, not waveform, btw.

berak gravatar imageberak ( 2015-01-09 16:42:41 -0500 )edit
1

I use OpenCV for the rest of the image processing and manipulation and it made sense to keep it all within OpenCV instead of using even more applications. Thanks for the Wavefront/form correction btw.

richyb gravatar imagerichyb ( 2015-01-09 17:48:55 -0500 )edit

there are ways to render to an off-screen context, unfortunately they are all os specific, and far beyond the scope of this page..

berak gravatar imageberak ( 2015-01-10 05:17:40 -0500 )edit

@richyb have you solved your problem? I have a similar one

marcoE gravatar imagemarcoE ( 2016-04-20 09:41:18 -0500 )edit

Hi, I meet the same problem. Have u solved it?

sublimation gravatar imagesublimation ( 2018-05-15 08:26:22 -0500 )edit

@sublimation , please do not post answers here, if you have a question or comment, thank you.

berak gravatar imageberak ( 2018-05-15 08:34:14 -0500 )edit
1

OK! I am so sorry for that. Please forgive me,I am only a fresh student and I do not know the rule!

sublimation gravatar imagesublimation ( 2018-05-16 05:02:04 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-01-09 15:43:23 -0500

Have you seen the new Viz module in OpenCV 3.0. I think this could be just what you are looking for. http://docs.opencv.org/trunk/doc/tuto...

edit flag offensive delete link more

Comments

Thanks - I hadn't (yet). Just looking at it now - does it work without the need to launch a window? (Documentation only shows examples with it)

richyb gravatar imagerichyb ( 2015-01-09 17:50:45 -0500 )edit

oh sorry, I missed that part. The last time I needed to do offscreen rendering, I was using QT but there has to be a simple way just with OpenGL or Glut. Have you tried something like http://stackoverflow.com/questions/14...

FooBar gravatar imageFooBar ( 2015-01-10 05:56:26 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-01-09 15:20:31 -0500

Seen: 1,325 times

Last updated: Jan 09 '15