How to find quantize, flooring and mod 2 of an image

조회 수: 5 (최근 30일)
Beginner in
Beginner in 2015년 5월 29일
답변: Walter Roberson 2015년 5월 30일
I have decomposed/ generated the coefficient matrices of the level-one approximation (LL) and horizontal (LH), vertical (HL) and diagonal features (HH) of an image with the following code line:
figure
subplot (2,2,1);
imshow(LL,[]);
title('LL subband-Approximation');
and similarly for LH, HL, HH band.
Now my problem is:
(i) separate LL out and quantify it to [0,255]. (ii) Then implement following term:
LL'(subscript i,j)= floor[LL (subscript i,j)/2^k] mod 2
where 0<=K<=7 and subscript i,j are 128*128.
How can this be implemented in MatLab. Please provide me the code.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 5월 30일
Quantize:
minLL = min(LL(:));
maxLL = max(LL(:));
halfLL = minLL + (maxLL - minLL)/2;
qLL = 255*(LL > halfLL);

카테고리

Help CenterFile Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by