Thread Subject: Blurring an image

Subject: Blurring an image

From: Juliette Salexa

Date: 28 Oct, 2009 18:10:21

Message: 1 of 1

Hello,

I have the pixelmap of a black & white image (a 2D matrix whose elements are 0 if the pixel is black and 1 if the pixel is white).

Does anyone know how I can blur this image ??

By blurring the image, what I mean is that I want to divide the matrix into blocks, and make the value all pixels within each block proportional to the number of black pixels inside that block: If all the pixels inside the block are 1 (white), then the same block in the blurred image should have all pixels =1 (white). If all pixels inside the block are 0, then the same block in the blurred image should be 0. If half of the pixels inside the block are 0 and half are 1, the same block in the blurred image should be 0.5.


I've tried doing this with the conv2() function, but the documentation for the function doesn't explain how to do this.

I've also heard that IMFILTER and bsxfun() can be used to do what I want to do, but once again, nothing specific enough to help me start on my way.

Any help would be greatly appreciated,

Thank you,
Juliette

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us at files@mathworks.com