Friday, July 1, 2016

Raspberry Pi NoIR Vein Contrast Viewer

This experiment uses a Raspberry Pi NoIR camera and a near infrared LED to show contrast between some superficial veins and nearby tissue. It is an educational imaging prototype. It is not a medical device and should not be used for diagnosis, injection or blood collection.

Near-Infrared Vein-Contrast Viewer

The Raspberry Pi NoIR camera omits the normal infrared-cut filter, allowing its silicon sensor to respond to visible and near-infrared light. When skin is illuminated in the near infrared, differences in absorption and scattering can produce contrast between superficial blood vessels and surrounding tissue.

The prototype used a nominal 3 W, 940 nm LED placed about 15 degrees from the camera axis. This arrangement produced visible contrast in the recorded test.

Why wavelength matters

Contrast depends on oxyhemoglobin and deoxyhemoglobin absorption, tissue scattering, melanin, vessel depth and diameter, LED bandwidth, camera response and lens transmission. Silicon camera sensitivity also changes across the near infrared range. A 940 nm source may need more exposure than a shorter wavelength on the same camera.

A controlled comparison can test narrow band sources near 740, 780, 810, 850 and 940 nm with matched irradiance and camera exposure. A 2004 study measured useful subcutaneous vein contrast from about 880 to 930 nm. A 2022 test of 720, 760, 850, 900 and 940 nm found the largest vein count at 850 nm in its own camera and lighting geometry. The best wavelength therefore depends on the complete system.

Illumination geometry

Placing the LED slightly off-axis can reduce direct glare, but the optimum angle changes with distance, field of view, skin curvature, and whether the system uses reflected or transmitted light. A ring or symmetric multi-angle source can improve uniformity. Cross-polarization may reduce surface reflection in visible imaging, although polarizer performance must be verified at the selected near-infrared wavelength.

For meaningful comparison, disable automatic exposure and gain, shield the camera from direct LED light, use a constant-current driver, and record wavelength, exposure, gain, distance, angle, and LED current.

Image processing

Histogram equalization can make the vein pattern easier to see, but global equalization can also increase illumination gradients and noise. CLAHE, which means contrast limited adaptive histogram equalization, limits local amplification and is a useful starting point. Process the least compressed and most linear image available.

A more rigorous pipeline would include:

  1. Dark-frame correction
  2. Flat-field correction for illumination and lens shading
  3. Motion stabilization
  4. Band-pass or vessel-enhancement filtering with documented parameters
  5. Contrast-to-noise measurement against manually defined vessel and background regions

Why projection is harder than detection

A miniature projector can place the processed image back onto the hand. Camera and projector calibration, skin shape, parallax, movement and processing delay can shift the projected line. A safe research system needs continuous geometric registration and a measured position error. A 2020 camera and projector calibration study gives one example of this type of correction.

Safety

  • A high-power near-infrared LED can expose the eye without producing a normal brightness or aversion response.
  • Use a rated constant-current driver, heat sink, physical shielding, and a current and exposure limit appropriate to the source geometry.
  • Do not stare into the LED or aim it toward another person’s eyes.
  • Do not infer blood flow, obstruction, oxygenation, vessel suitability, or medical status from this uncalibrated image.
  • Do not use the prototype to guide injections, blood draws, or treatment.

Result

The demonstration shows superficial vascular contrast with a low cost NoIR camera and 940 nm illumination. A second version can compare wavelengths, measure contrast to noise, record repeatability across people and measure camera to projector position error.

Research

6 comments:

  1. Hey!!! That was amazing... Planning to the same for my final year project... Could you please assist me.. Please... Was finding this one badly.. Please help :)

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  2. i'm also going to do this project i need help please not hesitate to help me by whaat u have

    ReplyDelete
  3. plz any one who has a knowledge on this side i need ur help

    ReplyDelete
  4. hey , can i get the code for this

    ReplyDelete