how to generate 3d meshes for an image in opencv? [closed]

asked 2018-11-02 00:57:23 -0600

After importing an image, i want to generate 3d meshes for that image. How can i do it?

edit retag flag offensive reopen merge delete

Closed for the following reason not a real question by berak
close date 2018-11-02 04:01:42.285145

Comments

oh, that's easy. you just have to implement this

berak gravatar imageberak ( 2018-11-02 02:53:48 -0600 )edit

is it possible to get the source code of your sir? it would be very helpful for me .

not a robot gravatar imagenot a robot ( 2018-11-02 03:54:46 -0600 )edit

sure that would be helpful for you ;)

(no, i don't have any code for that. and i'm only "pulling your leg" here.)

(if you don't have any skills or even did any proper research -- YOU can't do it.)

berak gravatar imageberak ( 2018-11-02 04:01:12 -0600 )edit

What do you mean a 3D mesh for an image? Like a hilly terrain where height is proportional to input pixel intensity? Sounds kind of interesting. email me at [email protected] if you want to explain the problem to me.

sjhalayka gravatar imagesjhalayka ( 2018-11-02 09:32:14 -0600 )edit

@sjhalayka -- you'll for sure like the paper mentioned in the 1st link !

(it's also using marching cubes as a baseline for comparison ;)

berak gravatar imageberak ( 2018-11-02 09:34:10 -0600 )edit

I see that now. I only browsed the abstract until now. That looks crazy! They do such a great job.

sjhalayka gravatar imagesjhalayka ( 2018-11-02 09:37:22 -0600 )edit
1

Also, Paul Bourke has a Marching Cubes page:

http://paulbourke.net/geometry/polygo...

That page is where I learned about Marching Cubes. It also has a C implementation.

sjhalayka gravatar imagesjhalayka ( 2018-11-02 09:46:56 -0600 )edit

You could use p5 or Pixi.

example: https://codepen.io/kpachinger/pen/dgeQMW

kpachinger gravatar imagekpachinger ( 2018-11-04 07:35:55 -0600 )edit

@kpachinger, -- the main problem with this question was:

0 own research + 0 skill == 0 result

am i wrong, or does your (nice) codepen only make a deformable 2d grid ? (looks like 2d "voxels" to me)

berak gravatar imageberak ( 2018-11-04 07:38:04 -0600 )edit
1

It is deformable 2d. The effect of the presentation resembles 3d cloth. It was largely taken from the solution in the details. But also, Pixi could be used to add a depth map and light source, or you could add a z to the point properties and go from there.

kpachinger gravatar imagekpachinger ( 2018-11-04 08:47:49 -0600 )edit