资源简介
FT显著性算法matlab代码,代码简单明了,亲测效果很好
代码片段和文件信息
%---------------------------------------------------------
% Read image and blur it with a 3x3 or 5x5 Gaussian filter
%---------------------------------------------------------
img = imread(‘15.jpg‘);%Provide input image path
gfrgb = imfilter(img fspecial(‘gaussian‘ 3 3) ‘symmetric‘ ‘conv‘);
%---------------------------------------------------------
% Perform sRGB to CIE Lab color space conversion (using D65)
%---------------------------------------------------------
cform = makecform(‘srgb2lab‘);
% cform = makecform(‘srgb2lab‘ ‘WhitePoint‘ whitepoint(‘d65‘));
lab = applycform(gfrgbcform);
%---------------------------------------------------------
% Compute Lab average values (note that in the paper this
% average is found from the unblurred original image but
% the results are quite similar)
%---------------------------------------------------------
l = double(lab(::1)); lm = mean(mean(l));
a = double(lab(::2)); am = mean(mean(a));
b = double(lab(::3)); bm = mean(mean(b));
%---------------------------------------------------------
% Finally compute the saliency map and display it.
%---------------------------------------------------------
sm = (l-lm).^2 + (a-am).^2 + (b-bm).^2;
imshow(sm[]);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1292 2018-02-24 07:46 ft.m
文件 20015 2007-06-13 17:00 15.jpg
----------- --------- ---------- ----- ----
21307 2
- 上一篇:小波变换MATLAB代码
- 下一篇:光线补偿的matlab源码
评论
共有 条评论