-
Raspberry PiCam
08/13/2017 at 15:02 • 0 commentsFor the technical development and construction of our Venenfinder, we follow the principle that appears most useful after our experiments and literature research: The skin is irradiated by an infrared light source, while a camera (Pi camera or webcam) records the reflected light. The camera image is then processed using mathematical filter algorithms.
However, most cameras have a filter to block infrared light, so we either have to use one that doesn’t or convert a normal webcam by removing the blocking filter. The single board computer we use for image processing is the Raspberry Pi3 (inexpensive, powerful and available worldwide). There are two cameras that can be connected directly, one with and one without IR-blocking filter. Using the "Raspberry Pi NoIR Camera Module" saves you from disassembling a webcam and modifying the hardware – with this module you can build the Veinfinder using mostly off the shelf components, which makes it easier to rebuild for people with less experience in hacking playing with technology.
If you look at the spectral sensitivity of the Raspberry camera module (Fig. XYZ), you can thee three peaks in sensitivity (surprisingly at blue, green, red) and a slight improvement of sensitivity again when approaching the near infrared wavelength again:
Figure 7: Spectral sensitivity of the Raspberry-Pi camera sensor
(Type designation of the image converter OmniVision QV5647)
Source: https://github.com/khufkens/pi-camera-response-curves)
Image sensors have "sub-pixels" per image pixel, which react particularly sensitively to different wavelengths in the visible region and enable an image reproduction, as we expect it to be from our perception. However, the spectral sensitivity of all three sub-pixels increases again in the NIR range; In the graphic, this is already recognizable for blue- and green-sensitive image receptors. Thus, the initially paradoxical situation may appear that in the infrared region (NIR), the "blue" subpixels reproduce the reflected infrared radiation very clearly (and darken the veins due to the absorption), whereas they are unsuitable for venous localization in the visible region.
Here is an estimation of sensitivity for an extended wavelength:
Figure /XYZ:
Either way, it becomes evident that you should add a different filter that blocks everything but IR light – the easiest way to do so is to use a piece of of exposed analog film.
Buildlog 2: Raspi-Cam Version
Version 1: Standard Camera System (Pi-Camera)
The first version uses an off the shelf camera system, the Raspberry Pi NoIR Camera Module. It is connected via a relatively rigid flat-ribbon cable, which reduces the possible applications. For this reason, we have integrated two adapters that physically moves the pins of the Raspberry camera adaptor to an HDMI-port and vice-versa. The adapter can be bought from Tindie (https://www.tindie.com/products/freto/pi-camera-hdmi-cable-extension/).
It is simple a physical conversion that uses a standard HDMI cable for more flexibility and more length than the ribbon cables provide; there is no signal conversion – so don’t confuse this port with the HDMI output from the Raspberry :-)
Illuminating the skin and tissues is done by a self-made headlamp consisting of a matrix of 9 high-performance infrared light-emitting diodes. They are arranged in a 3x3 arrangement with reflectors and are controlled by standard constant current driver for 12V. During our experiments we designed, 3d printed and tested several housings for the camera module as well as for the headlight:
Figure 10: Construction of camera housings and IR headlights with reflectors
Overall, however, this arrangement was not stable and user-friendly enough and the filter made of exposed film, which passes IR light and blocks visible light, could not be well accommodated. As a next stage we have therefore designed a housing that can be screwed to a mini-tripod and integrates all necessary components. The filter can be attached with a plate with magnetic support:
Figure 11: Overall construction - green: case for camera, blue: case for LED matrix spotlight, red: mounting plate for the 3x3 LEDs , orange: snap-on attachment for the filter.
The design is easy to replicate with any 3D printer. Strong magnets are pressed into the round recesses, which fix the filter in front of the camera lens. We use a Pitop Ceed as the basis for Raspberry and Display, but we designed a case for the Raspberry Pi computer together with a 7-inch display for the second approach (using a webcam) so that the overall system is as easy to handle as possible.
-
First Experiments
08/11/2017 at 09:13 • 0 commentsFor the development of our prototype we recreated some experiments from the specialist literature in order to test whether our ideas can be realized. This includes e.g. the attempt to distinguish venous from arterial blood by means of a spectral analysis or the illumination of the tissue with different wavelengths and the recording of the light scatter with one of the camera systems.
During the development phase of the device, we were faced with the question whether there is a discernible difference between arterial and venous blood when illuminating with infrared light.
To find this out, we conducted a spectral analysis with diluted blood. We have extracted Venous blood by a venipuncture, but we have not been able to determine arterial blood exactly, but poked a needle into the blood vessels in the finger and thus obtained a mixture of venous and arterial blood.
We found out that there was only a weakly visible difference in the infrared range of the absorption spectra of the blood samples - possibly due to the mixture in the second sample (blood vessels in the finger). Nevertheless, the difference is recognizable and meaningful in the overall representation of the spectrum: The blue absorption curve shows the venous blood, which absorbs the spectral range significantly above approximately 600 nm (orange). This difference, which the spectrometer could only image up to about 900nm, is to be amplified by the image calculation by software. To this end, we have also carried out several tests - both in the visible and in the NIR range.
In this experiment, we examined the sensitivity of the camera for different wavelengths and the reflection of skin and mesh on the inner side of the forearm. For this purpose we have illuminated the skin areas with various colored LEDs - from blue to green, yellow, orange to red - and this "lighting" with the Raspberry Pi camera. We did not use the webcam for this experiment, because it was already equipped with a filter, which only allows infrared light to pass through and almost blocks the visible area. We also wanted to know with which wavelengths in connection with the camera the best results possible can be achieved.
An intensive red illumination is suitable for representing the darker shadows of the veins. However, differences can also be seen in green lighting, which, however, are significantly larger in the case of red LEDs. For the evaluation of the IR illumination, however, a further unknown quantity also plays a role, namely the sensitivity of the camera sensor outside the visible range.
Another method of venous discovery was found in the publication of Asrar / Al-Habaibeh et al. (2016). After we had done first experiments with visible and IR light. This method is used to visualize veins using a thermal imaging camera. The affected site must be cooled before carrying out the procedure. Since the veins transport warm blood into the cooled region, the skin parts, where the large veins are seated, warm up first. This heating process should be able to be imaged by the thermal imaging camera and the veins are so clearly defined by the surrounding structures. We followed the experiment with a thermal imaging camera to check how good the application is with a relatively cheap IR camera.
For this, we cooled the arm once with ice cubes and in another run with an icing spray and the warming with the thermal imaging camera recorded as video. In the course of time, the thermal image shows how skin-like areas of the skin heat up - here, veins are recognizable. The surrounding skin areas heat up significantly slower. However, the image and thermal resolution of the camera (FLIRone) used is not particularly high and is 160 × 120 pixels with a thermal sensitivity of 0.1 ° C. This means that no finely resolved structures are recognizable. This could be changed by choosing a model with a larger spatial and thermal resolution. The drawback of this type of method is the enormous cost for thermal imaging cameras with high resolution (several thousand euros); For this reason we do not pursue this procedure any further. In addition, this can be unpleasant with cooling with ice cubes, even with a cold spray, and in the worst case can lead to burns of the skin.