Code covered by the BSD License  

Highlights from
Statistical Learning Toolbox

from Statistical Learning Toolbox by Dahua Lin
Functions for statistical learning, pattern recognition and computer vision, covering many topics.

Description of slvecfilters
Home > sltoolbox > imgproc > slvecfilters.m

slvecfilters

PURPOSE ^

SLVECFILTERS Vectorizes the filter band

SYNOPSIS ^

function vfb = slvecfilters(fb)

DESCRIPTION ^

SLVECFILTERS Vectorizes the filter band

 $ Syntax $
   - vfb = slvecfilters(fb)

 $ Arguments $
   - fb:       The filter band
   - vfb:      The vectorized filter band
   
 $ Description $
   - vfb = slvecfilters(fb) vectorizes the filter band. A set of filter
     band is an array of size (ph x pw x ...). In its vectorized form,
     each filter is vectorized as a row vector. Then for a set of 
     filter band with same size, vfb is a matrix of size k x d, here 
     d = ph x pw, while k is the number of filters.
   
 $ History $
   - Created by Dahua Lin on Sep 2nd, 2006

CROSS-REFERENCE INFORMATION ^

This function calls:
This function is called by:

SOURCE CODE ^

0001 function vfb = slvecfilters(fb)
0002 %SLVECFILTERS Vectorizes the filter band
0003 %
0004 % $ Syntax $
0005 %   - vfb = slvecfilters(fb)
0006 %
0007 % $ Arguments $
0008 %   - fb:       The filter band
0009 %   - vfb:      The vectorized filter band
0010 %
0011 % $ Description $
0012 %   - vfb = slvecfilters(fb) vectorizes the filter band. A set of filter
0013 %     band is an array of size (ph x pw x ...). In its vectorized form,
0014 %     each filter is vectorized as a row vector. Then for a set of
0015 %     filter band with same size, vfb is a matrix of size k x d, here
0016 %     d = ph x pw, while k is the number of filters.
0017 %
0018 % $ History $
0019 %   - Created by Dahua Lin on Sep 2nd, 2006
0020 %
0021 
0022 fbsiz = size(fb);
0023 if ndims(fb) == 2
0024     k = 1;
0025 else
0026     k = prod(fbsiz(3:end));
0027 end
0028 d = prod(fbsiz(1:2));
0029 
0030 vfb = reshape(fb, [d, k])';
0031 
0032 
0033     
0034

Generated on Wed 20-Sep-2006 12:43:11 by m2html © 2003

Contact us at files@mathworks.com