Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How can i do the threshold of an image ?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153316/image.png)
- The above image of size 8*8 is my original image
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153317/image.png)
- 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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153318/image.png)
What can i change ?? Thank you
0 comentarios
Respuestas (1)
Image Analyst
el 27 de Nov. de 2013
T = 10;
binaryImage = Results > T;
% Get new X with zeros where it's less than 10:
X(~binaryImage) = 0;
2 comentarios
Image Analyst
el 28 de Nov. de 2013
Editada: Image Analyst
el 28 de Nov. de 2013
What is the name of that array, is it I? If so, then do:
I(I<10)=0;
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!