Use hugin to construct a 3d image from 2d image sets 3d VOXEL

1,283 views
Skip to first unread message

paisajesenvenezuela

unread,
Nov 7, 2010, 8:24:42 PM11/7/10
to hugin and other free panoramic software
hey guys, i just found this website, it comes with a code based on
matlab on how to build a 3d model from 2d images, they evn included an
example on how to do it..

i can partucularlly find uses of this...just like there is VR used to
do a virtual tour of a place, you could have objects viewed in 3
dimensiones using hugin, lets say that you have a website which sells
objects, instead of just uploading regular 2d pictures, why not upload
a 3d rotating picture of the object you want to sell??

i find it very useful, it will catch the website users interest and
they could see how the object looks realtime and in interactive form
as well...No need to use third party expensive software, with this,
hugin would be able to build 3d objects from 2d pictures...Below is
adescription of what the website states:

http://blogs.oregonstate.edu/hess/code/voxels/

3D Voxel Coloring
Voxel coloring is a technique used to create a photorealistic 3D scene
reconstruction from a fairly sparse set of images without computing
image correspondences. It works by discretizing the 3D scene into
small volume elements, called voxels, and reprojecting each voxel one-
by-one back onto the image set. Voxels that reproject onto a set of
pixels with low color variance are colored accordingly, while voxels
that reproject onto a set of pixels with high color variance remain
uncolored. A sweep of the entire scene volume yields a reconstruction
of that scene.

The 3D voxel coloring algorithm available here is implemented in
MATLAB. The images below depict a 3D reconstruction it created from a
set of 20 input images.

IN THE WEBSITE THERE IS A 3D MODEL MADE FROM A SET OF 2D PICTURES...

link to the voxel source:

https://web.engr.oregonstate.edu/~hess/downloads/voxel_src.zip

the big bird image set:

https://web.engr.oregonstate.edu/~hess/downloads/bigbird.zip

this is enough to build another hugin version...and it would extend
its funcionality from basic image panoramic construction to a 3d
modeler..

john doe

unread,
Nov 7, 2010, 8:35:21 PM11/7/10
to hugin and other free panoramic software
also it would be very nice to include this in the stitcher tab and include the VRML extension option..

Tom Sparks

unread,
Nov 7, 2010, 8:51:06 PM11/7/10
to hugi...@googlegroups.com
--- On Mon, 8/11/10, paisajesenvenezuela <guerrer...@gmail.com> wrote:

> From: paisajesenvenezuela <guerrer...@gmail.com>
> Subject: [hugin-ptx] Use hugin to construct a 3d image from 2d image sets 3d VOXEL
> To: "hugin and other free panoramic software" <hugi...@googlegroups.com>
> Received: Monday, 8 November, 2010, 12:24 PM
> hey guys, i just found this website,
> it comes with a code based on
> matlab on how to build a 3d model from 2d images, they evn
> included an
> example on how to do it..

the are already a group of voxel modelers see http://en.wikipedia.org/wiki/Voxel#Voxel_editors

related is image based modelling

tom



kfj

unread,
Nov 8, 2010, 3:54:33 AM11/8/10
to hugin and other free panoramic software


On 8 Nov., 02:24, paisajesenvenezuela <guerrerodelu...@gmail.com>
wrote:
> hey guys, i just found this website, it comes with a code based on
> matlab on how to build a 3d model from 2d images, they evn included an
> example on how to do it..
> ...

> this is enough to build another hugin version...and it would extend
> its funcionality from basic image panoramic construction to a 3d
> modeler..

I have doubts about the wisdom of including something like this in
hugin. I feel that good software design should aim at providing
powerful tools for specific purposes that are open to cooperate with
other tools by sharing code and data. Putting two functionalities as
different as panorama imaging and 3D reconstruction into the same
program unnecessarily ties the two functionalities together. It bloats
the body of code, thereby increasing traffic and making maintanance
more difficult (since the whole is more complex), and the likelyhood
that anyone would actually want or need to do both 3D reconstruction
and panorama creation with the same program is probably not that high,
whereas the functionality would be visible to every hugin user and
probably, at least initially, produce a fair amount of extra support
load.

