Image Segmentation built into MATLAB?!

Does anyone know if there are any image segmentation methods built into any of the MATLAB toolboxes? I have tried a 'lookfor' on the word 'segment' but haven't found anything interesting...

답변 (2개)

Wolfgang Schwanghart
Wolfgang Schwanghart 2011년 5월 24일

0 개 추천

Hi Philip, look at the function watershed. In addition, there is a very good example using morphological reconstruction.

doc watershed

Cheers, W.

Sean de Wolski
Sean de Wolski 2011년 5월 24일

0 개 추천

doc gt
doc lt
doc ge
doc le
doc eq
doc im2bw %Image Processing Toolbox (and doc graythresh)
doc edge %IPT
doc imerode %IPT
doc imdilate %IPT
doc imopen %IPT
doc imclose %IPT
doc bwareaopen %IPT
doc bwmorph %IPT
Just a few of them... If you want real information you'll have to provide images with expected results.

댓글 수: 4

Philip
Philip 2011년 5월 24일
Thanks for your response! I will look at the functions you have suggested. To make my objective clearer, here are the "before" and "after" images that I am hoping to find:
before segmentation:
http://imageshack.us/photo/my-images/220/nhcathedral.jpg/
after segmentation:
http://imageshack.us/photo/my-images/21/nhcathedralsegmented.jpg/
I have used "Statistical Region Merging (SRM)" to segment the image in this example. The problem is that it can take up to 5 minutes to run. The end result however is what is important - where I essentially have 2 classes; the object and the background. This is achieved in SRM by using a low "Q-level" (or threshold)...
Sean de Wolski
Sean de Wolski 2011년 5월 24일
Do you want the grassy foreground or just the building?
Philip
Philip 2011년 5월 24일
Ideally, just the building and the sky...
Sean de Wolski
Sean de Wolski 2011년 5월 24일
The sky and road are easy: a lower threshold on the blue channel, i.e.:
>> Ibw = I(:,:,3)<90; %blue less than 90
The grass can be done with an AND statement and a lower threshold on the green channel. A few morphological operations would get you what you want.

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

질문:

2011년 5월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by