How to get the threshold values so i can just get my hand in the binary image?

1 Ansicht (letzte 30 Tage)
I am trying to count the number of fingers shown by the user's hand for which i need a binary image with just the hand and other things removed.How should i find the threshold values to get something like this?
Image.png

Antworten (1)

KALYAN ACHARJYA
KALYAN ACHARJYA am 13 Sep. 2019
Bearbeitet: KALYAN ACHARJYA am 13 Sep. 2019
Hi Akshat,
In your image the object (ROI) and image is clearly separable, you can directly apply the imbinirize function on the input image.
result=imbinrize(gray_image);
By default it uses the otshu method to find the threshold value. see other methods detail
Also you can set the threshold own limit (range 0 to 1, say 0.4 etc), and see the results, test with different threshold values and check the best result in your case. In addition after binary operation, you can do some morphological operation to smoth the boundary and segment ROI blobs on binirize image to extract the region of interest (not always).
Already I have mentioned, in your case the hand is clearly separable, just try it. If you will find any difficulty, let me know.
Good Wishes!

Community Treasure Hunt

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

Start Hunting!

Translated by