You are on page 1of 22

Nonlinear diffusion by regions.

KMLS a new
version, comparison with other gradient
threshold estimations for the diffusion
coefficient

Reinaldo Barrera Travieso, Angela M. León-Mecı́as, and Richard


M. Méndez-Castillo

Faculty of Mathematics and Computer Science, University of Havana

PROGRAM 15th International Workshop on Operations Research


May 30, 2023

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 1 / 22
Presentation Overview

1 Introduction
Objectives

2 Image smoothing by diffusion


The gradient threshold in the diffusion coefficient

3 Estimating the gradient threshold


Problems with the gradient threshold estimator KMLS for
mammogram images
KMLS2, a modified version of KMLS for AD smoothing of
mammogram images

4 Experimental environment and results


Results and discussion

5 Conclusions

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 2 / 22
Introduction
Mammograms are images with low contrast and a complicated
structured background and generally contaminated by some noise.
At the same time, mammograms are very important non-invasive
tests in the early detection of breast cancer.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 3 / 22
Objectives

• Apply AD Perona-Malik on mammography images to remove


noise and enhance edges.
• Apply AD by region using the SLIC algorithm.
• To compare different ways of estimating the threshold of the
gradient magnitud in the diffusion coefficient, and its influence
on edge detection.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 4 / 22
Image smoothing by diffusion

Diffusion is known as a physical process that equilibrates


concentration differences without creating or destroying mass. In
image processing we may identify the concentration with the
intensity of the gray value at a certain location.

Isotropy diffusion
∂I(x, y, t)
= c∆I(x, y, t)
∂t

PDE solution
2 +y 2
 
1 −x
Gσ (x, y) = e 2σ 2
2πσ 2

where the time-scale relationship is given by σ = t

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 5 / 22
Image smoothing by diffusion

Figure: Isotropy diffusion with σ = 5

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 6 / 22
Image smoothing by diffusion

Non linear PDE model (Perona and Malik)


∂I(x, y, t)
= div (c(x, y, t) · ∇I(x, y , t)), in Ω × (0, T)
∂t
c(x, y, t) · ∇I(x, y , t) · N = 0, in ∂Ω × (0, T)
I(x, y, 0) = I0 (x, y ), in Ω

Diffusion coefficient
 
−s2
1 2k 2
g1 (s) = s2
and g2 (s) = e
1+ k2

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 7 / 22
The gradient threshold in the diffusion coefficient

• K is a contrast parameter or a threshold for the magnitude of


the brightness gradient with great influence on edge
preservation.
• The diffusion coefficient also works as a stop function of time
and all its known expressions depend on a parameter k.
• Those regions of the image where ∥∇I∥ > k , the smoothing
effect is weaker and therefore both edges are preserved and
where ∥∇I∥ < k , the smoothing effect is stronger.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 8 / 22
Estimating the gradient threshold

P-Norm
σ∥It (x, y )∥p
k=
n·m

Morphological approach
X It (x, y) ◦ st X It (x, y) • st
k= −
n·m n·m
(x,y)∈It (x,y)∈It

Noise estimator
In this method a histogram of the absolute values of the gradient in
the whole image is calculated and k is set equal to 90% of its
integral value at each iteration.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 9 / 22
Problems with the gradient threshold estimator
KMLS for mammogram images

• The KMLS algorithm shows us the partition process according


to K-Means.
• If an image is divided into regions before it is smoothed, it can
happen that each pixel has similar gradient values.
• The low contrast problem led to the idea of introducing image
segmentation before running any diffusion process, trying to
locally smooth the image, to reinforce small edges.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 10 / 22
KMLS2, a modified version of KMLS for AD
smoothing of mammogram images

Figure: Adjustment and partitioning methodology applied to KMLC


Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 11 / 22
KMLS2, a modified version of KMLS for AD
smoothing of mammogram images

Estimating the gradient threshold for KMLC


s
−(m14 + m24 )
k=
ln(wep)m12 + ln(sep)m22

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 12 / 22
Experimental environment and results

