
Auteurs : Nicolas Robidoux , Adam Turcotte.

Image > Upsize


http://registry.gimp.org/node/19582


This work is licensed under the Creative Commons Attribution 2.5 Canada License. 
To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/ca/ or send a letter to
Creative Commons, 171 Second Street, Suite 300, San Francisco,
California, 94105, USA.

 
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.


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, Pvoa 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).



Upsize -- image resizing plug-in for The Gimp image manipulation program Copyright (C) 2009 Nicolas Robidoux and Adam Turcotte

LAST UPDATED:
March 25, 2011
 - Fixed Smooth/Sharp radio button callback.
 - Uses gimp_image_insert_layer() for Gimp 2.7 and newer instead of gimp_image_add_layer(), which has been deprecated.

INSTALLATION INSTRUCTIONS:
Make sure the libgimp2.0-dev package is installed, then type:
gimptool-2.0 --install upsize.c

NOTE:
This current version of the code has some unneeded redundancies. Manana.


Natural boundary conditions mean that the normal derivative of the histopolant (average matching reconstructed intensity profile) is
zero at the boundary. A alternate version of the code could use not-a-knot boundary conditions instead (weaker variational
principle but would produce a scheme which is exact on affine intensity profiles).


This source code can generate plug-ins which use either 16bit or 8bit arrays to store the B-Spline coefficients after they have been
computed "in the vertical direction."

More details: This tensor scheme requires one tridiagonal solve per column, and one tridiagonal solve per row. The column solves are
performed first, with the results stored in integer arrays. The results are retrieved when the row solves are performed.

Storing the intermediate results in 8bit saves approximately half of the memory compared to 16bit (not counting the input and output
images themselves), at the cost of introducing intensity errors which are at most 1.




