Frequency-tuned Salient Region Detection MATLAB代码出错修改方法
2014-12-18 10:35
543 查看
论文:Frequency-tuned Salient Region Detection.CVPR.2009
MATLAB代码运行出错如下:
Error using makecform>parseWPInput (line 389)
Expected input number 2, PROPERTYNAME, to match one of these strings:
AdaptedWhitePoint
The input, ''whitepoint'', did not match any of the valid strings.
Error in makecform>parseWPInputs (line 378)
wp = parseWPInput(varargin{2}, varargin{3}, valid_strings, 'WP', 2);
Error in makecform>make_srgb2lab_cform (line 349)
wp = parseWPInputs('AdaptedWhitePoint', varargin{:});
Error in makecform (line 213)
c = make_srgb2lab_cform(varargin{:});
Error in FT_Saliency_CVPR2009 (line 36)
cform = makecform('srgb2lab', 'whitepoint', whitepoint('d65'));
修改如下:
cform = makecform('srgb2lab', 'AdaptedWhitePoint', whitepoint('d65'));
效果图:
MATLAB代码运行出错如下:
Error using makecform>parseWPInput (line 389)
Expected input number 2, PROPERTYNAME, to match one of these strings:
AdaptedWhitePoint
The input, ''whitepoint'', did not match any of the valid strings.
Error in makecform>parseWPInputs (line 378)
wp = parseWPInput(varargin{2}, varargin{3}, valid_strings, 'WP', 2);
Error in makecform>make_srgb2lab_cform (line 349)
wp = parseWPInputs('AdaptedWhitePoint', varargin{:});
Error in makecform (line 213)
c = make_srgb2lab_cform(varargin{:});
Error in FT_Saliency_CVPR2009 (line 36)
cform = makecform('srgb2lab', 'whitepoint', whitepoint('d65'));
修改如下:
cform = makecform('srgb2lab', 'AdaptedWhitePoint', whitepoint('d65'));
%--------------------------------------------------------- % Copyright (c) 2009 Radhakrishna Achanta [EPFL] % Contact: firstname.lastname@epfl.ch %--------------------------------------------------------- % Citation: % @InProceedings{LCAV-CONF-2009-012, % author = {Achanta, Radhakrishna and Hemami, Sheila and Estrada, % Francisco and S黶strunk, Sabine}, % booktitle = {{IEEE} {I}nternational {C}onference on {C}omputer % {V}ision and {P}attern {R}ecognition}, % year = 2009 % } %--------------------------------------------------------- % Please note that the saliency maps generated using this % code may be slightly different from those of the paper. % This seems to be because the RGB to Lab conversion is % different from the one used for the results in the C++ code. % The C++ code is available on the same page as this matlab % code (http://ivrg.epfl.ch/supplementary_material/RK_CVPR09/index.html) % One should preferably use the C++ as reference and use % this matlab implementation mostly as proof of concept % demo code. %--------------------------------------------------------- % % %--------------------------------------------------------- % Read image and blur it with a 3x3 or 5x5 Gaussian filter %--------------------------------------------------------- img = imread('100\images\8.jpg');%Provide input image path gfrgb = imfilter(img, fspecial('gaussian', 3, 3), 'symmetric', 'conv'); %symmetric图像大小通过镜像反射其边界来扩展 conv通过使用卷积来完成 %fspecial('gaussian', 3, 3)产生3*3高斯低通滤波器模板 %--------------------------------------------------------- % Perform sRGB to CIE Lab color space conversion (using D65) %--------------------------------------------------------- %cform = makecform('srgb2lab', 'whitepoint', whitepoint('d65')); cform = makecform('srgb2lab', 'AdaptedWhitePoint', whitepoint('d65')); lab = applycform(gfrgb,cform); %--------------------------------------------------------- % 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,[]); %---------------------------------------------------------
效果图:
相关文章推荐
- Frequency-tuned Salient Region Detection:一种快速显著物体检测算法
- Frequency-tuned salient Region Detection
- Frequency-tuned Salient Region Detection 算法学习总结
- 图像显著性论文(三)—Frequency-tuned Salient Region Detection
- 【图像处理】图像显著性论文—Frequency-tuned Salient Region Detection
- 阅读图像显著性检测论文二:Frequency-tuned Salient Region Detection
- 关于matlab代码DeepLearnToolbox-CNN卷积神经网络手写数字识别实例源码直接运行出错的解决方法
- WordPress注册时不能发邮件,修改程序代码直接显示密码的方法
- 禁止修改输入框的方法 Javascript强制设为首页的网页代码
- 最近修改代码(Matlab)的感受
- 使用RTW代码生成工具是将MATLAB用于C开发流程的最好的方法(转自恒润科技)
- IE被某些网站恶意代码修改的问题解决方法心得
- ext3grep 出错的补丁修改方法
- jsp中上传大文件(200M已测试),存到数据库,易发生连接超时的ie找不到网页的错误,其解决方法。略写代码,参考(.net修改代码应该可以,改天修改)
- 国外的一个图像显著区域检测代码及其效果图 saliency region detection
- [转]国外的一个图像显著区域检测代码及其效果图 saliency region detection
- EAS修改客户端代码后热部署的方法
- ASP.NET 中在代码中修改Title的方法
- dedecms 5.6 分页样式代码修改方法
- fedora 下apache出错,代码400的解决方法