Ask Your Question

it is possible to obtain infrared values of a picture ?

asked 2016-10-03 13:47:44 -0500

laguna93 gravatar image

Hi, i´m new in opencv ihave made some exercises with the library. i can obtain pictures of the red, blue an green band (one picture for each band), my question is : it is possible to obtain a picture of the infrared band ?, anf if it is possible: how to do it? (i don´t want all the code or something like that, just a litle tutorial or help where to find that information).

i already removed NIR filter of my camera.

edit retag flag offensive close merge delete


Even if you cut away the NIR filter, the IR information will be captured inside the B G R bands, because the camera chip is simply not designed to capture IR information. You need a seperate LWIR camera for that... or use a multispectral/hyperspectral camera.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-10-04 04:41:39 -0500 )edit

thanks for your anwer steven...

laguna93 gravatar imagelaguna93 ( 2016-10-04 17:23:11 -0500 )edit

2 answers

Sort by » oldest newest most voted

answered 2016-10-04 12:17:42 -0500

pklab gravatar image

updated 2016-10-07 05:15:19 -0500

It depends on wavelength you want to catch. Most cameras sensor, in special CCD, have some residual sensitivity out of visible range... let say 20% @ 800nm down to 0% around 1000nm. Manufacturers install IR filter to create an image as human eye can see.

After this, there is no unique technology that works over the full IR band 700nm...20um and over. You can buy Near,Short,Mid or Long Wave IR Cameras if your budget is rich enough :)

Going back to VISUAL-NIR range (720..1000nm), common cameras have low sensitivity here so you can catch this wavelength using longer exposure time. If you want only VIS-NIR wavelengths you have to mount IR pass filter over your lens. You can buy it and/or you can make some test using a non developed negative film or hold floppy disk.

Finally, the IR pass filter cuts the visible band, therefore, using common camera you can't split VIS-NIR, R, G, B from same shoot

EDIT after user comment

1st Considering that NDVI = (NIR — VIS)/(NIR + VIS) you need to compare intensity vs wavelengths. For absolute and accurate measures you have to make VIS and NIR response homogeneous (sensor independent). You have to specify wavelengths than you have to check sensitivity (quantum efficiency) of your sensor for those wavelengths. This info is provided by sensor manufacturer. E.g. sensor XYZ quantum efficiency: 60% at 550nm, 80% at 700nm 50% at 800nm 30% at 900nm 10% at 1000nm

It means that your sensor converts as image signal only 10% of energy it has received at 1000nm. While energy at 550 will looks much brighter because 60% of incident energy will be converted by the sensor. This gives you an offset you have to consider.

2nd As I stated, on common camera there is no software option to split VIS-NIR, R, G, B from same shoot, because you need to apply/remove the IR pass filter.

Some alternatives

  • you might create some mechanical/servo wheel to move bandpass filters over your cam and take a picture for each filter.
  • XBox Kinetic cam has VIS cam and NIR cams... it's not so expensive. If you like raspberry a nice option would be 1 raspi camera + 1 raspi noir camera with high pass IR pass filter

EDIT 2 short clarification about false colors-image

  • An option could be to use high pass red filter like this to take false-colors images with IR converted camera. Considering that residual sensitivity of the Bayer filter in the NIR band is spreads over BGR channels, if you cut the blue light you will have a (lower intensity) NIR image in the blue channel and a VIS-Red image in the red channel. As alternative you might use a band pass blue to get VIS-blue in the blue channel and NIR in the red channel. This solution requires calibrations an post processing but It seems that this it's used for similar task.
edit flag offensive delete link more



You can even buy low resolution IR camera for your smartphone

LBerger gravatar imageLBerger ( 2016-10-04 13:29:16 -0500 )edit

thanks LBerger

laguna93 gravatar imagelaguna93 ( 2016-10-04 17:06:03 -0500 )edit

thanks pklab, i have already done the conversion with a common camera because i don´t have a big budget :( ...i made that question beacause im working with vegetation index (ndvi, tvi, rvi^2), that is why i want to have characteristics of the near infrared band, do you have any sugestion about programming or something like that...

laguna93 gravatar imagelaguna93 ( 2016-10-04 17:22:32 -0500 )edit

To extend the comment of @pklabyou might create some mechanical/servo wheel to move bandpass filters over your cam, take a look at what is called a filter wheel, an which is quite often used in computer vision setups.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-10-05 06:25:35 -0500 )edit

answered 2016-10-03 20:29:16 -0500

Tetragramm gravatar image

No. IR cameras have an additional filter that blocks out anything BUT near infrared light. Or a separate set of pixels that respond to a different set of light, like CMYK instead of RGB. There are even some RGBN cameras that have all four, though of course, the filter is necessary for those.

edit flag offensive delete link more


thanks for your answer, i´ve already done that tutorial :)... i´m working with vegetation index, any advice for me?...

laguna93 gravatar imagelaguna93 ( 2016-10-04 17:05:38 -0500 )edit

To calculate the vegetation index you need either two cameras aligned, or one camera that has both RGB and N on the same focal plane.

If you followed that tutorial, then the camera may give you an RGB channel, but since you added the filter, it's only the NIR that's present. You need an unaltered camera to give you the visible data (which would be the gray conversion of the RGB).

Tetragramm gravatar imageTetragramm ( 2016-10-04 17:30:57 -0500 )edit

Question Tools

1 follower


Asked: 2016-10-03 13:47:44 -0500

Seen: 6,059 times

Last updated: Oct 07 '16