How to separate hand region after using multi-otsu's thresholding?
Show older comments
The attached image is the output after appling multi-otsu's thrsholding using 2 threshold value. How can I separate the hand region now ?
Remember the approah should be adaptive.
Answers (1)
Image Analyst
on 24 Sep 2022
Simply use ==. Assuming the hand is the brightest in your quantized, 3-level image:
maxGL = max(yourImage(:))
binaryImage = yourImage == maxGL;
% Extract only the largest blob:
binaryImage = bwareafilt(binaryImage, 1); % Binary image of only the hand.
If you want to crop it out to a separate, smaller image for some reason (probably not necessary though), you can do:
% Find Bounding Box:
props = regionprops(binaryImage, 'BoundingBox');
% Extract that bounding box out into it's own, smaller image.
handOnly = imcrop(binaryImage, props.BoundingBox);
6 Comments
Zara Khan
on 25 Sep 2022
Image Analyst
on 25 Sep 2022
You'd need a ground truth segmentation - one that you know for a fact is 100% accurate. Then you can use dice.
Otherwise you can just make some subjective judgment about whether it's good enough for your needs, even if it's not 100% accurate or you don't know its accuracy.
Zara Khan
on 25 Sep 2022
Image Analyst
on 25 Sep 2022
No.
Let's say you use some kind of algorithm and segmented the image, thus producing a binary image. Well...how do you know that binary image is not accurate?
If you suspect that it's not accurate then you must have some other binary image produced by an algorithm much more trusted than the one you just used. So that would be your ground truth segmented image. Compare your binary image to that one using dice.
If you have no other binary image then perhaps you want to create one by hand tracing some region with drawpolygon. But why do you think that would be more accurate than your coded algorithm? Well, maybe it is, if your algorithm is really bad.
Zara Khan
on 25 Sep 2022
Image Analyst
on 26 Sep 2022
You can prove it did a great job because, without any "right answer", who is to say otherwise? With no authoritative right answer, no one can complain that your segmentation is not perfect.
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!