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

2 ビュー (過去 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 Center および File ExchangeModify Image Colors についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by