|
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
|