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
kindly reply to my question. I have sent u many mails that this code is not working fine for me as i am getting a white image only. I need the ROI which i selected with seed point. Please reply.
Hi... I have found an error when i am executing this code. The details of error are follows:
??? Error using ==> minus
Integers can only be combined with integers of the same class, or
scalar doubles.
dist = abs(neg_list(1:neg_pos,3)-reg_mean);
Thanks !
i should say that this is very helpful for beginners like me, but i have a doubt, on what basis can we determine the value to reg_max distance
if we choose to segment a particular region
I have tried the code on image size 512*512. after providing the x and y values, i get J of same size 512*512 with all white image. No segmentation has been done. Please suggest!
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.
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.
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?
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!
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.
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
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