Effacer les filtres
Effacer les filtres

How to find connected region to local maxima in a gray scale image

1 vue (au cours des 30 derniers jours)
RIshabh Golchha
RIshabh Golchha le 15 Sep 2017
Commenté : Image Analyst le 16 Sep 2017
I have a gray scale image. Using imregionalmax() I can find the various local peaks. For each peak I want the connected region in such that the entire region has an intensity greater than 0.5*Intensity of that peak.
Any suggestions on how to achieve this?

Réponses (1)

Image Analyst
Image Analyst le 15 Sep 2017
Well that's a regiongrowing concept. You could use my attached magic wand program.
Or you could iterate and for every peak, find the threshold, then threshold the entire image and then extract the one blob that contains the current blob using imreconstruct(). Here's a start:
% First get threshold somehow, then
allBlobs = grayImage > threshold;
blobAroundPeak = imreconstruct(...
  2 commentaires
RIshabh Golchha
RIshabh Golchha le 16 Sep 2017
Well. That is one way to do it. But if there are a large number of peaks in the same image I would have to put a loop right? Is there some other more efficient way to do it?
Image Analyst
Image Analyst le 16 Sep 2017
My gosh, how many peaks do you have? Even if you had a million peaks and had to do a million iterations, that would only take a millisecond (just for the iteration part, not the image processing).
Anyway, the "problem" is that your threshold varies on a peak-by-peak basis since it's 0.5*peakIntensity for just that peak. So no matter what, you're stuck doing something (region growing or thresholding) in a loop over all detected peaks. Give it a try - it may be faster (and easier) than you think. If you need help, attach your image.
You may also have small dark peaks next to taller/brighter peaks and that would cause the regions to be connected. So you should define the smallest region that you want to consider. Before you threshold, check it's size and if it's too small, then skip it.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by