The project is based on the idea to create a cheap way to map veins on medical patients in order to canalize them. Knowing there are devices that already do the task, the goal is to achieve it in a cheaper way.

In order to do so, the idea is to use a hacked webcam, IR band pass filter, a few IR wide angle leds, and a RaspberryPi (or similar) to do image processing and a display to show whats intended.

The idea is based on light absorption.

We illuminate the target with IR Light (around 850nm), that is what IR led's job.

We need a spectrum of light which if highly permeable for human tissue, but still is absorbed by blood and its components.

Here is were near-IR light comes.

Even though near-IR isn't its optimal absorption wavelenght, it is highly pearmeable for human tissue.

Veins contain carboxinated blood, wich absorbs IR light, thus, in the reflected image, veins will appear idealy black, in practice they appear slightly darker.

To achieve the image capturing, we have to modify a digital camera sensor. In this case, we use a webcam (future image proccesing porpouse).

We need to remove the IR filter.

By default, a digital camera has an IR filter to avoid IR light reach the light sensor.

I bought a few webcams, diferent brands and quality, some of them had the IR filter attached to the sensor, being nearly impossible to remove without damagin the sensor.

Others, had a fixed focus, so removing the IR filter lead to a focusless image.

I finally got one wich had an easy-to-remove IR filter, adjustable focus lens and acceptable 720p quality.

Surfing the Web I found several brands an models, but living in Argentina means it is not that easy to find -nor afford- most of them. So I had to work with things that were reacheable - and affordable.

I found a Genius Facecam 1000x HD, wich it was compatible with the linux kernel 2.6 and newer. This was very important because the idea is to use it with a Raspberry Pi running Raspbian. And its very affordable.

Now that we have an "IR Light Sensor" we need to light it up.

I use 5x 850nm IR LED with wide angle (60°).

I tried common remote IR but wasn't getting a clear image. Even increasing the number of leds.

In order to turn them on, I used a DC DC Step Down power supply, being set at 4,85V and calculated 22ohm resistor in order to get around 220mA current per led.

I have to admit, I was looking to get a clear image with 100mA, but in practice, I adjusted the power supply with more current until I had a clear enough image, without burning the leds nor the image.

I use a band pass IR optical filter. The idea is to acquire only IR light.


The idea is to avoid interference from artificial light sources, this also helps to equalize reflection and absorption linked to skin color.


Here is the first prototype:


As you can see, I used normal remote IR leds.

But they don't have enough power for the porpouse.


Second prototype:

I used more powerful IR leds, 8 of them with 39ohm 1W resistor. But, now image was "burnt", too much IR light on target.

So, being reative, I decided to put some tape until I found 5 was the magic number.

Since resistors were overheating, decided to use some with more heat dissipation.


Here is the current prototype. 5 IR Leds, with 33ohm 3W resistors. This leds require bigger amounts of current, therefore, overheating resistors is something to consider.


On the back, there is the webcam and the DC DC StepDown power supply.

And here, how it looks with the optical filter.


Of course, it is black to visible light, but it is permeable to IR wavelength.

Now that I got a clear "enough" image, it time to process it.


As you can see, we have a sort of "black and white" picture. Even though it is the way the camera perceives IR light.

In order to process the image, I follow a few steps.

For this, I use Python (compatible with the RaspberryPi 's Raspbian OS), and OpenCV library.

The script acquires a frame from the webcam, process it, and shows it.

The idea is to process it and display it in order to have an idea where...

Read more »