- Research
- Open Access
- Published:

# Relationship between entropy and SNR changes in image enhancement

*EURASIP Journal on Image and Video Processing*
**volume 2017**, Article number: 83 (2017)

## Abstract

There are many techniques of image enhancement. Their parameters are traditionally tuned by maximization of SNR criterion, which is unfortunately based on the knowledge of an ideal image. Our approach is based on Hartley entropy, its estimation, and differentiation. Resulting gradient of entropy is estimated without knowledge of ideal images, and it is a subject of minimization. Both SNR maximization and gradient magnitude minimization cause various settings of the given filter. The optimum settings are compared, and their differences are discussed.

## Introduction

In many different fields, image quality measurement is important for various image processing tasks. Traditional tasks as image enhancement [1, 2], sharpening, and smoothing are solved by digital filters of various types and parameter settings. Filter performance can be compared by different image quality assessment techniques [3, 4]. Image quality measure signal-to-noise ratio (SNR) [5] or its modifications are the most commonly used to compare filter performance [6–8]. SNR measure is based on the knowledge of referential image which is a kind of Full-Reference Image Quality Assessment. However, the original image is not available in real-world tasks. Therefore, No-Reference Image Quality Assessment (NR-IQA) technique [9, 10] must be used to measure image quality. Our approach is focused on relationship between SNR and Hartley entropy. In this paper, a novel NR-IQA method based on image entropy is introduced and verified on image dataset. Alternative approach focused on motion estimation and parallel computing is included in [11, 12].

## Methods

### Quality measures

A digital image is a 2D discrete signal obtained by a sampling process of analogous 2D signal. A digital image will be denoted by real function x(*n*
_{1},*n*
_{2}) which describes image amplitude at an integer coordinate position (*n*
_{1},*n*
_{2}). Image quality can be measured by standard measures as mean squared error or SNR. However, both mentioned measures are based on the knowledge of original image. Other measures must be used when original image is not known. Founding a relationship between SNR and entropy allows us to use also entropy as image quality measure.

#### Signal-to-noise ratio

The SNR is an image property comparing the ratio of signal power to noise power. The SNR measure can be used to analyze image quality. The estimation of SNR is based on knowledge of original undegraded image s(*n*
_{1},*n*
_{2}). The SNR of input noisy image x(*n*
_{1},*n*
_{2}) is calculated in the spatial domain as

with E[ ·] standing for an expected value. The SNR of improved image y(*n*
_{1},*n*
_{2}) is

The traditional improving measure *Δ*
*SNR* is defined as a difference between *SNR*
_{
y
} and *SNR*
_{
x
}, and it allows to compare filter performances.

Positive *Δ*
*SNR* value expresses the improvement of noisy image after its reconstruction. On the other hand, negative value expresses noisy image degradation.

#### Robust signal-to-noise ratio

Measure *Δ*
*SNR* compares squared error of image intensities. Image filtering can cause intensities shifting or scaling, which will automatically decrease image quality measure *Δ*
*SNR*. Therefore, we introduce robust version of *Δ*
*SNR* designated as *Δ*
*R*. Definition of *Δ*
*R* is similar to *Δ*
*SNR* but *Δ*
*R* compares squared errors of statical rank

where R(·) is a rank function [13] returning the rank of a pixel intensity inside an image. This measure is shift and scale invariant, but its time complexity is greater than time complexity of *Δ*
*SNR* due to embedded sorting.

#### Hartley entropy

Entropy is well known as a measure in statistical thermodynamics and information theory. We use entropy as a measure for image quality. To estimate image entropy, we use entropy estimation algorithm described in [14, 15]. Let \(n \in \mathbb {N}\) be the number of image pixels, *x*
_{
k
}∈ [0,1] be the intensity of *k*th pixel for *k*=1,⋯,*n*, and *ε*∈(0,0.5] be the width parameter. Hartley entropy [16] (in nats) can be estimated as

where \(\mu (\mathcal {C})\) is a measure of a set

The measure of a set \(\mu (\mathcal {C})\) can be calculated as

