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

  • 大小: 18KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-16
  • 語言: Matlab
  • 標簽: IQA??

資源簡介

該源代碼是針對《FSIM: A Feature Similarity Index for Image Quality Assessment》使用文中的PC和GM計算方式。FSIM是一種常用的進行圖像質量評估的工具

資源截圖

代碼片段和文件信息

function?[FSIM?FSIMc]?=?FeatureSIM(imageRef?imageDis)
%?========================================================================
%?FSIM?Index?with?automatic?downsampling?Version?1.0
%?Copyright(c)?2010?Lin?ZHANG?Lei?Zhang?Xuanqin?Mou?and?David?Zhang
%?All?Rights?Reserved.
%
%?----------------------------------------------------------------------
%?Permission?to?use?copy?or?modify?this?software?and?its?documentation
%?for?educational?and?research?purposes?only?and?without?fee?is?here
%?granted?provided?that?this?copyright?notice?and?the?original?authors‘
%?names?appear?on?all?copies?and?supporting?documentation.?This?program
%?shall?not?be?used?rewritten?or?adapted?as?the?basis?of?a?commercial
%?software?or?hardware?product?without?first?obtaining?permission?of?the
%?authors.?The?authors?make?no?representations?about?the?suitability?of
%?this?software?for?any?purpose.?It?is?provided?“as?is“?without?express
%?or?implied?warranty.
%----------------------------------------------------------------------
%
%?This?is?an?implementation?of?the?algorithm?for?calculating?the
%?Feature?SIMilarity?(FSIM)?index?between?two?images.
%
%?Please?refer?to?the?following?paper
%
%?Lin?Zhang?Lei?Zhang?Xuanqin?Mou?and?David?Zhang“FSIM:?a?feature?similarity
%?index?for?image?qualtiy?assessment“?IEEE?Transactions?on?Image?Processing?vol.?20?no.?8?pp.?2378-2386?2011.
%?
%----------------------------------------------------------------------
%
%Input?:?(1)?imageRef:?the?first?image?being?compared
%????????(2)?imageDis:?the?second?image?being?compared
%
%Output:?(1)?FSIM:?is?the?similarty?score?calculated?using?FSIM?algorithm.?FSIM
% ?????only?considers?the?luminance?component?of?images.?For?colorful?images?
%????????????they?will?be?converted?to?the?grayscale?at?first.
%????????(2)?FSIMc:?is?the?similarity?score?calculated?using?FSIMc?algorithm.?FSIMc
%????????????considers?both?the?grayscale?and?the?color?information.
%Note:?For?grayscale?images?the?returned?FSIM?and?FSIMc?are?the?same.
%????????
%-----------------------------------------------------------------------
%
%Usage:
%Given?2?test?images?img1?and?img2.?For?gray-scale?images?their?dynamic?range?should?be?0-255.
%For?colorful?images?the?dynamic?range?of?each?color?channel?should?be?0-255.
%
%[FSIM?FSIMc]?=?FeatureSIM(img1?img2);
%-----------------------------------------------------------------------

[rows?cols]?=?size(imageRef(::1));
I1?=?ones(rows?cols);
I2?=?ones(rows?cols);
Q1?=?ones(rows?cols);
Q2?=?ones(rows?cols);

if?ndims(imageRef)?==?3?%images?are?colorful
????Y1?=?0.299?*?double(imageRef(::1))?+?0.587?*?double(imageRef(::2))?+?0.114?*?double(imageRef(::3));
????Y2?=?0.299?*?double(imageDis(::1))?+?0.587?*?double(imageDis(::2))?+?0.114?*?double(imageDis(::3));
????I1?=?0.596?*?double(imageRef(::1))?-?0.274?*?double(imageRef(::2))?-?0.322?*?double(imageRef(::3));
????I2?=?0.596?*?double(imageDis(:

評論

共有 條評論