Discontinue processing on edge pixels within an image

1 visualizzazione (ultimi 30 giorni)
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.

Risposta accettata

Image Analyst
Image Analyst il 26 Dic 2014
Well there are two ways.
  1. 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.
  2. 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.
To do the first way, just have your mask of edge pixels, then do
outputImage(mask) = originalImage(mask);
  6 Commenti
Image Analyst
Image Analyst il 1 Gen 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

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by