
Scanner Access Now Easy
Dust removal Using Infrared Channel
The recent film scanners from Nikon (LS-30 and LS-2000) are four
colour scanners: Red, Green, Blue and Infrared (RGBI).
The infrared channel can be used to detect dust or scratches
on the film surface as the color particles on the film
are allmost transparent to infrared light.
The infrared channel image is therefore almost uniform exept for the
spots where dust covered the film.
The dust absorbs the color channels as well as the infrared channel.
Nikons publicity on this can be found here
An example is illustrated in the following.
The image was a diapositive scanned with 2700 dpi on a Nikon LS-30
using the version 0.4.2 of the Coolscan Backend and xscanimage as a gimp plugin.
The infrared channel is transfered to gimp as the alpha channel.
The image was split into RGB (image on the left)
and infrared (image in the center) by the command (image->Channe Ops ->decompose). Finally a gimp plugin called "dustremove" (see below) was used
to interpolate the image at the positions where the infrared channel
is below a mannually choosen threshold.
It is interesting to see that on the image on the left it is
impossible to tell the difference between the dirt on the
white part of the anorak from the buttons on it.
After dust removal the dust has disappeared and the buttons
are clearly distinguishible.
The image doesn't lose any of it's sharpness (ok - it wasn't
very sharp to begin with, but at 2700 dpi most images, especially old
ones like this one, are somewhat unsharp)
Image scanned in RGB | Infrared channel | after dust removal |
|
 |  |
|
The theory behind it
For those who want to see some of the theory behind it, the method
is patented by IBM (US Pat. 5,266,805) and even though it is a
patent - in the typical patent language - it is allmost readable.
Correction of Infrared Channel?
In practice the infrared channel is not completely independent
of the color channels, especially the red-channnel.
That is why it is neccessary to correct the infrared channel
by using the information in the color channels.
The patent above used a cubic root on each channel and
then does a linear correction (by applying a 4*4 matrix multiplication).
Afterwards they take the result to the power of three.
This method needs to be applied on the raw image data,
before the application of the gamma-LUT (Look-Up-Table).
This operation cannot be done in the gimp-plugin
as it receives the allready gamma-corrected values.
The above images were created using matrix values that
were hand adapted and a gamma of 3
(which is equivalent to a cubic root).
What happens if the matrix values or the gamma is not
adapted correctly can be seen on the second example.
Here the gamma was 1. The infrared channel still contains
color information and a simple threshold is not
sufficient to seperate dust from image data.
When using a threshold that removes most of the
dust, it removes also some image information
that was not occluded by dust.
As my interpolation method is extremely simple this
shows severe artefacts.
Image scanned in RGB | Infrared channel | after dust removal
|
 |  |
|
How can I try it out anyway?
First you need to install the latest version of the coolscan
backend including xscanimage.
Make sure xscanimage can be used as a gimp plugin
(by making a link from xscanimage to ~/.gimp/plug-ins/xscanimage).
Start gimp and use "Xtns->Acquire Image" to start xscanimage
Do preview (with advanced option Autofocus-> before preview)
Select a region with a lot of contrast and different colors
Select "Scan mode -> RGBI" in xscsanimage
Scan
When the image is in gimp use "Image->Chanel Ops->Decompose->alpha to seperate the alpha channel from the other channels
Change in xscanimage option Ired cor. red and repeat the scanning
until this alpha image is basically flat except for the dust.
The bigger the value "Ired cor. red" the bigger is the cross-talk-correction
from the red channel.
Remember the value you used, it should be a constant for the same
film-type.
Use the plugin "dustremove" (see below) in gimp to do the actual dust-removal
(select the right threshold with the slider)
Dustremove plugin for gimp
A preliminary version of a gimp-plugin that does the dust-removal
using the infrared channel (stored as alpha-channel as provided
by the modified xscanimage when scanning in RGBI mode)
can be found here:plugindust010.tgz
sane-devel@mostang.com / SANE mailing list
This page was last updated: June 29 1999