How can I identify/Detect regions in grayscale image with thin border?

2 ビュー (過去 30 日間)
AMAR P
AMAR P 2018 年 8 月 21 日
再開済み: Walter Roberson 2018 年 12 月 22 日
Hi All, Am working on a problem where I wish to extract regions in the image below.
Objective: - Identify every region. - Calculate the Area and related parameters.
What I have done?
  • Read image and convert to Grayscale
[MainImg, MainImg_Map] = imread('MainImg');
GrayImg = ind2gray(MainImg,MainImg_Map); #Convert to Gray
  • Detect Edges
FindEdge_Sobel = edge(GrayImg, 'sobel');
  • Create structuring element to make borders more visible
se1 = strel('line',3, 90);
se0 = strel('line',3, 0);
  • Dilate the Image objects
ImgDill = imdilate(FindEdge_Sobel ,[se1 se0]);
  • Result:
MORE QUESTIONS: > How to set foreground and Background for the image? > How I can make those border to enclose region as in Original Image?

回答 (1 件)

KSSV
KSSV 2018 年 8 月 21 日
Have a look on regionprops
  1 件のコメント
AMAR P
AMAR P 2018 年 8 月 21 日
編集済み: AMAR P 2018 年 8 月 21 日
Hey Thanks, I tried that earlier. Below is the Output. Red *'s are Center of the object, measured using 'Centeroid'
Am trying to use couple of Morphological operations on the image. What do you think?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by