## Abstract

Measurement of changes in arterial vessel diameter can be used to assess the state of cardiovascular health, but the use of such measurements as biomarkers is contingent upon the accuracy and robustness of the measurement. This work presents a simple algorithm for measuring diameter from B-mode images derived from vascular ultrasound. The algorithm is based upon Gaussian curve fitting and a Viterbi search process. We assessed the accuracy of the algorithm by measuring the diameter of a digital reference object (DRO) and ultrasound-derived images of a carotid artery. We also assessed the robustness of the algorithm by manipulating the quality of the image. Across a broad range of signal-to-noise ratio and with varying image edge error, the algorithm measured vessel diameter within 0.7% of the creation dimensions of the DRO. This was a similar level of difference (0.8%) to when an ultrasound image was used. When SNR dropped to 18 dB, measurement error increased to 1.3%. When edge position was varied by as much as 10%, measurement error was well maintained between 0.68 and 0.75%. All these errors fall well within the margin of error established by the medical physics community for quantitative ultrasound measurements. We conclude that this simple algorithm provides consistent and accurate measurement of lumen diameter from B-mode images across a broad range of image quality.

- digital reference object
- phantom
- wall tracking
- edge detection

## NEW & NOTEWORTHY

This study describes a relatively simple algorithm that accurately measures the diameter of arteries from B-mode images. The simplicity of the algorithm allows it to be easily modified for specific applications. Moreover, we apply use of digital reference objects (DROs) in place of physical phantoms. This allows the characteristics of the image to be manipulated, with precision, to determine the robustness of the algorithm.

cardiovascular diseases are the leading cause of death in the world (25). Atherosclerosis underlies most cardiovascular disease (1), and impaired endothelium-dependent dilation is considered early evidence of atherosclerosis. In humans, endothelium-dependent dilation is typically determined noninvasively using flow-mediated dilation. This technique involves acquiring images of blood vessels during normal and hyperemic blood flow using transcutaneous ultrasound. Measurement of lumen diameter from the ultrasound images is either done manually (4) or using commercial or custom software (10, 12, 14, 20). Manual determination of vessel diameter using digital calipers is time-consuming and open to a high degree of subjectivity. Thus computer algorithms have been developed to more quickly and more objectively measure vessel diameter (6, 9, 12, 17, 22). Typically, assessment of an algorithm has been limited to its accuracy. Accuracy is usually assessed by comparing diameters determined by an algorithm to a known diameter (by utilizing a phantom) or to diameters determined by a previously used approach. Most studies report a measurement error between 0 and 2% (16, 23). However, it is unclear how robust these algorithms are to the inherent noise and error contained within the images. Artifacts that distort lumen measurements can be caused by variations in ultrasound settings and data processing, as well as data collection techniques (19). Other artifacts depend on the acoustic properties of an individual's tissues (21). Thus, while an algorithm may be accurate when used on optimal B-mode images from humans or synthetic phantoms, it is not typically reported how the accuracy is affected by decreased signal-to-noise ratio or increased acoustic artifact.

We have previously used an early piece of commercial software that employed a series of user-selected points for each wall, which were interpolated into a pair of parabolic curves (13, 14). The distance between curves was used to determine vessel diameter (22). However, analysis was cumbersome, requiring manual frame-by-frame edge tracking, and so a more simplistic algorithm has been developed with the intent of being both accurate and robust. The algorithm takes a straightforward approach using signal-processing methods to account for signal noise and apparent multiple wall positions due to image artifact. The aim of this study was to quantify the accuracy of this algorithm in measuring lumen diameter using a digital reference object that mimics a B-mode image of an artery. The advantage of this approach is that we were able to alter the signal-to-noise ratio and introduce an edge error to quantify how imaging artifacts affect accuracy.

## MATERIALS AND METHODS

#### Construction of digital reference object (DRO).

Digital reference objects, or “phantoms,” were created in MATLAB and its Statistics Toolbox Release 2012a (The MathWorks, Natick, MA) with the goal of producing an image that mimics the physiology of interest, with the option to control the signal-to-noise ratio (SNR) and edge error. Because information density of an image is intrinsically a function of image resolution, which can then be converted to physical distance using a calibration factor, we considered the measurements of interest in terms of pixels. An adventitia-to-adventitia distance of 170 pixels was used. Gaussian line shapes were computed to form an overall line profile that represented the intima, media, and adventitial layers, as shown in Fig. 1. The width and relative heights of the line shapes were chosen on the basis of experience in working with images acquired in other studies on humans.

