Online Speckle Tracking in Ultrasound Images for Prosthetic Hand Control

Introduction

Ultrasound Image generation
Ultrasound imaging provides a non-invasive and cost effective way to obtain internal images for medical applications and diagnosis of human health. Image generation from ultrasound waves consists of three steps- production of sound waves by piezoelectric transducer, receiving echoes, and formation of image. Strong, short electrical pulses from ultrasound machine make the transducer ring at a desired frequency, which can be anywhere between 2-18 MHz. Then, focussing of sound is done by either the shape of the transducer, lens in front of transducer or a complex set of control pulses from ultrasound machine (also called beamforming), which produces the arc-shaped sound wave from the face of the transducer. Wave enters the body and focuses at a desired depth. The partially reflected sound waves vibrate the transducer; transducer then turns the vibrations into electrical pulses that travel to ultrasound machine where they are processed and transformed into digital image. The ultrasound scanner first determines how long it takes the echo to be received from when the sound is transmitted and then how strong the echo is. Sound wave is not a click, but a pulse of specific carrier frequency. Moving objects change this frequency on reflection, so that it is only a matter of electronics to have simultaneous Doppler sonography. Once the ultrasound
scanner determines these three things, it can locate which pixel in the image to light up and to what intensity, and at what hue if frequency is processed.

Program Description

The program’s block diagram and front panel, shown in Figure 3, tracks the tendon motion through image sequences, and computes and displays the delta x and delta z displacements (in each coordinate) of tendon for all consecutive image frame sequences. This program translates existing Matlab tendon tracking code into a LabView platform for implementation on FPGA. This program makes use of Functions from NI LabVIEW Vision Development Module such as ‘IMAQ AVI Open’, ‘IMAQ AVI Read Frame’, ‘IMAQ Create’ and ‘IMAQ Dispose’ and ‘IMAQ Image to Array’ functions for opening and reading frames from the video recording, creating temporary memory location for each image frame and destroying the image after it has been analysed in order to free the occupied space for the next image to be read and analysed, and extracting the pixel values related to ‘template’ and ‘tempboxes’ from the image sequences into 2D arrays which are then compared for matching. In each while loop iteration, two consecutive frames are read and template-tempbox matching is performed. This process is repeated for all frames sequentially. The program uses SAD (Sum of Absolute Differences) method as similarity measure for matching tempbox with template where firstly every tempbox array in ROI in 2nd frame of each loop’s iteration is subtracted from the template in 1st frame of same loop’s iteration, then sum of absolutes of the pixel values from the subtraction result for each tempbox is computed (each resulting value is the SAD value for each tempbox and is collected, using auto-indexing, into array named ‘SAD’) and then the tempbox with the minimum ‘SAD’ value is computed (using ‘Array Max and Min’ function) in each frames’
comparisons, which is basically the best matched tempbox for the corresponding template in earlier frame. The coordinates of the matched tempbox with minimum SAD value are obtained as well using ‘Array Max and Min’ function in every loop iteration and compared with the coordinates of template to acquire delta x and delta z displacements of tendon through all consecutive frame comparisons. This information is then saved into Excel as a
.csv file using ‘Write to Spreadsheet File.vi’.

Conclusion

Thank you for interest in the blog. Please leave comments, feedback and suggestions if you feel any.

Machine Vision Researcher

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store