# Accurate Needle Localization in the Image Frames of Ultrasound Videos
## 1 Introduction
[23] developed a method for localizing the needle by identifying the bright linear structures in the image using a Gabor filter [24] and Random Sample Consensus analysis [25]. [PERSON] et al. [26] introduced a technique for ultrasound-based needle detection using image thresholding and model-fitting analyses. [PERSON] et al. [27] used a Hessian matrix-based line filter for detecting the needle. [PERSON] and [PERSON] [28] developed a low-complexity formulation of Hough transform to detect the needle at interactive rates. Furthermore, a recent study [29] proposed the use of an adaptive Kalman filter combined with compressive tracking to track the needle tip in ultrasound videos. [PERSON] et al. [30] utilized a deep learning approach to detect the tip of a needle inserted in _ex vivo_ chicken tissue. [PERSON] et al. [31] utilized a UNet-based deep learning model to identify the needle in ultrasound images. The current study presents a new needle detection method (a preliminary version of this study was presented in [32]; the preliminary version briefly describes the capability of utilizing the speckle variations feature and the local phase feature to detect the needle in ultrasound images, along with a limited performance analysis) to improve the localization of the needle in ultrasound videos. The method starts by decomposing the ultrasound video that is acquired during needle insertion into image frames. Each image frame is processed separately in three phases. During the first phase (phase I), the image is processed to extract three feature groups. These feature groups are the speckle variations feature, the local phase feature, and the Gray-Level Co-Occurrence Matrix (GLCM) texture features. The speckle variations feature quantifies the variations in ultrasound speckle patterns that are induced around the inserted needle. The local phase feature enables intensity-invariant detection of edges that align with the orientation of the needle. Furthermore, the GLCM texture features quantify the pixel gray-level statistics. The extracted features are processed using a machine learning classifier to generate a quantitative ultrasound (QUS) image. The QUS image characterizes the pixels associated with the needle and hence facilitates the task of detecting the needle region. During the second phase (Phase II), Radon transform (RT) is applied to the QUS image to identify the region of interest (ROI) containing the needle. In the third phase (Phase III), the ROI is processed to accurately localize the needle trajectory and tip. The localization of the needle trajectory is achieved using a customized Ranklet transform (RanT) kernel [33], which is specifically designed to detect the needle, followed by RT analysis. In addition, the needle tip is identified using a sliding window procedure that quantifies the ultrasound speckle variations along the detected needle trajectory. The performance of the proposed method was assessed by detecting the needle trajectory and tip in the image frames of ultrasound videos acquired during _ex vivo_ and _in vivo_ needle insertions. The primary contributions of this study are as follows:  
* This study introduces a new method that effectively detects the needle in the image frames of ultrasound videos acquired during ultrasound-guided needle procedures. This method includes innovative contributions to enhance needle detection, including the use of the speckle variations feature to detect ultrasound speckle variations associated with needle insertion, and the customized RadT kernel that is specifically designed for detecting the needle trajectory. * The proposed needle detection method does not require altering the workflow of the intervention or using external needle tracking devices. * The performance of the proposed method was assessed using _ex vivo_ and _in vivo_ ultrasound video datasets. The rest of this paper is structured as follows. Section 2 outlines the proposed method. The results are provided in Section 3. In Section 4, the discussion and conclusions are presented.