Help with image thresholding?
Ältere Kommentare anzeigen
I need to get a binary image of the fist (shown below).
I've tried using graythresh to get the threshold value, tried my own threshold values, used imgradient to get the edges and even used edge detection, but I can't seem to get a clear outline of the fist.
I'm using blob analysis for detecting the fist.
Can someone help me out? Really appreciate it!

Antworten (1)
Anand
am 3 Mär. 2014
Try working in the HSV space. Here's what I got
I = imread('http://www.mathworks.com/matlabcentral/answers/uploaded_files/8923/gest2_7.jpg');
% Convert to HSV
I = rgb2hsv(I);
% Threshold based on hue
mask = I(:,:,1)>=0.023 & I(:,:,1)<=0.082;
% Cleanup mask
...
You'll need to play around with the thresholds some more and do some post-processing on the mask like filling holes and smoothing the boundaries.
5 Kommentare
Shravanthi
am 3 Mär. 2014
Bearbeitet: Shravanthi
am 3 Mär. 2014
Image Analyst
am 3 Mär. 2014
Why? Why are you not using color????
Shravanthi
am 3 Mär. 2014
Bearbeitet: Shravanthi
am 3 Mär. 2014
Image Analyst
am 3 Mär. 2014
Can you get better illumination of the background, so that you don't have such a severe gradient?
Shravanthi
am 4 Mär. 2014
Kategorien
Mehr zu Object Analysis finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!