필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
RIshabh Golchha
RIshabh Golchha 2017년 9월 15일
댓글: Image Analyst 2017년 9월 16일
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?

답변 (1개)

Image Analyst
Image Analyst 2017년 9월 15일
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
RIshabh Golchha
RIshabh Golchha 2017년 9월 16일
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 2017년 9월 16일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by