Hi,
You can go through the follwoing documentation which describes the different ways to segment an image using Image segmenter App in MATLAB.
You can try out 'Threshold' or 'Graphcut' tools for your problem.
Also, you can use functions to segment the images. Please go through this documentation for function on image segmentation.
Hope it helps!