Image thresholding is a very important phase in the image analysis process. However, different images have different characteristics making the traditional process of thresholding by one algorithm a very challenging task. That is because any thresholding method may be perform well for some images but for sure it will not be suitable for all images. In this paper, intelligent thresholding by training a neural network is proposed. The neural network is trained using a set of features extracted from medical images randomly selected form a sample set and then tested using the remaining medical images. This process is repeated multiple times to verify the generalization ability of the network. The average of segmentation accuracy is calculated by comparing every segmented image with its gold standard image.