필터 지우기
필터 지우기

how to obtain the threshold 25% of the gray intensities?

조회 수: 2 (최근 30일)
fred bnm
fred bnm 2016년 10월 25일
댓글: Image Analyst 2016년 10월 25일
Hi, i want to binarize an image by using thresholding.how to obtain threshold 25% of the gray intensities? (25% of the lower gray intensities are discarded) please gudie me.

채택된 답변

Image Analyst
Image Analyst 2016년 10월 25일
Try this
binarizedImage = grayImage > 0.25 * intmax(class(grayImage));
That should work for uint8 or uint16 images and produce a logical image of the same size.
  댓글 수: 6
fred bnm
fred bnm 2016년 10월 25일
편집: fred bnm 2016년 10월 25일
this is (maximum) More acceptable Compared to the previous.Because that is more adaptable than any image.in fact I am looking for pixels that have 75% of the total gray level image. if you know another method that is suitable for thresholding for Include pixels on edges Please explain.
Image Analyst
Image Analyst 2016년 10월 25일
You have to be more precise in your wording. "pixels that have 75% of the total gray level image" is not precise enough to know what you mean. Do you mean a gray level such that when thresholded at that gray level, 75% of the pixels will be selected? Or do you mean the gray level that is at 25% of the max gray level allowed for that class (uint8 or uint16)? Or do you mean the gray level that is 25% of the max gray level that occurs in the image? Or something else. I don't know.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by