论文: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. [Erlang12] Mnesia分布式应用

    [Erl_Question12] Mnesia分布式应用 情景: 设计一个图书管理系统,需求: 1. 基本的增删查改功能; 2. 支持多节点备份(其中一个节点挂了进,对外接口不影响). 方案一: Er ...

  2. async异步操作和同步上下文

    第8章 哪个线程运行我的代码 看到社区里的朋友没有翻译完这本书,我接着对一下的章节进行翻译 像我之前说的,异步编程就是关于线程的.那就意味着我们需要理解在C#程序中哪个.NET线程什么时候运行我们的代 ...

  3. Excel转Json工具

    应用程序在本地的数据配置的格式一般有JSON.XML.YAML.INI等格式,但是如果直接编写JSON数据往往不是特别方便, 今天给大家分享的是如何在EXCEL配置好数据,然后一键转换成JSON和C# ...

  4. c++调用c#写的DLL

    c++调用c#写的DLL: 此文章演示了建立c#的dll: c++建立工程,引入dll: 不能解决的问题: 指定dll的路径,在代码里面直接写 #using "xxx.dll" 必 ...

  5. Major OSL changes to catch up

    flat_map optimization for runtime specialization: https://github.com/imageworks/OpenShadingLanguage/ ...

  6. mongodb 连接字符串

    mongodb 连接字符串 <!--连接字符串--> <add key="ts.students" value="mongodb://192.168.0 ...

  7. PXE-cobbler 无人值守装机------续

    上篇学习了cobbler pxe 安装的大致流程以及采用默认分区方式安装centos7系统. 这里深入学习ks文件的具体参数 . ks.cfg文件又叫kickstart.cfg文件,主要被用于linu ...

  8. fzu月赛(2015.11)(思维)

    Problem 2205 据说题目很水 Sunday最近对图论特别感兴趣,什么欧拉回路什么哈密顿回路,又是环又是树.在看完一本书后,他对自己特别有信心,便找到大牛牛犇犇,希望他出一题来考考自己. 在遥 ...

  9. “全栈2019”Java第三十六章:类

    难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java第 ...

  10. UML图基础

    UML(Unified Model Language)统一建模语言,是对象管理组织(OMG)制定的一个通用的.可视化的建模标准语言,可以用来可视化.描述.构造和文档化软件密集型系统的各种工作.在学习设 ...