# Sobel edge detection for quantifying the effectiveness of focused ultrasound thalamotomy for tremor relief

Vered Aharonson, Michiel Postema, Robyn Gebbie, Jesse van der Merwe, Ilana Schlesinger

► To cite this version:

Vered Aharonson, Michiel Postema, Robyn Gebbie, Jesse van der Merwe, Ilana Schlesinger. Sobel edge detection for quantifying the effectiveness of focused ultrasound thalamotomy for tremor relief. Current Directions in Biomedical Engineering, 2023, Proceedings of the 57th Annual Meeting of the German Society of Biomedical Engineering (26 – 28 September 2023, Duisburg), 9 (1), pp.17-20. 10.1515/cdbme-2023-1005. hal-04215115v2

HAL Id: hal-04215115

https://hal.science/hal-04215115v2

Submitted on 29 Sep 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
<figure><img src="image_2.png" /></figure>

Vered Aharonson*, Michiel Postema, Robyn Gebbie, Jesse Van Der Merwe, and Ilana Schlesinger

# Sobel edge detection for quantifying the effectiveness of focused ultrasound thalamotomy for tremor relief

https://doi.org/10.1515/cdbme-2023-1005

**Abstract:** Focused ultrasound on the thalamus is employed to relieve tremor in movement disorders. The treatment efficacy is currently assessed by subjective observation of patient tremor during hand movements. The purpose of this study was to create a simple quantitative method to assess tremor based on traditional pen-and-paper spiral drawing that could be employed during treatment and follow-up visits. Image processing was employed to automatically and rapidly clean scanned spiral and line drawings and to isolate the minimal part of the drawing that could provide sufficient data for tremor detection. Sobel edge detection and easily-interpretable statistics of the distribution of edge-angle orientations in the spirals relative to the spiral centres were used as tremor measures. The method was applied to scanned drawings of 122 tremor patients before treatment and in follow-up visits. Discrimination analysis of the tremor measure between drawings in the session before treatment and the follow-up sessions was carried out. The processing yielded correctly cropped and clean spirals. The tremor measure demonstrated consistent tremor reduction in the treated hand drawings in all five follow-up visits during the first year following treatment date in 76 patients from the study cohort. In this study we developed a computational method that rapidly computed tremor severity estimate in an explainable and clinically useful manner from a traditional pen-and-paper spiral drawing. This rapid quantitative and objective tremor assessment can easily be implemented

during focused ultrasound treatment and replace the subjective assessment currently employed.

**Keywords:** Parkinson's disease, essential tremor, thermal lesion, unilateral ablation, FUS.

## 1 Introduction

Focused ultrasound thalamotomy is a noninvasive treatment for tremor in Parkinson's disease and essential tremor [1]. The treatment is done by directing ultrasonic beams to the thalamus through a helmet-like focused ultrasound transducer in an MRI machine. The beams heat the tissue and create unilateral ablation on targeted brain zones responsible for the communication of sensory and motor signals and interrupt abnormal brain activity [2]. The titration of the sonication peaks is manually adjusted according to subjective visual assessment of hand-tremor reduction [3]. Quantitative, objective and rapid tremor measurements that can be applied during the procedure may enhance treatment decision regarding targeting and heating. Hand-tremor assessment in clinics usually employ hand-drawing of Archimedes spirals and straight lines [4] [5]. Drawing these shapes requires a single continuous pen motion and thus emphasise abnormal trajectories and capture the frequency, amplitude and direction of a tremor [5]. Existing instrumentation that administer this assessment can provide quantitative measurements, but are not applicable in focused ultrasound treatment scenario due to electrical interference in the MRI. The analysis of traditional pen and paper drawings employed a wide array of image processing methods including machine learning ones, which are complex and slow for computation in this scenario [6]. Sobel edge detection is indicated as both fast and sensitive to uneven and low quality lines which are prevalent in tremour drawing [7]. No previous study used hand drawings to computationally evaluate focused ultrasound treatment efficacy.

