1 Introduction

Sublingual orthogonal polarization spectral (OPS) imaging [2, 4, 23, 25, 2729, 34] and side-stream dark field (SDF) imaging [17] are currently being used extensively in clinical microcirculatory research, especially in surgery and intensive care medicine. This research has gained clinical importance by the finding in several centers that microcirculatory alterations nonresponsive to therapy predict a poor outcome in critically ill patients [32, 39]. This predictive value of microcirculatory images was not found in systemic hemodynamic or oxygen-derived parameters measured conventionally at the bedside. Furthermore, clinical investigations have shown that the impact of standard as well as innovative therapies could best be demonstrated by their effect on the sublingual microcirculation [7, 10, 34, 35]. In demonstrating their effects, OPS and SDF images have been analyzed manually by semi-quantitative scoring methods [4, 8, 9, 34]. Although these methods have been validated and prove sensitive and specific in identifying the severity of disease in critically ill patients they are cumbersome, very time consuming and semi-quantitative. Klyscz et al. [22] described an early quantitative method for estimating red blood-cell (RBC) velocity, limited to straight vessel segments selected manually by the user [11, 13, 1820, 22, 24, 28]. Local vessel width is determined manually with an on-screen caliper; vessel length is obtained using a drawing tool that allows manual tracing of vessels. Although the program is unique in its field, it requires a large amount of user interaction, which increases observer bias and analysis time.

The image analysis techniques proposed in the current paper provide a high degree of automation and yield quantitative measures of vessel length, vessel diameter, the functional capillary density distribution, RBC velocity in individual vessel segments and the RBC velocity distribution. Space–time diagrams [20] are used for velocity estimation and the new technique, in contrast to earlier similar image analysis software, is able to generate space–time diagrams of curved vessels. We introduce automatic detection of the line orientation in space–time diagrams for automated velocity estimation. The accuracy of the present method was validated using video simulations and compared to commercially available software (CapiScope [6, 14, 33]). Finally, in order to illustrate the application of the software we present analyses of sublingual video recordings from a healthy volunteer and from a patient during cardiac luxation in open-heart surgery.

2 Methods

With currently available imaging techniques, such as capillaroscopy, OPS or SDF imaging, “vessels” are only observed in the presence of RBCs. The RBCs contain haemoglobin, which highly absorbs the incident wavelength used in these techniques, in contrast to the background medium. The capillary vessel wall is basically invisible to these imaging techniques. Videos of the microcirculation therefore show structures of red blood cells that are bounded by vessel walls. These structures are referred to as “vessels” in this paper.

The analysis techniques described involve vessel segmentation (the operation that extracts vessel segments from an image) and RBC velocity estimation using space–time diagrams, and require a comprehensive series of image processing steps as indicated by Fig. 1. The performance of the image analysis algorithms depends on a series of parameters that are listed in Table 1. These parameters are adjusted for optimal performance, considering the utilized image scale, and need only be adapted when changing optical magnification.

Fig. 1
figure 1

a Analysis steps for vessel segmentation and for assessment of quantitative analysis parameters. Step 10, velocity detection, is detailed in the second diagram. b Analysis steps for quantifying RBC velocity per vessel segment

Table 1 Parameter settings for automated microcirculatory analysis

Movement of the subject or the hand-held imaging device can result in unstable images that hamper vessel recognition and velocity measurements. In order to stabilize images 2D cross correlation was used [1]. During this stabilization process, image enhancement is optionally performed in two ways. First, intensity variations in the background are reduced for each frame by subtracting the quadratic polynomial surface that best-fits the image, and by adding the average intensity of the original image. Secondly, contrast improvement is achieved by manipulating the image gray-scale histogram, by mapping each gray-level of the input image to a gray-level of the output image using a so-called transfer function, as described by Pries [30]. The latter method may affect the vessel geometry and is therefore not recommended before performing spatial measurements. It is convenient, however, to evaluate space–time diagrams.

