Groups | Blog | Home
all groups > c# > april 2004 >

c# : Processing a 5x5 convolution matrix... what do I do with the edges?


Hilton
4/14/2004 4:27:41 PM
Not really a C# question, but here goes anyway:

1. Assume the pixels to be zero
2. Assume the pixels to be the same as the real edge pixel
3. Mirror the two 'real' edge pixels
4. Use the two pixels from the other side of the image (assume image wraps
around).
5. Don't process the pixel unless the entire matrix 'sees' real pixels.
6. Probably a whole bunch of other things to do...

There is no *right* way to do it - it depends on what your matrix is, what
your image is, and what you're trying to do.

Hilton


[quoted text, click to view]

MrPolite
4/14/2004 8:59:31 PM
I'm using a 5x5 convolution matrix to do some image processing. (I don't
really know much about image processing). I lose 2 pixels from the edges of
the image. When I apply any 5x5 matrix in photoshop however, it doesn't lose
any pixels around the edges. So I'm wondering what is usually done with the
edge pixels when using a convolution matrix???

MrPolite
4/15/2004 4:32:03 AM
hey thanks:) good ideas, I think I'll assume the pixels to be the same as
the edge pixel

umm, what's a good newsgroup for image processing questions?:P would you
know??

Thanks for the response
[quoted text, click to view]

Hilton
4/15/2004 4:44:55 PM
[quoted text, click to view]

No, but I'm sure there is one. I was remembering back to my Image
Processing days at University as well as when I wrote the Color Space
Library at Silicon Graphics Inc. (dmColor etc).

Hilton

AddThis Social Bookmark Button