Our method reverts to traditional pen and paper drawings that are rapidly scanned and seeks accurate, fast and explainable tremor descriptors.

*Corresponding author: Vered Aharonson, School of Electrical and Information Engineering, University of the Witwatersrand, Johannesburg, 1 Jan Smutslaan, Braamfontein 2050, South Africa and University of Nicosia Medical School, Nicosia, Cyprus, e-mail: vered.aharonson@wits.ac.za

Michiel Postema, BioMediTech, Faculty of Medicine and Health Technology, Tampere University, Tampere, Finland and School of Electrical and Information Engineering, University of the Witwatersrand, Johannesburg, Braamfontein, South Africa

Robyn Gebbie, Jesse Van Der Merwe, School of Electrical and Information Engineering, University of the Witwatersrand, Johannesburg, Braamfontein, South Africa

Ilana Schlesinger, Department of Neurology, Rambam Medical Center, Haifa, Israel

<figure><img src="image_3.png" /></figure>
## 2 Materials and methods

<figure><img src="image_4.png" /><figcaption>**Fig. 1:** Methodology demonstrated on a scan of patient 5 drawings: text and line-drawing area identification in green and line area distortion correction in orange (a), cropping of a spiral area, corrected for rotation and distortion (b), denoising of the spiral area and computation of θ, denoted in the blue line, from the pixel gradient in orange and the angle from its radius to the spiral centre in green (c).</figcaption></figure>

The study included 34 Parkinson's disease patients and 88 essential tremor patients from the Rambam Medical Center, Haifa, Israel (IRB 4040-17). The focused-ultrasound treatment procedures were performed in a 3-T magnetic resonance imaging system (GE Medical Systems, Milwaukee, WI, USA) using an ExAblate Neuro 4000 device and a silicon frame (InSightec, Tirat Hacarmel, Israel). A magnetic resonance-compatible stereotactic frame (Integra Radionics, Burlington, MA, USA) immobilised the patient head. The heat-

ing was continuously measured using magnetic resonance-thermometry. The temperature was gradually increased to reach 45–50°C and the target site was repositioned as necessary according to the clinical status, the patients’ feedback, and adverse effects. The sonication was then increased to reach a tissue temperature range of 57°C in repeated peaks of 10–39 second duration. Each sonication peak was followed by a subjective visual inspection of the patient tremor and an assessment of adverse effects such as speech dysfunction [8].

Drawing tests were performed before treatment and in multiple follow-up sessions after treatment. The patients were requested to draw two Archimedean spirals and three straight lines on a paper template, as shown in Figure 1a. The patients drew two templates, one for each hand. The dataset included patients with at least 5 follow-up drawings after treatment. On each template, the administrating personnel marked the hand used for drawing, left or right, and the patients identification code. The templates were rapidly scanned using a low-cost scanner in 300DPI resolution, to simulate an affordable testing scenario. The scans were saved on a disk using a patient and session identification code. The scanned dataset was accompanied by an anonymised spreadsheet containing information for each scan. The information included the drawing date and time, hand dominance, treated hand and treatment date.

All analysis stages were implemented in Python, using the OpenCV image processing package. Visual inspection of the scans found human-induced errors, such as patient and/or physician marking on the page and scanning artefacts such as rotation and pixelisation. A squared area consisting of each spiral in the template was estimated using its relative location from the three text areas: “Drawing A”, “Drawing B” and “Drawing C”. The text areas were identified using a text detection algorithm [9] as shown in Figure 1a. A correction layer was added to the algorithm to determine if the coordinates of a candidate text match the expected three positions in the template. Missing text areas was estimated by its relative position to the detected text areas. Scans where two or more text areas could not be identified, or where text positions were significantly different from their expected locations in the template, were discarded. The coordinates of the four solid black lines under “Drawing C” were identified. The deviation of the shape formed by these coordinates from a rectangle parallel to the scanned paper edge was used for a correction of rotation and distortion of spiral areas in the scan. The areas of spiral A and spiral B were cropped, converted to greyscale as illustrated in Figure 1b. A non-local means denoising filter [10] removed scanning noise. The spiral images were uniformly resized to a 500×500 pixels. All images were visually examined to detect cropping errors and remaining noise and distortions. Tremor was observable in the drawings by the irregular angle changes compared to the continuous smooth spiral line, as exemplified
<figure><img src="image_5.png" /><figcaption>**Fig. 2:** Spiral drawing of patient #13 before treatment (a), one week after treatment (b), one month after treatment (c), three months after treatment (d), six months after treatment (e), and twelve months after treatment (f).</figcaption></figure>

