Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
3D from two 2D orthographic views

Subject: 3D from two 2D orthographic views

From: GAURAV

Date: 21 Oct, 2010 02:02:04

Message: 1 of 1

Hi!!
I have two orthogonal 2D views i.e. just the two outlines and from that I have to get a 3D volume from that.
'IMAGE ANALYST' gave the following code for this.

topView = [0 0 1 0 0;...
> > 0 1 1 1 0;...
> > 0 1 1 1 0;...
> > 0 1 0 1 0;...
> > 0 1 0 1 0]
> > sideView = [0 0 0 0 0;...
> > 0 1 1 1 0;...
> > 0 1 1 1 0;...
> > 0 1 0 1 0;...
> > 0 0 0 0 0]
> > % Extrude the top view down the Z axis.
> > topView_3D = repmat(topView, [1 1 5])
> > % Extrude the side view down the z axis.
> > sideView_3D = repmat(sideView, [1 1 5])
> > % Turn it to make it a side view.
> > sideView_3D = permute(sideView_3D, [1 3 2]);
> > % Multiply them to get the common pixels.
> > bothViews = topView_3D .* sideView_3D

The suggested solution worked fine! Appreciate it. Just had few major concerns with this approach.

1) Can you suggest any command which will show this new 3D reconstruction ? isosurface command crashes out with larger images.
How will you plot the bothViews in the code you wrote?

2) The multiplication result results in sharp edges and not smooth surface from all of the views. If you consider intersection of two projecting circles we get a sphere but in some views it looks like a square.
Any ways to smooth this off to some reasonable amount?

Thanks,
Regards,
Gaurav

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us