How to detect infrared light with OpenCV

Zbigniew Wazeliniak picture Zbigniew Wazeliniak · Oct 27, 2012 · Viewed 7k times · Source

I'm trying to use OpenCV to detect IR point using in-built camera. My camera can see infrared light. However I don't have a clue how to distinguish between visible light and IR light. After transformation to RGB we can't distinguish, but maybe OpenCV has some methods to do it.

Does anybody know about such OpenCV functions? Or how to do it in other way?

--edit

Is it possible to recognise for example light wavelength using laptop in-build camera ? Or it's just impossible to distinguish between visible and infrared light without using special camera?

Answer

Science_Fiction picture Science_Fiction · Oct 27, 2012

You wouldn't be able do anything in OpenCV because by the time it goes to work on it, it will just be another RGB like the visible light (you sort of mention this).

You say your camera can see infrared...Does this mean it has a filter which separates IR light from the visible light? In which case by the time you have your image inside OpenCV you would be only focusing on IR. Then look at intensities etc?