I feel that flat-surface-remodelling (mosaic mode) is already
stretching it a bit - after all, naively clicking on 'optimize all' in
the optimizer tab will try and optimize X Z and Z even if the image is
panoramic, almost certainly resulting in a complete screwup that can
only be mended by undoing the 'optimization', but one might argue that
the two are still sufficiently close to each other to put them into
one piece of software. The bloating you can, for example, see in the
optimizer tab, where X,Y and Z take up loads of screen estate
displaying - mainly - zeroes, because mainly hugin is used for
panorama creation where you actually want nothing but zeroes there. I
think this is about where the limit is, but of course it's only my
personal opinion.

But since hugin is OS, if you feel that a significant portion of the
functionality would lend itself to the 3D reconstruction purpose,
there's nothing stopping you from taking the bits that fit and reshape
it into a separate 3D modeling program. The resulting piece of
software [code name hugout ;-) ] would likely be much smaller and
easier to maintain in the beginning, since it's functionality wouldn't
have the birth defect of having to share a body with its panoramic
siamese twin, and if the two were separate, you could just take bits
from hugin you like once they emerge.

I think the 3D reconstruction prospect is exciting. I've looked around
for free tools in the area - not very intensely, and, as of yet, to no
avail. My interest would be more in the generation of DEMs from sets
of landscape photographs from different perspectives, since the DEMs
available for my favourite trecking area are rather sketchy, but I
have plenty of imagery...

with regards
Kay

john doe

unread,
Nov 8, 2010, 2:28:06 PM11/8/10
to hugi...@googlegroups.com
so what is need for hugin to do this??i believe matlab and opencv are the solution...they both have libraries that can do 3d reconstruction, opencv is cpp based...


--
You received this message because you are subscribed to the Google Groups "Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to hugi...@googlegroups.com
To unsubscribe from this group, send email to hugin-ptx+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/hugin-ptx

john doe

unread,
Nov 8, 2010, 2:29:23 PM11/8/10
to hugi...@googlegroups.com
opencv code is open source..it also has functions based on SIFT, SURF, image matching, etc...

john doe

unread,
Nov 8, 2010, 3:09:20 PM11/8/10
to hugi...@googlegroups.com
tom the tool in http://blogs.oregonstate.edu/hess/code/voxels/
is free...what is DEM???

im going to look for what you were saying and see what i can find..

tom_a_...@yahoo.com.au

unread,
Nov 8, 2010, 5:34:50 PM11/8/10
to hugin and other free panoramic software


On Nov 9, 7:09 am, john doe <guerrerodelu...@gmail.com> wrote:
> tom the tool inhttp://blogs.oregonstate.edu/hess/code/voxels/
> is free...what is DEM???
http://en.wikipedia.org/wiki/Digital_elevation_model

>
> im going to look for what you were saying and see what i can find..
have read of these master thesis http://www.gpstraces.com/sven/main/publications/Master.Thesis.pdf
the are two many gotach with voxel rendering

tom

john doe

unread,
Nov 8, 2010, 9:20:05 PM11/8/10
to hugi...@googlegroups.com
anyways tom it would be very interested to make a hugin type project with 3d voxel capability, to turn regular 2d pictures to a 3d rotating image, what do you think>???on the first post i commented on there is a site with open source code using opencv...just imagine what you could do with this..

heck the name could be hug-xel, short for hugin and voxel...

why not also include the different types of projection in there too?


--

john doe

unread,
Nov 8, 2010, 9:30:12 PM11/8/10
to hugi...@googlegroups.com
tom i found some very nice interesting info and code here:


some code:

...
...
if (raydiffx>raydiffy)
{
if (angle!=90 && angle!=270)
{ 
distance=raydiffx/cos(angle);
} else distance=raydiffy/sin(angle);
} else
if (angle!=0 && angle!=180)
{
distance=raydiffy/sin(angle);
} else distance=raydiffx/cos(angle);
}
 
float angle=-30.0f;
float angleinc=HFOV/ScreenWidth;
 
for (int i=0;i<ScreenWidth<<1;i++)
{
sin_correction(i)=sin(90-(angle*PI/180));
angle+=angleinc;
}
 
for (int i=ScreenWidth<<1;i<ScreenWidth;i++)
{
sin_correction(i)=sin(90-(angle*PI/180));
angle-=angleinc;
}
 
distance=distance*sin_correction[current_x];
...

john doe

