05-07-2014 02:19 AM
Hello,
I'd like to know if there is an efficient way to correct dead pixels in a picture. I get pictures from an infra red sensor that included dead pixels.
I know the coordinates of dead pixels and I know the coordinates of the better pixels alive close to dead pixels. So I would like to replace dead pixels by alive pixels in order to make picture as complete as possible.
The example attached show what I do, but when then number of dead pixels is quiet big, I suppose that the execution time should be very long.
Thanks
05-14-2014 03:12 PM
Begin by creating a bad pixel map. This will essentially be a binary image, where good pixels are black (0), and bad pixels are white (1).
Use the binary image as a mask. You can shift the the mask by one pixel in any direction to capture a replacement set of good pixels, and then combine the original image, where you have masked out bad, with the new image where you have masked in adjacent good pixels.