You are here

Upsize

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!

UPSIZE: An image upsizing plugin featuring two modes.
1. Smooth (IBFNBQH): Image upsizing with Interpolatory Box Filtered Natural BiQuadratic Histosplines. [This is the default option.]
2. Sharp (EANBQH): Exact Area image upsizing with Natural BiQuadratic Histosplines.

This plugin was written by Nicolas Robidoux and Adam Turcotte at Laurentian University in Sudbury, Ontario, Canada.

LAST UPDATED: March 25, 2011
The Smooth/Sharp radio buttons were not allowing Sharp to be used, so this has been fixed. Also, the plugin now uses gimp_image_insert_layer() for Gimp 2.7 and newer instead of gimp_image_add_layer(), which has been deprecated.

Note: This is a refined version of the code that was used to create the HQ_Rescale plugin for Windows (http://registry.gimp.org/node/13187).

For more details regarding these methods, see Fast Exact Area Image Upsampling with Natural Biquadratic Histosplines by Nicolas Robidoux, Adam Turcotte, Minglun Gong and Annie Tousignant, pp.85-96 of Image Analysis and Recognition, 5th International Conference, ICIAR 2008, Póvoa de Varzim, Portugal, June 25-27, 2008. Proceedings, Aurelio C. Campilho, Mohamed S. Kamel (Eds.). Lecture Notes in Computer Science 5112, Springer 2008, ISBN 978-3-540-69811-1. Only the "Sharp" version is explicitly discussed; "Smooth" differs in that it is box filtered (and in that this implementation uses a different image size convention than the "Sharp" resampler).

EANBQH Standalone Programs (Added: May 11, 2012)
Upsize Sharp has been implemented as a pair of standalone C programs:
eanbqh8 allows for PPM input images with 8-bit samples (maxval=255)
eanbqh16 allows for PPM input images with 16-bit samples (maxval=65535)
See the README file in eanbqh.tar.gz for more information.

GIMP Version: 
Code License: 

Comments

Roughly speaking, Upsize smooth (IBFNBQH) gives results which one would expect from a smoother (but not blurrier) Catmull-Rom (the smoothest interpolatory bicubic), and Upsize sharp (EANBQH) gives results which one would expect from Catmull-Rom unsharp-masked with a tight radius and then blurred with an even smaller radius.

The installation instructions for linux (included in the source code) are:

* INSTALLATION INSTRUCTIONS:

* Make sure the libgimp2.0-dev package is installed, then type:

* gimptool-2.0 --install upsize.c

in a terminal.

On the technical ("math") side, the code for this plugin contains a tridiagonal linear solver which uses less than 2 multiplications and 2 subtractions per row (this is less than a typical tridiagonal matrix-vector multiply), relying on the rapid convergence of a continued fraction to pack the lower and upper factors of the coefficient matrix in seven single precision constants. This code also stores intermediate results in 16 bit integers with no significant truncation error. See the article cited above by Adam for details.

The code also contains a reasonably fast plain C rounding and clamping macro (F_ROUND_AND_CLAMP_0255).

The source code contains an inactive (by default) version which stores temporary results in 8 bit instead of 16 bit (which leads to slightly simpler code, and basically halves the memory requirement). We have left the "8 bit option" code in more for academic and teaching purpose than because we recommend its use, because such storage does lead to non-negligible truncation error. The difference is (always?) invisible to the naked eye, but Adam and I "know it's there." You can turn on 8 bit storage by uncommenting a #define in the source code and reinstalling.

Although the theoretical derivation is different, Upsize smooth (IBFNBQH) gives results which could also be obtained with (global interpolatory) natural cubic splines.

Hi,
i compiled this with SnowLeopard but should be a universal version. Works with the GimponOSX Bundle.
No other way to share it, so i uploaded it to depositfiles. i hope the builder of this plugin will stick it to the main post.
http://depositfiles.com/files/gw9517hom

copy the file to
/Users/[user name]/Library/Application Support/Gimp/plug-ins

Perhaps someone can give me an feedback, if it works.

Nope, it's Intel-only. Sadface.

Thank you very much for posting this. I have added it to the list of attachments as upsize_mac.zip. I am unable to test it myself, so any feedback from other MacOS users would be excellent.

Thank you for providing the Windows binaries. It has been added to the attachment list.

Merci Sylvie pour les binaires Windows.

nicolas

Pages

Subscribe to Comments for "Upsize"