To create images with known SNR, the standard deviation of the desired noise to be added to the line shape was calculated as
(1)where σ is the standard deviation of the noise, *S*_{RMS} is the root-mean-square amplitude of the input line shape, and *SNR* is the desired signal-to-noise ratio, in decibels (dB). The noise was computed to be the product of the standard deviation and a number pseudorandomly generated according to a normal distribution. The random number generator was seeded each time an image was created, based upon the current time. Finally, the noise was added to the signal as depicted in Fig. 1*B*. A total of five levels of SNR were used (as depicted in Fig. 3).

To create images of known edge error, random numbers of mean zero with standard deviation of 1, 5, and 10% of the intima-media thickness were generated, designated *r*_{IMT}. Next, a random number was generated between 5 and 20, designated as *r*_{width}. Starting from the left of the image, this number was used to determine how many columns of line profiles would be shifted by *r*_{IMT}. The effect of edge error on line profiles is shown in Fig. 1*C*. The process was repeated until a complete image was created as depicted in Fig. 2. Images for every combination of SNR and edge error were created 100 times and combined to create image sets, i.e., videos, of 100 replicate images.

Additionally, to assess the algorithm's performance across a range of diameters, the diameter of the DRO was allowed to vary in such a manner as to mimic a cardiac cycle based on previously published data (13). Each cardiac cycle encompassed 30 images, and a sequence of 90 images was made to mimic 3 consecutive cardiac cycles. Image sets of varying SNR and edge error were constructed.

#### Algorithm.

The algorithms for image processing were implemented by custom-written scripts and functions in MATLAB. Calculation of lumen diameter begins by taking the sum of the intensity values for each row of pixels within a user-defined region of interest. These are used to create a line profile for each frame. A convolution (18) using a Hamming window (18) is applied to this line profile to reduce noise and emphasize the significant features of the image. An expectation-maximization algorithm (3) searches for local maxima and minima in the first derivative of the line profile as candidate locations for the walls. Because some of these local maxima and minima are due to acoustic scattering or noise in the lumen, a Viterbi search (3) selects certain points on the basis of the brightness of the image at those points, the distance from the center of the image, and the distance from the locations of candidate points in adjacent frames. This image-processing algorithm was applied to all frames in the image sets of the combinations of SNR and edge error, as well as the image set created to mimic the cardiac cycle.

Although the use of DROs is more commonplace in the medical physics community, it is still novel within the physiology community. Therefore we also collected 100 images of a common carotid artery using a Mindray M7 ultrasound machine using a linear array 14-MHz transducer (Mindray North America, Mahwah, NJ). The images were simultaneously stored on the ultrasound hard drive for analysis using the digital calipers provided by the resident software, and images were stored on another computer for offline analysis using our algorithm.

#### Data analysis.

The accuracy (±1.5% from criterion value of 170 pixels) (8) of the algorithm was determined by comparing the adventitia-to-adventitia distance determined using the algorithm to the known distance of the digital phantom with a SNR of 100 and edge error of zero. The robustness of the algorithm was characterized by determining the level of SNR and edge error required to rapidly decrease the accuracy. To assess the algorithm's ability to accurately track edges and measure diameters across a physiological range, we determined the difference between the measured and known diameters throughout the video mimicking the cardiac cycle. The level of agreement between algorithm and digital caliper measurements of ultrasound-derived images of the common carotid artery was determined from the correlation coefficient in combination with an ordinary least products regression (15). The least products regression assumes error in both the algorithm and caliper-derived measurements. The slope and intercept provide an index of proportional and fixed bias, respectively.

## RESULTS

