Howto convert HSV image to Binary Thresholding?
7 views (last 30 days)
Show older comments
I want to try convert HSV image to Binary Thresholding, but when I run the program something eror, the result is not visible. this my coding.
HSV = rgb2hsv(RGB);
%R = RGB(:,:,2);
subplot(2, 5, 2);
imshow(HSV);
title('HSV Image');
% Contrast Limited Adaptive Histogram Equalization (CLAHE) %
V = HSV(:,:,3);
subplot(2, 5, 3) ;
imshow(V);
title('CLAHE');
S1 = strel('disk',30);
J = imclose(imopen(V,S1),S1);
subplot(2, 5, 4);
imshow(J);
title('Morfologi Smoothing');
% Binary Thresholding %
thresholdValue = 230;
BI = V > thresholdValue;
subplot(2, 5, 5);
imshow(BI);
title('Binary Thresholding');
can help me? and this my picture.
0 Comments
Answers (1)
Image Analyst
on 14 Dec 2015
I don't know why you call it CLAHE - you did not do CLAHE, which is done by the function adapthisteq().
Anyway, I'd guess that your thresholdValue is no good. See my interactive thresholding application in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
6 Comments
muhammad akhir muhammad
on 3 May 2016
where this code given by image analyst should be add so that we can run the coding smoothly given by indra ginanjar?? TQ Sir..
Image Analyst
on 3 May 2016
See my color segmentation demos here: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!