Resynthesizer:
Copying:
The Resynthesizer is a plug-in for the Gimp released under the
terms of the GNU General Public License (see the file "COPYING").
Utility:
Resynthesizer is a plug-in with multitudinous uses:
- Generating a more of a texture
Given a sample of a particular texture, produce a larger version
of that texture.
Given a sample of a particular texture, produce a tilable version
of that texture.
- Removing unwanted features from an image
If there is some unwanted feature in an image (such as a
discoloration or a political ally who has fallen out of public
favour), Resynthesizer can remove it by extending the surrounding
texture over the top of it.
- Applying themes to images
Given a sample texture (for example watercolor brushstrokes),
another image can be given that texture while retaining its overall
structure.
This might be used to make an image look as if it had been
painted.
This feature acts somewhat like a generic effects plug-in. Given a
sample of an effect, that effect can be applied to an image.
- Melting your CPU and filling your swap partition
Resynthesizer is quite resource intensive. What it does is
computationally expensive.
Installation:
In the directory of Resynthesizer:
- Compiling: make
- Installing: (logged as the user you want install for) make
install
- Compiling and installing international features: (as root)
make install-mos
Simple adaptation:
In the beginning of the resynth.c you will find the next
lines:
- #define SIZE_OF_PREVIEW_IMAGE_IN_PIXELS 50000.0
This line permit you to specify the surface in pixels the preview
image will, approximately, have. For compilation reasons, it must be
a real so must finish it by « .0 ». For a value
of 50000.0, this can give size resolution of 100x500 as well as
250x200 or 400x125.
- #define RADIUS_OF_NEIGHBOURHOOD_IN_PIXELS 3
This one permit to specify how far the resynthesizer will « look »
around a pixel for analysis of the texture as for the the
re-synthesis. This may be an integer.
Usage:
This plug-in installs itself in the Filters/Map menu as
"Resynthesize".
It generates a new version of a texture (which image to take the
texture from is specified as one of the options). This texture can be
made to fit the boundary pixels of a region, or to have a specified
arrangement of features.
A description of the options are given below. However the best way
to get a feel for how Resynthesizer works is to have a look at the
examples at http://www.csse.monash.edu.au/~pfh/resynthesizer/
This can be used to select the image to take the texture from.
Any selected regions in this image will *not* be included in the
analysis of this texture.
- Make horizontally tilable
- Make vertically tilable
Should the output be tilable, i.e. wrap around at the edges ?
- Fit output to bordering pixels
If this option is checked and there is a selection, Resynthesizer
will try to match its output to pixels surrounding the selection.
Amount of randomness to introduce when resynthesizing the texture.
If this is high, the result will tend to contain only small
features. If it is low the result will contain larger features (often
copied exactly from the texture source), but may also contain
artifacts such as repeating patterns.
If this option is set a pair of images (maps), one for the texture
source and one for the output, will be used to guide placement of
features of the texture in the output.
The input and output maps should have the same mode (greyscale or
RGB). They should have the same size as the texture source and output
image respectively.
Resynthesizer will try to select features from the texture source
having similarly colored pixels in the input map as the corresponding
pixels in the output map.
Adjust the map importance slider to specify how slavishly
Resynthesizer should follow these maps.
Authors:
Resynthesizer was written by Paul Harrison. He can be contacted at
pfh@yoyo.cc.monash.edu.au
and so is the author of most of this work.
David Rodríguez García added the « update »
button in the preview dialog-box. He can be contacted at
darodga@mail.ono.es.
Laurent Despeyroux made some optimizations and most of the changes
of the version 0.7. He can be contacted at
laurent.despeyroux@free.fr.
Ali Akcaagac updated Resynthesizer to work with Gimp 1.3.
Feedback is welcome.
Location in the pop-up image menu:
- Filters/Map/Resynthesize
- Script-Fu/Enhance/Smart enlarge
- Script-Fu/Enhance/Smart sharpen
- Script-Fu/Enhance/Smart remove selection
More information:
http://www.csse.monash.edu.au/~pfh/resynthesizer/
(Paul Harrison's web site)
http://laurent.despeyroux.free.fr/gimp/texture.html
(Laurent Despeyroux web-site)
Change log:
0.8
- Updated to work with Gimp 1.3
0.7:
- internationalization (and French version)
- optimizations (theoretical)
- comments added to code
- preview window bigger
- « update » button in the preview
dialog-box
- more messages during calculation
- README in html
- « Simple adaptation », « Location
in the pop-up image menu » and « More
information » sections added to README
0.6:
- updated stuff to not use compatibility cruft in libgimp
0.5:
- ported to C,
- loosing what little readability the code had to begin with in
the process
- included some script-fu utilities that use resynthesizer
0.4:
- fixed bug selecting which pixels to use with semi-transparent
masks
- fixed out-by-one bug in partition code
0.3:
- fixed sqrt of negative number problem in Entropy_accumulator
- fixed bug that was stuffing up map importance parameter
- repeat-last mode now works properly
0.2:
- workaround for strange (presumably) compiler bug involving
gimp_message and the ?: operator
0.1: