When to use 10 log 10 and 20 log 10 while calculating psnr of image ?

284 views (last 30 days)
Difference between 10log10 and 20log20 can anyone please explain?

Answers (3)

Star Strider
Star Strider on 15 Jan 2018
Whether you use 10 or 20 in calculating decibels depends on the units you are starting with. If you are starting with power, use 10, because power is already the square of amplitude. If you are starting with amplitude (or ‘energy’), use 20.

John BG
John BG on 15 Jan 2018
Edited: John BG on 21 Jan 2018
Hi Prashali Deshmukh
.
1. in MATLAB there is no log20
indeed one can write a function with such name but the only related built-in functions are log log2 and log10
2.
log10 is used to compress a reference axis so the relevant data shows up, so it's easier to spot, like RF signals in noise.
3.
the 10*log10 or 20*log10 is just to further amplify the data, according to whether you are measuring
  • Amplitude: Voltage or current (Volts Amperes), or
  • Power (Volts)^2 (/R) or I^2 (*R)
the reference resistor is usually of well known value, in my applications assumed 1, so one calculates the Watts per Ohm.
if you find this answer useful would you please be so kind to consider marking my answer as Accepted Answer?
To any other reader, if you find this answer useful please consider clicking on the thumbs-up vote link
thanks in advance for time and attention
John BG

Image Analyst
Image Analyst on 15 Jan 2018
Use the built-in psnr() function, in the Image Processing Toolbox. Optical images have units of gray levels which are most like a unit of energy, not power. Work out the units from first principles and you'll see. But it depends on how you interpret it.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!