plot 3d object from an 2d image
显示 更早的评论
Hi, I desire to plot a 3d object from an 2d image, for example, an 2d image contain a square (20X20), i desired to extend the shape to 3d (20x20x10). After construct, the image should able to view by the command "view(45,60);"
采纳的回答
image_as_3D = repmat(image_as_2D, 1, 1, 10);
You will need to show us an example of what you want the plot to look like.
9 个评论
The attached code is how i plot the 3d car model. But each line need to draw manually and ugly, so now i desired to use an 2d image, then extend it to 3d.
The code did not get attached. Be sure to click on Attach File after selecting the file.
attached code
When you say you want to start with a 2d image do you mean like a .tif file? If so please attach a sample.
no, image like png/jpg/bmp. This is the attached image.
That is just a square? I thought you meant something like a picture of an automobile taken from the top.
to simply, i just test with square, this is the car image.
If I understand correctly, you want to be able to click on a part of the image, have the program figure out what else in the image is part of the same structure, and then you want to be able to stretch that object into the third dimension using some as-yet-unstated method to indicate how large you want it? With the program having to be able to figure out continuity to know for example that the horizontal line crossing the circles indicates that the body of the car is straight across and that the circles are complete circles that are "behind" the transparent body of the car?
I think that these days people who want to do this kind of task use a dedicated CAD tool that has these kinds of facilities built in. And if they were modeling an existing object that they would use one or more stereo images to extract depth information, or they would use a 3D scanner or tool such as a Kinect
hi, sorry that my question is unclear, but what is to display an array like 256x256x4 (contain pixel value). Just like imshow in 2d image.
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
