Regiongrowing algorithm for region base segmentation this function take 5 parameters and retrun one logical image
I is the intencity value you want to segment,
gray is the input gray image,
outimg is the empty image size of input image like outimg=zeros(rows,cols), and
x and y are seed point loction