After stabilization, video frames are time-averaged to fill up interruptions in capillaries that exist due to the presence of plasma gaps or white blood cells. Averaging causes capillaries to be detected as a continuous structure, irrespective of interrupted cell flow. Averaging also reduces the contribution of noise, which is beneficial for the vessel segmentation process.

The remaining analysis steps rely on the scale parameter (σ). Analyzing at larger values of the scale parameter detects larger vessels whereas smaller values of this parameter detects smaller structures. The scale parameter is explained in greater detail in the Appendix. The pre-processed image is subjected to vessel segmentation as detailed in the Appendix.

The vessel diameter may be overestimated, especially in small vessels, if the microcirculatory image is not in focus. It is, therefore, important to exclude those vessels that are out of focus. In the present study the average gradient magnitude at all edge points of a vessel is used to determine a focus score per vessel. This focus score [12] is made less sensitive to background variations by normalization to the background intensity, local (200 × 200 pixels2) to each edge pixel. The user is able to exclude vessels with a focus score below a manually adjusted limit.

Blood flow splits into two branches at a bifurcation, causing RBC velocity to change. For accurate RBC velocity assessment, space–time diagrams have to be determined from vessel segments between bifurcations. The process of cutting vessels at bifurcations is automated by determining the distance between the end of a blood vessel segment and the wall of neighboring vessels. If a vessel approaches a neighbor within less than 1½ × the neighbor’s radius, the neighbor is cut in two at the point of approach. The 1½ × factor allows cutting of vessels that bifurcate or intersect, yet prevents cutting vessels that run parallel. This cutting procedure is repeated for all available vessel segments.

Following the above-described automatic segmentation, the user is able to manipulate these intermediate results by deleting, cutting, or connecting vessel segments. Undetected vessel segments can be manually drawn in where the software suggests a present vessel segment, given a user-selectable scale (i.e. σ = 1.5, σ = 3.0, σ = 6.0 or σ = 12.0). If computer-assisted vessel detection fails, one can add remaining vessels by manual tracing with a user-selected diameter.

RBC velocity is determined using space–time diagrams [20], which are obtained by automatically tiling the centerline intensity of a vessel as vertical lines (corrected for vessel curvature, see the Appendix) for a number of consecutive frames. Moving cells and plasma gaps cause tilted lines to appear in these diagrams (see Fig. 7b for an example). The line orientation is indicative for RBC velocity. Acquiring the space–time diagram from curved vessels is an improvement on previous methods which only allow velocity estimation from straight vessel segments where the user draws a straight centerline. Image histogram equalization [31] is utilized to automatically improve visibility of the line structure in space–time diagrams. RBC velocity is estimated automatically using gray-scale Hough transform [15, 26], detailed in the Appendix. The user is allowed to overrule the result of automatic analysis by tracing lines in the space–time diagram interactively. When interactively tracing lines, the average orientation is used for further processing. Finally, the acquired orientation is converted to an actual velocity value (see Appendix).

Some of the above described techniques, numbered in Fig. 1a, b, are new in microcirculatory image analysis and are therefore explained in the Appendix in greater detail. These include: Fig. 1a-(3) centerline detection, Fig. 1a-(6) vessel wall detection in the presence of interrupted cell flow, Fig. 1b-(2) curvature correction, Fig. 1b-(4) automatic orientation and velocity estimation and Fig. 1b-(5) theoretical range of velocity assessment.

3 Experiments

In all experiments detailed below, the algorithms were configured according to the settings given in Table 1. Contrast enhancements were not used in any of the experiments.

3.1 Validation

To validate the performance of vessel length, diameter and RBC velocity, simulation videos were created. The main advantage of simulation videos is that the actual vessel and flow characteristics are fully known and the ability of the software to measure it can accurately be determined. In addition, such simulation videos exclude optical effects, such as, scattering of light in surrounding tissue and widening of vessels due to point spread effects [38].

