标签:
参考文献:http://www.cnblogs.com/CCBB/archive/2011/05/19/2051442.html
1、一个简单的matlab例子
1 clear 2 clc 3 4 %% Read image from file 5 inImg = im2double(rgb2gray(imread(‘256.png‘))); 6 %%inImg = imresize(inImg, 64/size(inImg, 2)); 7 8 %% Spectral Residual 9 myFFT = fft2(inImg); 10 myLogAmplitude = log(abs(myFFT)); 11 myPhase = angle(myFFT); 12 mySpectralResidual = myLogAmplitude - imfilter(myLogAmplitude, fspecial(‘average‘, 3), ‘replicate‘); 13 saliencyMap = abs(ifft2(exp(mySpectralResidual + i*myPhase))).^2; 14 15 %% After Effect 16 saliencyMap = mat2gray(imfilter(saliencyMap, fspecial(‘gaussian‘, [10, 10], 2.5))); 17 imshow(saliencyMap);
原图:
显著性:
标签:
原文地址:http://www.cnblogs.com/Wanggcong/p/5183404.html