where *x*
_{(1)}≤*x*
_{(2)}≤⋯≤*x*
_{(n)}. Supposing, a reconstructed image is the result of any filter application with parameters \({\bold {p}} \in \left (\mathbb {R}_{0}^{+}\right)^{q}\) where \(q \in \mathbb {N}\) is a number of parameters.

The novel characteristic which helps to optimize digital filter design is the component wise maximum of Hartley entropy gradient

that should be minimum possible which is the main supposition and matter of novel approach. The *G* criterion design is motivated as follows. When the filter has only one parameter (*q*=1), we minimize \(\partial \hat {H}/\partial p < 0\). Therefore, we obtain inflection point of \(\hat {H}(p_{1})\) for value of *p*
_{1} where the Hartley entropy rapidly decreases. The generalization for \(q \in \mathbb {N}\) is based on minimax approach when we minimize the maximal parameter sensitivity \(\partial \hat {H} / \partial p_{i} < 0\) over all tuning parameters. Whenever any \(\partial \hat {H}/\partial p_{i} \geq 0\), we set *G*=0. The partial derivative of Hartley entropy \(\hat {H}({\bold {p}})\) with respect to the variable *p*
_{
i
} can be approximated by finite differences

where spacing *h*>0 approaches zero and *i*∈{1,⋯,*q*}.

### Linear filter primer

We have to introduce sharpening filters that will be used for studying relationship between SNR and entropy changes in image enhancement. Our interest [15] is focused only on linear infinite impulse response (IIR) filters [17] with radial symmetry in frequency domain whose response can be easily calculated by the Discrete Fourier Transform [18] (DFT). Their advantage is in the side effect suppression of a rectangular grid.

Let \(\omega = \lVert \boldsymbol {\omega } \rVert _{2}, {\boldsymbol \omega }\in \mathbb {R}^{2}\) be the angular frequency and *ρ*>0 be the radius. The radial filter has transfer function F(** ω**)=Φ (

**). Useful low-pass (LP) filter is a Gaussian filter [19] as traditional one**

*ω*The simplest sharpening filter based on Gaussian filter with sharpening parameter *α*>0 and its generalization include

where LP(** ω**), LP

_{0}(

**), LP**

*ω*_{1}(

**), and LP**

*ω*_{2}(

**) are four realizations of low-pass filter Φ**

*ω*_{1}(

**). In the case of Φ**

*ω*_{2}, only fundamental low-pass filter is used, but in Φ

_{3}, the difference between two low-pass filters (LP

_{1},LP

_{2}) is used as high-pass filter added to the fundamental LP

_{0}filter in accordance with conventions of image processing. The filters Φ

_{1}(smoothing), Φ

_{2}, and Φ

_{3}(sharpening) will be subject of parameter optimization in the next section. The filter Φ

_{1}has only one parameter

*ρ*which is an advantage for its optimization. The filters Φ

_{2}and Φ

_{3}have two (

*α*,

*ρ*) and four (

*α*,

*ρ*

_{0},

*ρ*

_{1},

*ρ*

_{2}) parameters, respectively. Their tuning can be performed by any heuristics for multimodal function optimization. Both Φ

_{1}and Φ

_{2}quality measures (

*Δ*

*SNR,G*) can be easily visualized.

## Results and discussion

The novel characteristic *G* was tested on real images with an additive noise. The role of filter parameters was investigated for log10*ρ*∈ [−1,1], log10*α*∈ [−4,0], and log10*ρ*
_{
k
}∈ [−1,0] where *k*∈{0,1,2} in the case of Φ_{1},Φ _{2}, and Φ_{3}. The Fast Simulated Annealing (FSA) [20] was used for *Δ*
*SNR* maximization and *G* minimization inside given logarithmic ranges.

### Test data

Four gray scale images (THISTLE, HOUSE, MAP, WINDMILL) of size 450×400 and two gray scale images (BRIDGE, BALCONY) of size 375×282 pixels were chosen to demonstrate the relationship between *Δ*
*SNR* and *G* criteria. All image intensities were transformed from their original range to the interval [0,1] and were degraded by a box filter with squared mask of size 3×3 and then by Gaussian additive noise with *σ*=0.01. The original images and results of their degradation are depicted in Figs. 1 and 2.

