threshold values
Mostra commenti meno recenti
My threshold value=0.9
If the pixel value is less than 0.9, I have to set it to zero...
else set it to 255.
What command should be used for this
Risposte (4)
the cyclist
il 22 Mag 2012
Does this do what you want?
p = 255*(p>=0.9);
3 Commenti
Sivakumaran Chandrasekaran
il 22 Mag 2012
Image Analyst
il 22 Mag 2012
Assuming p is your image array, it does match your requirement. If it doesn't you need to say why not, because then there would be something you didn't tell us. In your original question you did NOT say anything about "finding" a threshold value - you said that it was 0.9.
Geoff
il 22 Mag 2012
+1 : this does exactly what you have requested, but you might not understand why. The call (p>=0.9) returns an array of 0 or 1: 0 if the value is less than 0.9 and 1 otherwise. By multiplying by 255, this achieves your two tasks (set to zero or set to 255) simultaneously. Did you actually try it?
Sivakumaran Chandrasekaran
il 30 Mag 2012
0 voti
Neesha Sahl
il 3 Apr 2019
0 voti
Can someone explain to me threshold values in simple English? Such as why I need to set a threshold value when I am running Optical Flow and how to pick the best threshold value.
Categorie
Scopri di più su Image Thresholding in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!