Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can i do the threshold of an image ?

1 Ansicht (letzte 30 Tage)
ting
ting am 27 Nov. 2013
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
  • 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

Antworten (1)

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

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by