Effacer les filtres
Effacer les filtres

Change Pixel intensity value

2 vues (au cours des 30 derniers jours)
Pugazhendhi
Pugazhendhi le 21 Fév 2012
Commenté : Image Analyst le 17 Fév 2018
Hi all,
I have an image(gray scale) whose pixel intensity values ranges from -0.5373 to 0.4744. I would like to change the intensity value which is lesser than 0 to 0. Can any one help me to solve this.
Thanks.

Réponse acceptée

Honglei Chen
Honglei Chen le 21 Fév 2012
Say your image is x,
x(x<0) = 0;
  5 commentaires
Honglei Chen
Honglei Chen le 21 Fév 2012
I'm just making an example, make sure there are negative numbers in x.
Image Analyst
Image Analyst le 22 Fév 2012
No, you don't need all that reshaping stuff. "x(x<0)=0" is sufficient to work on the whole 3D matrix (e.g., a color image) - no reshaping is needed.

Connectez-vous pour commenter.

Plus de réponses (2)

Walter Roberson
Walter Roberson le 21 Fév 2012
X = max(0, X); %another way of changing anything less than 0 to 0
  1 commentaire
Pugazhendhi
Pugazhendhi le 22 Fév 2012
Thanks for the help

Connectez-vous pour commenter.


vishnu lohith
vishnu lohith le 16 Fév 2018
use a suitable transformation to change the intensities from ( 0,255) to (65,180).
  1 commentaire
Image Analyst
Image Analyst le 17 Fév 2018
Are you sure you posted to the correct six year old question? Not sure what your answer has to do with the original question about clamping the signal to zero.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Segmentation and Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by