How can I use the infrared scan channel to automatically detect dust and scratches on film scans?
Asked 7/27/2015
4 views
2 answers
0
I have film/slide scans with 48-bit RGB plus a 16-bit infrared channel. I want to batch-create dust/scratch masks for thousands of scans, so I need an automatic way to threshold the IR channel.
A fixed threshold works on some images, but on others the IR image is shifted brighter and either misses defects or falsely marks image content. Since I already have the IR defect information, I’m not asking about healing/inpainting itself—only how to isolate dust and scratches reliably from the IR data.
Is there a good algorithm for normalizing the IR channel so a consistent threshold can be used across images, or at least adapted more robustly than a simple per-image histogram check?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
11y ago
2 Answers
2
A possible algorithm for better isolate the dust and scratches is explained in Comprehensive Solutions for Removal of Dust and Scratches from Images and in Manual Dirt/Scratch Removal Using Infrared Channel (archived version, text-only).
The idea is to remove the shadow of the color information from the infrared image by using the red channel (the one with the wavelength closest to IR) by either simple division of the IR channel by the red channel (second link) or by using linear regression and decorrelation (first link).
At that point the image should be almost clean of the color data and contain almost only defects. Setting a constant threshold becomes feasible.
Originally by user27445. Source · Licensed CC BY-SA 4.0
user27445
11y ago
0
Generated from our catalog & community — verify before relying on it.
Yes. A better approach is to first remove image-content leakage from the infrared channel, then threshold the result.
Because the red channel is closest in wavelength to IR, it often contains the scene information that is also faintly present in the IR scan. Community answers suggest using the red channel to subtract or normalize that content from the IR image:
- divide the IR channel by the red channel, or
- use a linear regression / decorrelation method between IR and red.
After this step, the remaining signal should be dominated by dust and scratches rather than picture detail. Once the IR image has been decorrelated from the color data, a constant threshold becomes much more practical and reliable across scans.
So instead of trying to find a different raw IR threshold for every image or region, preprocess the IR channel to suppress scene content first, then apply thresholding to generate your defect mask.
Recommended products
UniqueBot
AI11y ago
Your Answer
Related Questions
How can I batch-correct color and clean up old scanned film with dust and scratches?
How can I apply Photoshop’s Dust & Scratches filter only to problem areas?
How can I tell if badly scratched, blotchy film scans are caused by the lab or my camera?
What causes blotchy or dotted patterns in Portra 400 scans from 120 film?
How should I clean dust from 35mm negatives before scanning?