### Image enhancement based on *Δ*
*SNR*

The *Δ*
*SNR* criterion was used for the optimization of filters Φ_{1},Φ _{2}, and Φ_{3} as a reference. The dependency of *Δ*
*SNR* on *ρ* is demonstrated on Fig. 3 for smoother Φ_{1} and MAP image. The dependency of *Δ*
*SNR* on *α* and *ρ* is depicted in Fig. 4 for sharpening filter Φ_{2} and the same image. Similarly, Fig. 5 is showing the dependency of *Δ*
*SNR* on *α* and *ρ*
_{0} of filter Φ_{3} with *ρ*
_{1}=0.9 and *ρ*
_{2}=0.2. The numerical results of heuristics maximization are included in Tables 1, 2, and 3 for both traditional and referential approaches. Reconstructed images via Φ_{3} with maximal *Δ*
*SNR* are shown in Fig. 6.

### Image enhancement based on *G*

The novel *G* measure was used for the optimization of filters mentioned above. The measure *G* was approximated by Eq. (9) with spacing *h*=10^{−12}. Width parameter *ε* was set to value 0.01. The dependency of *G* on *ρ* is demonstrated on Fig. 3 for smoother Φ_{1} and MAP image. The dependency of *G* on *α* and *ρ* is depicted in Fig. 7 for sharpening filter Φ_{2} and the same image. For the last filter Φ_{3} with *ρ*
_{1}=0.9 and *ρ*
_{2}=0.2, the dependency of *G* on *α* and *ρ*
_{0} is depicted in Fig. 8. The numerical results of heuristic minimization via FSA are included in Tables 4, 5, and 6 with adequate values of *Δ*
*SNR* and *Δ*
*R*. Reconstructed images via Φ_{3} with minimal *G* are shown in Fig. 9.

### Discussion

The proposed novel criterion *G* was minimized to obtain the optimal parameters of the three different filters tested on the real images. The quality of the optimal reconstruction was evaluated by the classical *Δ*
*SNR* measure and our robust version *Δ*
*R*. For a comparison, the same images were reconstructed by the filters whose optimal parameters were obtained by maximization of *Δ*
*SNR*. The relative changes *RC* between the qualities of the optimal reconstruction according to the filters Φ_{1},Φ _{2}, and Φ_{3} evaluated for the criterion *Δ*
*SNR* and *G* are summarized in the Table 7. When comparing the results, it can be seen that the achieved results are similar. The most considerable changes in the quality measures were obtained for the filter Φ_{2} settings providing significantly lower qualities but still improving image enhancement. The image intensities reconstructed by the filter Φ_{2} and proposed criterion *G* are shifted or scaled which results from the large values of the relative changes with respect to the quality measure *Δ*
*SNR*.

## Conclusions

The novel No-Reference Image Quality Assessment method and adequate criterion were introduced in this paper. It is based on the Hartley entropy estimation from gray-level densities and the optimization of its changes during tuning of filter parameters. Three types of linear image filters with various number of parameters were optimized by using traditional SNR criterion as a reference, first. Using novel criterion *G* and its minimization, similar results of comparable SNR quality were obtained without prior knowledge of ideal image. The novel procedure is directly applicable to real image enhancement.

## References

- 1
B Langari, S Vaseghi, A Prochazka, B Vaziri, FT Aria, Edge-guided image gap interpolation using multi-scale transformation. IEEE Trans. Image Proc.

**25**(9), 4394–4405 (2016). - 2
E Hostalkova, O Vysata, A Prochazka, in

*15th International Conference on Digital Signal Processing Location*. Multi-dimensional biomedical image de-noising using Haar transform (Cardiff UnivCardiff, WALES, 2007). - 3
S Patil, S Sheelvant, Survey on image quality assessment techniques. Int. J. Sci. Res.