The mean diameter measurement across all levels of SNR and edge error was 168.6 ± 0.4 pixels. Given that the diameter of our DRO is 170 pixels, this represents an error of 0.8 ± 0.2%. As depicted in Fig. 3, the accuracy is well maintained at SNR of 37.28, 61.05, and 100 dB, with measurement errors of 0.7, 0.7, and 0.6%, respectively. Measurement error increases slightly at SNR of 22.76 dB (1.0%) and 18.0 dB (1.3%). This small effect of SNR was relatively constant across a range of diameters as depicted in Fig. 4.

The effect of edge error was variable. Measurement error was highest with no edge error (mean error across all levels of SNR = 1.2 ± 0.08%). Edge errors of 1, 5, and 10% were associated with measurement errors of 0.68 ± 0.08%, 0.75 ± 0.26%, and 0.72 ± 0.45%, respectively.

For the ultrasound image analysis, the mean diameter as derived from digital calipers was 6.51 ± 0.14 mm. The mean diameter as derived from our algorithm was 6.46 ± 0.12 mm. As depicted in Fig. 5, both measures were strongly associated, with no proportional bias, but a small fixed bias of ∼0.8%.

## DISCUSSION

We directly evaluated both the accuracy and robustness of a relatively simple algorithm developed to measure lumen diameter. Using a digital reference object, with a known wall-to-wall distance, we found the measurement error SNR = 100 dB of −0.5%. When SNR was decreased, the accuracy was well maintained down to 37 dB, after which it declined somewhat. Accuracy was also well maintained with increasing edge error up to 10%. When both SNR was decreased and edge error was increased, accuracy was well maintained across a broad number of combinations of noise and error. On the basis of these findings, we believe this simple algorithm provides a measurement of lumen diameter with accuracy similar to previously evaluated, more complex algorithms. Moreover, this algorithm is robust with regard to signal noise and variations in edge quality that can occur because of the echogenic qualities of the tissue and signal processing.

Previous studies that have evaluated the accuracy of algorithms designed to measure lumen diameter and/or intima-media thickness have reported accuracies between 0.001% (16) and 1.7% (23). Across the range of SNR and edge error used in this study, the algorithm tested in this study underestimated diameter by ∼1.3%. This is within the recommended ±1.5% error for medical imaging (8). Moreover, when only SNRs above 23 dB are considered, the mean error is 0.7%. Thus this algorithm provides a stable and accurate measure of lumen diameter suitable for both absolute diameter measurements as well as changes in diameter, such as when used to characterize arterial distensibility or flow-mediated dilation. It is of note that our algorithm displayed a negative bias compared with the expected dimension of the DRO.

This fixed bias was confirmed when we compared the results of our algorithm to diameters measured using digital calipers. This could be due to two factors. First, when features of interest are created in digital images from functions, such as the Gaussian function in this work, pixelation can occur so that the actual distance between the near and far walls was slightly less than the intended 170 pixels. Second, our algorithm uses a Gaussian function to fit the edges. This particular curve may not fit the edges as precisely as possible, resulting in a fixed underestimation of edge position. Future work using this algorithm may need to include other curve functions so as to maximize fit and minimize bias.

Previous algorithms have been evaluated using several different approaches. Some researchers have compared their algorithm measurement with measurements derived from digital calipers (7, 12, 17, 22, 23). Others have compared their algorithm with a previously used algorithm (16). Still others have used physical phantoms to compare their algorithm with a known measurement (5, 9, 24). While the latter approach avoids comparing an “objective” measure with a more subjective one, all three approaches evaluate images that contain unknown, or at least unreported, amounts of noise (echogenic backscatter) as well as artifact from ultrasound settings. Thus the accuracy of these algorithms could be greater or worse than reported. We chose to use a so-called “digital phantom” in which we could control not only the lumen diameter with very high precision but also the SNR and edge error associated with the echogenic characteristics of the tissue as well as differences in signal processing and the skill of the ultrasonographer.

