- You could process the whole image and then just replace the edge pixels of the output image with the original pixels. This is by far the easiest.
- You could try to not use the pixels in the processing in the first place by setting them to 0 or nan or some other flag value. How you handle it really depends on what king of processing takes place.
Discontinue processing on edge pixels within an image
1 view (last 30 days)
Show older comments
I have enhanced the edge information within an image. Now I want another algorithm to work on the rest of the image information excluding edges. I am taking small image blocks at a time on which the algorithm is going to be applied. How can I make this algorithm to work on the rest of the image information and not on edges? Should I define a fixed width for edges and brute force the algorithm to not work on pixels of "this much" width or "intensity". That wouldn't be robust, right? Any ideas would be appreciated.
0 Comments
Accepted Answer
Image Analyst
on 26 Dec 2014
Well there are two ways.
To do the first way, just have your mask of edge pixels, then do
outputImage(mask) = originalImage(mask);
6 Comments
Image Analyst
on 1 Jan 2015
Actually there is a setting in R2014b that lets you specify whether nan's are included or ignored in calculations. Look in Home->Preferences>Workspace->Statistical Calculations
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!