« Return to Thread: enblend algorithm

Re: enblend algorithm

by cspiel :: Rate this Message:

Reply to Author | View in Thread


Hi there!

On Jun 11, 10:25 am, tago <liquidt...@...> wrote:
> I was trying to study and understand how Enblend algorithm works.
> I'm looking at the example in http://enblend.sourceforge.net/details.htm,
> where it says (just before the example) "The algorithm finds a line
> which is as far away as possible from the edges of the area where two
> images intersect".

        This is the correct description of Enblend's initial seam line
generation, i.e. before seam line optimization.  Though I wouldd
prefer a more mathematical statement:
        "The algorithm finds a line whose minimum distance to any edge
        (of the overlap area) is maximal."                  [MAX-DIST]


> Looking at the picture I wonder why the line starts at the upper left
> corner of the intersection, shouldn't it be in the middle?

        Nope.  Think 2-dimensional. ;)  The overlap areas can be
irregular.  E.g., the overlap need not happen from "left-to-right", it
could be from "top-to-bottom" as well.  In the general case two images
can overlap in multiple areas even in the no 2-pi wraparound case.

OK, let us take a look at the example image.  If you place the initial
seam in the middle and I assume you mean horizontal center at the top,
you would get a distance to the left image's boundary (indicated by
the red line) of zero while still having a small distance to the right
image's boundary (indicated by the green line just above the red one).
Thus, this construction violates MAX-DIST because the distance to the
red line is not maximal.

Now, if you look _very_ closely at the example you will notice a tiny
"nose" at the top of the upper vertical segment of the seam line,
which violates MAX-DIST, too.  The overhang there actually is a bug.
See SourceForge bug id #2160427.  The nose can become pronounced with
irregularly shaped overlap areas.  See the attachments to the bug
report.  Regrettably, I have to deny you the pleasure of fixing it.
(Just kidding.)  It has been corrected in the "staging" branch
revision 331:
        http://bazaar.launchpad.net/~cspiel/enblend/staging/revision/331


> For sure I'm not understanding the purpose of Enblend.

        Neither do I. -- Now, will you buy me a beer?

However, I understand the purpose of the initial seam line generation
step.  Usually, the closer we get to an image border the more the
pixels suffer from distortion, aberration, etc.  As Enblend deals with
re-mapped images it is furthermore exposed to the errors introduced by
the projection, which also can increase towards the images' edges.
So, we want to stay away from _any_ edge as far as possible.  MAX-DIST
minimizes the combined "error" of both images participating in the
overlap.

And in the next semester we shall learn about seam line
optimization...


> If someone could enlighten me.

Isn't it better to be enlightened than it is to be enblended?


Cheers,
        Chris

--~--~---------~--~----~------------~-------~--~----~
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 hugin-ptx@...
To unsubscribe from this group, send email to hugin-ptx-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: enblend algorithm