Main Page: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
No edit summary
No edit summary
 
(366 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
'''Peak signal-to-noise ratio''', often abbreviated '''PSNR''', is an engineering term for the ratio between the maximum possible power of a [[Signal (information theory)|signal]] and the power of corrupting [[noise]] that affects the fidelity of its representation. Because many signals have a very wide [[dynamic range]], PSNR is usually expressed in terms of the [[logarithm]]ic [[decibel]] scale.
This is a preview for the new '''MathML rendering mode''' (with SVG fallback), which is availble in production for registered users.


PSNR is most commonly used to measure the quality of reconstruction of lossy compression [[codec]]s (e.g., for [[image compression]]). The signal in this case is the original data, and the noise is the error introduced by compression. When comparing compression codecs, PSNR is an ''approximation'' to human perception of reconstruction quality. Although a higher PSNR generally indicates that the reconstruction is of higher quality, in some cases it may not. One has to be extremely careful with the range of validity of this metric; it is only conclusively valid when it is used to compare results from the same codec (or codec type) and same content.<ref>{{cite doi|10.1049/el:20080522}}</ref><ref>[http://web.mit.edu/xiphmont/Public/theora/demo7.html MIT.edu]</ref>
If you would like use the '''MathML''' rendering mode, you need a wikipedia user account that can be registered here [[https://en.wikipedia.org/wiki/Special:UserLogin/signup]]
* Only registered users will be able to execute this rendering mode.
* Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.


PSNR is most easily defined via the [[mean squared error]] (''MSE''). Given a noise-free ''m''×''n'' monochrome image ''I'' and its noisy approximation ''K'', ''MSE'' is defined as:
Registered users will be able to choose between the following three rendering modes:  
:<math>\mathit{MSE} = \frac{1}{m\,n}\sum_{i=0}^{m-1}\sum_{j=0}^{n-1} [I(i,j) - K(i,j)]^2</math>


The PSNR (in dB) is defined as:
'''MathML'''
:<math>\begin{align}\mathit{PSNR} &= 10 \cdot \log_{10} \left( \frac{\mathit{MAX}_I^2}{\mathit{MSE}} \right)\\
:<math forcemathmode="mathml">E=mc^2</math>
&= 20 \cdot \log_{10} \left( \frac{\mathit{MAX}_I}{\sqrt{\mathit{MSE}}} \right)\\
&= 20 \cdot \log_{10} \left( {\mathit{MAX}_I} \right) - 10 \cdot \log_{10} \left( {{\mathit{MSE}}} \right)\end{align}</math>


Here, ''MAX<sub>I</sub>'' is the maximum possible pixel value of the image. When the pixels are represented using 8 bits per sample, this is 255. More generally, when samples are represented using linear [[Pulse-code modulation|PCM]] with ''B'' bits per sample, ''MAX<sub>I</sub>'' is 2<sup><var>B</var></sup>−1. For [[color image]]s with three [[RGB]] values per pixel, the definition of PSNR is the same except the MSE is the sum over all squared value differences divided by image size and by three. Alternately, for color images the image is converted to a different [[color space]] and PSNR is reported against each channel of that color space, e.g., [[YCbCr]] or [[HSL and HSV|HSL]].<ref>{{cite web|last=Oriani|first=Emanuele|title=qpsnr: A quick PSNR/SSIM analyzer for Linux|url=http://qpsnr.youlink.org/|accessdate=6 April 2011}}</ref><ref>{{cite web|title=pnmpsnr User Manual|url=http://netpbm.sourceforge.net/doc/pnmpsnr.html|accessdate=6 April 2011}}</ref>
<!--'''PNG''' (currently default in production)
:<math forcemathmode="png">E=mc^2</math>


Typical values for the PSNR in [[lossy compression|lossy]] image and video compression are between 30 and 50&nbsp;[[decibel|dB]], provided the bit depth is 8&nbsp;[[bit|bits]], where higher is better. For 16-bit data typical values for the PSNR are between 60 and 80&nbsp;[[decibel|dB]].<ref>{{cite book|last=Welstead|first=Stephen T.|title=Fractal and wavelet image compression techniques|year=1999|publisher=SPIE Publication|isbn=978-0-8194-3503-3|pages=155–156|url=http://books.google.com/books?id=evGyv-mogukC&lpg=PA155&dq=image%20compression%20acceptable%20PSNR&pg=PA156#v=onepage&q=image%20compression%20acceptable%20PSNR&f=false}}</ref><ref>{{cite journal|author=Raouf Hamzaoui, Dietmar Saupe|title=Fractal Image Compression|journal=Document and image compression|date=May 2006|volume=968|pages=168–169|url=http://books.google.com/books?id=FmqPOsEYRsEC&lpg=PA229&dq=image%20compression%20acceptable%20PSNR&pg=PA168#v=onepage&q=PSNR&f=false|accessdate=5 April 2011|editor1-first=Mauro|editor1-last=Barni|publisher=CRC Press|isbn=9780849335563}}</ref> Acceptable values for wireless transmission quality loss are considered to be about 20&nbsp;dB to 25&nbsp;dB.<ref>Thomos, N., Boulgouris, N. V., & Strintzis, M. G. (2006, January). Optimized Transmission of JPEG2000 Streams Over Wireless Channels. IEEE Transactions on Image Processing , 15 (1).</ref><ref>Xiangjun, L., & Jianfei, C. Robust transmission of JPEG2000 encoded images over packet loss channels. ICME 2007 (pp. 947-950). School of Computer Engineering, [[Nanyang Technological University]].</ref>
'''source'''
:<math forcemathmode="source">E=mc^2</math> -->


In the absence of noise, the two images ''I'' and ''K'' are identical, and thus the MSE is zero.  In this case the PSNR is infinite (or undefined, see [[Division by zero]]).<ref>{{cite book|last=Salomon|first=David|title=Data Compression: The Complete Reference|year=2007|publisher=Springer|isbn=978-1846286025|url=http://books.google.com/books?id=ujnQogzx_2EC&lpg=PA281&ots=FolwqB8qsN&dq=PSNR%20infinite&pg=PA281#v=onepage&q=PSNR%20infinite&f=false|edition=4|accessdate=26 July 2012|page=281}}</ref>
<span style="color: red">Follow this [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering link] to change your Math rendering settings.</span> You can also add a [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering-skin Custom CSS] to force the MathML/SVG rendering or select different font families. See [https://www.mediawiki.org/wiki/Extension:Math#CSS_for_the_MathML_with_SVG_fallback_mode these examples].


{{multiple image
==Demos==
  | width    = 200
  | align = center
  | footer    = Example [[Luma (video)|luma]] PSNR values for a [[libjpeg|cjpeg]] compressed image at various quality levels.
  | image1    = PSNR-example-base.png
  | caption1  = Original uncompressed image
  | image2    = PSNR-example-comp-90.jpg
  | caption2  = Q=90, PSNR 45.53dB
  | image3    = PSNR-example-comp-30.jpg
  | caption3  = Q=30, PSNR 36.81dB
  | image4    = PSNR-example-comp-10.jpg
  | caption4  = Q=10, PSNR 31.45dB


(full resolution is [http://upload.wikimedia.org/wikipedia/commons/d/d3/PSNR-example-base.png here].)
Here are some [https://commons.wikimedia.org/w/index.php?title=Special:ListFiles/Frederic.wang demos]:
  }}


==See also==
* [[Data compression ratio]]
* [[PEVQ|Perceptual Evaluation of Video Quality (PEVQ)]]
* [[Signal-to-noise ratio]]
* [[Structural similarity|Structural similarity (SSIM) index]]
* [[Subjective video quality]]
* [[Video quality]]


==References==
* accessibility:
{{Reflist}}
** Safari + VoiceOver: [https://commons.wikimedia.org/wiki/File:VoiceOver-Mac-Safari.ogv video only], [[File:Voiceover-mathml-example-1.wav|thumb|Voiceover-mathml-example-1]], [[File:Voiceover-mathml-example-2.wav|thumb|Voiceover-mathml-example-2]], [[File:Voiceover-mathml-example-3.wav|thumb|Voiceover-mathml-example-3]], [[File:Voiceover-mathml-example-4.wav|thumb|Voiceover-mathml-example-4]], [[File:Voiceover-mathml-example-5.wav|thumb|Voiceover-mathml-example-5]], [[File:Voiceover-mathml-example-6.wav|thumb|Voiceover-mathml-example-6]], [[File:Voiceover-mathml-example-7.wav|thumb|Voiceover-mathml-example-7]]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Audio-Windows7-InternetExplorer.ogg Internet Explorer + MathPlayer (audio)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-SynchronizedHighlighting-WIndows7-InternetExplorer.png Internet Explorer + MathPlayer (synchronized highlighting)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Braille-Windows7-InternetExplorer.png Internet Explorer + MathPlayer (braille)]
** NVDA+MathPlayer: [[File:Nvda-mathml-example-1.wav|thumb|Nvda-mathml-example-1]], [[File:Nvda-mathml-example-2.wav|thumb|Nvda-mathml-example-2]], [[File:Nvda-mathml-example-3.wav|thumb|Nvda-mathml-example-3]], [[File:Nvda-mathml-example-4.wav|thumb|Nvda-mathml-example-4]], [[File:Nvda-mathml-example-5.wav|thumb|Nvda-mathml-example-5]], [[File:Nvda-mathml-example-6.wav|thumb|Nvda-mathml-example-6]], [[File:Nvda-mathml-example-7.wav|thumb|Nvda-mathml-example-7]].
** Orca: There is ongoing work, but no support at all at the moment [[File:Orca-mathml-example-1.wav|thumb|Orca-mathml-example-1]], [[File:Orca-mathml-example-2.wav|thumb|Orca-mathml-example-2]], [[File:Orca-mathml-example-3.wav|thumb|Orca-mathml-example-3]], [[File:Orca-mathml-example-4.wav|thumb|Orca-mathml-example-4]], [[File:Orca-mathml-example-5.wav|thumb|Orca-mathml-example-5]], [[File:Orca-mathml-example-6.wav|thumb|Orca-mathml-example-6]], [[File:Orca-mathml-example-7.wav|thumb|Orca-mathml-example-7]].
** From our testing, ChromeVox and JAWS are not able to read the formulas generated by the MathML mode.


{{Noise}}
==Test pages ==


[[Category:Image compression]]
To test the '''MathML''', '''PNG''', and '''source''' rendering modes, please go to one of the following test pages:
[[Category:Noise]]
*[[Displaystyle]]
[[Category:Film and video technology]]
*[[MathAxisAlignment]]
[[Category:Digital television]]
*[[Styling]]
[[Category:Engineering ratios]]
*[[Linebreaking]]
*[[Unique Ids]]
*[[Help:Formula]]


[[vi:PSNR]]
*[[Inputtypes|Inputtypes (private Wikis only)]]
*[[Url2Image|Url2Image (private Wikis only)]]
==Bug reporting==
If you find any bugs, please report them at [https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=Math&version=master&short_desc=Math-preview%20rendering%20problem Bugzilla], or write an email to math_bugs (at) ckurs (dot) de .

Latest revision as of 23:52, 15 September 2019

This is a preview for the new MathML rendering mode (with SVG fallback), which is availble in production for registered users.

If you would like use the MathML rendering mode, you need a wikipedia user account that can be registered here [[1]]

  • Only registered users will be able to execute this rendering mode.
  • Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.

Registered users will be able to choose between the following three rendering modes:

MathML


Follow this link to change your Math rendering settings. You can also add a Custom CSS to force the MathML/SVG rendering or select different font families. See these examples.

Demos

Here are some demos:


Test pages

To test the MathML, PNG, and source rendering modes, please go to one of the following test pages:

Bug reporting

If you find any bugs, please report them at Bugzilla, or write an email to math_bugs (at) ckurs (dot) de .