hi all

i'm trying to make a region growing segmentation for my project , can anyone please help me writng the code

the algorithm is as follows:

1. seed the first pixel(seed) manually
2. get the value of the seed
3. compare it with its 4-neighbors or 8-neighbors(i dont know which is better)
4. if the neighbors have the same value then they are in region
5. compare these neighbors with there other neighbors and so on until it finds a boundary, then stop

thanks a lot