convert "single" 2D image to 3D volume
Show older comments
Hello there,
I have a single 2D image and I want to convert it to a 3D volume of faces and vertices.
Then exprot it to use it in another rendering software.. ex. unity, real engine.
How this can be solved?
an example image is attached.
3 Comments
Rik
on 28 Jul 2019
This will require a lot of assumptions and is quite a big project. What have you tried so far? What is your specific issue?
sana3 sal
on 28 Jul 2019
Rik
on 28 Jul 2019
It's going to be very difficult to get a 3D model. The most you're going to get with basic native Matlab tools is a flat mesh for each color.
You need a method to determine depth. You can start in the field of computer vision. The question you're asking is large enough to be a masters project, if not larger. It might be easy for a human to estimate a 3D shape from a 2D image, but for computers it is a complex task.
I know just enough of this field to tell you that you will have a lot of work to do, and I will not be able to help you with this.
Answers (1)
Steven Lord
on 28 Jul 2019
0 votes
Suppose you have a picture from directly above the object, and all you see a black square. Is the object:
- A table with four legs in the corners but open space between the legs?
- A desk with one wall open but the other three solid walls?
- An overturned trash can with four solid walls but a hollow interior?
- A solid cube of material with no open space below the square?
To me each of those seem consistent with the one picture you have. Without more information you can't distinguish those four.
5 Comments
sana3 sal
on 29 Jul 2019
Rik
on 29 Jul 2019
You want the z, which means you want the full object. If you want to render this image, you need to know how the object looks from a different angle. How are you planning to model that?
Steven Lord
on 29 Jul 2019
Okay, let's say you have a Google Maps view of a building. How many stories does it have? Just viewing the building from above, with no other information, it's going to be difficult or impossible to answer that question.
For that matter, how can you distinguish a picture of a building from Google Maps with a picture of a very detailed model train layout, with buildings that are accurate scale models of the original buildings? You may not be able to tell whether the building is 20 meters tall or 20 millimeters tall.
So what other information do you have available above and beyond what's captured in the image data itself? Does your file have metadata associated with it? That might help.
sana3 sal
on 29 Jul 2019
Sushmitha Kudari
on 21 Apr 2020
Can you please share how you were able to genereate this image from a 2D image
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!