MetricMeasurement calculates Peak Signal-to-Noise Ratio
function [M_SE PSNR] = MetricsMeasurement(Orig_Image,Esti_Image)
% This function MetricMeasurement calculates Peak Signal-to-Noise Ratio and
% Mean-Square Error
%
% INPUTS: Orig_Image = Original Image
% Esti_Image = Estimation of the original image obtained from a
% noisy image after filtering it.
% OUTPUT:
% Mean-Square Error (M_SE)
% Peak Signal-to-Noise Ratio (PSNR)
%---Checking Input Arguments
if nargin<1||isempty(Esti_Image), error('Input Argument: Estiamted Image Missing');end
%---Implentation starts here
if (size(Orig_Image)~= size(Esti_Image)) %---Check images size
error('Input images should be of same size');
else
%---Mean-Square Error(MSE) Calculation
Orig_Image = im2double(Orig_Image);%---Convert image to double class
Esti_Image = im2double(Esti_Image);%---Convert image to double class
[M N] = size(Orig_Image);%---Size of Original Image
diff = Orig_Image - Esti_Image;%---Difference between two images
M_SE = (sum(sum(diff .* diff)))/(M * N);
%---Peak Signal-to-Noise Ratio(PSNR) Calculation
if(M_SE > 0)
PSNR = 10*log10(255*255/M_SE);
else
PSNR = 99;
end
end
相關文章
- Hit Ratio For ORACLEOracle
- Buffer Cache Hit Ratio
- Keeping the Library Cache Reload Ratio at 0 and the Hit Ratio Above 95 Percent
- [Oracle Script] Buffer Cache Hit RatioOracle
- why Buffer Cache Hit Ratio < 0
- [Oracle Script] Library Cche Hit RatioOracle
- Cursor Cache Hit Ratio超過100%
- [Speaker] Haoyuan Li, CEO, AlluxioUX
- Find Peak element leetcodeLeetCode
- oracle分析函式之ratio_to_reportOracle函式
- Oracle Reporting 1 - Ratio_to_Report FunctionOracleFunction
- Keeping the Data Dictionary Cache Hit Ratio at or above 95 Percent
- Leetcode-Find Peak ElementLeetCode
- SAP Portfolio Analyzer 中 夏普比率(Sharpe Ratio)計算
- -webkit-min-device-pixel-ratio: 2是什麼意思?WebKitdev
- [LeetCode] 852. Peak Index in a Mountain ArrayLeetCodeIndexAI
- CentOS 7 搭建 TeamSpeak3 伺服器CentOS伺服器
- Apeaksoft Screen Recorder 螢幕錄影軟體
- 網路實時監控工具:PeakHour for macMac
- (使用者向)TeamSpeak3 使用教程
- SAP TRM模組中Portfolio Analyzer 中特雷諾指數(Treynor ratio)計算
- 螢幕錄影軟體:Apeaksoft Screen Recorder MacMac
- BIP 下 RTF 模板中求欄位比率方法及ratio_to_report
- 《Toon Blast》發行商Peak Games總收入突破10億美元ASTGAM
- 部落格折騰記——tranquilpeak主題個性化UI
- 多功能影片編輯器:Apeaksoft Video Editor for MacIDEMac
- iOS資料恢復軟體:Apeaksoft iOS Toolkit for maciOS資料恢復Mac
- 文獻閱讀 — Clustering by Fast Search and Find of Density PeaksAST
- CBO,ORACLE,隱含引數,_sort_elimination_cost_ratio的含義Oracle
- MaciPhone資料傳輸軟體——Apeaksoft iPhone Transfer for MacMaciPhone
- 藍光影片播放器:Apeaksoft Blu-ray Player for Mac播放器Mac
- Apeaksoft Video Editor for Mac(影片編輯處理軟體)IDEMac
- 新增speak成員方法,輸出我是一個好人
- Apeaksoft iOS Toolkit for Mac,強大的iOS資料恢復工具iOSMac資料恢復
- ios裝置解鎖工具Apeaksoft iOS Unlocker最新啟用版iOS
- [LeetCode] Find Peak Element 求陣列的區域性峰值LeetCode陣列
- Peak Games:中東遊戲市場增長速度僅次於亞洲GAM遊戲
- 李宏毅2022機器學習HW4 Speaker Identification下機器學習IDE