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

1 vue (au cours des 30 derniers jours)
Beginner in
Beginner in le 29 Mai 2015
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.

Réponses (1)

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

Catégories

En savoir plus sur Modify Image Colors 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