Got Questions? Get Answers.
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: 5 Oct, 2010 08:47:04

Message: 1 of 10

Hi Everyone!

Does anyone have some links or softwares that can do 3D reconstruction from two 2D orthographic views? I have say top front view and one of the side views of the object and I need to reconstruct it, how would I go about doing this? Any softwares or tools in mind guys? Need help.

Thanks,
Gaurav

Subject: 3D from two 2D orthographic views

From: Steven_Lord

Date: 5 Oct, 2010 14:18:08

Message: 2 of 10



"GAURAV " <gsharda@engineering.uiowa.edu> wrote in message
news:i8eom8$qqj$1@fred.mathworks.com...
> Hi Everyone!
>
> Does anyone have some links or softwares that can do 3D reconstruction
> from two 2D orthographic views? I have say top front view and one of the
> side views of the object and I need to reconstruct it, how would I go
> about doing this? Any softwares or tools in mind guys? Need help.

In general, this is not possible as you described. Suppose you had a
Rubik's Cube:

http://en.wikipedia.org/wiki/Rubik%27s_Cube

and you had pictures of two adjacent sides. Can you tell me for certain the
arrangement of the stickers on the other four sides? [Note that I reserve
the right to remove and reapply the stickers in any pattern I want -- in
other words, the easy way to solve the Cube :] In addition, can you prove
to me, from those two views, that some of the squares on the sides for which
you don't have pictures don't have divots in them?

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: 3D from two 2D orthographic views

From: GAURAV

Date: 5 Oct, 2010 15:10:27

Message: 3 of 10

Hi Steve!
Appreciate your reply. I desperately need help on this.
Hereby, I have attached a link. If you see figure 4 in the paper, how the heart has been reconstructed from only two views, I need that kind of thing. Can you please see that.
I really need a software that does this thing. Please help me out.
Heres the link:-
http://www.alecrivers.com/3dmodelingwithsilhouettes/files/3D%20Modeling%20with%20Silhouettes.pdf

Thanks,
Gaurav


"Steven_Lord" <slord@mathworks.com> wrote in message <i8fc2v$ua$1@fred.mathworks.com>...
>
>
> "GAURAV " <gsharda@engineering.uiowa.edu> wrote in message
> news:i8eom8$qqj$1@fred.mathworks.com...
> > Hi Everyone!
> >
> > Does anyone have some links or softwares that can do 3D reconstruction
> > from two 2D orthographic views? I have say top front view and one of the
> > side views of the object and I need to reconstruct it, how would I go
> > about doing this? Any softwares or tools in mind guys? Need help.
>
> In general, this is not possible as you described. Suppose you had a
> Rubik's Cube:
>
> http://en.wikipedia.org/wiki/Rubik%27s_Cube
>
> and you had pictures of two adjacent sides. Can you tell me for certain the
> arrangement of the stickers on the other four sides? [Note that I reserve
> the right to remove and reapply the stickers in any pattern I want -- in
> other words, the easy way to solve the Cube :] In addition, can you prove
> to me, from those two views, that some of the squares on the sides for which
> you don't have pictures don't have divots in them?
>
> --
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Subject: 3D from two 2D orthographic views

From: Diego

Date: 5 Oct, 2010 15:17:05

Message: 4 of 10

"Steven_Lord" <slord@mathworks.com> wrote in message <i8fc2v$ua$1@fred.mathworks.com>...
>
>
> "GAURAV " <gsharda@engineering.uiowa.edu> wrote in message
> news:i8eom8$qqj$1@fred.mathworks.com...
> > Hi Everyone!
> >
> > Does anyone have some links or softwares that can do 3D reconstruction
> > from two 2D orthographic views? I have say top front view and one of the
> > side views of the object and I need to reconstruct it, how would I go
> > about doing this? Any softwares or tools in mind guys? Need help.
>
> In general, this is not possible as you described. Suppose you had a
> Rubik's Cube:
>
> http://en.wikipedia.org/wiki/Rubik%27s_Cube
>
> and you had pictures of two adjacent sides. Can you tell me for certain the
> arrangement of the stickers on the other four sides? [Note that I reserve
> the right to remove and reapply the stickers in any pattern I want -- in
> other words, the easy way to solve the Cube :] In addition, can you prove
> to me, from those two views, that some of the squares on the sides for which
> you don't have pictures don't have divots in them?
>
> --
> Steve Lord
> slord@mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Besides that, in mechanics, for exemple, usually more than 2 views are needed to represent a part.
If you can draw by yourself (non-automatically) I sugest SolidWorks.

Subject: 3D from two 2D orthographic views

From: GAURAV

Date: 5 Oct, 2010 15:51:19

Message: 5 of 10

