decreasing no of gray levels

조회 수: 2 (최근 30일)
k.v.swamy
k.v.swamy 2012년 2월 4일
편집: Image Analyst 2013년 9월 30일
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.

채택된 답변

Image Analyst
Image Analyst 2012년 2월 5일
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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2012년 2월 4일
Hint: X - mod(X,2^P)
  댓글 수: 1
k.v.swamy
k.v.swamy 2012년 2월 5일
can u pl tell me what is x

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by