Friday, September 07, 2018

Making Invisible Waves Visible, Near Infrared Imaging - Part 2

With IR Cut Filter                                                                Without IR Cut Filter
In my previous post I showed many uses for a near infrared camera. To be clear, this is NOT a thermal infrared camera.  Thermal IR cameras image in the mid IR and mainly detect electromagnetic radiation due to the random thermal motion of the atoms and molecules in objects. A near IR camera isn't any different than a regular digital camera that creates images from visible light. It is a digital camera that has been modified to make images from the wavelengths that are just beyond the wavelength humans perceive as red. It is like being able to see an additional color that is invisible to the human eye. In this post I will describe how you can modify a digital camera to be a near IR camera.

Remote Control Using iPhone Selfie Camera
The fact that digital cameras are sensitive to IR is a detriment to good photography. The lens of the camera is not designed to focus IR, resulting in a fuzzy picture. The extra IR light can make exposure settings unreliable. To get around this, all digital cameras have a built in IR cut filter, but some IR still gets through. The cheaper the camera, the less effective the IR cut filter. You can demonstrate this by pointing a remote control at any digital camera. When a button on the remote is pressed, the IR LED on the remote can be seen flashing in the camera display. I first discovered this when my 3 year-old daughter was toddling toward me with a remote control as a took a video. I was startled to see it flashing in the viewfinder but not to my eye. She is now 25. The better the IR cut filter, the dimmer the flashing. New phones cut almost all of it, try using the lower quality selfie camera. The IR cut filter must be removed to make a near IR camera. This will void the warranty and possibly wreck the camera. That is why a computer webcam is a good choice for a near IR camera. They are cheap and easier to disassemble.

IR Cut Filter on a Webcam Lens
Webcams have several types of IR cut filters. The worst is a coating on the lens. This must be scratched off, that can degrade image quality. Second worse is a filter attached to the CCD chip. This must be carefully removed to avoid damaging the CCD. The best filters are part of the lens housing. These can usually be popped out without difficulty. The IR cut filters are dichroic, they look transparent straight on but usually pinkish from the side. They are worth saving to explore their characteristics with a spectrometer.

I have converted 5 different webcams over the years. Because I like to use a Mac, it was more difficult do find suitable webcams. Macs have come with built-in webcams for a long time, so few vendors make Mac compatible Webcams. The most recent near IR webcam I converted is the Logitech HD Laptop Webcam C615. It can be purchased for about $25. It was a little difficult to take apart until I found out I could peel off the flat plastic panels on the front to reveal the screws. The IR cut filter was glued on to the lens housing but easily broke off with a quick blow from a pencil. It worked well with my Macbook Pro and is my only HD near IR webcam. I made a video showing the conversion process for this webcam in case you want to give it a try.
My other converted webcams are older models but still available as of this writing. I tried the IceCam2 by Macally. It worked well with my Mac but unfortunately the IR cut filter was a lens coating. I was able to scratch it off with an X-Acto knife with acceptable results, but I wouldn’t recommend it. The Macally MegaCam had a removable IR cut filter and works well. The only downside is it had a limited range of focus. Next I tried a Logitech QuickCam Connect. Although there was a Mac driver when I made it, currently there isn't one. The IR cut filter was a small square piece of plastic that easily popped out of the housing. This camera worked well on a PC and my Mac laptop running Windows. I recommend this one for PC users. I then tried the Logitech QuickCam Chat Web Camera because there was a Mac driver available for it. Unfortunately it had an IR cut filter coated on the lens. I swapped the QuickCam Connect lens with this webcam. This is what I used until a Mac OS update caused that driver to stop working too!

Once the IR cut filter is removed, replace it with a filter that only passes IR radiation. I use a Wratten #87C filter. Edmund Optics sells one for $175. That is expensive but it would be enough to make many near IR cameras. The filter is large enough to be attached over the lens of the camera. This allows pictures to be taken with and without it for comparison. I chose to place it inside the lens housing of the webcam so it is more secure. I can then use an unmodified webcam for comparison pictures. You can find less expensive Wratten 87C filters on eBay for $30-$40.

