[sane-devel] Film scanning and infrared image cleaning

Julian Hauser julian at julianhauser.com
Sun Aug 13 18:35:25 UTC 2017

I take back my comments about the dust removal being overeager. On closer inspection these really are all specks of dust, just extremely tiny ones and, in my case, the blur induced by the removal is actually more visible than the dust that caused it.

On Sun, 13.08.17 19:12, Julian Hauser wrote:
>Hello Klaus,
>On Fri, 11.08.17 09:05, Klaus Kaempf wrote:
>>Hi Julian,
>>* Julian Hauser <julian at julianhauser.com> [Aug 10. 2017 22:58]:
>>> Hello everyone,
>>> I'm using the Reflecta 10T scanner using the pieusb backend. It mostly works very well, thanks! One thing I have noticed though is that if I enable the infrared scratch and dust removal option "Clean image" in Xsane, the detected defects get painted over with a blurred dot. On film negatives, which have a grainy structure, the results are clearly visible. I've uploaded an example here: https://mis.julianhauser.com/index.php/s/MhSuFltcm0CLIMs. It would be very nice if the corrections repaired the result taking into account the structure of the neighbouring areas (as for example the "healing tool" in GIMP does).

>>> Does the "overpainting" happen in the firmware of the scanner or is
>>> that part of sane?

>>it's part of sane, resp. the pieusb backend. See
>>where various sane_ir_* functions are called.
>I've had a look at the functions that are responsible for the dust removal but I have to admit I don't even understand the basic approach taken. Is the author of those functions on the list? It would be nice if someone could explain me roughly what is happening and where a change would have to be made.
>I've also noticed that the scratch and dust removal seems to be a bit overeager. If you look at the example image I linked to in the first email you can see that the scan is littered with blurred circles. I scanned some photos with scratch removal on and then off, and it is clear that most of the corrections aren't of anything visible to the naked eye.

>>> Two more things I've noticed with the scanner is that images always
>>> come out reversed left-to-right

>>All images (color, greyscale, b&w) ? In all resolutions ?
>All the ones I could test are reversed (but that is only various resolutions in colour mode currently). Given that the same happened with the Reflecta CrystalScan 7200 that I had earlier, I would say it's a general issue.

>>> and greyscale scans make xsane crash. These things don't bother me much
>>> as they are easily fixed with a script after scanning. I can send crash
>>> logs if someone is interested in debugging this however.

>>Please do ! ;-)
>Here's the log of an attempt to scan with xsane using greyscale: https://pastebin.com/upMTt9HJ. I've realised that lineart and halftone do not work either.

More information about the sane-devel mailing list