The simulation video for length and diameter validation (500 × 500 pixels) contains five lines of different length (50, 100, 150, 200 and 250 pixels) with a Gaussian cross-sectional profile (with standard deviation σ l ). The vessel wall of these simulated vessels is marked by the points where the maximum gradient is found, i.e. at ± σ l , yielding d = 2σ l , where d is the line diameter. The background and centerline intensity were set to 200 and 50 au (au = arbitrary units). The effect of vessel orientation was incorporated by including frames with different line orientation in the range [0, 90]° with 15° increments.

A second simulation video (250 × 250 pixels) was created for validating velocity assessment. Each video frame shows a simulated vessel containing “cells” being circular blobs with a Gaussian cross-sectional intensity profile (σ cell = 3 pixels). These cells (approximately 1 cell per 5 pixels of vessel length, background intensity 200 au, center at 50 au) were drawn at random locations but within the boundaries of an imaginary vessel of 10 pixels wide that extends to the edges of each video frame. The accuracy of interactive and automatic velocity assessment was tested in a vessel oriented at 0° in the velocity range [2.5, 2,000] pixels/s. The lower limit of this range was chosen pragmatically while the upper limit is in accordance with the physical limit of detection (∼v max, see Eq. 2 in the Appendix, L = 250 pixels, f = 25 frames/s). Velocity results were obtained interactively, by tracing up to five available lines in the space–time diagram, and automatically (see Appendix).