in Figure 1c. A mathematical description of these angles is the difference between the line gradient and the its azimuth to the spiral centre, for each pixel in the image. Sobel edge detection was applied to find the gradient from light to dark, in the direction of the largest increase, for each edge in the image. Two 9×9 Sobel filters and y were convolved with the image to calculate the horizontal and vertical gradients of each edge, and the edge gradients were converted to angles. The azimuth of each pixel coordinates from the spiral centre was computed. The relative orientation angle of the pixel, θ, is the subtraction of this azimuth angle from the edge angle. As the template is similar to all input drawings, it was removed in the analysis and not included in the pixel gradient and azimuth computation. Figure 1c and (1) describe and illustrate the computation of θ:

$$ \theta = \arctan \left( \frac{S_x * I}{S_y * I} \right) - \arctan \left( \frac{y - C_y}{x - C_x} \right), \quad (1) $$

where θ is the relative orientation (blue angle in Fig. 1c) of a pixel edge (orange line in Fig. 1c) to its radius azimuth (green line in Fig. 1c). The first term of the equation entails the Sobel filters Sx and Sy that are convolved with the image I and produce the gradients in the vertical-numerator and horizontal-denominator directions, respectively. The second term entails the pixel coordinates x and y distances from the spiral centre coordinates Cx and Cy. The angles θ constituted the feature-set of our study. The pattern portrayed by this feature set was analysed statistically. Histograms of θ over all pixels in the spirals drawn by the patient were calculated as shown in Figure 3. The standard deviation of the distributions estimated by the histograms was calculated and denoted θSD.

The methodology was applied to the scans of each patient in six sessions: before treatment, one week after treatment, and 1, 3, 6, and 12 months after treatment.

## 3 Results

Figure 2 demonstrates the cropped and cleaned spirals drawn by a patient before treatment (frame a) and in the five followup session (frames b–f) after treatment. Figure 3 portrays the dis-

<figure><img src="image_6.png" /><figcaption>**Fig. 3:** Histograms of θ in patient #13 spiral drawing, before and a week after treatment.</figcaption></figure>

tributions of θ before and a week after treatment for this patient. The histogram after treatment is clearly narrower. The standard deviations were 0.64 and 0.15 for the before and after treatment histograms, respectively. Figure 4 portrays the average ratio of θSD in the baseline to θSD in the five follow-up tests of all patients. Figure 5 displays the percentage of patients in the cohort for whom the proposed criterion of θSD greater than 1 was fulfilled, for each of the follow-up sessions.

## 4 Discussion

Currently tremor assessment during focused ultrasound thalamotomy is performed by subjective visual observations. There is an unmet need for repeated objective assessments during treatment in an MRI environment. Digital apparatus and machine-learning analyses are lengthy, costly and complex to both clinicians and patients. Using traditional scanned paper drawings and a simple, fast analysis we were able to address these limitations. Our preprocessing method was able to clean the drawings from human- and scanner- induced noise and artefacts and to accurately isolate single spiral drawings. This step is crucial as scanning could be performed using mobile devices or inexpensive scanners. Our subsequent analysis offered an interpretable tremor pattern recognition in the spiral drawing. The analysis provided a tremor reduction criterion, based on drawing angle orientations. This criterion demonstrated consistent values across all follow-up sessions in 76 percent of the patients. This explainable quantitative and simple criterion was different from the clinicians subjective visual observations the patients accounts, which implied tremor reduction in 90 percent of the patients. This difference cold be due to a bias of the clinicians. On the other hand, the underestimation of tremor reduction in our analysis can
<figure><img src="image_7.png" /><figcaption>**Fig. 4:** The ratio of θ<sub>SD</sub> before treatment to after treatment for the five consecutive follow-up sessions of patient #13 hand drawings.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**Fig. 5:** The percentage of patients for whom the ratio of θ<sub>SD</sub> before treatment to follow-up sessions was larger than 1.</figcaption></figure>

