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

  • Thread starter Thread starter MrPolite
  • Start date Start date
M

MrPolite

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???
 
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
 
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
 
MrPolite said:
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??

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top