Not all images can be segmented by setting thresholds on the histogram of pixel values. For example, most widefield microscope images show different features with similar grey values. In such cases, texture can be quantified and used for segmentation.
This video explains the process of segmenting an image using texture.
Code associated with these tutorials can be downloaded from here: https://github.com/bnsreenu/python_fo...