Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
RIshabh Golchha
RIshabh Golchha el 15 de Sept. de 2017
Comentada: Image Analyst el 16 de Sept. de 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?

Respuestas (1)

Image Analyst
Image Analyst el 15 de Sept. de 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 comentarios
RIshabh Golchha
RIshabh Golchha el 16 de Sept. de 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 el 16 de Sept. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by