Design and Development of Machine vision based Vein Finder
Intra-venous drug injection is very common and among the four error types(wrong intravenous rate, mixture, volume, and drug incompatibility) accounted for 91.7% of errors. Wrong injection rate was the most frequent and acc
2025-06-28 16:31:24 - Adil Khan
Design and Development of Machine vision based Vein Finder
Project Area of Specialization Mechatronics EngineeringProject SummaryIntra-venous drug injection is very common and among the four error types(wrong intravenous rate, mixture, volume, and drug incompatibility) accounted for 91.7% of errors. Wrong injection rate was the most frequent and accounted for 95 of 101 serious errors. This can be prevented if the injection is inserted properly in the subcutaneous veins. Now a days quite expensive vein finding devices are used to locate the right vein.

Aim of proposed system is to design a Low Cost Machine Vision based Vein Finder to distinguish between subcutaneous network of vascular bundles. Image processing is used to help the medical staff to increase their diagnosis accuracy.
Image processing is a method to perform some operations on an image, in order to get an enhanced image or to extract some useful information from it. It is a type of signal processing in which input is an image and output may be image or characteristics/features associated with that image. Nowadays, image processing is among rapidly growing technologies. It forms core research area within engineering and computer science disciplines too.
Python( a programming language) will be used for sequencing the capturing of the image, then perform image processing( which includes otsu thresholding and median filtering) to locate a specific vein in the region of interest.

So far initial experimentation has been performed to test the proposed method for vein accurate identification.
Raspberry Pi will be the platform for all the programming and also the core hardware for the project.
Project ObjectivesOur aim is to develop a Low-Cost Machine Vision based Vein Finder. In order to achieve this aim, few objectives are set, which are as following:
- To provide efficient drug delivery by detecting the sub cutaneous veins.
- To provide ease to clinicians in successful and accurate inter-venin drugs delivery.
- To develop low cost and user-friendly drug delivery system for clinical practices.
The whole project will be implemented via three crucial stages:
- Image Capture using NIR( near infrared) technique.
- Image enhancement and noise removal for feature extraction.
- Accurate vain identification for drug delivery.
These three steps can be further clarifed by the following block diagram:

Near infrared light can penetrate into the biological tissue up to 3mm depth. The deoxygenated blood absorbs more of infrared radiation than the oxygenated blood and the surrounding tissue, so it enhances the contrast of blood veins in the image acquired. An IR camera with an IR flash is ideal for acquiring the vein pattern of the desired body part. It can filter out light of wavelengths less than that of the infrared light used. It consists of a camera, IR leds and a laser diode. An intensive processing of image is required, for which an imaging processing tool, OpenCV will be used. The microprocessor chosen for this is the Raspberry Pi 4 Model B, which has Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz, a Camera Interface (CSI) and a 4GB LPDDR4-3200 SDRAM which supports image processing at reasonable speeds. The prototype consists of a set of motors, sensors and a relay module that conveys the information between various inputs and outputs of the system. Example is shown in the images below:


The overall benefits of this project are listed below:
- Due to the accurate vein detection and vein pointing, the drugs of extreme sensitivity can be delivered very efficiently and easily.
- The device will serve the humainty by relieving them from the disasters of multiple vein puncturing due to in correct IV ( intra-venous) injections.
- As the device will be available on a very low cost, it will be easily affordable to every laboratory in Pakistan.
- It will be very easy to operate. The user just has to turn the power button On and the rest of the work will be done by the device itself.
- As most of the injections are delivered by the nurses, mostly in the absense of the doctor, it will be very easy for them to collect blood samples etc.
The technical details of the project can be detailed as:
- The material for manufacturing the case will be plastic (PVC) and acrylic.
- The dimensions of the device will be:
-
- length 40.53cm
- height 7.60cm
- Width 25.53.
- The CAD design is given below. The units are in mm but the units in actual model will be in centimetre (cm).

- The Raspberry Pi 4 model B which will be used has the following specifications:'
- Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
- 1GB, 2GB or 4GB LPDDR4-3200 SDRAM (depending on model)
- 2.4 GHz and 5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.0, BLE
- Gigabit Ethernet
- 2 USB 3.0 ports; 2 USB 2.0 ports.
- Raspberry Pi standard 40 pin GPIO header (fully backwards compatible with previous boards)
- 2 × micro-HDMI ports (up to 4kp60 supported)
- 2-lane MIPI DSI display port
- 2-lane MIPI CSI camera port
- 4-pole stereo audio and composite video port
- H.265 (4kp60 decode), H264 (1080p60 decode, 1080p30 encode)
- OpenGL ES 3.0 graphics
- Micro-SD card slot for loading operating system and data storage
- 5V DC via USB-C connector (minimum 3A*)
- 5V DC via GPIO header (minimum 3A*)
- Power over Ethernet (PoE) enabled (requires separate PoE HAT)
- Operating temperature: 0 – 50 degrees C ambient.
- The dual shaft metal gear servo motors that will be used have the following specs:
| Specification | 4.8V | 6.0V | 7.4V |
| Idle Current ( at stopped ) | 4.85mA | 7mA | 8mA |
| No load Speed | 0.18sec/60* | 0.16sec/60* | 0.14sec/60* |
| Running current ( at no load ) | 160mA | 190mA | 230mA |
| Torque | 14kg.cm | 16kg.cm | 18.2kg.cm |
| Stall Current | 1200mA | 1500mA | 1900mA |
- The camera used will be Raspberry Pi Camera 8 MegaPixel V2.
| Elapsed time in (days or weeks or month or quarter) since start of the project | Milestone | Deliverable |
|---|---|---|
| Month 1 | Proposal Writing and Defense | Proposal Reports |
| Month 2 | Literature Review | Report |
| Month 3 | CAD Designing | Design |
| Month 4 | CAD Designing | Design |
| Month 5 | Fabrication | Purchasing & Assembling |
| Month 6 | Finalizing | Purchasing & Assembling |
| Month 7 | Prototype | Testing |
| Month 8 | Prototype | Testing |
| Month 9 | Thesis Submission | Thesis Submission |
| Month 10 | Thesis Submission | Thesis Submission |