<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238489</link>
    <title>MATLAB Central Newsreader - PSNR ?</title>
    <description>Feed for thread: PSNR ?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 31 Oct 2008 14:15:04 -0400</pubDate>
      <title>PSNR ?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238489#608334</link>
      <author>ABUTALA </author>
      <description>Can anyone reply with the sample code to calculate PSNR of two&lt;br&gt;
images in MATLAB?&lt;br&gt;
&lt;br&gt;
thanks</description>
    </item>
    <item>
      <pubDate>Fri, 31 Oct 2008 14:26:01 -0400</pubDate>
      <title>Re: PSNR ?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238489#608339</link>
      <author>Adam </author>
      <description>&quot;ABUTALA&quot; &amp;lt;love.scream1@gmail.com&amp;gt; wrote in message &amp;lt;gef3t8$r8q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Can anyone reply with the sample code to calculate PSNR of two&lt;br&gt;
&amp;gt; images in MATLAB?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanks&lt;br&gt;
&lt;br&gt;
Did you even try this yourself?  Programming doesn't get much easier than this.&lt;br&gt;
&lt;br&gt;
Post what you did and if it's not Matlab optimal people will happily help out.  I'm sure someone will post the answer anyway...&lt;br&gt;
&lt;br&gt;
~Adam</description>
    </item>
    <item>
      <pubDate>Fri, 31 Oct 2008 15:48:02 -0400</pubDate>
      <title>Re: PSNR ?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238489#608375</link>
      <author>ABUTALA </author>
      <description>&quot;Adam&quot; &amp;lt;not.real@email.com&amp;gt; wrote in message &amp;lt;gef4hp$5rn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;ABUTALA&quot; &amp;lt;love.scream1@gmail.com&amp;gt; wrote in message &amp;lt;gef3t8$r8q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Can anyone reply with the sample code to calculate PSNR of two&lt;br&gt;
&amp;gt; &amp;gt; images in MATLAB?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; thanks&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Did you even try this yourself?  Programming doesn't get much easier than this.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Post what you did and if it's not Matlab optimal people will happily help out.  I'm sure someone will post the answer anyway...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ~Adam&lt;br&gt;
&lt;br&gt;
If you have answer, you reply or we dont need comment?&lt;br&gt;
&lt;br&gt;
if i  have answer , why i ask you?</description>
    </item>
    <item>
      <pubDate>Fri, 31 Oct 2008 16:08:01 -0400</pubDate>
      <title>Re: PSNR ?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238489#608378</link>
      <author>Adam </author>
      <description>&quot;ABUTALA&quot; &amp;lt;love.scream1@gmail.com&amp;gt; wrote in message &amp;lt;gef9bi$7gj$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Adam&quot; &amp;lt;not.real@email.com&amp;gt; wrote in message &amp;lt;gef4hp$5rn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;ABUTALA&quot; &amp;lt;love.scream1@gmail.com&amp;gt; wrote in message &amp;lt;gef3t8$r8q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Can anyone reply with the sample code to calculate PSNR of two&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; images in MATLAB?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; thanks&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Did you even try this yourself?  Programming doesn't get much easier than this.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Post what you did and if it's not Matlab optimal people will happily help out.  I'm sure someone will post the answer anyway...&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; ~Adam&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If you have answer, you reply or we dont need comment?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; if i  have answer , why i ask you?&lt;br&gt;
&lt;br&gt;
Nope.  I have answer, I'm just not telling, AND I'm commenting.&lt;br&gt;
&lt;br&gt;
People come in here everyday asking for code without putting forth any indication they did any work themself.  If you had googled PSNR you would see it's one equation and would already have your code instead of waiting for someone else to come along and maybe/maybe not answer your question.&lt;br&gt;
&lt;br&gt;
Good luck,&lt;br&gt;
~Adam</description>
    </item>
    <item>
      <pubDate>Fri, 31 Oct 2008 19:26:02 -0400</pubDate>
      <title>Re: PSNR ?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238489#608416</link>
      <author>ABUTALA </author>
      <description>&quot;Adam&quot; &amp;lt;not.real@email.com&amp;gt; wrote in message &amp;lt;gefah1$m7c$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;ABUTALA&quot; &amp;lt;love.scream1@gmail.com&amp;gt; wrote in message &amp;lt;gef9bi$7gj$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Adam&quot; &amp;lt;not.real@email.com&amp;gt; wrote in message &amp;lt;gef4hp$5rn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &quot;ABUTALA&quot; &amp;lt;love.scream1@gmail.com&amp;gt; wrote in message &amp;lt;gef3t8$r8q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Can anyone reply with the sample code to calculate PSNR of two&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; images in MATLAB?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; thanks&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Did you even try this yourself?  Programming doesn't get much easier than this.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Post what you did and if it's not Matlab optimal people will happily help out.  I'm sure someone will post the answer anyway...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; ~Adam&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; If you have answer, you reply or we dont need comment?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; if i  have answer , why i ask you?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Nope.  I have answer, I'm just not telling, AND I'm commenting.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; People come in here everyday asking for code without putting forth any indication they did any work themself.  If you had googled PSNR you would see it's one equation and would already have your code instead of waiting for someone else to come along and maybe/maybe not answer your question.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Good luck,&lt;br&gt;
