how to get binary image from histogram?
조회 수: 2 (최근 30일)
이전 댓글 표시
I'm new to matlab. Some on please help me to obtain binary segmentation form histogram.
thank you
댓글 수: 0
답변 (1개)
Image Analyst
2014년 3월 13일
You pick a threshold and then do
binaryImage = grayImage < thresholdValue;
if you want any more advice, post an image and say what you want to find or measure. The threshold can be chosen form the histogram, for example from my interactive thresholding application: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
댓글 수: 4
Image Analyst
2014년 3월 14일
[pixelCounts, grayLevels] = imhist(grayImage, 256);
binaryImage = grayImage < 128;
Do the above thresholding for each color channel and then AND the 3 binary images to get the overall binary image for the color image.
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!