Unexposed, Developed Color Film
A much less expensive filter can be made from developed, unexposed color film. The resulting dark negative works almost as well as a Wratten 87C, see spectra below. If you look through old boxes of color negatives at your grandmother's house you will probably find some developed, unexposed sections on the ends of negatives that you can use. They are the portions that look completely dark. This material will pass IR while blocking almost all visible. Some people recommend floppy disk material but it passes a lot of the visible spectrum. I don't recommend it for near IR webcams. However, looking directly through it gives you an approximate view of what things look like in near IR.
View of My Classroom Through the Material from a 3.5" Floppy Disk
The figure below shows the continuous spectrum of an incandescent light (red line). The other curves show this spectrum after passing through various filters. The sensitivity of the spectrometer was adjusted to show the spectra at approximately the same scale so the intensity values can't be compared. The purple line is the IR cut filter that was removed from a webcam. You can see why these must be removed as most light above the 650 nm wavelength is blocked. The orange curve is the material from a 3.5" floppy disk. Although it passes IR, it also allows a lot of red and orange light to pass too. The green curve is developed, unexposed color film. It works almost as well as the Wratten 87C (blue line), letting through only a small amount of visible light. If you use developed, unexposed film as a filter, try doubling it up for better results.
Continuous Spectrum Compared to Spectrum After Pass Through IR Cut, Floppy, Color Negative, and Wratten 87C Filters
You can use any software that displays a video preview of your webcam to capture images. On a Mac this is Photobooth if you have a compatible webcam. For PCs, the software that comes with the Logitech webcams works well. It has settings for low light levels, still and video capture, and some basic editing tools. There are many other choices for PC webcam software including ManyCam

A near IR webcam is very useful in the classroom but awkward for taking around town and country. Many people would have difficulty successfully taking apart a webcam AND putting it back together in working condition. I know I did. Another option that overcomes these obstacles is the Sony Nightshot line of cameras. They have a switch that slides the IR cut filter out of the optical path. They also have IR LEDs to illuminate objects so they can be seen in total darkness. I use a Sony MiniDV Handycam DCRHC40 that I purchased new in 2004. There are usually many inexpensive Sony Nightshot cameras for sale on eBay. To convert a Nightshot camera to a near IR camera all you need to do is place an IR pass filter over the lens. Either a Wratten 87C or one made from developed, unexposed color film works well. I made a card stock holder so I can quickly attach and remove the filter to take near IR/visible comparison pictures. I also cover the IR LEDs with electrical tape although they are useful for some applications.
My Sony Nightshot Camera With IR Pass Filter Installed and Tape Blocking IR LEDs
Sony Nightshot cameras have been manufactured since 1998. There was some media attention when people used them to see through certain fabrics when illuminated with a bright near IR source. Sony modified them so that they overexpose in bright conditions to prevent voyeurism. This does not affect their use as near IR cameras because the IR pass filter dims the image considerably. However, I sometimes have issues with overexposure in bright sunlight. There is a way to defeat this, set the Nightshot switch halfway between on and off. That is how I took the picture of the billiard balls at the top of this post.
Fabric in Visible Light                                                                  Same Fabric in Near IR
Another option would be to modify a digital camera like a webcam by removing the IR cut filter and replacing it with an IR pass filter. This is best done with an old digital camera that would not be missed if it refused to work after reassembling it. I tried this with an old Kodak digital camera and it did work for a little bit, then became e-waste. There are companies that will do this but their main purpose is to remove IR cut filters from DSLR cameras to make them better for astrophotography. If you are interested in pursuing this option, here is a clearinghouse of information and here is a good place to start.

I learned how to convert webcams to near-IR cameras by searching for DIY websites and videos online. This post is an amalgamation of what I have learned from this research and from using near IR cameras for many years. Here are a few websites that I found useful:

https://youtu.be/Xytt8YHhlOU

http://www.hoagieshouse.com/IR/

http://www.instructables.com/id/Infrared-IR-Webcam/

No comments:

Post a Comment