You are on page 1of 12

Home Search Collections Journals About Contact us My IOPscience

Two-dimensional sample entropy: assessing image texture through irregularity

This content has been downloaded from IOPscience. Please scroll down to see the full text.

2016 Biomed. Phys. Eng. Express 2 045002

(http://iopscience.iop.org/2057-1976/2/4/045002)

View the table of contents for this issue, or go to the journal homepage for more

Download details:

IP Address: 134.148.10.13
This content was downloaded on 25/03/2017 at 00:29

Please note that terms and conditions apply.

You may also be interested in:

Application of multi-scale (cross-) sample entropy for structural health monitoring


Tzu-Kang Lin and Jui-Chang Liang

Short-time regularity assessment of fibrillatory waves from the surface ECG in atrial fibrillation
Raúl Alcaraz, Fernando Hornero, Arturo Martínez et al.

Entropy analysis of EEG background activity in Alzheimer's disease patients


D Abásolo, R Hornero, P Espino et al.

Medical image retrieval and analysis by Markov random fields and multi-scale fractal dimension
André Ricardo Backes, Leandro Cavaleri Gerhardinger, João do Espírito Santo Batista Neto et al.

Comparison of different threshold values r for ApEn


Chengyu Liu, Changchun Liu, Peng Shao et al.

K-nearest-neighbor conditional entropy approach for the assessment of the short-term complexity of
cardiovascular control
A Porta, P Castiglioni, V Bari et al.

Early detection of Alzheimer's disease using spontaneous EEG recordings


W L Woon, A Cichocki, F Vialatte et al.

Artificial crawler model for texture analysis on silk fibroin scaffolds


Bruno Brandoli Machado, Wesley Nunes Gonçalves and Odemir Martinez Bruno

Classification of focal liver lesions in B-mode ultrasound images


Hiroyuki Yoshida, David D Casalino, Bilgin Keserci et al.
Biomed. Phys. Eng. Express 2 (2016) 045002 doi:10.1088/2057-1976/2/4/045002

PAPER

Two-dimensional sample entropy: assessing image texture through


RECEIVED
17 November 2015
irregularity
REVISED
5 May 2016
ACCEPTED FOR PUBLICATION
L E V Silva1, A C S Senra Filho2, V P S Fazan3, J C Felipe2 and L O Murta Junior2
19 May 2016 1
Department of Physiology, School of Medicine of Ribeirão Preto, University of São Paulo, Ribeirão Preto, SP, Brazil
2
PUBLISHED Department of Computing and Mathematics, Faculty of Philosophy, Science and Languages of Ribeirão Preto, University of São Paulo,
27 July 2016 Ribeirão Preto, SP, Brazil
3
Department of Surgery and Anatomy, School of Medicine of Ribeirão Preto, University of São Paulo, Ribeirão Preto, Brazil
E-mail: murta@ffclrp.usp.br

Keywords: sample entropy, texture quantifier, image irregularity, biomedical image analysis, sural nerve

Abstract
Image texture analysis is a key task in computer vision. Although various methods have been applied
to extract texture information, none of them are based on the principles of sample entropy, which is a
measurement of entropy rate. This paper proposes a two-dimensional sample entropy method,
namely SampEn2D, in order to measure irregularity in pixel patterns. We evaluated the proposed
method in three different situations: a set of simulated images generated by a deterministic function
corrupted with different levels of a stochastic influence; the Brodatz public texture database; and a real
biological image set of rat sural nerve. Evaluation with simulations showed SampEn2D as a robust
irregularity measure, closely following sample entropy properties. Results with Brodatz dataset
testified superiority of SampEn2D to separate different image categories compared to conventional
Haralick and wavelet descriptors. SampEn2D was also capable of discriminating rat sural nerve images
by age groups with high accuracy (AUROC = 0.844). No significant difference was found between
SampEn2D AUROC and those obtained with the best performed Haralick descriptors, i.e. entropy
(AUROC = 0.828), uniformity (AUROC = 0.833), homogeneity (AUROC = 0.938) and Wavelet
descriptors, i.e. Haar energy/entropy (AUROC = 0.932) and Daubechies energy/entropy
(AUROC = 0.859). In addition, it was shown that SampEn2D computation time increases with image
size, being around 1400 s for a 600 × 600 pixels image. In conclusion, SampEn2D showed to be stable
and robust enough to be applied as texture feature quantifier and irregularity properties, as measured
by SampEn2D, seem to be an important feature for image characterization in biomedical image
analysis.

1. Introduction spatial structure is taken into account. Haralick


entropy descriptor computes Shannon entropy from
Entropy measurement is ubiquitous in signal and an image co-occurrence matrix, and therefore
image analysis fields, as the only requirement for accounts for spatial pixel distribution, i.e. texture
entropy calculation is a probability distribution (Tsal- patterns on image.
lis 2009). A motivation for entropic methods relies on Measurement of entropy rates is usual in time ser-
the fact that these probabilities can be defined in ies analysis standing for systems complexity. Kolmo-
several ways, according to the problem under study. gorov–Sinai (KS) entropy is a theoretical definition of
Entropy is often computed from image using Shannon entropy rate (Sprott 2003). KS entropy defines prob-
entropy, where probability distribution is easily esti- ability distribution as probability occurrences of each
mated from image histogram. Although there are system trajectory, calculated from phase space, and
some alternative approaches (Zhao and Ngo 2009, computes the limit of Shannon entropy for n  ¥
Celik 2014), in most cases probability distribution and ò → 0, where n is the system time and ò is the size
accounts only for individual pixels occurrence and no of phase space hypercubes, i.e. state similarity

© 2016 IOP Publishing Ltd


Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

tolerance. However, n  ¥ limit makes KS entropy signals where the number of matches for m is very
not applicable to finite time series. close to (m + 1)-length patterns, the ratio between
Approximate entropy (ApEn) and sample them will be close to one, and therefore, SampEn will
entropy (SampEn) emerged as computationally be close to zero. In this case of low SampEn, patterns
feasible alternatives for KS. They can be applied to within the signals are very repetitive, predictable and
finite time series, becoming widely used entropic mea- regular.
sures (Pincus 1991, Richman and Moorman 2000). On the other hand, for signals where the number
SampEn was proposed as an improvement of ApEn, of pattern matches for m is much larger than to m + 1,
which is known to have important biases (Richman the ratio between them is close to zero, resulting in a
and Moorman 2000). Nevertheless, both ApEn and large SampEn value. In this case, patterns within the
SampEn are essentially irregularity measurements signals are very irregular, very unpredictable, as the
(Pincus and Goldberger 1994). SampEn approaches new points accounted for in (m + 1)-length patterns
zero for signals with highly periodic patterns while is are not similar at all.
higher for very irregular series, such as white noise. Our extension of SampEn method for digital ima-
SampEn is largely applied to analyze data series ges, considered a two-dimensional signal, was con-
such as heart rate variability and brain structural cerned to maintain the original propose of SampEn as
measures (Richman and Moorman 2000, Chen and a irregularity measure. Consider an arbitrary image u
Pham 2013). (i, j) with W width and H height. Let xm(i, j) be the set
In this paper, we propose the concept of two- of pixels of u ranging columns j to j + m − 1 and lines i
dimensional SampEn and evaluate its application for to i + m − 1, i.e., x m (i , j ) = [u (i , j ), u (i , j + 1) ,...,
image analysis. The method, namely SampEn2D, is an u (i , j + m - 1), u (i + 1, j ), u (i + 1, j + 1) ,... u
extension of SampEn, and therefore is supposed to (i + 1, j + m - 1), ..., u (i + m - 1, j + m - 1)].
quantify irregularity of two-dimensional pattern in Shortly, xm(i, j) is the m-length square window with
images. After defining the method, we present several origin at u(i, j).
comparisons of SampEn and SampEn2D for the same Let Nm be the total number of square windows
processes in one and two-dimensional cases. Finally, within u that can be generated for both m and m + 1
we propose and evaluate the application of SampEn2D size. It can be calculated by Nm = (W−m) * (H−m).
to a public standard image set as well as to histological Note that the pixels in the last m lines and columns
images of nerves. These evaluations were performed cannot be used as pattern origins for both m and m + 1
with the purpose of accessing its effectiveness as an sizes, following the same properties of SampEn (Rich-
image texture descriptor. man and Moorman 2000). Considering r a similarity
threshold, two-dimensional SampEn, namely
SampEn2D, is defined by
2. Two-dimensional SampEn
U m + 1 (r )
SampEn2D (u , m, r ) = -ln , (1)
SampEn was originally proposed as a measure of U m (r )
irregularity for one-dimensional time series, and where
quantifies the overall probability that two sequence of
i = H - m; j = W - m
m points that are similar will still be similar when the 1
following point is considered in both (i.e., m + 1
U m (r ) =
Nm
å U im, j , (2)
i = 1; j = 1
points). Two patterns are considered similar if the
absolute difference between each corresponding point U im, j (r )
within the patterns is less than r. Eventually, SampEn [# of x m (a , b) ∣ d [x m (i , j ) , x m (a , b)]  r ] (3)
=
calculates the negative logarithm of this probability, so Nm - 1
that values close to zero indicate repeating patterns or
a predictive dynamics, i.e, regularity, whereas high and
values point to nonrepeating patterns or unpredictable i = H - m; j = W - m;
1
dynamics, i.e. irregularity. U m + 1 (r ) =
Nm
å U im, j + 1 (4)
i = 1; j = 1
The probability described above can be computed
by counting the number of similar m and (m + 1)-

[# of x m + 1 (a , b) ∣ d [x m + 1 (i , j ) , x m + 1 (a , b)]  r ]
U im, j + 1 (r ) = , (5)
Nm - 1

length patterns, i.e. number of matches. Calculating where a ranges from 1 to H−m, b ranges from 1 to W
the ratio between (m + 1) and m matches, we obtain − m and (a, b) ¹ (i, j). The distance function d is
conditional probabilities. One can note that, for defined by

2
Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

Figure 1. Example of SampEn2D pattern comparison scheme. A pattern match is obtained when all corresponding pixels within two
patterns are not different by more than r. In (a) there is a tridimensional example of MIX2D(p) process and in (b) a representative
window of pixels with amplification view. Dashed lines surround two patterns (m = 3). Those patterns are considered similar (match)
if all of the following conditions are satisfied: ∣u (12, 18) - u (9, 21)∣ < r , ∣u (12, 19) - u (9, 22)∣ < r , ∣u (12, 20) - u (9, 23)∣ <
r , ∣u (13, 18) - u (10, 21)∣ < r , ∣u (13, 19) - u (10, 22)∣ < r , ..., ∣u (14, 20) - u (11, 23)∣ < r .

d [x m (i , j ) , x m (a , b)] and Moorman 2000, Lake et al 2002, Costa et al 2005).


(6)
= max (∣u (i + k , j + l ) - u (a + k , b + l )∣) , As an irregularity measure, SampEn is expected to
where k and l ranges from 0 to m − 1. increase with increasing amount of noise. On the other
In equations (3) and (5), the origin points (i, j) and hand, SampEn is expected to decrease with increasing
(a, b) must be different to exclude self-matches. r, as it implies that more patterns will be considered
Equations (2)–(6) are almost the same defined in Sam- similar.
pEn, except for Nm. Distance function is ideally the For SampEn2D, those parameters are expected to
same of SampEn, here extended for the two-dimen- play similar roles. However, changing m or r by the
sional case, i.e., the differences are taken from each same amount in one and two-dimensional methods
corresponding pixels within the windows. Figure 1 might have different aftereffect, once for m-length
illustrates the pattern comparison step. As similar to time series patterns there are m comparisons, while for
original SampEn, r can be defined as a fraction of image images, m-length patterns correspond to m-square
standard deviation as a normalization procedure. matrix of pixels, and therefore, there will be m2 pixel
The estimation of m and r parameters in SampEn comparisons.
is a difficult task. Nevertheless, there are some studies
addressing this problem (Ramdani et al 2009, Liu
et al 2011). For signals such as those ones usually 3. SampEn2D evaluation
found in heart rate variability analysis, values of m = 2
and r = 0.15 or r = 0.20 times the signals standard In this section, we describe experimental procedures
deviation are common choices (Pincus 1991, Richman for both parametric analysis and method validation in

3
Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

Figure 2. Examples of images generated by MIX2D(p) process, sized 256 × 256 pixels, for (a) p = 0.1, (b) p = 0.5 and (c) p = 0.9.
Graphics in (d)–(f) represents the first row of each image, respectively. Note that as p  1, the resulting image gets closer to
completely random noise, i.e. an irregular image.

SampEn2D context. First, we describe a process to values uniformly distributed. According to the choice
generate two-dimensional image patterns with varying of p, the resulting images present a specific degree of
level of white noise, namely MIX2D(p), used to analyze spatial regularity, similar to what has been studied for
the SampEn2D behavior with respect to r and m one-dimensional signals. MIX2D(p) was defined to
parameters. The parameter evaluation is important to have zero mean and unit standard deviation for all p
validate SampEn2D. The use of other noisy images in values (Pincus and Goldberger 1994).
this analysis is also addressed. Then we describe the MIX2D(p) is a family of stochastic processes regu-
public image set Brodatz, widely used to evaluate lated by the probability p. When p = 1, MIX2D(p) is
texture analysis schemes and a methodological proce- purely a random function, resulting in a highly irre-
dure to determine the best parameters of SampEn2D gular image. The opposite occurs with p = 0, resulting
for a specific dataset. Finally, we describe a real in a perfectly regular periodic image, i.e. bidimen-
application to SampEn2D in a set of histological images sional sine function. Figure 2 shows sample images
of rat sural nerve. generated by the MIX2D(p) process. Different levels of
irregularities might be detected by SampEn2D.
3.1. MIX processes
MIX(p) is a one-dimensional family of stochastic 3.2. Noisy robustness
processes which overlays sine function with comple- Besides MIX2D(p) process, we also evaluated
tely random dynamics, according to the choice of SampEn2D in a gray scaled reference image added with
parametric probability p (0 < p < 1). The larger the p, different levels of noises. Uniform white noise and salt
the more frequent is random dynamics (Pincus and and pepper noise were chosen for addition. Uniform
Goldberger 1994). white noise consists of uniformly distributed uncorre-
In order to evaluate SampEn2D and its parameters, lated values ranging from –127 to 127. Salt and pepper
we introduce a family of two-dimensional MIX pro- is a binary uncorrelated noise, having values of 0 or
cesses, namely MIX2D(p), based on the one-dimen- 255. Figure 3 illustrates examples of reference images
2pi 2pj
( )
sional definition. Let X i, j = sin 12 + sin 12 be a ( ) added by different levels of both noises. For uniform
white noise, the noise levels (p) correspond to the
sinusoidal image and Yi, j an image composed by uni-
form white noise pixels in the range [- 3 , 3 ]. In attenuation of total noise. For example, uniform white
addition, consider the random variable Zi, j, where Zi, noise with intensity p = 0.5 correspond to random
j = 1 with probability p and Zi, j = 0 with probability 1
values in the range [−64, 64]. After noise addition, the
−p. MIX2D(p) is defined by equation (7) final image is renormalized to guarantee the same
range values (0–255). For salt and pepper noise, the
MIX2D ( p )i, j = (1 - Z i, j ) X i, j + Z i, j Yi, j . (7) noise levels (p) correspond to the amount of pixels
replaced by binary values (0 or 255).
In short, MIX2D(p) creates bidimensional sine It is worth noting that salt and pepper noise addi-
waves, replacing p of total number of pixels by random tion procedure is quite similar to MIX2D(p) processes.

4
Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

Figure 3. Examples of a reference image, sized 256 × 256 pixels, added with different levels of uniform white noise (first row) and salt
and pepper noise (second row). Noise levels are 0.1 ((a) and (d)), 0.5 ((b) and (e)) and 0.9 ((c) and (f)). As can be seen, salt and pepper
noise result in more striking interferences in spatial pattern when compared with white noise.

Figure 4. Examples from Broadtz image dataset. Groups are numbered as in the original database: (a) 05, (b) 15, (c) 30, (d) 36, (e) 45,
(f) 75, (g) 93, (h) 95 and (i) 102. Each group is composed by 16 sample images with size 128 × 128 pixel.

However, in MIX2D(p) processes one has always the 3.3. Brodatz image dataset
same background image (sinusoid) and pixels are We accessed the effectiveness of SampEn2D in discri-
replaced by uniform white noise, not by binary values. minating different texture patterns. Nine groups of
On the other hand, addition of uniform white noise to images representing different categories were selected
a reference image is different from MIX2D(p) because from Brodatz dataset (You and Cohen 1993, Abdel-
in the latter pixels are replaced, while in the former mounaime and Dong-Chen 2013, Jacob et al 2014).
noise is added to original image values. From each group, we extracted 16 sample images sized

5
Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

Figure 5. Examples of rat sural nerve transverse section for (a) a rat aged 30 days; and (b) a rat aged 720 days. Black horizontal bars
represent 10 μm.

Table 1. Definition of Haralick descriptors. procedure to select those parameters according to the
Descriptor Definition Meaning image dataset. We illustrate the procedure with the
Brodatz database.
Variance å i å j (i - j )2P (i , j ) Contrast level First, SampEn2D is calculated for all images, vary-
Entropy å i å j P (i , j ) log P (i , j ) Suavity ing r and m in a broad range. Here we chose
Uniformity å i å j P 2 (i , j ) Uniformity 0.06 < r < 0.50 and 1 < m < 5. Next, for each m we
(energy) identify which r gives the best separation of groups. In
Homogeneity å i å j P (i , j ) (1 + ∣i - j∣) Homogeneity
this part, some distance or discriminant between
3rd order moment å i å j (i - j )3P (i , j ) Distortion
groups must be used. We applied ROC curves for each
pair of groups and take de average AUROC for each r.
The best r is the one that gives the greater mean
128 × 128 pixels. Figure 4 illustrates one image sample
AUROC, considering all pairwise comparisons.
from each category.
In case of the Brodatz database we obtained:
In order to compare the precision of SampEn2D,
AUROC = 0.958 (m = 1, r = 0.12), AUROC = 0.949
we used Haralick and Wavelet descriptors. The Har-
(m = 2, r = 0.32), AUROC = 0.969 (m = 3, r = 0.24),
alick descriptors are the most commonly used for
AUROC = 0.967 (m = 4, 0.20) and AUROC = 0.952
representing image texture: variance, entropy, uni-
(m = 5, 0.30).
formity (energy), homogeneity and 3rd order
Choosing the best m is a more difficult task. One
moment. Their definition is shown in table 1. Coocur-
possibility is take the greatest AUROC considering all
rence matrices were extracted considering four orien-
m. However, one must be aware that the greater the m,
tations (0°, 45°, 90° and 135°) and ten interpixel the greater the chance of no pattern matches in
distances, i.e. ranging from 1 to 10 pixels. The inter- SampEn2D calculation, and therefore, an undefined
pixel distance influences the result according to the SampEn2D value. For large m values, a large tolerance r
granularity of images. We decided to use a wide range should be selected. For the Broadatz dataset, unde-
of distances to cover a larger variety of images. Each fined SampEn2D values were observed for r  0.06
Haralick descriptor was calculated for each coocur- (m = 2), r  0.14 (m = 3), r  0.20 (m = 4) and
rence matrix and, to have a one-to-one comparison r  0.24 (m = 5).
with SampEn2D, we calculated the descriptor average Here we choose the pair (m = 3, r = 0.24) for Bro-
considering all the matrices. We also used Wavelets of datz database analysis, as it gives the greatest mean
Haar and Daubechies in two levels of decomposition AUROC without the risk of undefined SampEn2D.
and calculated the energy and entropy average from
the low-level images. 3.5. Rat sural nerve image dataset
Group pairs were compared using ROC curves. SampEn2D, Haralick and wavelet descriptors were also
Area under ROC (AUROC) was used to measure the applied to light microscopy images of rat sural nerve,
quality of SampEn2D and the other descriptors in dis- obtained from Wistar rats aged 30 (young group,
criminating groups. N = 12) and 720 days (elderly group, N = 16). A
semithin transverse section of sural nerve was obtained
3.4. Choosing the best parameters for SampEn2D for each rat and stained with 1% toluidine blue, which
The best values of m and r might vary for different is used to mark lipids, i.e. the myelin sheath. Images
datasets. Here we propose a simple methodological were optically magnified with oil immersion lens

6
Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

Figure 6. Entropy values for one and two-dimensional MIX processes. First row shows SampEn for MIX(p) process for (a) m = 1, (b)
m = 2 and (c) m = 3. Second row shows SampEn2D for MIX2D(p) process for (d) m = 1, (e) m = 2 and (f) m = 3. MIX(p) processes were
generated with 4096 points length and MIX2D(p) were generated with 265 × 256 pixels. As can be seen, both SampEn and SampEn2D
increases with increasing p for virtually all r values.

(100×), optovar (1.6×) and camera (0.5×), as well as increases. Likewise, as SampEn2D was defined as an
by computer (8×) (Jeronimo et al 2005, 2008). Figure 5 extension of SampEn, it is also supposed to increase
shows two examples of the images, obtained from rats with increasing p in MIX2D(p). Figure 6 shows that
aged 30 and 720 days. SampEn2D resembles SampEn for this feature.
All images are sized 636 × 474 pixels. Descriptors Although their similar curve profiles, SampEn2D
were computed for all images in both groups. Mean and SampEn present different absolute entropy values.
values (standard error) are presented. SampEn2D para- To understand that, consider m = 1. Both SampEn
meters were set to m = 2 and r = 0.10 (10% of image and SampEn2D will compute the fraction of similar
standard deviation) based on results obtained in a pre- patterns for m = 1 and m = 2, eventually taking the
vious study (Silva et al 2014). ratio between those fractions (see equations (2), (4)
The ability to discriminate age groups were asses- and (6)). For one-dimensional case, incrementing
sed by Mann–Whitney rank sum test of median m = 1 to m + 1 = 2 causes one more comparison for
values, as well as through ROC curves. The statistical similarity criteria. However, for two-dimensional
differences between the AUROC generated with case, incrementing m = 1 to m + 1 = 2 cause three
SampEn2D and the other descriptors were computed more comparisons, as patterns are squared windows
using DeLong’s method (DeLong et al 1988, Sun and of pixels. To satisfy the similarity criteria, all corresp-
Xu 2014). All p-values are reported. onding pixels must be considered similar (see
equation (6)). Although the number of available pat-
terns is greater in the two-dimensional case, the incre-
4. Results and discussion ment from m to m + 1 requires more 2m + 1 pixels to
be all similar in the comparisons with other patterns.
This section describes and discusses the results of Eventually, when ratio is calculated, SampEn2D is
SampEn2D evaluation in three stages, namely valida- likely to be higher than SampEn.
tion of SampEn2D and its parameters, performance Figure 7 shows SampEn2D values for a sample
with Brodatz database and application to sural nerves. image (see figure 3), added with increasing amount of
uniform white noise and salt and pepper noise (also
4.1. Validation of SampEn2D indicated by p). Results are similar to findings with
Figure 6 shows entropy values for MIX(p) and MIX2D(p).
MIX2D(p) processes with increasing p, for three values One can notice that the larger the number of
of m (1, 2 and 3) and different values of r. The higher points of a signal, the larger the number of available
the p, the higher the amount of noise swapped in place patterns the signal will have, and therefore, the better
of deterministic component. the estimative of pattern occurrence probabilities.
As MIX(p) represent periodic dynamics replaced Although the dependence of SampEn on signal length
with stochastic values with a percentage p, SampEn, an has already been reported elsewhere (Richman and
irregularity measurement, is expected to increase as p Moorman 2000, Chen et al 2009, Yentes et al 2013), we

7
Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

Figure 7. SampEn2D values for increasing amount of salt and pepper noise (first row) and uniform white noise (second row). Results
are shown for m = 1 ((a) and (d)), m = 2 ((b) and (e)) and m = 3 ((c) and (f)). Horizontal axis (p) indicates the amount of noise added to
the reference image (see figure 3).

Figure 8. Dependence of SampEn on signal size. Six one-dimensional MIX processes were created for p = 0.3 (first row) and p = 0.7
(second row), with size ranging from 1000 to 21 000, step 4000. Results are shown for m = 1 ((a) and (d)), m = 2 ((b) and (e)) and m = 3
((c) and (f)).

calculated it for different lengths of MIX process and image size and low r values. As m increases, less pattern
compared to SampEn2D values obtained with different matches are expected to occur. For MIX2D(p) process
sizes of MIX2D(p) process. Figure 8 show results for with p = 0.7, patterns are highly contaminated with
SampEn and figure 9 for SampEn2D. MIX processes random values, leading to undefined SampEn2D. On
were created with p = 0.3 and p = 0.7. the other hand, MIX2D(p) process with p = 0.3 present
As can be seen, both SampEn and SampEn2D do more regular patterns and SampEn2D is defined for all
not vary much with signal and image size. Therefore, r and image sizes (figure 9(c)).
SampEn2D can be considered robust for small image
sizes. 4.2. Performance with Brodatz database
In some situations there is no entropy value due to Figure 10 shows mean SampEn2D values obtained with
the absence of pattern matches. For example, in Brodatz image dataset. Each image group is associated
figure 9(f) (m = 3), SampEn2D is not defined for low with a number (see figure 4).

8
Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

Figure 9. Dependence of SampEn2D on image size. Six squared MIX2D(p) processes were created for p = 0.3 (first row) and p = 0.7
(second row), with size ranging from 100 to 600, step 100. Results are shown for m = 1 ((a) and (d)), m = 2 ((b) and (e)) and m = 3 ((c)
and (f)).

Figure 10. Average SampEn2D values for Brodatz image groups. SampEn2D was calculated for (a) m = 1, (b) m = 2 and (c) m = 3.

The best parameters of SampEn2D for this dataset Table 2. Average AUROC values obtained with SampEn2D,
have already been chosen (m = 3, r = 0.24) using ROC Haralick and Wavelet descriptors. The ‘best’ case comprises
groups 15, 36, 45, 93, 102 whereas the ‘worst’ case comprises
curves and are described in the previous section. We groups 30, 45, 75, 102. ROC curves were calculated for each
evaluated the effectiveness of SampEn2D in dis- pair within the case and mean AUROC are showed.
criminating Brodatz image groups in two ways: first, Descriptor Best case Worst case
we visually selected five groups whose SampEn2D
curves were nearly equidistantly separated and com- SampEn2D (m = 3, r = 0.24) 0.975 0.924
Haralick variance 0.896 0.907
pared one to each other; we call it the ‘best case’
Haralick entropy 0.927 0.825
(groups 15, 36, 45, 93 and 102). Second, we visually Haralick uniformity 0.887 0.813
identified groups which SampEn2D curves are super- Haralick homogeneity 0.885 0.798
imposed or very close one to each other; we call it the Haralick 3rd moment 0.943 0.917
‘worst case’ (groups 30, 45, 75 and 102). Haar energy 0.796* 0.908
Haar entropy 0.791* 0.867
Table 2 shows mean AUROC for SampEn2D, as
Daubechies energy 0.701* 0.829
well as values of AUROC calculated using Haralick Daubechies entropy 0.791* 0.842
and Wavelet descriptors.
As can be seen, SampEn2D outfits wavelet Note: *P < 0.05 compared to SampEn2D within each case.
descriptors for the best case (table 2, first row). For
the worst case, although no statistical difference was 4.3. Application to sural nerves
found, SampEn2D tend to have the highest mean Considering the sural nerve dataset, table 3 shows
AUROC. Therefore, even for very close SampEn2D mean values (standard error) for SampEn2D, Haralick
curves, it is possible to separate groups with high and wavelet descriptors, as well as the AUROC values
performance. calculated using each descriptor. Statistical

9
Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

Table 3. Mean values (standard error) and AUROC of SampEn2D, Haralick and Wavelet descriptors for sural nerve images (30 days and
720 days).

Descriptor 30 days 720 days AUROC p-value

SampEn2D (m = 3, r = 0.24) 2.38 (0.57) 0.84 (0.19)* 0.844 —


Haralick variance 15.9 (1.6) 14.3 (0.8) 0.578 0.08
Haralick entropy 1.99 (0.03) 1.80 (0.04)* 0.828 0.90
Haralick uniformity 0.03 (0.01) 0.07 (0.01)* 0.833 0.91
Haralick homogeneity 0.47 (0.01) 0.54 (0.01)* 0.938 0.31
Haralick 3rd moment 120.8 (18.2) 110.6 (7.8) 0.521 0.03
Haar energy 2297 (176) 1060 (165)* 0.932 0.39
Haar entropy 263.1 (12.6) 158.0 (14.1)* 0.932 0.39
Daubechies energy 3549 (185) 1516 (328)* 0.859 0.90
Daubechies entropy 348.7 (11.1) 190.1 (24.6)* 0.859 0.90

Note: *P < 0.05 compared to group aged 30 days. P-values represent DeLong’s statistical significance of AUROC compared to SampEn2D.

Figure 11. Average computation time of SampEn2D for m = 1, m = 2 and m = 3 and image sizes 100 × 100, 200 × 200, 300 × 300,
400 × 400, 500 × 500 and 600 × 600.

significance (p-values) for AUROC compared to 4.4. SampEn2D computation time


SampEn2D are also shown in the table. SampEn2D algorithm was implemented in Java version
As can be seen, SampEn2D is significantly higher for 7. Figure 11 shows SampEn2D computation time average
rats aged 30 days than to the aged 720 days, indicating (over the range 0.06  r  0.50) for squared images,
that sural nerve images of elderly rats are characterized computed in a desktop computer with Intel Xeon CPU
by more regular pixel patterns than the ones of young E5405 2 Ghz Quad Core and 3.9 Gb of RAM. Increasing
rats. Of note, only Haralick variance and 3rd moment image size increases considerably the computation time
did not give different values between age groups. In as there are more pattern comparisons. Moreover, there
agreement, analysis using ROC curves revealed poor dis- is a tendency of computation time to decrease with
crimination performances with variance and 3rd increasing m because only those patterns that match for
moment Haralick descriptors. All the other descriptors m-length will be compared to m + 1 and matches
were able to discriminate quite well the ageing of sural become more difficult to be found as m increases.
nerves, using different texture properties.
Most analysis of nerve images comprise the extrac- 5. Conclusions
tion of morphometric measures, which is a manual or
semi-automated process (Jeronimo et al 2005, 2008). In this paper we introduced the concept of SampEn2D
SampEn2D has the advantage to be a completely auto- and evaluated it as a tool for spatial image analysis
mated method. In addition, the level of irregularity of derived from widely used one-dimensional SampEn
patterns seems to be a valuable metric for characteriza- method. We demonstrated that SampEn2D follows
tion of those kind of images. Results encourage future SampEn properties, and therefore can be considered a
use of SampEn2D in problems involving classification measure of irregularity. SampEn2D has also demon-
of nerve images according to diseases. strated to be robust for small image sizes. As a texture

10
Biomed. Phys. Eng. Express 2 (2016) 045002 L E V Silva et al

descriptor, SampEn2D demonstrated to be useful and early alzheimerʼs disease and aging J. Neurosci. Methods 215
also outperformed Haralick variance descriptor in 210–7
Costa M, Goldberger A L and Peng C-K 2005 Multiscale entropy
some situations. SampEn2D was also applied to
analysis of biological signals Phys. Rev. E 71 021906
histological images, showing that pixel patterns reg- DeLong E R, DeLong D M and Clarke-Pearson D L 1988 Comparing
ularity level can be an important metric for biomedical the areas under two or more correlated receiver operating
image analysis and classification. characteristic curves: a nonparametric approach Biometrics
44 837–45
SampEn2D proposed here defines m-length pat-
Jacob I J, Srinivasagan K and Jayapriya K 2014 Local oppugnant
terns as m × m matrices, and two patterns match only color texture pattern for image retrieval system Pattern
when all corresponding pixels differs no more than r. Recognit. Lett. 42 72–8
There are other possibilities for such definitions. For Jeronimo A, Jeronimo C A D, Rodrigues Filho O A, Sanada L S and
Fazan V P S 2005 Microscopic anatomy of the sural nerve in
example, patterns could be defined differently: as
the postnatal developing rat: a longitudinal and lateral
l × m (not squared) matrices, as pixel cross, etc. In symmetry study J. Anat. 206 93–9
addition, matches could be alternatively considered Jeronimo A, Jeronimo C A D, Rodrigues Filho O A, Sanada L S and
when a percentage of pixels differs no more than r. Fazan V P S 2008 A morphometric study on the longitudinal
and lateral symmetry of the sural nerve in mature and aging
These are directions for future studies.
female rats Brain Res. 1222 51–60
Rotation is very frequent in images and difficult to Lake D E, Richman J S, Griffin M P and Moorman J R 2002 Sample
previously determine, therefore, it is expected for an entropy analysis of neonatal heart rate variability Am. J.
image qualifier to be invariant to rotations. Since rota- Physiol. Regul. Integr. Comp. Physiol. 283 R789–797
Liu C Y, Liu C C, Shao P, Li L P, Sun X, Wang X P and Liu F 2011
tions promoted in images would also rotate reference pat-
Comparison of different threshold values r for approximate
terns in SampEn2D, match counts would be the same. entropy: application to investigate the heart rate variability
Therefore SampEn2D is invariant to rotation. The same between heart failure and healthy control groups Physiol.
reasoning can be applied to image translation, allowing to Meas. 32 167–80
Pincus S M 1991 Approximate entropy as a measure of system
conclude that SampEn2D is translation invariant.
complexity Proc. Natl Acad. Sci. USA 88 2297–301
SampEn2D is an entropy rate measure that Pincus S M and Goldberger A L 1994 Physiological time-series
accounts for image spatial information and might be analysis: What does regularity quantify? Am. J. Physiol. Heart
useful in biomedical image analysis. We believe that Circ Physiol. 266 H1643–1656
Ramdani S, Seigle B, Lagarde J, Bouchara F and Bernard P L 2009 On
irregularity properties of images might be related to
the use of sample entropy to analyze human postural sway
important image features, such as texture patterns. data Med. Eng. Phys. 31 1023–31
Further application studies can be conducted to verify Richman J S and Moorman J R 2000 Physiological time-series
its effectiveness for other image datasets. analysis using approximate entropy and sample entropy
J. Am. Physiol. 278 H2039–2049
Silva L E V, Senra Filho A C S, Fazan V P S, Felipe J C and
Acknowledgments Murta Junior L O 2014 Two-dimensional sample entropy
analysis of rat sural nerve aging 36th Annual Int. Conf. IEEE
Engineering in Medicine and Biology Society pp 3345–8
The authors would like to thank FAPESP (grants Sprott J C 2003 Chaos and Time-Series Analysis (Oxford: Oxford
2013/15445-8 and 2013/01111-0), CNPq (grant University Press)
300900/2013-9) and CAPES (grant PNPD20131672) Sun X and Xu W 2014 Fast implementation of delongʼs algorithm
for the financial support. for comparing the areas under correlated receiver operating
characteristic curves IEEE Signal Process. Lett. 21 1389–93
Tsallis C 2009 Computational applications of nonextensive
References statistical mechanics J. Comput. Appl. Math. 227 51–8
Yentes J M, Hunt N, Schmid K K, Kaipust J P, McGrath D and
Abdelmounaime S and Dong-Chen H 2013 New brodatz-based Stergiou N 2013 The appropriate use of approximate entropy
image databases for grayscale color and multiband texture and sample entropy with short data sets Ann. Biomed. Eng. 41
analysis ISRN Mach. Vis. 2013 14 349–65
Celik T 2014 Spatial entropy-based global and local image contrast You J and Cohen H 1993 Classification and segmentation of rotated
enhancement IEEE Trans. Image Process. 23 5298–308 and scaled textured images using texture tuned masks Pattern
Chen W, Zhuang J, Yu W and Wang Z 2009 Measuring complexity Recognit. 26 245–58
using fuzzyen, apen and sampen Med. Eng. Phys. 31 61–8 Zhao W-L and Ngo C-W 2009 Scale-rotation invariant pattern
Chen Y and Pham T D 2013 Sample entropy and regularity entropy for keypoint-based near-duplicate detection IEEE
dimension in complexity analysis of cortical surface structure in Trans. Image Process. 18 412–23

11

You might also like