stem from the aim of this preliminary analysis to be as rapid
and simple as possible, and hence the decision to employ a
single, explainable feature. Future work will include manual
assessment of all drawings and their comparison to the auto-
mated image analysis. Additional analysis will incrementally
add features which previously demonstrated sensitivity and
specificity in movement disorders classification [6]. The ana-
lysis will examine which subset of these features best explain
the manual tremor rating of the drawings. We aim to use our
system in real-time treatments with focused ultrasound.

5 Conclusions

Our method offers a preliminary simple quantitative analysis
that could be employed repeatedly during focused ultrasound
treatment and assess its efficacy.

Author Statement

Research funding: This research was partially funded by a private donation of Avi and Ziva Bittan. Conflict of interest: Authors state no conflict of interest. Ethical approval: The research related to human use complies with all the relevant national regulations, institutional policies and was performed in accordance with the tenets of the Helsinki Declaration. Ethical clearance for human use was obtained from the Rambam Medical Centre Review Board (clearance certificate no. 4040-17). Ethical clearance for use of the patient dataset was obtained from the Human Research Ethics Committee (Medical) of the University of the Witwatersrand, Johannesburg (clearance certificate no. M220883). This manuscript was written without the aid of artificial intelligence.

References

[1] Zaaroor M, Sinai A, Goldsher D, Eran A, Nasser M, Schlesinger I. Magnetic resonance-guided focused ultrasound thalamotomy for tremor: a report of 30 Parkinson's disease and essential tremor cases. J Neurosurg 2017;128:202-210.

[2] Schlesinger I, Sinai A, Zaaroor M. MRI-guided focused ul-
trasound in Parkinson's disease: a review. Parkinsons Dis
2017;2017:8124624.

[3] Martínez-Fernández R, Matarazzo M, Máñez-Miró JU, Obeso JA. The role of focused ultrasound in the management of movement disorders: insights after 5 years of experience. Mov Disord Clin Pract 2021;8:681-687.

[4] Saunders-Pullman R, Derby C, Stanley K, Floyd A, Bressman S, Lipton RB, Deligtisch A, Severt A, Yu Q, Kurtis M, Pullman SL. Validity of spiral analysis in early Parkinsons' disease. Mov Disord 2008;23:531-537.

[5] Alty J, Cosgrove J, Thorpe D, Kempster P. How to use pen and paper tasks to aid tremor diagnosis in the clinic. Pract Neurol 2017;17:456-463.

[6] Seedat N, Aharonson V, Schlesinger I. Automated machine vision enabled detection of movement disorders from hand drawn spirals. Proc IEEE Int Conf Healthcare Informatics (ICHI) 2020:1-5.

[7] Ahmed AS. Comparative study among Sobel, Prewitt and Canny edge detection operators used in image processing. J. Theor. Appl. Inf. Technol 2018;96(19):6517-6525.

[8] Sinai A, Katz Y, Zaaroor M, Sandler O, Schlesinger I. The role of the anesthesiologist during magnetic resonance-guided focused ultrasound thalamotomy for tremor: a single-center experience. Parkinsons Dis 2018;2018:9764807.

[9] Zhou X, Yao C, Wen H, Wang Y, Zhou S, He W, Liang J. EAST: an efficient and accurate scene text detector. Proc 2017 IEEE Conf Computer Vision and Pattern Recognition (CVPR) 2017:2642-2651.

[10] Buades A, Coll B, Morel JM. Non-local means denoising. Image Process Line 2011;1:208-212.