"Diego " <dcampeao@lncc.br> wrote in message <i8ffhh$nql$1@fred.mathworks.com>...
> "Steven_Lord" <slord@mathworks.com> wrote in message <i8fc2v$ua$1@fred.mathworks.com>...
> >
> >
> > "GAURAV " <gsharda@engineering.uiowa.edu> wrote in message
> > news:i8eom8$qqj$1@fred.mathworks.com...
> > > Hi Everyone!
> > >
> > > Does anyone have some links or softwares that can do 3D reconstruction
> > > from two 2D orthographic views? I have say top front view and one of the
> > > side views of the object and I need to reconstruct it, how would I go
> > > about doing this? Any softwares or tools in mind guys? Need help.
> >
> > In general, this is not possible as you described. Suppose you had a
> > Rubik's Cube:
> >
> > http://en.wikipedia.org/wiki/Rubik%27s_Cube
> >
> > and you had pictures of two adjacent sides. Can you tell me for certain the
> > arrangement of the stickers on the other four sides? [Note that I reserve
> > the right to remove and reapply the stickers in any pattern I want -- in
> > other words, the easy way to solve the Cube :] In addition, can you prove
> > to me, from those two views, that some of the squares on the sides for which
> > you don't have pictures don't have divots in them?
> >
> > --
> > Steve Lord
> > slord@mathworks.com
> > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> > To contact Technical Support use the Contact Us link on
> > http://www.mathworks.com
>
> Besides that, in mechanics, for exemple, usually more than 2 views are needed to represent a part.
> If you can draw by yourself (non-automatically) I sugest SolidWorks.


Hi Steve!

I have two 2D curves defined by a set of points smoothed by cardinal spline and I need to use those curves to do the 3D reconstruction. I cannot draw the curves by myself. I need to enter those splined set of points. Suggestions please.
And yes thats the problem in my case I have just two views and thats very limited information but have to come up with something in this and have to get going soon. Please please help me out.

Thanks,
Gaurav

Subject: 3D from two 2D orthographic views

From: ImageAnalyst

Date: 5 Oct, 2010 16:11:04

Message: 6 of 10

Then that is a much simpler thing to do that Steve, or I, thought you
meant at first. One way to do it would be to project your one view
into a 3D volume with repmat(). Then you'd do the same with the other
view. Then you simply multiply them together (or AND them if they're
a logical array). You'd have to make sure you got your x, y, and z
axes consistent between the two but I think that should do it. Just
two calls to repmat() followed by a multiplication - 3 lines total.

Subject: 3D from two 2D orthographic views

From: GAURAV

Date: 5 Oct, 2010 16:40:21

Message: 7 of 10

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <bad4280c-cb03-486f-b72a-1668fe586f77@i13g2000yqd.googlegroups.com>...
> Then that is a much simpler thing to do that Steve, or I, thought you
> meant at first. One way to do it would be to project your one view
> into a 3D volume with repmat(). Then you'd do the same with the other
> view. Then you simply multiply them together (or AND them if they're
> a logical array). You'd have to make sure you got your x, y, and z
> axes consistent between the two but I think that should do it. Just
> two calls to repmat() followed by a multiplication - 3 lines total.


Hi!

This sounds good.
I have two outlines only though and I need the volume from that. I think using this I will get an outer bound of the 3D shape? So do I need to add new points with outlines I have or how do I go about forming a volume?

Thanks,
Gaurav

Subject: 3D from two 2D orthographic views

From: ImageAnalyst

Date: 5 Oct, 2010 16:53:40

Message: 8 of 10

On Oct 5, 12:40 pm, "GAURAV " <gsha...@engineering.uiowa.edu> wrote:
> This sounds good.
> I have two outlines only though and I need the volume from that. I think using this I will get an outer bound of the 3D shape? So do I need to add new points with outlines I have or how do I go about forming a volume?
>
> Thanks,
> Gaurav
--------------------------------------------------------------------------------------------------------------
I thought it was pretty clear but maybe since I forgot the permute
function, it threw you off. What I'm thinking of is 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

Subject: 3D from two 2D orthographic views

From: GAURAV

Date: 5 Oct, 2010 17:17:21

Message: 9 of 10

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <aee691e7-00b3-4aa2-8ba0-1f1135eb61cc@i21g2000yqg.googlegroups.com>...
> On Oct 5, 12:40 pm, "GAURAV " <gsha...@engineering.uiowa.edu> wrote:
> > This sounds good.
> > I have two outlines only though and I need the volume from that. I think using this I will get an outer bound of the 3D shape? So do I need to add new points with outlines I have or how do I go about forming a volume?
> >
> > Thanks,
> > Gaurav
> --------------------------------------------------------------------------------------------------------------
> I thought it was pretty clear but maybe since I forgot the permute
> function, it threw you off. What I'm thinking of is 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

Hi!

Thanks a lot for your help. I will try this out and let you the results. Appreciate it.

Regards,
Gaurav

Subject: 3D from two 2D orthographic views

From: GAURAV

Date: 13 Oct, 2010 04:11:03

Message: 10 of 10

Hi!!
The suggested solution worked really fine! Appreciate it. Just had few questions.
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.
"GAURAV " <gsharda@engineering.uiowa.edu> wrote in message <i8fmj1$euf$1@fred.mathworks.com>...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message <aee691e7-00b3-4aa2-8ba0-1f1135eb61cc@i21g2000yqg.googlegroups.com>...
> > On Oct 5, 12:40 pm, "GAURAV " <gsha...@engineering.uiowa.edu> wrote:
> > > This sounds good.
> > > I have two outlines only though and I need the volume from that. I think using this I will get an outer bound of the 3D shape? So do I need to add new points with outlines I have or how do I go about forming a volume?
> > >
> > > Thanks,
> > > Gaurav
> > --------------------------------------------------------------------------------------------------------------
> > I thought it was pretty clear but maybe since I forgot the permute
> > function, it threw you off. What I'm thinking of is 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
>
> Hi!
>
> Thanks a lot for your help. I will try this out and let you the results. Appreciate it.
>
> Regards,
> Gaurav

Tags for this Thread

No tags are associated with 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