We use the AD equation of Perona–Malik with different ways to


estimated the contrast parameter, using the diffusion coefficient
given by g2 to smooth the mammogram images, followed by the
classical edge detector Scharr to obtain an edge image.
Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 13 / 22
Results and discussion

Using the same 20 images as before from the Inbreast database,


the crop function was applied to each image to reduce unwanted
external areas to the breast. For these images, the pixel meshes
and the masks of the ground truth of the lesions were extracted. In
a previous step the images were divided into regions using the SLIC
clustering algorithm, with 1, 6, 12, 20, 30 and 100 clusters, with the
best results being for 6 clusters, used for the experiments that
follow. Three types of Anisotropic Diffusion (AD) smoothing were
performed, that differ in the way of estimating the threshold
parameter k of the gradient in the diffusion coefficient. The
showed results correspond to 10 iterations. After that, the classic
edge detector Scharr is applied to each smoothed image.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 14 / 22
Results and discussion

(a) (b) (c) (d)

Figure: Mammogram ID53586896 (a) Original image, images with


smoothing after: (b) AD-PNorm (c) AD-Noise and (d) AD-KMLS2.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 15 / 22
Results and discussion

(a) (b) (c) (d)

Figure: Mammogram ID53586896 (a) Original image of unsmoothed edge,


edge images with smoothing after (b) AD-PNorm (c) AD-Noise and (d)
AD-KMLS2.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 16 / 22
Results and discussion

(a) (b) (c) (d)

Figure: Mammogram ID53586896 (a) Mask of the anomaly ground truth


edge image, edge images: (b) without smoothing (c) and(d) after
AD-KMLS2 and AD-Noise respectively.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 17 / 22
Results and discussion

(a) (b) (c) (d)

Figure: Mammogram ID53587663 (a) Mask of the anomaly ground truth


edge image, edge images: (b) without smoothing (c) and(d) after
AD-KMLS2 and AD-Noise respectively.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 18 / 22
Results and discussion

0.05286
0.7093
0.05285

0.7092 0.05284

0.05283
0.7091

PFoM*
RMSE

0.05282
0.7090
0.05281

0.7089 0.05280

0.7088 0.05279
KMLS2 KMLS2
Noise 0.05278 Noise
PNorm PNorm
0.7087
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
t t

Figure: Objective performance measure RMSE(left), PFoM*(right), applied


to the edge image of ID53586896. Smoothing by AD-KMLS2, AD-pnorm
and AD-Noise.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 19 / 22
Results and discussion

0.01937
0.4217

0.01936
0.4216

0.4215 0.01935

0.4214 0.01934

PFoM*
RMSE

0.4213 0.01933

0.4212
0.01932

0.4211 KMLS2 KMLS2


Noise
0.01931 Noise
0.4210 PNorm PNorm
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
t t

Figure: Objective performance measure RMSE(left), PFoM*(right), applied


to the edge image of ID53587663. Smoothing by AD-KMLS2, AD-pnorm
and AD-Noise.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 20 / 22
Conclusions

• The quality of the edge images is superior when a previous AD


smoothing is applied.
• The proposed method AD-KMLS2 achieved better results for
45% of the images in terms of both quality measures.
• For the rest of the images the AD-Noise worked better,
although the difference according to the measurements is of
the order least equal 5 × 10−5 and visually the differences are
barely perceptible.
• The best results are reached by Scharr edge detector.

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 21 / 22
Nonlinear diffusion by regions. KMLS a new
version, comparison with other gradient
threshold estimations for the diffusion
coefficient

Reinaldo Barrera Travieso, Angela M. León-Mecı́as, and Richard


M. Méndez-Castillo

Faculty of Mathematics and Computer Science, University of Havana

PROGRAM 15th International Workshop on Operations Research


May 30, 2023

Reinaldo Barrera Travieso (MATCOM-UH) Nonlinear diffusion by regions May 30, 2023 22 / 22

You might also like