unread,
Nov 8, 2010, 9:46:36 PM11/8/10
to hugi...@googlegroups.com
tom i found this code maybe its helpful to you, its a complete program that does 3d reconstruction from 2d images, its made in q4, comes with the pro files, cpp files also..

tom_a_...@yahoo.com.au

unread,
Nov 8, 2010, 10:00:20 PM11/8/10
to hugin and other free panoramic software
On Nov 9, 1:30 pm, john doe <guerrerodelu...@gmail.com> wrote:
> tom i found some very nice interesting info and code here:
>
> http://cboard.cprogramming.com/game-programming/55548-voxel-algo-scre...
>
> <http://cboard.cprogramming.com/game-programming/55548-voxel-algo-scre...>some
> code:
<snip>
that code is for 2D voxels or heightmap (witch is what DEM is)
http://en.wikipedia.org/wiki/Heightmap

tom

tom_a_...@yahoo.com.au

unread,
Nov 8, 2010, 10:09:43 PM11/8/10
to hugin and other free panoramic software
the more I think about what your doing its closer to objectvr

On Nov 9, 1:46 pm, john doe <guerrerodelu...@gmail.com> wrote:
> tom i found this code maybe its helpful to you, its a complete program that
> does 3d reconstruction from 2d images, its made in q4, comes with the pro
> files, cpp files also..
>
> http://perception.inrialpes.fr/~Franco/EPVH/index.php
>
> On Mon, Nov 8, 2010 at 10:00 PM, john doe <guerrerodelu...@gmail.com> wrote:
> > tom i found some very nice interesting info and code here:
>
> >http://cboard.cprogramming.com/game-programming/55548-voxel-algo-scre...
>
> > <http://cboard.cprogramming.com/game-programming/55548-voxel-algo-scre...>some
> > code:
>
> > ...
> > ...
> > if (raydiffx>raydiffy)
> > {
> > if (angle!=90 && angle!=270)
> > {
> > distance=raydiffx/cos(angle);
> > } else distance=raydiffy/sin(angle);
> > } else
> > if (angle!=0 && angle!=180)
> > {
> > distance=raydiffy/sin(angle);
> > } else distance=raydiffx/cos(angle);
> > }
>
> > float angle=-30.0f;
> > float angleinc=HFOV/ScreenWidth;
>
> > for (int i=0;i<ScreenWidth<<1;i++)
> > {
> > sin_correction(i)=sin(90-(angle*PI/180));
> > angle+=angleinc;
> > }
>
> > for (int i=ScreenWidth<<1;i<ScreenWidth;i++)
> > {
> > sin_correction(i)=sin(90-(angle*PI/180));
> > angle-=angleinc;
> > }
>
> > distance=distance*sin_correction[current_x];
> > ...
>
> > On Mon, Nov 8, 2010 at 9:50 PM, john doe <guerrerodelu...@gmail.com>wrote:
>
> >> anyways tom it would be very interested to make a hugin type project with
> >> 3d voxel capability, to turn regular 2d pictures to a 3d rotating image,
> >> what do you think>???on the first post i commented on there is a site with
> >> open source code using opencv...just imagine what you could do with this..
>
> >> heck the name could be hug-xel, short for hugin and voxel...
>
> >> why not also include the different types of projection in there too?
>
> >> On Mon, Nov 8, 2010 at 6:04 PM, tom_a_spa...@yahoo.com.au <
> >> tom_a_spa...@yahoo.com.au> wrote:
>
> >>> On Nov 9, 7:09 am, john doe <guerrerodelu...@gmail.com> wrote:
> >>> > tom the tool inhttp://blogs.oregonstate.edu/hess/code/voxels/
> >>> > is free...what is DEM???
> >>>http://en.wikipedia.org/wiki/Digital_elevation_model
>
> >>> > im going to look for what you were saying and see what i can find..
> >>> have read of these master thesis
> >>>http://www.gpstraces.com/sven/main/publications/Master.Thesis.pdf
> >>> the are two many gotach with voxel rendering
>
> >>> tom
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Hugin and other free panoramic software" group.
> >>> A list of frequently asked questions is available at:
> >>>http://wiki.panotools.org/Hugin_FAQ
> >>> To post to this group, send email to hugi...@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> hugin-ptx+...@googlegroups.com<hugin-ptx%2Bunsu...@googlegroups.com>

