You are here

Interpolation Plugin

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

This is an interpolation plug-in for the GIMP. It works by doing plane/curve fitting and calculating weighted averages. It takes samples from a grid of pixels from 'known' image areas, trying to fit a plane or a curve to each, and then uses those samples to estimate the 'unknown' image areas.

Upper-left: original image, upper-right: result after interpolation,
lower left: selection (a.k.a. output mask), lower right: input mask

0.2 version is now based on the standard gimp-plugin-template and so should be easy to compile on any system. There are some fixes and additions. If you find any bugs in the code, please send me a patch or a bug report.

0.4 has an improved UI with a preview, support for using the active brush as a kernel, and a convenience option for internally subtracting the selection from the input mask.

0.5 can work with gamma-compressed images (internally transforming them into linear space and back again, with no loss of bit-depth, since floating-point numbers are used), can handle large images by taking samples only from a grid of points (instead of from every pixel) and has a few more new things. See the ChangeLog for details.

0.6 now supports quadratic approximation (x*x, x*y and y*y terms), has better arranged data (so as to make it easier to support new curve-fitting methods, or custom combinations of functions), can use a separate 'slopes' mask (so that the set of pixels used for calculating slopes can be different than the set of "slopes samples" used to calculate the output pixels), has sinc kernels, has 'cap' and 'base' settings for radius-based kernels, has separate horizontal and vertical kernel window settings (optional) and has a few bug-fixes. By using a separate "slopes mask" in combination with the newer "least squares" methods, you can use the filter in a completely new way: Instead of calculating a plane for each input pixel (or grid square) based on its near neighborhood, you can calculate planes (or curves) at sample points *within* the selection, based on a wide area (slopes window) that includes input pixels.

1.0 is simply 0.6 with a few bug fixes, scripting support, an option for hiding the progress bars and an updated translation. This is it.

There is also a homepage for this little project. I also wrote a small tutorial

Bitcoin donations appreciated: 12oG41zMz8uGJMo7BZbZATeRy5ZiQvxN83

GIMP Version: 
Code License: 

Comments

I did not try on lLinux already, but if the Makefile did not work, I would rename interpolate.c to interpolate.cpp and:
CFLAGS= -s gimptool-2.0 --build interpolate.cpp

Just using make creates the interpolate executable, but GIMP doesn't recognize it.

Using your method results in errors regarding = note: use option -std=c99 or -std=gnu99 to compile your code.

Even using the above "noted" CFLAGS variables results in errors, namely deprecation errors from the syntax within the interpolate.c file, (e.g. gint, kernel types, etc.) Got tired of trying to get it to work.

Is there a version for Windows XP yet?

Not to the moment. As for me I get errors from the c99 mode as usual.

Pages

Subscribe to Comments for "Interpolation Plugin"