I have a Raspberry Pi NoIR Camera. Which I want to take pictures with at daytime in a well lit room.

Unfortunately the colors on the pictures do not look anything like you would expect from a normal camera. I guess the reason is:

(NoIR = No Infrared.) This means that pictures you take by daylight will look decidedly curious, but it gives you the ability to see in the dark with infrared lighting.

This post states that you can only overcome this issue during daylight by using an additional infrared filter or by using a "normal" camera.

So the pictures seem to lack any green values, plus some of the black values appear red/purple.

enter image description here

I could apply filters to the images programmatically or using gimp and I was wondering how would one tackle such a task? Could this be solved with some simple color correction algorithms? Is it even possible to revert this effect without using a additional "hardware"-infra red filter?

Thanks in advance


Unfortunately no signal processing method could provide you what you wanted. Instead you must use a hardware optical IR filter that would block the incoming IR waves before they reach into your sensor.

A little physical insight would help you understand why this is so: An optical image is an array (matrix) of intensity values captured by the sensor pixels illuminated by the incoming electromagnetic wave during the exposure time.

In image capturing process, sampling is performed over geometric-space along the 2D sensor surface, unlike an audio sampling which captures the time variations of the incoming acoustic pressure wave which has a spectrum of about 20 Hz to 20 KHz range and therefore sampled about 44.1 KHz according to Nyquist sampling criteria.

Now the image sampling does not capture the time variations of the incoming electromagnetic wave. So those pixels only sample the spatial distribution of the illumination intensity $I(x,y)$ accross the sensor surface, over which an image was formed by a focusing lens system.

Furthermore, even if those sensors could capture time variation of the incoming electromagnetic spectrum (just like an antenna captured wave being sampled by an ADC of an SDR at an adequate bandwidth) the required bandwidth for complete spectral processing of the visible light is abbout $10^{14}$ Hz!!! (visible light spectrum in wave length is from about 400 nm (blue) to about 700 nm (red), plus IR spectrum is above 700 nm to at least about 1000 nm for near IR). Given a bandwidth of about $10^{14}$ would require a sampling rate of still about $10^{14}$ Hz. Such high data rate is not possible for commercial applications of typical imaging devices.

So, for your Sony NoIR cam, the spectral information of the incoming electromagnetic wave (the visible light) is not captured , not represented by the image pixels, and therefore cannot be processes by any mathematical means.

You should therefore physically place an IR blocking filter infront of the camera sensor or the lens. I was thinking of investigating old GSM phones which would typically have built in cameras, and therefore, I assume, would also incorporate an IR filter?

That being said, playing with colors, RGB channels, Hue values associated with the image being captured, you can obtain some improvements given a known set of illumination conditions. The details are obscure however.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.