Needle Detector
Project Dates: 6/4/2013 - 12/23/2013
Summary:
Designed a needle detector based on the Hough transform for Philips Healthcare in C++ to isolate a needle and eliminate reflective noise as well as image artifacts from an ultrasound video stream. The implementation was designed to be lightweight so it could be used in real time to assist in invasive procedures such as an ultrasound assisted biopsy or epidural administration.
Additional Details:
During medical procedures when a needle is inserted straight into the body to either obtain a biological sample or inject a drug to an isolated site, the needle is usually oriented in a position close to parallel to the ultrasound transducer. Since the ultrasound beams are not incident to the needle in these procedures, the transducer signal is beam steered to increase the angle of incidence, this increases the visibility of the needle however creates unwanted and often confusing reflections in the ultrasound image.
Algorithm Design:
To eliminate these reflections a filter was created based on the Hough Transform which ranks the linearity of structures in an image and can function as a line detector. The filter was modified to show the full body of the needle which is significantly thicker than a single line. Based on the results from the Hough transform, false positives were filtered out and left only the true needle. The Hough transform processes an image where an edge detection has been performed and so a Sobel edge detector was implemented first. The Sobel edge detector convolved a kernel with each image from the video stream to determine the x and y image pixel gradients. This process shows the pixels locations where there is the greatest change in pixel intensity and filters out pixels from larger more ubiquitous structures which makes the eventual Hough transform significantly less computationally expensive. A gradient image was then written using the sum of the x and the y gradient.
The Hough transform looks at every high valued pixel on the gradient image, representative of the edges and outlines of the original ultrasound image. Every possible line that could go through every high valued pixel in the gradient space is stored in an accumulator space where the image axes are the slope and the slope intercept. The points with highest intensity in the accumulator space correspond to the slopes and the intercepts of the most co-linear lines in the Sobel image. The accumulator space was then filtered to a certain threshold to determine the most co-linear object in the image. The ultrasound image would then only reconstruct the area around the needle based on the Hough transform output.
This algorithm was built and tested in MATLAB then ported and implemented on low end and high end Philips Ultrasound Machines using C++ and optimized using the SIMD libraries.
Image of a needle in a pork roast. The needle and transducer are positioned similarly as to during a biopsy
The beam steered image with noise and needle reflections
The Sobel Edge image
The accumulator space. The areas of brighter intensity have received more votes
The pork roast being scanned with the needle detection feature on