enfuse flaw on 360° seam

55 views
Skip to first unread message

Erik Krause

unread,
Jan 24, 2008, 4:11:55 PM1/24/08
to hugi...@googlegroups.com
Hello,

there where several reports of problems with the 360° seam even if
the -w switch is used. I was able to reproduce the problem. In my
testpano the seam was not very much visible, but it's definitely
there.

best regards
--
Erik Krause
Offenburger Str. 33
79108 Freiburg

Andrew Mihal

unread,
Jan 24, 2008, 4:49:59 PM1/24/08
to hugi...@googlegroups.com
Hi Erik,

Can you post instructions and example images for reproducing the problem?

Andrew

Erik Krause

unread,
Jan 24, 2008, 6:03:21 PM1/24/08
to hugin-ptx
On Thursday, January 24, 2008 at 13:49, Andrew Mihal wrote:

> Can you post instructions and example images for reproducing the problem?

In my own example it's very faint. Get them here:
http://www.erik-krause.de/vortex.zip

They reproduce the zenith vortex problem as well...

Theses are two equirectangular images out of 6
Simply pass them to enfuse using the -w parameter. View the result in
a spherical panorama viewer, like f.e. PTViewer. If you look straight
up there is the vortex and from that a faint line (a brightness
difference) goes down where the 360° joint is. This line is not
visible if you view the source images.

I'm waiting for some examples that show the effect better.

best regards

Erik Krause
http://www.erik-krause.de

Robert Harshman

unread,
Jan 24, 2008, 11:36:39 PM1/24/08
to hugin and other free panoramic software
> > Can you post instructions and example images for reproducing the problem?
>
> They reproduce the zenith vortex problem as well...
>
> I'm waiting for some examples that show the effect better.
>
>Hi Guys,

First let just say thanks for such a promising tool, very exciting,
thanks!

Here's some samples that show a seam line from a set of 3 EQ's blended
in Enfuse.

http://www.robertharshman.com/ENF/81stflr_b_1.zip

When blended with the -w option you can easily see a seam in the sky.
To reproduce, run enfuse on these, use the -w option and then use your
favorite image editor to offset the results and you'll see a seam. I
believe it also shows the zenith vortex.

Let me know if any issues.

Regards,

Robert

VRdundee

unread,
Jan 25, 2008, 7:46:00 PM1/25/08
to hugin and other free panoramic software
Hi Robert,
The individual layers show slight blend seams from the 4 incremental
shots. Vignetting or crop control can eliminate that, i think.
The original filess have an odd size and are not equirectangular. It
produced a vortex and 360 blend seam in enfuse360
Resizing to proper eq dimension did not show the blend seam but the
vortex at zenith meridian.

> Let me know if any issues.

Cheers, Milko

Robert Harshman

unread,
Jan 27, 2008, 1:04:21 PM1/27/08
to hugin and other free panoramic software


On Jan 25, 6:46 pm, VRdundee <vrdun...@gmail.com> wrote:
> Hi Robert,
> The individual layers show slight blend seams from the 4 incremental
> shots. Vignetting or crop control can eliminate that, i think.
> The original filess have an odd size and are not equirectangular. It
> produced a vortex and 360 blend seam in enfuse360
> Resizing to proper eq dimension did not show the blend seam but the
> vortex at zenith meridian.
>

Hi Milko,

To make the files a bit easier to upload/download there were resized
to half their original size in PS and reduced to 8 bits from 16. And
yes it looks like PS has rounded up so there is 1/2 an extra pixel in
the width. But, in the original fliles, they are an exact 2 to 1
relationship and the seam is there.

If any one of these input files is produced as a 360 it does not show
a seam. When run through Enfuse a seam is produced.

Regards,

Robert

Robert Harshman

unread,
Jan 27, 2008, 1:18:06 PM1/27/08
to hugin and other free panoramic software

> The individual layers show slight blend seams from the 4 incremental
> shots. Vignetting or crop control can eliminate that, i think.
> The original filess have an odd size and are not equirectangular. It
> produced a vortex and 360 blend seam in enfuse360
> Resizing to proper eq dimension did not show the blend seam but the
> vortex at zenith meridian.
>
Hi Milko,

I just tired resizing the files I made available by changing the size
to 4036 by 2018. The fuse process still produces a seam, it's
especially strong by the tree.

Regards,

Robert

Andrew Mihal

unread,
Jan 27, 2008, 2:00:02 PM1/27/08
to hugi...@googlegroups.com
I can reproduce the bug. Thanks for posting the test images. I'll keep you posted.

Andrew

Andrew Mihal

unread,
Feb 3, 2008, 12:55:15 AM2/3/08
to hugi...@googlegroups.com
It seems that there was a long-standing bug in the Laplacian pyramid code regarding the wraparound boundary condition. I have checked a fix into CVS. This will effect both enblend and enfuse. I am surprised this issue did not appear earlier. If anyone encounters further artifacts please let me know.

On the topic of equirectangular images, it is not necessary for the image to have an exact 2:1 aspect ratio in order to use the -w flag. This flag only states that the left and right edges of the output image are supposed to meet up. For example you can make a long and skinny 360 cylindrical image that omits the zenith and nadir and still use -w.

The "zenith vortex" artifact stems from the extreme warping at the top and bottom edges of equirectangular images. Enblend and Enfuse do not understand that all of the pixels along these edges are supposed to meet up. This is not a bug, it's a "missing feature". Unfortunately I don't know how to do this. Erik Krause suggested implementing a boundary condition where each top edge pixel matches with another top edge pixel 180 degrees away. I tried this several years ago and it does not work. It only produces a zenith vortex that is symmetrical through the zenith.

