nothing. In your case, just pass the gradient magnitude image to the region growing instead of the image. Something like:
[dX, dY] = gradient(image);
gradmag = sqrt(dX.^2 + dY.^2);
mask = RegionGrowing(gradmag, threshold, seed);
you need to set up the mex compiler by typing
>> mex -setup
and then chose one of the shown options (you should at least have the lcc compiler). Then try to run the region growing again.
I got this error! Can you help me?! Thank you very much. :)
Trying to compile mex file...Error: Could not detect a compiler on local system
which can compile the specified input file(s)
Error using RegionGrowing (line 67)
Could not compile the mex file :(. Please try to do so manually!