91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-09
  • 語言: Matlab
  • 標簽:

資源簡介

圖像PSNR及其計算(matlab實現版本) http://blog.csdn.net/laoxuan2011/article/details/51519062

資源截圖

代碼片段和文件信息

function?PSNR(AB)

%?PURPOSE:?To?find?the?PSNR?(peak?signal-to-noise?ratio)?between?two
%??????????intensity?images?A?and?B?each?having?values?in?the?interval
%??????????[01].?The?answer?is?in?decibels?(dB).
%
%??????????There?is?also?a?provision?in?EXAMPLE?3?below?for?images?
%??????????stored?in?the?interval?[0255]?i.e.?256?gray?levels.?
%
%?SYNOPSIS:?PSNR(AB)
%
%?DEscriptION:?The?following?is?quoted?from?“Fractal?Image?Compression“
%??????????????by?Yuval?Fisher?et?al.(Springer?Verlag?1995)
%??????????????section?2.4?“Pixelized?Data“.
%
%??????????????“...PSNR?is?used?to?measure?the?difference?between?two
%??????????????images.?It?is?defined?as
%
%???????????????????????????PSNR?=?20?*?log10(b/rms)
%
%??????????????where?b?is?the?largest?possible?value?of?the?signal
%??????????????(typically?255?or?1)?and?rms?is?the?root?mean?square
%??????????????difference?between?two?images.?The?PSNR?is?given?in
%??????????????decibel?units?(dB)?which?measure?the?ratio?of?the?peak?
%??????????????signal?and?the?difference?between?two?images.?An?increase
%??????????????of?20?dB?corresponds?to?a?ten-fold?decrease?in?the?rms
%??????????????difference?between?two?images.
%??????????????
%??????????????There?are?many?versions?of?signal-to-noise?ratios?but
%??????????????the?PSNR?is?very?common?in?image?processing?probably
%??????????????because?it?gives?better-sounding?numbers?than?other
%??????????????measures.“
%
%?EXAMPLE?1:?load?clown
%????????????A?=?ind2gray(Xmap);?%?Convert?to?an?intensity?image?in?[01].
%????????????B?=?0.95?*?A;????????%?Make?B?close?to?but?different?from?A.
%????????????PSNR(AB)????????????%?--->?“PSNR?=?+33.49?dB“
%
%?EXAMPLE?2:?A?=?rand(256);?%?A?is?a?random?256?X?256?matrix?in?[01].
%????????????B?=?0.9?*?A;???%?Make?B?close?to?but?different?from?A.
%????????????PSNR(AB)??????%?--->?“PSNR?=?+24.76?dB?(approx)“
%
%?EXAMPLE?3:?For?images?with?256?gray?levels:?this?function?PSNR?was?
%????????????originally?written?for?matrix-values?between?0?and?1
%????????????because?of?MATLAB‘s?preference?for?that?interval.
%
%????????????However?suppose?the?matrix?has?values?in?[0255].?Taking
%????????????Example?1?above?we?could?change?the?image?to?256?gray?levels.
%?????????
%????????????load?clown
%????????????A?=?ind2gray(Xmap);?%?Convert?to?intensity?image?in?[01]
%????????????AA?=?uint8(255*A);???%?Change?to?integers?in?[0255]
%????????????BB?=?0.95*AA;????????%?Make?BB?close?to?AA.
%
%????????????Now?we?must?alter?the?code?for?this?new?case.?Comment?out?the
%????????????existing?program?(using?%)?and?uncomment?the?alternative?
%????????????underneath?it.
%
%????????????PSNR(AABB)??????????%?--->?“PSNR?=?+33.56?dB“
%
%????????????Note?the?slightly?different?result?from?Example?1?because
%????????????decimal?values?were?rounded?into?integers.

if?A?==?B
???error(‘Images?are?identical:?PSNR?has?infinite?value‘)
end

max2_A?=?max(max(A));
max2_

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????3781??2009-05-19?16:27??PSNR.m
?????文件????????1316??2014-02-12?12:01??license.txt

評論

共有 條評論

相關資源