Table of Contents
The refocus Gimp plug-in can be used to sharpen images. Frequently, when processing images, e.g. when scanning photo's or slides, the images become slightly blurred. This plug-in attempts to "refocus" the image. In many cases this plug-in produces much better results than similar plug-ins such as sharpen or unsharp mask.
This plug-in has a preview that helps you select the best parameters.
Instructions for installing the plug-in are described in Installation.
Instructions for using the plug-in are described in Using the plug-in.
The home page for the Refocus plug-in is located at http://refocus.sourceforge.net.
For installing refocus you need the following:
The Gimp, of course. This plug-in should work with versions > 1.2.
Gtk+-2 plus pkg-config.
Optional: ATLAS, see Using ATLAS
Installation should be simple. Untar the distribution. If you want to use ATLAS install it in lib-atlas (see Using ATLAS).
Then run ./configure in the top-level directory.
Then run make install-bin if you want to install the plug-in under your home directory or make install-admin-bin if you want to install the plug-in under your Gimp's system directory.
If you have gtk-doc installed you can build the system documentation in the gtk-doc directory. In this case you must invoke configure with the --enable-gtk-doc option. When you make it for the first time make will fail with the message No rule to make target `tmpl/*.sgml'. Running make again will fix this problem.
ATLAS (see http://math-atlas.sourceforge.net) is a system for generating high-performance mathematical libraries. It generates a library that is specifically tuned to your processor and compiler. refocus needs some routines for solving a linear system of equations. By default refocus uses an unoptimized version from the CLAPACK distribution (see http://www.netlib.org/clapack/).
Make ATLAS generate its libraries. For instructions see the ATLAS documentation. Depending on your system, this may take a long time. During the installation you have to select a name to identify your configuration. In the following examples we will use Linux_PII as the chosen name.
Go to the subdirectory lib/Linux_PII and run make.
cd lib/Linux_PII make
This will generate a gzipped tar file that contains the generated libraries and include files.
Copy the gzipped tar file to the refocus directory and unpack it.
cp ~/ATLAS/lib/atlas3.4.1_Linux_PII.tgz ~/refocus cd ~/refocus zcat atlas3.4.1_Linux_PII.tgz |tar xvf - mv Linux_PII lib-atlas
If you have already run configure , you must delete the file config.cache.
Then run configure. If everything is OK you should see a message like using atlas in lib-atlas/lib.
Now run make.
You can start the plug-in by clicking with the right mouse-button in the image, and then select from the Filters menu Enhance/Refocus.
The plug-in window looks something like this:

The plug-in window contains a preview of the image on the left and on the right a set of spin-buttons to change its parameters.
The bottom of the preview contains the following buttons:
Quit the plug-in and apply the selected transformation to the image.
Select default values for all parameters.
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in without applying the selected transformation to the image.
The preview allows you to preview the output of the plug-in.
You can scroll the preview by pressing the first mouse-button and dragging in the preview. During scrolling, the original unprocessed image will be shown, because the plug-in is not fast enough to compute the processed imageww.w3.org/1999/xhtml">Preview
Compute the new transformation matrix and show the results in the preview. Because computing the transformation matrix can take a lot of time, it is not automatically recomputed, when the parameters in the spin-buttons have changed. When you have changed parameters the Preview button will change to active, i.e. it is no longer grayed out.
When the plug-in starts it shows the original untransformed image. When you press the Preview button the transformation matrix is computed and the transformed image will be shown in the preview.
Quit the plug-in witho