Vein Visualization on
Android Smartphones

See the system in action

Real-time vein visualization captured directly through the MobileVeinViewer app, demonstrating NIR imaging and adaptive thresholding on a live subject.

Venepuncture is harder than it looks

Finding the right vein is a prerequisite for blood draws, IV therapy, and cannulation. Standard practice relies entirely on surface anatomy and operator experience — with success rates dropping below 50% in difficult patient populations.

💉

Failed Attempts

On average, difficult patients require 3 needle sticks per vessel. Each failure increases the risk of bruising, nerve damage, and arterial puncture.

👁️

Invisible Veins

Patients with dark skin, high body weight, age-related changes, or conditions like scleroderma make visual identification nearly impossible.

💰

Expensive Devices

Dedicated vein viewers exist and work well, but their advanced hardware makes them unaffordable for many clinics in developing countries.

⚕️

Real Clinical Risk

Accidental arterial puncture, phlebitis, hematoma, and peripheral nerve damage are all documented complications of misplaced venepuncture.

Two components. One affordable system.

MobileVeinViewer pairs a custom-built hardware extension with an Android application to deliver real-time vein visualization anywhere a smartphone can go.

1 Hardware Extension

NIR LEDs8 × SD-AR512C9, 940 nm, 40 mA each
CameraModified webcam (IR-Cut → IR-Pass filter)
ConnectionUSB OTG cable — data + power (≤ 500 mA)
ControlStepless variable resistor for LED brightness
Total cost< €30
LEDs grid and NIR camera circuit

Why 940 nm? NIR light at this wavelength penetrates the epidermis but is strongly absorbed by oxyhaemoglobin in red blood cells. Surrounding tissue reflects it — creating a high-contrast dark pattern exactly where the veins are.

2 Android Application

The app receives the NIR video stream via a UVC camera library and runs each frame through an OpenCV-powered C++ image processing pipeline via Android JNI — all in real time.

  • Mode 1 Raw NIR — Direct camera output with no processing. Delivers good contrast on light-skinned patients with zero computational overhead.
  • Mode 2 Adaptive Thresholding — Local (mean or Gaussian) thresholding computes an individual threshold per pixel region, dramatically improving vein contrast on any skin tone.
  • Mode 3 Adaptive Threshold + Median Blur — Noise suppression via median filter applied after thresholding, preserving vein edges while removing artefacts.

Safety: An accelerometer-based alarm triggers if the device is flipped upside down, preventing direct NIR LED exposure to eyes.

Architecture & Tech Stack

USB Camera (UVC) ──► libuvccamera (JNI / libuvc) ──► UVCCameraHandlerMultiSurface
                                                             │
                                             ┌───────────────┴───────────────┐
                                             ▼                               ▼
                                      UVCCameraTextureView           ImageProcessor
                                       (live preview)          (OpenGL → JNI / OpenCV C++)
                                                                         │
                                                                         ▼
                                                                 SurfaceView result
                                                           (vein-enhanced image overlay)
Android (Java) C++ / NDK OpenCV 3 OpenGL ES 3.0 JNI Bridge libuvc libjpeg-turbo USB OTG / UVC MediaCodec / MediaMuxer Adaptive Thresholding Median Filter SurfaceView

Master's Thesis — TU München

This project was developed as a Master's thesis in Informatics at the Technische Universität München, Department of Informatics, under the supervision of Prof. Dr. Uwe Baumgarten. The full thesis covers the underlying physics, hardware design, image processing methodology, and clinical validation in detail.

Author: Bakri Bitar Supervisor: Prof. Dr. Uwe Baumgarten Submitted: November 15, 2018
📄  Read Full Thesis ⬡  Source Code