Effacer les filtres
Effacer les filtres

decreasing no of gray levels

1 vue (au cours des 30 derniers jours)
k.v.swamy
k.v.swamy le 4 Fév 2012
Modifié(e) : Image Analyst le 30 Sep 2013
hi all, can any one tell me how to decrease the no of gray levels in a image.i have to decrease in the powers of 2. regards k.v.swamy.

Réponse acceptée

Image Analyst
Image Analyst le 5 Fév 2012
X is the gray level in Walter's answer. Did you try to do it, like this:???
X = 0:255;
P = 3;
quantizedGrayLevel = X - mod(X,2^P)
fprintf('Original Gray Level, New Quantized Gray Level\n');
for gl = 1:length(X)
fprintf('%10d becomes %10d\n', X(gl), quantizedGrayLevel(gl));
end

Plus de réponses (1)

Walter Roberson
Walter Roberson le 4 Fév 2012
Hint: X - mod(X,2^P)
  1 commentaire
k.v.swamy
k.v.swamy le 5 Fév 2012
can u pl tell me what is x

Connectez-vous pour commenter.

Catégories

En savoir plus sur 2-D and 3-D Plots 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