Our digital phantoms could be viewed as artificial, in the sense that they are not actual B-mode images. First, one must understand that the algorithm does not interact with the B-mode image per se, but rather, the image is reduced to whiteness values, typically between 0 and 255, for each pixel, and these values are stored in a matrix. The algorithm then performs its allocated functions using the data in the matrix. The algorithm will treat a given value or string of values the same regardless of whether it comes from a B-mode image generated by the software of an ultrasound machine or by the software on an office computer. Second, “actual” B-mode images generated by an ultrasound machine will contain noise that can be inconsistent from image to image. For example, images from human subjects contain noise resulting from the echogenic properties of the tissue (11). Moreover, the characteristics of the image to the same artery can be altered by modifying the algorithm used to generate the B-mode images. For example, decreasing the compression reduces the range of brightness values assigned to the acoustic signal. Thus the edges get “smoothed.” This may lead to an increase in the measured diameter. Increasing the persistence will also result in smooth edges because of frame averaging. While this results in better-looking images, this apparent reduction in noise is the result of a loss of both signal and noise. This problem can be overcome by having consistent ultrasound settings. However, many studies either do not report their settings or simply state that the ultrasound settings were adjusted to optimize image quality. From a clinical perspective, this might be entirely appropriate, but in a research setting where changes of 0.00001 m can be significant, this alone can result in measureable differences in diameter. We attempted to maximize the fidelity of our DRO by basing our image on an actual B-mode image. In addition, we constructed a series of images that mimicked a single cardiac cycle. This allowed us to evaluate the accuracy of the algorithm across a wide range of diameters. In addition, by constructing an idealized image, we could test the accuracy of the algorithm independent of artifact. Moreover, this allowed us to both precisely quantify the lumen diameter and control SNR and edge error, providing the opportunity to easily examine the robustness of the algorithm. We believe the advantages far outweigh any perceived lack of generalizability to actual B-mode image analysis.

The robustness of an algorithm refers to its ability to provide accurate measurements even when image quality is compromised. Using a digital phantom, we were able to control both the SNR and the smoothness of the edges of the arterial wall (edge error). This allowed us to precisely quantify the robustness of the algorithm. We found that the algorithm was very robust, both in regard to decreased SNR and edge error. In fact, when characterized together, the algorithm provided stable, accurate measures across 67% of the total combined area tested. Cinthio et al. reported that altering the width of the region of interest (ROI) had little effect on their algorithm's measurement of arterial diameter and thus deemed their algorithm “robust” (5). However, the stability of measurements across varying ROI widths may reflect the stability of the edge position of the image (high image quality) rather than the robustness of the algorithm. Thus, to our knowledge, our study is the first to provide a quantitative measurement of robustness. It would be advantageous in future work to at least report SNR, if not variability in edge position, for images used for validation.

In clinical practice, as well as research, it is common practice to use preset values for numerous software settings, including depth and zoom, when imaging. Our use of a single DRO could be likened to using a single depth and zoom setting. Thus it cannot be ruled out that the accuracy of our algorithm could be affected by using different depth and zoom settings. This is unlikely, given that our algorithm demonstrated a constant accuracy over a range of diameters. Future studies, however, should account for different depth and zoom settings just as we have accounted for SNR and edge error when determining the accuracy and reliability across a wide range of image quality and scale.

The relatively simple algorithm tested in this study produced lumen diameters that were consistently 0.7-1.3% less than the known lumen diameter of our digital reference instrument. Moreover, the algorithm produces accurate measurements on images with significant noise and highly variable edge positions. Thus this algorithm is both accurate and quite robust to differences in image quality.

## GRANTS

H. M. Whitney was partially supported through the Aldeen Memorial Fund at Wheaton College. D.C. Flavin was supported through the Wheaton College Summer Research Program.

## DISCLOSURES

No conflicts of interest, financial or otherwise, are declared by the author(s).

## AUTHOR CONTRIBUTIONS

B.E.H. and H.M.W. conception and design of research; B.E.H., D.C.F., E.B., and H.M.W. analyzed data; B.E.H., D.C.F., and H.M.W. interpreted results of experiments; B.E.H., H.M.W., and D.C.F. prepared figures; B.E.H., H.M.W., and D.C.F. drafted manuscript; B.E.H. and H.M.W. edited and revised manuscript; B.E.H., D.C.F., E.B., and H.M.W. approved final version of manuscript; D.C.F., E.B., and H.M.W. performed experiments.

## ACKNOWLEDGMENTS

B. E. Hunt and H. M. Whitney acknowledge that Alfonso Nieto-Castanon produced the MATLAB scripts and functions used.

- Copyright © 2016 the American Physiological Society