makeblueyellowpyramid.m

来自「显著区域检测。求的图像中感兴趣区域的位置」· M 代码 · 共 61 行

M
61
字号
% makeBlueYellowPyramid - creates a blue-yellow opponency pyramid.%% [byPyr,bPyr,yPyr] = makeBlueYellowPyramid(Image,type)%    Creates a gaussian pyramid from a blue-yellow opponency map (byPyr)%    of image and, if requested, also the separate blue (bPyr)%    and yellow (yPyr) pyramids.%      Image - Image structure of the input image.%      type - 'dyadic' or 'sqrt2'%% For a dicussion of the particular definitions of color opponency used here, % see appendix A.2 of Dirk's PhD thesis:%    Walther, D. (2006). Interactions of visual attention and object recognition: %    Computational modeling, algorithms, and psychophysics. Ph.D. thesis.%    California Institute of Technology. %    http://resolver.caltech.edu/CaltechETD:etd-03072006-135433.%% See also makeRedGreenPyramid, getRGB, makeGaussianPyramid, %          makeFeaturePyramids, dataStructures.% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007% by Dirk B. Walther and the California Institute of Technology.% See the enclosed LICENSE.TXT document for the license agreement. % More information about this project is available at: % http://www.saliencytoolbox.netfunction [byPyr,bPyr,yPyr] = makeBlueYellowPyramid(image,type)declareGlobal;im = loadImage(image);[r,g,b,in] = getRGB(im);by = safeDivide(b-min(r,g),in);if (nargout >= 1)  map.origImage = image;  map.label = 'Blue/Yellow';  map.data = by;  map.date = timeString;  byPyr = makeGaussianPyramid(map,type);endif (nargout >= 2)  map.origImage = image;  map.label = 'Blue';  bb = clamp(by,0);  map.data = bb;  map.date = timeString;  bPyr = makeGaussianPyramid(map,type);endif (nargout >= 3)  map.origImage = image;  map.label = 'Yellow';  yy = clamp(-by,0);  map.data = yy;  map.date = timeString;  yPyr = makeGaussianPyramid(map,type);end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?