


Prepare the spatial filters for S-CIELAB opponent blurring
[filters,support,params] = scPrepareFilters(params)
Create three pattern-color separable filters according to the Poirson &
Wandell 1993 fitted spatial response. The filters are each weighted
sum of 2 or 3 gaussians. They are in the cell array, filters.
The params structure defines several properties of the features.
The two important slots are
sampPerDeg -- filter resolution in samples per degree of visual angle.
Minimum sample rate is recommended as 224 samples per degree of visual
angle. Code issues a warning of the sample rate is smaller than 100.
dimension: Specifies whether the created filters should be 1-D or 2-D.
These are obscure conditions (normally 2 is used) and we need to improve
the comments here.
dimension = 1: generate the linespread of the filters;
This is useful for 1-d image calculations, say for theoretical
work.
dimension = 2: generate the pointspread of the filters;
This is useful if you just want to create an image of the filters
dimension = 3: generate the pointspread in the form that can be used by
separableConv. The result is a set of 1-d filters that can be applied
to the rows and cols of the image (separably). This is not used in
ISET, but it may be used elsewhere.
The filters are a cell array. The support defines the spatial support in
terms of degrees of visual angle.
Example:
params.deltaEversion = '2000';
params.sampPerDeg = 145;
params.imageFormat = 'LMS';
params.filterSize = 145;
params.dimension = 2;
[filters,support] = scPrepareFilters(params);
figure; % Units are degrees of visual angle
subplot(1,3,1), mesh(support,support,filters{1}); colormap(hsv(256));
subplot(1,3,2), mesh(support,support,filters{2}); colormap(hsv(256));
subplot(1,3,3), mesh(support,support,filters{3}); colormap(hsv(256));
In 1996, Xuemei Zhang used this routine
[k1, k2, k3] = separableFilters(params.sampPerDeg,2);
figure(1); clf
subplot(1,2,1), mesh(support,support,filters{3})
subplot(1,2,2), mesh(support,support,k1)
The values are the same
figure(1); clf, mesh(support,support,k1-filters{1})
figure(1); clf, mesh(support,support,k2-filters{2})
figure(1); clf, mesh(support,support,k3-filters{3})
Copyright ImagEval Consultants, LLC, 2003.