On Tue, Sep 11, 2012 at 04:09:50AM -0400, Bruno Postle wrote:
> Sharpening doesn't survive remapping very well, so you should apply it to

Right! It looks to me that the remapping takes the average of two
surrounding pixels, on average. 

i.e. with an image that COULD map 1 to 1, every source pixel will
still be smeared out over two destination pixels minimum. (or the
other way around: every destination pixel is the average of two source
pixels). 

If my math intuition is good, the -0.5 2 -0.5 convolution is the
inverse of 0,1,1,0. Such a convolution might be possible to build into
the remapping operation to keep the images as sharp as the original.

The core of the problem is that you want to prevent aliasing
effects. It is quite possible that 50 source pixels map to 49
destination pixels. This means that at one point (say at 0 and 49
destination pixels) they line up perfectly. While at another (that
would be around 25 pixels) each destination pixel is halfway inbetween
two source pixels. 

If you do it the "obvious" way, you'd just copy pixels 0, 1, 48, 49 to
get a sharp image, but near pixels 24 and 25 you'd have to take the
average of 24, 25 to get destination pixel 24, and then average 25,26
to get destination pixel 25. This would probably lead to visible
artefacts. So there is some smart stuff in there to take a similar
"average" near the point where just copying would be more obvious.

I've described things as if they are one-dimensional. Things get a bit
more complicated in two dimensions.

        Roger.

-- 
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

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

Reply via email to