필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can i do the threshold of an image ?

조회 수: 1 (최근 30일)
ting
ting 2013년 11월 27일
마감: MATLAB Answer Bot 2021년 8월 20일
  • The above image of size 8*8 is my original image
  • The second one reconstructs from idct, i.e (idct2 is used here)
I think i need to do threshold-ing. If i set T=10, If I<10, i want to set them to be zero and only keep those intensities >=10
Results==idct2(X_dq);
T=10;
Ouput=Results>=10;
But i got this result, However, i want to keep my second row instead of all ones. I don't want a binary image.
What can i change ?? Thank you

답변 (1개)

Image Analyst
Image Analyst 2013년 11월 27일
T = 10;
binaryImage = Results > T;
% Get new X with zeros where it's less than 10:
X(~binaryImage) = 0;
  댓글 수: 2
ting
ting 2013년 11월 28일
I want to threshold those I<10 but keep this row how can i do that? Thank you
Image Analyst
Image Analyst 2013년 11월 28일
편집: Image Analyst 2013년 11월 28일
What is the name of that array, is it I? If so, then do:
I(I<10)=0;

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by