Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
half-width at half-height Gaussian blur with fspecial

Subject: half-width at half-height Gaussian blur with fspecial

From: b b

Date: 24 Jul, 2008 17:25:04

Message: 1 of 1

Hi,

I'm trying to blur an image that I've created and am having
a few difficulties getting the parameters set correctly.
Essentially, the image is a 800x600 greyscale image, where
I've plotted about 30 points, with each having a value of 1.
 After I've plotted them, I hope to blur the image, and then
subtract from each pixel the image mean, and then divide it
by its standard deviation in order to create an image that
has been normalized to have a zero mean and unit standard
deviation.

The problem is this: I want to construct an image (array
really) containing a delta function peak at each point, and
then blur the array by convovlving with a 2D Gaussian, with
half-width at half-height equal to 60 pixels.

I've tried using the following code snippet:
h = fspecial('gaussian',60,60);
    interObsMap = imfilter(interObsMap,h);
    mapMean=mean(interObsMap(:));
    interObsMap = (interObsMap - mapMean) ./std(interObsMap(:));

, although I'm not confident that the fspecial line is
correct.

Can anyone suggest how to convolve the image with a 2D
Gaussian with half-width at half-height equal to 60 pixels?

Thanks in advance!

b b.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us