Name
VarianceFilter — calculates the gray level variance in a neighborhood for each
pixel
Calling Sequence
FilteredImage = VarianceFilter(Image);
Parameters
- Image
2D matrix of type double
- FilterSize
vector of type double with two elements, the first one
specifies the height, the second one the width of the filter
- FilteredImage
2D matrix of type double
Description
This function calculates the gray level variance in a neighborhood
for each pixel. VarianceFilter is called by ComputeChannelVariance.
Examples
RGB = ReadImage('contrib\IPD-5.0\demos\teaset.png');
Image = RGB2Gray(RGB);
FilteredImage = VarianceFilter(Image, [9 9]);
figure(); ShowImage(Image, 'Original Image');
figure(); ShowImage(FilteredImage, 'Filtered Image');