论文: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'));

%---------------------------------------------------------
% Copyright (c) Radhakrishna Achanta [EPFL]
% Contact: firstname.lastname@epfl.ch
%---------------------------------------------------------
% Citation:
% @InProceedings{LCAV-CONF--,
% 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 =
% }
%---------------------------------------------------------
% 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', , ), 'symmetric', 'conv');
%symmetric图像大小通过镜像反射其边界来扩展 conv通过使用卷积来完成
%fspecial('gaussian', , )产生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(:,:,)); lm = mean(mean(l));
a = double(lab(:,:,)); am = mean(mean(a));
b = double(lab(:,:,)); bm = mean(mean(b));
%---------------------------------------------------------
% Finally compute the saliency map and display it.
%---------------------------------------------------------
sm = (l-lm).^ + (a-am).^ + (b-bm).^;
imshow(sm,[]);
%---------------------------------------------------------

效果图:

Frequency-tuned Salient Region Detection MATLAB代码出错修改方法的更多相关文章

  1. CVPR 2011 Global contrast based salient region detection

    Two salient region detection methods are proposed in this paper: HC AND RC HC: Histogram based contr ...

  2. Global Contrast based Salient Region Detection (Ming ming Cheng)

    abstract: Automatic estimation of salient object regions across images, without any prior assumption ...

  3. (不断更新)关于显著性检测的调研-Salient Object Detection: A Survey

    <Salient Object Detection: A Survey>作者:Ali Borji.Ming-Ming Cheng.Huaizu Jiang and Jia Li 基本按照文 ...

  4. Minimum Barrier Salient Object Detection at 80 FPS 论文阅读笔记

    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM ...

  5. Matlab人脸检測方法(Face Parts Detection)具体解释

    今天同学让我帮忙制作一个人脸表情识别的样本库,当中主要是对人脸进行裁剪,这里用到了一个相对较新的Matlab人脸检測方法Face Parts Detection.网上百度了一下发现关于Matlab人脸 ...

  6. Ncut matlab 代码bug 修复

    先说平台: win7 x64,matlab 2012a x64,亲测运行. ncut 是个图像切割方法,以后再回顾具体算法吧,网上很多流程的是Jianbo Shi 这位2000年写的,名字应该是:Da ...

  7. 让matlab在出错时停在debug内,并留下相关变量

    很多时候,我们写的matlab代码会在执行的过程中发生错误.这种情况下,matlab会 直接跳出执行,顺带告诉你是在代码的那一行跳出了,但是却无法留下出错时的每个变量 的具体值,给debug带来很大的 ...

  8. 【转载】让你的MATLAB代码飞起来

    原文地址:http://developer.51cto.com/art/201104/255128_all.htm MATLAB语言是一种被称为是"演算纸"式的语言,因此追求的是方 ...

  9. 如何加速MATLAB代码运行

    学习笔记 V1.0 2015/4/17 如何加速MATLAB代码运行 概述 本文源于LDPCC的MATLAB代码,即<CCSDS标准的LDPC编译码仿真>.由于代码的问题,在信息位长度很长 ...

随机推荐

  1. sql字段操作

    --删除第一位 substring(ftpMobile,2,len(ftpMobile)-1) --检查是否是数字 ISNUMERIC(ftpMobile) =0  含数字以外字符 ISNUMERIC ...

  2. typescript多维对象数组仿List泛型

    定义对象: namespace entity{ export class MyClass{ public value:number; public rect:string; public constr ...

  3. Linux使用私钥公钥(Public key)登录 - 免密码登录

    为了更安全.方便的登录Linux服务器,可以取消密码登录,使用私钥公钥的方式来登录,更方便也更安全. 生成密钥 借助Xshell可以很方便的生成和管理私钥,点击工具菜单,选择新建用户密钥生成向导: 直 ...

  4. ZKEACMS添加搜索功能,搜索插件说明

    ZKEACMS默认是不支持搜索功能的.但是搜索功能是比较常用的一个功能,使用这个搜索插件,可以让CMS支持搜索: 如下图所示: 数据库 Microstft Sql Server 2008R2 以上 页 ...

  5. 当页面滚动到距顶部一定高度时某DIV自动隐藏和显示

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. windows server2008 r2安装DNS服务器

    1.开始->管理工具->服务器管理器 2.角色->添加角色 3.服务器角色->DNS服务器 4.一直点击下一步,直至安装完成. (确认步骤时会提示,可能会需要重启服务器) 安装 ...

  7. mysql索引的应用场景以及如何使用

    唯一的是什么? 1. 索引列(字段)的所有值都只能出现一次,即必须唯一 ---------------------------------------------------------------- ...

  8. Linux下简易进度条的实现

    在生活中,进度条是很常见的,那么,进度条是如何实现的呢? 首先,进度条的动态是利用人眼视觉暂留效果的.实际上是如下过程: 先输出:[=                                  ...

  9. 百度地图API —— 制作多途经点的线路导航

    [百度地图API]如何制作多途经点的线路导航——驾车篇   摘要: 休假结束,酸奶小妹要从重庆驾车去北京.可是途中要去西安奶奶家拿牛奶饼干呢!用百度地图API,能不能帮我实现这个愿望呢? ------ ...

  10. redis存储的数据类型

    key-velue数据结构存储 key   只能是字符串 value 有5种数据leixing. 字符串 string 哈希 hash 列表 list 集合 set 有序集合 zset