Upsize

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.

AttachmentSize
upsize.c (Updated March 25, 2011)172.22 KB
upsize_win.zip (Updated March 25, 2011)48.06 KB
upsize_mac.zip (Updated April 8, 2011)17.42 KB
eanbqh.tar.gz (Updated May 2, 2012)18.16 KB
0
Average: 5 (2 votes)

Comments

Where is upsize once installed?

I have installed this app, but can't find it in Gimp. I've refreshed the scripts with script-fu, but I can't find it in the menus. Would it not make sense to explain on this page where it goes in the menu system, so new users can find it?

Its under the Image menu

Image>Upsize

-Rod

the upsize plugin is on ohloh

You can follow the changes in this plugin here:

https://www.ohloh.net/p/upsize_GIMP_plugin

New Mac Version

Hi,

here is the new Version for Mac. As before, it should be universal:
http://depositfiles.com/files/zsbslgl0k

@Adam: Can you write a Version Number in the Plugin Window?

Regards,
David

New Mac Version

Thank you for the new Mac version. I have updated the file listing.

Also, thank you for the version number suggestion. I will add this to the next revision.

Adam Turcotte

Thanks; been using the older

Thanks; been using the older set that Photocomix passed on to me. Just deleted those and added this single plugin in its place. :)

Upsize smooth and sharp

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.

MacOS Version

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.

Nope, it's Intel-only. Sadface.

MacOS Version

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.

Windows binaries

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

Thank you Sylvie

Merci Sylvie pour les binaires Windows.

nicolas

Syndicate content