&amp;gt; ~Adam&lt;br&gt;
&lt;br&gt;
So I ask because i dont have answer ans i googled but i didnt get my answer?</description>
    </item>
    <item>
      <pubDate>Sat, 01 Nov 2008 21:10:04 -0400</pubDate>
      <title>Re: PSNR ?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238489#608532</link>
      <author>Justin Abbott</author>
      <description>&quot;ABUTALA&quot; &amp;lt;love.scream1@gmail.com&amp;gt; wrote in message &amp;lt;gefm4a$gj9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Adam&quot; &amp;lt;not.real@email.com&amp;gt; wrote in message &amp;lt;gefah1$m7c$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;ABUTALA&quot; &amp;lt;love.scream1@gmail.com&amp;gt; wrote in message &amp;lt;gef9bi$7gj$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &quot;Adam&quot; &amp;lt;not.real@email.com&amp;gt; wrote in message &amp;lt;gef4hp$5rn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &quot;ABUTALA&quot; &amp;lt;love.scream1@gmail.com&amp;gt; wrote in message &amp;lt;gef3t8$r8q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Can anyone reply with the sample code to calculate PSNR of two&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; images in MATLAB?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; thanks&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Did you even try this yourself?  Programming doesn't get much easier than this.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Post what you did and if it's not Matlab optimal people will happily help out.  I'm sure someone will post the answer anyway...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; ~Adam&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; If you have answer, you reply or we dont need comment?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; if i  have answer , why i ask you?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Nope.  I have answer, I'm just not telling, AND I'm commenting.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; People come in here everyday asking for code without putting forth any indication they did any work themself.  If you had googled PSNR you would see it's one equation and would already have your code instead of waiting for someone else to come along and maybe/maybe not answer your question.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Good luck,&lt;br&gt;
&amp;gt; &amp;gt; ~Adam&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; So I ask because i dont have answer ans i googled but i didnt get my answer?&lt;br&gt;
&lt;br&gt;
try googling:&lt;br&gt;
psnr wiki&lt;br&gt;
the first result should be useful.&lt;br&gt;
-Justin</description>
    </item>
    <item>
      <pubDate>Wed, 26 Nov 2008 06:45:29 -0500</pubDate>
      <title>Re: PSNR ?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238489#613311</link>
      <author>malin198409@gmail.com</author>
      <description>On Oct 31, 10:15=A0pm, &quot;ABUTALA&quot; &amp;lt;love.scre...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Can anyone reply with the sample code to calculate PSNR of two&lt;br&gt;
&amp;gt; images in MATLAB?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; thanks&lt;br&gt;
&lt;br&gt;
Matlab Sorce code is listed in the following. and the range of the&lt;br&gt;
value of the two image A and B is 0~255:&lt;br&gt;
&lt;br&gt;
function PSNR(A,B)&lt;br&gt;
&lt;br&gt;
if A =3D=3D B&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;error('Images are identical: PSNR has infinite value')&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
max2_A =3D max(max(A));&lt;br&gt;
max2_B =3D max(max(B));&lt;br&gt;
min2_A =3D min(min(A));&lt;br&gt;
min2_B =3D min(min(B));&lt;br&gt;
&lt;br&gt;
if max2_A &amp;gt; 255 || max2_B &amp;gt; 255 || min2_A &amp;lt; 0 || min2_B &amp;lt; 0&lt;br&gt;
&amp;nbsp;&amp;nbsp;error('input matrices must have values in the interval [0,255]')&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
error_diff =3D A - B;&lt;br&gt;
decibels =3D 20*log10(255/(sqrt(mean(mean(error_diff.^2)))));&lt;br&gt;
disp(sprintf('PSNR =3D +%5.2f dB',decibels))</description>
    </item>
  </channel>
</rss>

