marginal_2

PURPOSE ^

imagenes is a cell containing the image names

SYNOPSIS ^

function [histograma,valores,subbanda,subbandacrop]=marginal_2(Im,escala,orientacion,bins);

DESCRIPTION ^

   imagenes is a cell containing the image names

   histograma: wavelet coeficients histogram
   valores:    histograma abscise
   subbanda:   subband coefficeints
   subbandacrop:  subband coefficeints without outlayers

   USE: [histograma,valores,subbanda,subbandacrop]=marginal(imagenes,1,'H',256);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %
0002 %   imagenes is a cell containing the image names
0003 %
0004 %   histograma: wavelet coeficients histogram
0005 %   valores:    histograma abscise
0006 %   subbanda:   subband coefficeints
0007 %   subbandacrop:  subband coefficeints without outlayers
0008 %
0009 %   USE: [histograma,valores,subbanda,subbandacrop]=marginal(imagenes,1,'H',256);
0010 
0011 function [histograma,valores,subbanda,subbandacrop]=marginal_2(Im,escala,orientacion,bins);
0012 
0013 switch lower(orientacion)
0014    case 'h'
0015       sub=1;
0016    case 'v'
0017       sub=2;
0018    case 'd'
0019       sub=3;
0020 end
0021 
0022 subbanda=[];
0023 
0024    [pyr,ind]=buildWpyr(double(Im),4);
0025    pyrsub = wpyrBand(pyr, ind, escala, sub);
0026    pyrsub = pyrsub(:);
0027    subbanda = [subbanda; pyrsub];
0028 
0029 [histograma,valores] = hist(subbanda,256);
0030 histograma = histograma/sum(histograma);
0031 
0032 cdf = cumsum(histograma);
0033 
0034 ind1 = find(cdf>=0.005);
0035 ind1 = ind1(1);
0036 
0037 ind2 = find(cdf<=0.995);
0038 ind2 = ind2(end);
0039 
0040 subbandacrop = subbanda(subbanda>valores(ind1) & subbanda<valores(ind2));
0041 
0042 [histograma,valores] = hist(subbanda,256);
0043 histograma = histograma/sum(histograma);

Generated on Fri 07-Mar-2014 13:28:33 by m2html © 2005