Yuval's idea to use cube faces is more promising. All six cube faces would have to be made available to Enfuse at the same time. Then every edge would have a corresponding edge to draw boundary pixels from. The fact that all of the boundaries are horizontal or vertical makes this approach a better fit with the current pyramid algorithms. The same code would be useful for Enblend as well. Enblend would also need a nearest feature transform that operates on the surface of a cube. If anyone knows an efficient algorithm to solve this, please send me a reference.

Andrew

Daniel M German

unread,
Feb 3, 2008, 1:32:25 AM2/3/08
to hugi...@googlegroups.com

Hi Andrew, everybody,

Andrew> The "zenith vortex" artifact stems from the extreme warping at the top and
Andrew> bottom edges of equirectangular images. Enblend and Enfuse do not understand
Andrew> that all of the pixels along these edges are supposed to meet up. This is not a
Andrew> bug, it's a "missing feature". Unfortunately I don't know how to do this. Erik

How about using the panotools projection stack. Enfuse/enblend can
work in spherical coordinates, instead of cartesian. I don't really
know how enblend/enfuse work and if this will be useful, but it will
not be difficult to add the coordinate transformations (the input
equirectangulars make it easy).

Andrew> Krause suggested implementing a boundary condition where each top edge pixel
Andrew> matches with another top edge pixel 180 degrees away. I tried this several
Andrew> years ago and it does not work. It only produces a zenith vortex that is
Andrew> symmetrical through the zenith.

Andrew> Yuval's idea to use cube faces is more promising. All six cube faces would have
Andrew> to be made available to Enfuse at the same time. Then every edge would have a

This might sound stupid, but how about processing the equirectangular twice:

* Pass 1. Enblend/enfuse

* Pass 2. Rotate the images 90 degrees (pitch), such that zenith and the
nadir are in the horizon. Then enblend/enfuse.

* Blend the resulting images at aproximately the 45 degree parallel
(this can be done simply with a alpha channel in both images).

It will be significantly slower, though, but it does not require any
changes to enblend/enfuse. It can all be done via scripting with the
tools we currently have.

We can even require the user to provide the rotated images.


--
--
Daniel M. German
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

Erik Krause

unread,
Feb 3, 2008, 5:53:25 AM2/3/08
to hugin-ptx
On Saturday, February 02, 2008 at 21:55, Andrew Mihal wrote:

> Erik Krause suggested implementing a boundary condition where each top
> edge pixel matches with another top edge pixel 180 degrees away. I tried
> this several years ago and it does not work. It only produces a zenith
> vortex that is symmetrical through the zenith.

Well, it didn't avoid the vortex completely in my test case but it
reduced significantly. What I did was to mirror the image on the top
edge, then shift it sideways half width. But I understand that this
is no solution, since it gives no perfect result.

Pablo mentioned that probably sinusoidal projection would be
beneficial. It has no horizontal pixel stretching and to produce it
from equirect there is only a 1-dimensional transformation needed if
the vertical pixel count stays the same. And there is only one
boundary to process. Unfortunately I don't have any idea whether this
is feasible.

Yuval Levy

unread,
Feb 3, 2008, 1:33:12 PM2/3/08
to hugi...@googlegroups.com
Andrew Mihal wrote:
> Yuval's idea to use cube faces is more promising.

I have some ugly script hidden somewhere. I'll have to grab it out,
rewrite it (it's PHP, meant to run on a server) and forward it to you.

what it does is:
- extract the cubefaces from the equirct
- combine them into "crosses" - one cross per cubeface

then you could work on the crosses, however I am not sure if the four
corners would be a problem. I like much better Daniel's idea of pitching
the equirect 90°.

For the sinusoidal: will the black around the boundaries be an issue?

anyway, new binaries for testing are up at
<http://panospace.wordpress.com/2008/02/03/enfuse-it-again/>

users of my hugin installer can simply replace the executables in
hugin/bin with those in the zip file.

Erik: thanks for the enf_comb scripts. Somehow they don't seem to work
here. me dummy. :(

Yuv

Daniel M German

unread,
Feb 3, 2008, 3:13:46 PM2/3/08
to hugi...@googlegroups.com
Erik Krause twisted the bytes to say:

Erik> On Saturday, February 02, 2008 at 21:55, Andrew Mihal wrote:

>> Erik Krause suggested implementing a boundary condition where each top
>> edge pixel matches with another top edge pixel 180 degrees away. I tried
>> this several years ago and it does not work. It only produces a zenith
>> vortex that is symmetrical through the zenith.

Erik> Well, it didn't avoid the vortex completely in my test case but it
Erik> reduced significantly. What I did was to mirror the image on the top
Erik> edge, then shift it sideways half width. But I understand that this
Erik> is no solution, since it gives no perfect result.

Erik> Pablo mentioned that probably sinusoidal projection would be
Erik> beneficial. It has no horizontal pixel stretching and to produce it
Erik> from equirect there is only a 1-dimensional transformation needed if
Erik> the vertical pixel count stays the same. And there is only one
Erik> boundary to process. Unfortunately I don't have any idea whether this
Erik> is feasible.

The sinusoidal is area preserving, so this is a very good
idea. Perhaps it will give better results when combined with doing the
blending/enfusing in polar coordinates than the equirectangular. There
is less of a worry of interpolation. I guess it is a matter of trying
it.

--dmg

Erik> best regards
Erik> Erik Krause
Erik> http://www.erik-krause.de


Erik>

Reply all
Reply to author
Forward
0 new messages