decreasing no of gray levels
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
k.v.swamy
am 4 Feb. 2012
Bearbeitet: Image Analyst
am 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.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 5 Feb. 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
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!