Home > SaliencyToolbox > makeBlueYellowPyramid.m

makeBlueYellowPyramid

PURPOSE ^

makeBlueYellowPyramid - creates a blue-yellow opponency pyramid.

SYNOPSIS ^

function [byPyr,bPyr,yPyr] = makeBlueYellowPyramid(image,type)

DESCRIPTION ^

 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.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % makeBlueYellowPyramid - creates a blue-yellow opponency pyramid.
0002 %
0003 % [byPyr,bPyr,yPyr] = makeBlueYellowPyramid(Image,type)
0004 %    Creates a gaussian pyramid from a blue-yellow opponency map (byPyr)
0005 %    of image and, if requested, also the separate blue (bPyr)
0006 %    and yellow (yPyr) pyramids.
0007 %      Image - Image structure of the input image.
0008 %      type - 'dyadic' or 'sqrt2'
0009 %
0010 % For a dicussion of the particular definitions of color opponency used here,
0011 % see appendix A.2 of Dirk's PhD thesis:
0012 %    Walther, D. (2006). Interactions of visual attention and object recognition:
0013 %    Computational modeling, algorithms, and psychophysics. Ph.D. thesis.
0014 %    California Institute of Technology.
0015 %    http://resolver.caltech.edu/CaltechETD:etd-03072006-135433.
0016 %
0017 % See also makeRedGreenPyramid, getRGB, makeGaussianPyramid,
0018 %          makeFeaturePyramids, dataStructures.
0019 
0020 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
0021 % by Dirk B. Walther and the California Institute of Technology.
0022 % See the enclosed LICENSE.TXT document for the license agreement.
0023 % More information about this project is available at:
0024 % http://www.saliencytoolbox.net
0025 
0026 function [byPyr,bPyr,yPyr] = makeBlueYellowPyramid(image,type)
0027 
0028 declareGlobal;
0029 
0030 im = loadImage(image);
0031 [r,g,b,in] = getRGB(im);
0032 
0033 by = safeDivide(b-min(r,g),in);
0034 
0035 if (nargout >= 1)
0036   map.origImage = image;
0037   map.label = 'Blue/Yellow';
0038   map.data = by;
0039   map.date = clock;
0040   byPyr = makeGaussianPyramid(map,type);
0041 end
0042 
0043 if (nargout >= 2)
0044   map.origImage = image;
0045   map.label = 'Blue';
0046   bb = clamp(by,0);
0047   map.data = bb;
0048   map.date = clock;
0049   bPyr = makeGaussianPyramid(map,type);
0050 end
0051 
0052 if (nargout >= 3)
0053   map.origImage = image;
0054   map.label = 'Yellow';
0055   yy = clamp(-by,0);
0056   map.data = yy;
0057   map.date = clock;
0058   yPyr = makeGaussianPyramid(map,type);
0059 end
0060

Generated on Thu 18-Jul-2013 06:10:46 by m2html © 2005