john doe

unread,
Nov 8, 2010, 10:27:10 PM11/8/10
to hugi...@googlegroups.com
im going to start doing objectvr i just downloaded a flash prorgram that makes a vr from sequence of pictures, but its a very nice idea to make 3d models out of regular images..whats the difference of both of them??if youre a customer and are viewing a 3d voxel image of an item in a store you probally will find some very few differences than viewing an objectvr..

the main idea applies for both objectvr and 3d voxel modeling..

hugins current development cant do 3d voxel imaging or object vr...it would be a very nice and exciting idea to write a program based off of hugin to do that...

id like to show clients interactive 3d objects based on the items a store has for sale..

Tom Sparks

unread,
Nov 9, 2010, 2:30:08 AM11/9/10
to hugi...@googlegroups.com
--- On Tue, 9/11/10, john doe <guerrer...@gmail.com> wrote:

From: john doe <guerrer...@gmail.com>
Subject: Re: [hugin-ptx] Re: Use hugin to construct a 3d image from 2d image sets 3d VOXEL
To: hugi...@googlegroups.com
Received: Tuesday, 9 November, 2010, 2:27 PM

im going to start doing objectvr i just downloaded a flash prorgram that makes a vr from sequence of pictures, but its a very nice idea to make 3d models out of regular images..whats the difference of both of them??if youre a customer and are viewing a 3d voxel image of an item in a store you probally will find some very few differences than viewing an objectvr..

the main idea applies for both objectvr and 3d voxel modeling..

hugins current development cant do 3d voxel imaging or object vr...it would be a very nice and exciting idea to write a program based off of hugin to do that...

id like to show clients interactive 3d objects based on the items a store has for sale..
have a look @ http://ict.debevec.org/~debevec/Chevette/

polygon modeling is easier as seen with the image modelers / photomodeler
voxels models are 1000% larger then the polygon model (can be debatable)
ttrue voxel modeling is a niche and only pixel artist can do it


tom_a_sparks
"It's a nerdy thing I like to do"


 

Sabuj Das Gupta

unread,
Aug 18, 2014, 3:28:21 PM8/18/14
to hugi...@googlegroups.com, guerrer...@gmail.com
Those links are dead. Will be much appreciated if anyone can upload them in here. thanks

bugbear

unread,
Aug 19, 2014, 4:09:33 AM8/19/14
to hugi...@googlegroups.com
Sabuj Das Gupta wrote:
> Those links are dead. Will be much appreciated if anyone can upload them in here. thanks

This was not a hugin project.

BugBear

Sabuj Das Gupta

unread,
Aug 19, 2014, 10:05:58 AM8/19/14
to hugi...@googlegroups.com
Hello Bugbear,
 
I am sorry about my confusion. I think this was a Hugin project. Is there anyone who can send/upload this project?
 
That would be a great help.
 
thanks




--
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
--- You received this message because you are subscribed to a topic in the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hugin-ptx/rRcGlhNl52A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hugin-ptx+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/53F30634.70903%40papermule.co.uk.

For more options, visit https://groups.google.com/d/optout.

Sabuj Das Gupta

unread,
Aug 19, 2014, 10:06:27 AM8/19/14
to hugi...@googlegroups.com
Hello Bugbear,
I am sorry about my confusion. I think this was a Hugin project. Is there anyone who can send/upload this project?
That would be a great help.
thanks

___matthieu___

unread,
Aug 19, 2014, 10:11:46 AM8/19/14
to hugi...@googlegroups.com
Hello,

you just need to search voxel_src.zip on google :

https://www.google.com/search?q=voxel_src.zip&ie=utf-8&oe=utf-8

Cheers,

Matthieu

Sabuj Das Gupta

unread,
Aug 19, 2014, 10:58:58 AM8/19/14
to hugi...@googlegroups.com
Hi Matthieu,
 
thanks for the link.
 
This following link says this project has four files
 
However, i could only get the first three files and couldnt get the last file named skew3.m
 
if anyone get that file please send to me...it will be a much appreciated.
 
thanks

sharma mayank

unread,
Sep 3, 2014, 3:43:01 AM9/3/14
to hugi...@googlegroups.com, guerrer...@gmail.com
Any demo plz ?
Reply all
Reply to author
Forward
0 new messages