**4**(7), 1756–1759 (2015). - 4
P Hanhart, MV Bernardo, M Pereira, AMG Pinheiro, T Ebrahimi, Benchmarking of objective quality metrics for HDR image quality assessment. EURASIP J. Image Video Process.

**2015:**, 39 (2015). - 5
RG Lyons,

*Understanding digital signal processing*(Prentice Hall, New Jersey, 2010). - 6
I Djurović, BM3D filter in salt-and-pepper noise removal. EURASIP J. Image Video Process.

**2016:**, 13 (2016). - 7
D-H Jiang, X Tan, Y-Q Liang, S Fang, A new nonlocal variational bi-regularized image restoration model via split Bregman method. EURASIP J. Image Video Process.

**2015:**, 15 (2015). - 8
A Isar, S Moga, D Isar, A new denoising system for SONAR images. EURASIP J. Image Video Process.

**2009:**, 173841 (2009). - 9
V Kamble, KM Bhurchandi, No-reference image quality assessment algorithms: a survey. Optik - Int. J. Light Electron. Opt.

**126**(11-12), 1090–1097 (2015). - 10
H Liu, I Heynderickx, in

*Proc. SPIE 7867, Image Quality and System Performance VIII, vol. 78670C*. Issues in the design of a no-reference metric for perceived blur, (2011). - 11
C Yan, et al, A highly parallel framework for HEVC coding unit partitioning tree decision on many-core processors. IEEE Sig. Process. Lett.

**21**(5), 573–576 (2014). - 12
C Yan, et al, Efficient parallel framework for HEVC motion estimation on many-core processors. IEEE Trans. Circ. Syst. Video Technol.

**24**(12), 2077–2089 (2014). - 13
EL Lehmann, HJM D’Abrera,

*Nonparametrics, statistical methods based on ranks*(HOLDEN-DAY, San Francisco, 1975). - 14
Z Krbcová, J Kukal, in

*MENDEL 2016 - 22nd International Conference on Soft Computing*. Image quality measures based on entropy (Brno: University of Technology, 2016), pp. 209–216. - 15
Z Krbcová, J Kukal, J Švihlík, K Fliegel, in

*Proceedings of SPIE Volume 9971 Applications of Digital Image Processing XXXIX, vol. 997121*. Fast estimate of Hartley entropy in image sharpening, (2016). - 16
RVL Hartley, Transmission of information. Bell Syst. Tech. J.

**7**(3), 535–563 (1928). - 17
JS Lim,

*Two-dimensional signal and image processing*, 1st edn (Prentice Hall PTR, New Jersey, 1990). - 18
N Ahmed, T Natarajan, KR Rao, Discrete cosine transform. IEEE Trans. Comput.

**C-23:**, 90–93 (1974). - 19
HJ Blinchikoff, AI Zverev,

*Filtering in the time and frequency domains*(Wiley, New York, 1976). - 20
H Szu, R Hartley, Fast simulated annealing. Phys. Lett. A.

**122:**, 157–162 (1987).

## Acknowledgements

Not applicable.

### Funding

This study has been supported financially from specific university research MSMT no. 20-SVV/2016, CTU grant SGS 17/196/OHK4/3T/14 and grant GA17-05840S “Multicriteria Optimization of Shift-Variant Imaging System Models” of the Czech Science Foundation.

### Availability of data and materials

The dataset supporting the conclusions of this article is included within the article.

## Author information

### Affiliations

### Contributions

JK suggested the main ideas of the research and realized a part of algorithms. ZK realized a part of algorithms and performed the comparison between entropy and SNR. ZK and JK took part in writing and approved the final version of the manuscript.

### Corresponding author

Correspondence to Zuzana Krbcova.

## Ethics declarations

### Ethics approval and consent to participate

Not applicable.

### Consent for publication

Not applicable.

### Competing interests

The authors declare that they have no competing interests.

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License(http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## About this article

#### Received

#### Accepted

#### Published

#### DOI

### Keywords

- Entropy
- Signal-to-noise ratio
- Robust signal-to-noise ratio
- Filter design optimization