How do I treat the edges of an image?
Show older comments
Hi all,
I've got an image which I want to perform smoothing operations on. As my convolution is 5x5 it won't work properly when it borders the edge of the image. What can I do about this? Also, what buzz words could I search for that would help me understand this further?
Here's what I understand I could do: - nothing, let the convolution go off the edge of the image and get skewed results, or assign a value automatically - nothing, let the convolution go as close to the edge as the mask allows, without going off the edge, meaning a row of pixels around the edge of the page wouldn't be acted upon. - when the mask goes off the edge of the image, I could reflect the values from the other half that remains on the image. - when the mask goes off the edge of the image, I could wrap the values around from the opposite side of the image (not suitable for my application)
As I said, I don't really know what the names of each of these techniques are, so in addition to your advice, I could also do with help in naming these techniques so I can search for them more effectively.
Thanks so much, Paul
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!