Setting the threshold for converting grayscale to binary image

By using "graythresh" the object to be detected is missing. So, how to set a threshold value for an image to convert it to binary image?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by