Code covered by the BSD License  

Highlights from
Region Growing

4.6

4.6 | 20 ratings Rate this file 311 Downloads (last 30 days) File Size: 54.69 KB File ID: #19084
image thumbnail

Region Growing

by Dirk-Jan Kroon

 

06 Mar 2008 (Updated 06 Mar 2008)

Segmentation by growing a region from seed point using intensity mean measure

| Watch this File

File Information
Description

Simple but effective example of "Region Growing" from a single seed point.

The region is iteratively grown by comparing all unallocated neighbouring pixels to the region. The difference between a pixel's intensity value and the region's mean, is used as a measure of similarity. The pixel with the smallest difference measured this way is allocated to the region.

This process stops when the intensity difference between region mean and new pixel becomes larger than a certain treshold

Acknowledgements
This submission has inspired the following:
Region Growing (2D/3D grayscale)
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (32)
26 Mar 2008 Xin Liu

It's very helpful. Thanks!

08 Apr 2008 jichao zhao

That is excellent one. I am wondering whether you can extend your work to colorful graph, not just gray scale.

17 Apr 2008 balamurugan samy

useful

22 Apr 2008 Roberto Mantia

It does what it should do. Very good !

18 May 2008 Zonglei Zhen

region growing is a very useful method for sgementation. This program is a good start of it.

31 Jul 2008 Paolo L

very good, simple to read, simple to understand, it works fine for a start, useful for student exercises

01 Aug 2008 ryan hartadi

it works very good, so simple. need to de developed in other area

19 Dec 2008 rasool shaik

good

22 Jan 2009 Ida Haggstrom  
06 Feb 2009 ucd puri

Hi All, This is an excellent piece of code. I am just an intermediate matlab programmer and have a couple of questions on this code.
(1) It works perect on normal images. But i have a dicom int16 medical image, when i give it as an input, i get an output image with only one pixel (the seed pixel that i selected) . I changes the code a little bit for example instad of imread, i used dicomread, and in place of imshow(I,[]) i used imshow(I,'displayRange',[]).
(2) the file explaination reads '"This process stops when the intensity difference between region mean and
 new pixel become larger than a certain treshold (t)" but this t is 0.2 which you have defined in the file, what if i want to use an grey intensity level of say 600 as threshold. As my image is int16 dicom, it has 2^16 , so it grey sclae ranges from -32768 to + 32768.
thanks a lot for help in advance.
tanuj

20 Feb 2009 ucd puri

Hi, I figured out what was the problem, my data set was in int16 format so, it was eaisy to make amendments, but i am not sure if my region is segmented correctly. Regards tanuj

25 Feb 2009 Jag

thanks, seems like a handy piece of code.
On R2008b I had to change line 70 to

dist = abs(neg_list(1:neg_pos,3)-double(reg_mean));

to get it to run with the sample image.

21 Mar 2009 Torres Chhetri

its was a great help, would you like to extend your for taking random seed pixels for a colorful image. if u do that, it would be so great.

31 Mar 2009 siti 85

cannot download.. why?

23 Sep 2009 jack lumber  
12 Dec 2009 taccini

Hello All,
first i want to thank Dirk about his work and all the matlab community because there are very helpful for me.
well i need to use the region growing for 3D matrix.
this code could be adapted or any one have some idea?
thanks.

03 Feb 2010 anoop R

Very useful piece of code.

08 Jun 2010 Natarajan

code works except as Ron did . got to change the line 70.

However the i didn't get a segmented/thresholded output for 16 bit grey scale! Thanks

Would be great if someone could give an idea of whats the issue!

23 Jun 2010 Jess

No need to change line 70 if use im2double with imread as given in the example (line 21 - comment section)

23 Nov 2010 Esther Kneepkens

Thank you a lot!

05 Dec 2010 Hank Will

This looks pretty cool! But I wonder processing larger images with this routine (e.g. satellite data). Any suggestions? In my case I don't get any error, but processing a 10 Bit panchromatic imagery subset of just 15 Mb leads to no valuable results.
Would highly appreciate any thoughts about workflows for matlab for this purpose!
Thanks!

07 Jan 2011 Aravind

can somebody explain how to segment a carotid artery ?

30 Mar 2011 myriam robert

I have a MRI coup from a 3D data matrix "Y" so it's Y( : , : , 14) .
the algorithm doesn't work on this coup. In the result I have only one white pixel ( the seedpoint).
I change the line 70 but it doesn't change anything.
can you help me please?

30 Mar 2011 myriam robert

I change reg_maxdist to 10 and it's ok.
Does anybody have find how use the region growing for 3D matrix ?
thank you

29 May 2011 paramveer sran

i have downloaded this piece o code but when i tried to run on the same image i.e medtest.png i got the following error. could you plz tell me where is the problem and how to solve this
>> regiongrowing
??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.

Error in ==> isstruct at 99
thanx

26 Sep 2011 michiko

very helpful!Thank you very much!!!

12 Oct 2011 Xin He

very helpful thanks!

17 Oct 2011 saif

thank you

21 Nov 2011 kalarmago

What are x and y, I believe image(x,y) coordinate, but when I tested other x,y values (eg, x=308,y=244, I(x,y)=0.73) then the segmented result image is not desired.

22 Nov 2011 fsdm fsdm  
17 Dec 2011 Sivan Ran

Hi,
How can I make it work for 3D images?

Thank you

30 Dec 2011 Deepak

Thq Dirk-Jan Kroon for such short code.I am working dicom image.I convert it into JPG.i have a problem over run time.

??? Undefined function or method 'regiongrowing' for input
arguments of type 'double'.

I even defined im2double() fnc.but i got an error...

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
morphology Dirk-Jan Kroon 22 Oct 2008 09:52:07
segmentation Dirk-Jan Kroon 22 Oct 2008 09:52:07
region growing region segmentation Dirk-Jan Kroon 22 Oct 2008 09:52:08
simple and effective but if u could extend your work with colorf Torres Chhetri 21 Mar 2009 01:10:14
its a great work Torres Chhetri 21 Mar 2009 01:10:14
经济 zhou ? 25 Oct 2009 03:48:54
经济 Su Dongcai 30 Jan 2010 23:54:19
经济 Mike Liu 20 Sep 2010 04:12:47
region growing region segmentation Mike Liu 20 Sep 2010 04:13:12
morphology gunjan deotale 02 Nov 2010 17:14:39
simple and effective but if u could extend your work with colorf Mohammad Golam Kibria 22 Mar 2011 06:19:12
its a great work bhavya 08 Apr 2011 11:36:29
its a great work xiao qiugen 24 Jun 2011 03:24:21
region growing region segmentation pollausen85 07 Jul 2011 05:53:57
region growing region segmentation Marlene 30 Dec 2011 13:07:55

Contact us at files@mathworks.com