The most important key in the thresholding process is the threshold point. Manually, the threshold pint can be visually judged by trial and error, adjusting the value is you don't get the desired background-object separation.
Thresholding is the simplest method of image segmentation. From a gray scale image, thresholding can be used to create binary image (Shapiro, et al 2001:83).During the thresholding process, individual pixels in an image are marked as “object” pixels if their value is greater than some threshold value (assuming an object to be brighter than the background) and as “background” pixels otherwise. This convention is known as threshold above. Variants include threshold below, which is opposite of threshold above; threshold inside, where a pixel is labeled "object" if its value is between two thresholds; and threshold outside, which is the opposite of threshold inside (Shapiro, et al 2001:83).
For Automatic thresholding, many methods have been implemented in many research. You can simply use the mean or median value, or you can analyze the histogram and find a valley for the threshold value.