Image Sensor Vacuum Cleaner
A one night (+ one afternoon) project aiming to software remove dirt on my microscope image sensor.
The idea was that, since the smudges always appear in the same places, it is possible to detect their position automatically (unsupervised learning) from a pool of images and a calculation of variance on pixels of the image. Once the mask is calculated, it should be possible to reconstruct the pixels by interpolation of valid neighbors pixels. To treat the local areas independently of each other, we need to work by connected components.
The computation depend of two parameters :
- threshold : the threshold of variance to considere the pixel as a dirty pixel.
- dilatation : the number of time we "dilate" the mask to expand the area we will considere as dirty area.
750 / 8 | 1000 / 4 | 1000 / 8 | 1100 / 4 |
---|---|---|---|
Before | After | Mask red highlight |
---|---|---|