Each video fragment covered 100 frames. Gaussian noise was added to each frame with σ noise = 10 au, which is approximately twice that of a typical SDF image. The validation experiments were made independent of optical magnification, by expressing the accuracy of assessment in terms of pixels/s. The two simulation videos have been put on the Internet (http://www.sdfimaging.net) as information for the reader and for use in validation of other software developments.

3.2 Comparison

To evaluate the utility and accuracy of our software we compared its performance to that of a commercially available microcirculation image analysis package. In this context, CapImage [22] and CapiScope [14] are commercially available software packages used to analyze microcirculatory video sequences. CapImage represents one of the few software packages that has been described and evaluated in the literature in any detail. To our knowledge this package is no longer available. Instead a new software package was developed with similar modalities but using improved technology, called CapiScope. A validation study [6, 33] showed that CapiScope provides comparable values for microcirculatory parameters, such as, vessel diameter and RBC velocity, to those obtained with CapImage. In the present study we compared the performance of our software to that of CapiScope (version (KK-Technology, Bridleways Holyford, Devon, England).

In the comparison study the ability of the software to measure the average vessel diameter was compared to that measured by CapiScope. In the CapiScope method an average of five determinations at different locations along the vessel was taken as the average diameter and in the present software the diameter was averaged over the entire vessel segment. RBC velocity was measured in a simulation video as well as in an SDF imaging recording of the sublingual microcirculation in a healthy male volunteer (see http://www.sdfimaging.net). In the latter experiment the interactively obtained velocity results were most accurate and served as reference for determining the error in automatic analysis. For automatic analysis, a velocity error level up to 20% compared to interactive assessment, was considered acceptable within the framework of the experiment.

For comparing the vessel length estimation, the vessel density (VD) was also determined by both programs by analyzing ten sublingual recordings of healthy individuals. The VD is defined as the functional capillary density (FCD) [16, 22] and includes thick vessels as well as capillaries.

To evaluate the time saved by the present method two experienced analysis researchers applied the two methods to the analysis of the simulation as described before and to SDF image recordings of the sublingual microcirculation.

3.3 Clinical application

Sublingual video recordings were made using a MicroScan SDF system [17] (MicroScan B.V., Amsterdam, The Netherlands) with a standard 5× optical magnification, which results in microcirculation images with a pixel spacing of approximately (h × w) 1.5 × 1.4 μm. The disposable microscope tip is held gently against the tissue and guarantees a fixed distance (∼1 mm) and no perspective between specimen and lens over the entire field of view. The hardware features a point spread function [38] similar to a Gaussian distribution with a standard deviation of approximately 1 pixel in the x and y direction. Capillaries, having a diameter of about 4-5 μm, are therefore approximately 3 pixels wide in standard SDF images.

A sublingual video recording from a healthy male volunteer was selected with high contrast and moderate RBC velocity, which allowed us to evaluate the feasibility of automatically analyzing space–time diagrams of clinical observations. Another sublingual recording was made during cardiac luxation in a patient who underwent cardiac bypass surgery using off-pump coronary artery grafting (OPCAB). Cardiac luxation is a procedure that is used during cardiac surgery where the heart is lifted and repositioned causing an immediate decrease of cardiac output and thereby sublingual microcirculation. During this procedure sublingual SDF imaging was applied and cessation of the microcirculation was observed during luxation-induced hypotension. The luxation videos have also been put on the Internet (http://www.sdfimaging.net) as information for the reader.

4 Results

4.1 Validation experiments

4.1.1 Vessel length

In two out of 35 measurements at a diameter d = 1 pixel automatic vessel detection failed due to the presence of noise. The bars in Fig. 2a show the average length deviation of lines at different orientation. The error bars indicate the small error range due to line orientation and image noise (<5% for capillaries with L > 100 pixels and d < 5 pixels). The graph shows that the accuracy of length assessment strongly depends on the diameter of the simulated vessel (due to the scale of analysis). CapiScope could not measure vessel length automatically.

Fig. 2
figure 2

Results of evaluation using simulation video. a Average vessel length estimation error (l err) versus actual length (L, pixels) and diameter (d, pixels). b Average diameter estimation error (d err) versus actual vessel diameter (d in pixels). Measurements at whole pixel intervals are slightly shifted apart for clarity. The error bars in both figures indicate the error range due to image noise and vessel orientation as tested in the range [0, 90], with 15° increments. c Accuracy of interactive, automatic (Hough) and CapiScope velocity estimation. The inset shows the space–time diagrams that yielded these results

4.1.2 Vessel diameter

Figure 2b shows the relative diameter-estimation error of simulated vessels as obtained by the present method (σ = 3, σ cross = 1) and by CapiScope. The error bars indicate the range as a result of vessel orientation and image noise. CapiScope tends to overestimate vessel diameter slightly over the entire range. The present method performs better for vessels wider than 5 pixels. It also shows a smaller diameter variation due to orientation and image noise. With the present method, vessels with a diameter in the range [2σ cross, 13] pixels show an absolute diameter error <1 pixel. This results in a relative error that drops below 20% for vessels wider than 3 pixels (Fig. 2b).

4.1.3 Velocity

RBC velocity was estimated by the present method using the acquired space–time diagrams shown in Fig. 2c (inset). These diagrams show that a line structure is clearly visible at low velocities while the images turn rather noisy at high velocities. Figure 2c shows the deviation in velocity assessment as obtained with the new method by drawing lines in the space–time diagram manually, automatically using the Hough method, and using CapiScope. Interactively tracing lines in the space–time diagram gives the best results and appears feasible up to 1,000 pixels/s in this simulation experiment (accuracy >95%). Automatic velocity assessment performs excellently up to 750 pixels/s (>95% accurate). At higher velocities (>1250 pixels/s), the method fails and selects an alternative orientation that results in a large velocity error. CapiScope was not able to measure velocities below 50 pixels/s. Higher velocities showed a relatively large error (Fig. 2c).

4.2 Comparison experiments

This section compares the analysis results of the present method with CapiScope in finding vessel density, vessel diameter and RBC velocity. For these experiments SDF image recordings were used that show the sublingual microcirculation of healthy volunteers.

The Bland–Altman plots [3] in Fig. 3a, b illustrate the similarity between the present method and CapiScope in measuring vessel density and the diameter of sublingual vessels. With the present method, VD measurements were performed in 67% of the time required by using CapiScope (10 recordings in 56 min with the present method compared to 84 min with CapiScope). The vessel diameter measurement using CapiScope took approximately 4 h while the present method provided the same data in approximately 10 min.

Fig. 3
figure 3

Agreement of present method and CapiScope, represented by Bland–Altman plots [3] showing, a difference against average vessel density (VD), b difference against average diameter, c difference against average velocity. Data was obtained from sublingual microcirculatory video recordings. All curves are drawn with 95% limits of agreement (dashed lines) and regression line

Velocity results obtained by the present method do not correspond with those obtained by CapiScope (as illustrated by the graph in Fig. 3c). With the present method, line orientation in the space–time diagram was analyzed automatically and if the presented orientation failed, lines were traced manually. Visual inspection of the video fragment, together with the many space–time diagrams, confirmed the presence of relatively low velocities in this experiment (<200 μm/s) that were largely overestimated by CapiScope. This finding is similar to the results of the simulation experiment shown in Fig. 2c which illustrates the disparity between the two methods. Manual velocity analysis with CapiScope took 3 h in this experiment compared to 20 min using the present automated method.

4.3 Clinical application

This section describes the application of the present method in analyzing microcirculatory images from a healthy volunteer and from a patient during cardiac surgery.

4.3.1 Healthy volunteer

The video recording of a healthy volunteer was analyzed after averaging frames within a 2 s interval. In this experiment 31% of the total vessel length required manual interaction. The functional microcirculatory density distribution is given in Fig. 4a. It shows the presence of a bimodal distribution with a large portion of the image area being occupied by capillaries in the range 5-10 μm.

Fig. 4
figure 4

Distributions a Sublingual microcirculatory density distribution [A represents the relative image area occupied by vessels in the given diameter (d) range] and, b velocity distribution, both of a healthy male individual. c Velocity distribution, and d functional microcirculatory density distribution, both showing the results before and during the first 10 s of cardiac luxation (see also Fig. 5)

In this analysis a total of 207 vessel segments was analyzed. In 99 segments (48%) the space–time diagrams did not reveal a visible line structure. In some of these cases vessel segments were too short to allow velocity analysis (see Eq. 2 in the Appendix). The space–time diagrams of the remaining 108 vessel segments (52%) showed a line structure that was analyzed both interactively, by tracing lines, and automatically. The velocity distribution in Fig. 4b illustrates the result of interactive analysis and shows that RBC velocity is in the same order of magnitude for all vessels in the given diameter range d = [0, 60] μm. With automatic analysis 29 segments (27%) fell within the 20% error level of acceptance.

4.3.2 Cardiac luxation

The present method was used to measure the changes which occur when the heart is repositioned during off-pump cardiac surgery. Figure 5a, c indicate the average of 250 frames (10 s) from the sublingual video recording before and during cardiac luxation. The figures at the right (Fig. 5b, d) show the same video data with the results of analysis superimposed. Vessel segments with a diameter larger than 60 μm were excluded. In these two experiments 95% (before luxation) and 80% (during luxation) of the total vessel length were segmented automatically, the remaining vessels were added interactively. We traced up to 20 lines in each space–time diagram (10 s interval) to get an impression of the average velocity in each vessel segment during that interval. Space–time diagrams showed a clear line structure in 44% of the vessel segments before, and 48% during luxation. These represent approximately 75% of the segmented vessel length in both cases. RBC velocity is color-coded in the vessels of Fig. 5b, d. Dark colors in Fig. 5d clearly show that RBC velocity is reduced during cardiac luxation. Figure 4c demonstrates the velocity distribution.

Fig. 5
figure 5

a Average frame out of a video sequence showing sublingual microcirculation before a luxation procedure. b Same image as (a) with analysis results superimposed. c Average of frames obtained during a luxation procedure, d with analysis results superimposed. The magnitude of red-blood cell velocity is color-coded in the range [5 (dark), 650 (bright)] μm/s. Vessel segments with space–time diagrams that could not be analysed are marked black. The small arrows indicate the direction of blood flow

The observed image area that was occupied by vessels in the cardiac luxation example changed from 17.1 to 14.6%, which is a 15% reduction. The reduction of vessels was confirmed by visual inspection of the images of Fig. 5. It shows that some small vessels are not visible, i.e. the presence of red blood cells is lacking or is reduced, during cardiac luxation. The density distributions of Fig. 4d illustrate that a slight reduction of small vessels (d < 45 μm) occurs during luxation.

5 Discussion

This present study has introduced advanced image analysis techniques for the analysis of microcirculatory video sequences which allow determination of vessel length, diameter and RBC velocity, from curved vessels, quantitatively. The method combines automatic vessel identification with manually tracing vessels. It further provides the microcirculatory density distribution and the RBC velocity distribution. A first step towards automatic detection of RBC velocity from space–time diagrams has been made. The method was validated using simulation video sequences and was compared with commercially available software (CapiScope). Finally, clinical application of the software was demonstrated by analyzing microcirculatory images from a healthy volunteer and from a patient during cardiac surgery.

The measurements performed on sublingual recordings showed that 69–95% of the total vessel length was detected automatically at a single scale of analysis. Compared to CapiScope, the present method reduced analysis time from hours to minutes. It can therefore be concluded that computer-assisted vessel segmentation drastically reduces user interaction although visual inspection of the superimposed results and possible interaction at selectable scales, remain necessary.

The validation experiments were all performed at the same small scale of automatic analysis, which focuses on small image features, such as small vessels. This explains why vessel length and diameter estimation were less accurate for large-diameter vessels. In addition, the eigenvalue |λ n | (see “centerline detection” in the Appendix) reduces with vessel diameter. In the simulation experiments, where vessels end in a step edge (i.e., |λ t | is fixed), less pixels are consequently marked as being centerline pixels. This explains the underestimation of vessel length for large-diameter vessels. Considering the length of actual vessels in OPS and SDF images (L ≈ 100 pixels on average), it can be concluded that length estimation is very accurate (>95%) for capillaries up to 5 pixels wide. Vessel diameter could accurately be determined (>80%) for vessels wider than 3 pixels as in standard SDF images. Velocity estimation with the present method was very accurate (>95%) for both interactive velocity estimation (range [2.5, 1,000] μm/s) and automatic analysis of space–time diagrams (range [2.5, 750] pixels/s). CapiScope on the other hand, was not able to identify vessels automatically. It also could not measure vessel length automatically, could not measure velocities in curved vessels and was not able to measure velocities below 50 pixels/s while higher velocities were relatively inaccurate.

Clinical application of the present method illustrated the use of the functional microcirculatory distribution. Its bimodal behavior demonstrates the presence of microcapillaries as well as larger vessels. The velocity distribution was also bimodal and showed that velocities are of the same order of magnitude in vessels ranging [3, 60] μm. It was also demonstrated that RBC velocity reduced to approximately one third in all vessels ranging [3, 60] μm, during episodes of shock with severe hypotension caused by cardiac luxation. The present method of analysis was able to detect the microcirculatory alterations adequately and this illustrates its potential use in clinical microcirculation research.

The clinical experiments confirmed the feasibility of analyzing space–time diagrams automatically using the Hough transform (∼25% of the vessels with a visible line structure in the space–time diagram). The performance of automatic velocity analysis strongly depends on the quality of microcirculatory video recordings. In this respect, RBC velocity measurements benefit from higher frame rates, which increases the velocity range (limited by v max, see Eq. 2 in the Appendix), and from stroboscopic illumination with very short exposure times, which reduce longitudinal motion blur in vessels, thereby yielding high-contrast space–time diagrams. This would increase the performance of automatic orientation detection of space–time diagrams and may ultimately render velocity detection fully automatic.

The image analysis technique described in this study drastically reduce analysis time. It further reduces user interaction and observer bias. The method proved to be fast and accurate. It enables determination of vascular density and RBC velocity distributions that were otherwise impossible to obtain. We expect that the present method will allow much more widespread analysis of microcirculatory images which currently is very time consuming and thereby prohibiting. It is expected that the use of the present method will encourage microcirculation research and will increase our insight into the central role of the microcirculation in health and disease.

A full-featured version of the software that includes all analysis algorithms in this paper can be downloaded free of charge for evaluation at http://www.sdfimaging.net.