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

198 Ansichten (letzte 30 Tage)
prashali deshmukh am 15 Jan. 2018
Bearbeitet: John BG am 21 Jan. 2018
Difference between 10log10 and 20log20 can anyone please explain?
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Antworten (3)

Star Strider am 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.
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

John BG am 15 Jan. 2018
Bearbeitet: John BG am 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.
thanks in advance for time and attention
John BG
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Image Analyst am 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.
##### 0 Kommentare-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Kategorien

Find more on Blocked Images in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!