# Filter common signal from image

In a set of images taken with the same infrared camera, I have a noise signal presumably originating from the camera chip. How would I go about extracting said signal to be able to substract it from all images I have taken?

• Is the noise random? – geometrikal Jul 5 '13 at 14:45
• No, it should be the same for every image – karlson Jul 31 '13 at 12:44

Basically you have to do a shading correction. This process removes known artifacts from an image (or a series of images) based on a reference image (or "compensation image" as it is sometimes called) containing only those artifacts. Such a reference images can be obtained by photographing a uniform object (i.e. a perfectly white wall or perfectly black darkness) under good conditions so that only the signal from the defect camera chip is recorded.

I have done this example with Mathematica, the basic principle can be implemented anywhere.

Given a set of images (I used grayscale images since I have no infrared images) without the defective signal

img1= img2= img3= and an artificial defect camera chip signal aka the reference image (I pulled this out of my hat).

noise = GaussianFilter[Binarize[Image[RandomReal[1, {299, 499}]], 0.95], 5] Now we generate the noisy images.

img1n = ImageAdd[img1, noise]   Then we simply subtract the reference image from the noisy images and get the actual images without the noise.

ImageSubtract[img1n, noise]
ImageSubtract[img2n, noise]
ImageSubtract[img3n, noise]   If you happen to have a noisy image and a perfectly fine image with exactly the same scene (and of course image sizes)

img1n = img1= then you can simply generate the reference image yourself by subtracting the latter from the former.

ImageSubtract[img1n, img1] 