High Resolution 1024 x 1820 SWIR Snapshot Camera on the Cheap
In the last years I got obsessed with spectral imaging. I did hyperspectral imaging with a cheap pushbroom imager, SWIR-VNIR hyperspectral data evaluation from PRISMA database and NIR photography.
Eyes are the most useful sensors in the human body for the everyday life. It's interesting that we see the world with our eyes in 3 colours (spectral bands) and there is already so much information available. Trees are green, clouds are white, the sky is blue.. We recognize things based on 3 spectral channels. What could we achieve with seeing 100 channels instead of 3? Or seeing UV, Infrared, Shortwave-Infrared?
A lot of people do UV and near infrared photography because the usual Silicon based image sensors can detect light from 200nm to 1200nm.. The other end of the spectrum from 3000nm (3um) to 12000nm (12um) is used by thermal cameras. Thermal cameras are monochrome, but still, it's a vision in a completely different domain which is available for everyone for USD 100-200.
The range between 1200-3000nm is yet undiscovered by hobbyists. Low resolution cameras for these wavelength often start at 10s of thousands of dollars. Often InGaAs is the sensor material, but recently there are CQD (colloidal quantum dot) and PbS (lead sulfide) sensors also available, still nowhere near affordable for a private hobby.
Luckily there is the used devices market. Used devices are available at the fraction of the price, which is still thousands. Export restrictions apply too. If you want to start a SWIR imaging hobby, you won't have a easy start.
SWIR DIY snapshot options
Just like the most, I can't afford even the used devices and they are for that also low resolution so not very useful for photography. There are two solutions for this problem:
1) You buy a single photodiode (PbS, HgCdTe, InGaAs..etc.) and scan it in two direction to create an image behind the lens. Disadvantage of this solution is a lot of work (electronics, software, optics, mechanics...) and that recording a single photo will take a lot of time. A simple 1 MegaPixel photo would take at least 30 minutes (yes, I did this before) and a lot of post processing after as the lighting conditions change.
2) The second solution is to get a used SWIR line scan camera and convert it to a snapshot imager. I chose this option.
SWIR Linescan camera
InGaAs (SWIR) line scan cameras are often available on eBay. They are cheaper than area scan cameras, but the same fast. Often there are no export restrictions either. A typical old linescan camera can record up to 50 000 lines per second. If you can scan somehow the line fast and one frame is made of 1000 lines, you have 50 FPS frame rate. The catch is of course that you can't scan it that fast. Also, you if you need a longer exposure time, the line rate will be much lower.. So it can't be used for videos and nighttime shots but good for daylight snapshots. I believe this is why where is no expert restriction - it can't be used for night vision / military purposes.
My SWIR linescan camera
Anyway, I was looking for the right SWIR linescan camera for about a year where I came across a unit with 1024 pixels and a good price. The seller was not able to fully test the camera because of a missing trigger signal and that made it possible for me to buy it for $850.
This is the model which I bought (manufacturer website):
1024-LDH Digital Linescan Legacy Camera | Sensors Unlimited (sensorsinc.com)
It's a legacy camera, quite heavy and old. Supposedly it was used for solar cell inspection. It will do, if it works.
Always expect of course issues with eBay items. If the only problem is that the seller can't use it, it might be a good sign. With this camera there was luckily no issues. As soon as I managed to reset the factory settings and figure out the communication with the image grabber, it worked. Not even a single defect pixel. I wonder why the original owner decided to get rid of it.
Now unfortunately the camera alone is not enough to produce images. It needs a 12V power supply through a Hirose connector, a frame grabber for CameraLink, a CameraLink cable, a power supply for the frame grabber, a cable between the frame grabber and your laptop, a objective lens, spectral filter, 90degree mount, a user manual, rotation mechanics, a tripod and finally a software.
The users manual and camera power supply was quite easy. Even though this is a legacy product, the manufacturer had a remaining (used) set of accessories which they sold me for about $100. The package included adaptor for Canon EF lenses, a CD and the manual.
CameraLink cables are widely available, it's still something which is used in the industry, but a upgraded version of it to allow more bandwidth for data transfer. This is an old camera, so it needed only a simple CameraLink cable.
Objective lenses for SWIR are hard to get, there is not too many out there especially for such a large camera sensor (25.6mm long sensor). Used lenses are rare. You can use instead a simple lens from Thorlabs or Edmund Optics which has a proper antireflection coating or a simple everyday camera lens. A simple camera lens has a disadvantage that the full manual focus adjustment range won't be enough for focusing. These lenses are just not designed for SWIR. But the adjustable mount from the manufacturer will do a good job compensating for that. Expect also ghost images, about 40% transmission and a longer than specified focal length.
Filters are important for the interesting effects. InGaAs sensors have still 20-30% quantum efficiency around 800nm. At 800nm there is much more sunlight than towards 2000nm in the solar radiation spectrum. If you don't use any filter, you will get basically the same effect as a CMOS camera with a visible cut-off filter. If you are using the sun as a light source, you have to take care by selecting the filter. There are atmospheric absorption bands which will at some wavelengths completely block the sunlight. If you buy a bandpass filter which matches the absorption bands, you will need a artificial light source too. SWIR LEDs are available or a halogen/incandescent lamp will do too for close objects, but you can't do any landscape photos then.
Solar spectra from Wikipedia (Sunlight - Wikipedia):
If you are getting a bandpass filter, you should choose something with at least 15-20nm bandwidth, otherwise you will have again not much light reaching the camera --> very long exposure times. Filters are available from the usual sources: Edmund Optics, Thorlabs, MidOpt, AndoverCorporation or China. This particular lens I have needed a large filter so I bought mine from China (a company called TiinOptics) and it worked nice so far. The filter I got (1575nm bandpass filter) cost only about $350.
Self portrait 1575nm filter:
Comparison NIR (800-1200nm) and SWIR (800-1700nm) without filter:
The frame grabber and the software go together. I wanted to have this setup portable so usual PCI or PCI-E frame grabbers were out of question. Although, you can make these frame grabbers portable but it's a lot of effort and the thing will be huge which limits portability. The advantage of these would have been the software. The camera comes usually with a simple software to read the image data. This works only with selected frame grabbers and these were all PCI type.. I bought instead a used Pleora frame grabber and the eBUS software for altoghether $600. This is an external frame grabber which translates the CameraLink protocol to a gigabit Ethernet. You connect your ethernet cable to the frame grabber and connect the frame grabber through CameraLink to your camera. In the software eBUS Player you have to tell the frame grabber what to expect on the CameraLink side: number of pixels, number of lines per image, bit depth, baud rate (for serial communication) and a few more settings.. To be honest this is the hardest part. There are so many settings (hundreds) and a lot of them has to be set up properly to get any image information. Trial and Error.
eBUS Player with a lot of settings:
Now that you can record images with the camera, you can set up the mechanics. First of all, the line scan sensor is horizonal when the camera is mounted using the screw holes on it's housing. You have to buy a 90 degree rotation mount so the line sensor is aligned vertical. ..Then you will have to rotate it around while recording an image with a constant speed. For that I used a Syrp Genie Mini motorized mount. The rotation speed and rotation angle can be set up from a smartphone app and this device has a built in battery. The whole assembly needs to be mounted on a stable enough tripod at the end.
Optional (but not if you want to have this portable) accessory is a power bank. I bought a compact power bank which can give be 230V for all the 230V-->12V power supplies. The camera and the frame grabber will use little power, max 5-10W so a power bank like this will last for hours.
I haven't mentioned yet a laptop. Of course you need a computer to record and store the images. Any laptop would do, your choice. Long battery life is an advantage.
Camera with mounts:
How to do a recording
Now that the hardware is available, time to start playing with it..
Focusing: For focusing you can start a continuous recording of let's say 10 lines images. While adjusting the focus manually on the lens, you should observe this 10 lines image. The more lines you see, the better the focus setting.
Focus OK vs. not OK:
Exposure time and digital gain: Digital gain will add a lot of noise, so I would leave it simply off. The exposure time can be adjusted between a minimum value (20 something microseconds) and the frame rate. You should choose a frame rate which will allow enough exposure time adjustment with your planned lighting conditions. If you change the frame rate later, you will have to change the rotation speed too (see later).
To adjust the exposure time, there is in the manufacturer's software a slide control, but there is no such thing in eBUS player. You have to send the camera commands like "EXP 2000" to have the exposure time set to the value of 2000. It's a bit of a pain to be honest, but expected with similar projects. Add to that, 2000 doesn't mean 2000 microseconds in this case but 2000 camera clock cycles.
Serial communication with eBUS Player:
Rotation speed: You will have to do some experiments to figure out the rotation angle and the rotation speed. Set up a fixed line rate with the camera and do some images with different speed. The one which look the least distorted will have the right speed. In doubt you can use a even pitch grid target.
Rotation angle: After finding the right rotation speed for a given angle it's easy to scale this further. Double the image size and double the rotation angle. I usually do 1024x1820 images to keep the 9:16 ratio, but you can do 1024 x any size with this setup. A 360° panorama would be possible and cool for instance.
If you want to repeat this exercise or do it even better, I've put together the steps for you:
- Get a used SWIR linescan camera
- Get accessories
- Figure out frame grabber setup
- Measure the right rotation speed and angle
- Focus, adjust exposure time and record image
- Total cost about $2000-$3000 and a lot of your time
I'm sure you have a lot of SWIR application ideas, but let me help out here too:
- Soldering iron (see it hot)
- Silicon wafer (see it transparent)
- See through haze much better (see it)
- Catch moving people or train at the station (interesting)
- Make young people look old (water absorption & white hair)
- See through plastic
- Distinguish chemicals
With that I wish you good luck and thank you for your interest in this project. Drop me an email if you have questions. ;)