How to retrieve first 4 digits after decimal point?
12 views (last 30 days)
I have to retrieve first 4 digits after decimal point in HH band of the following code:
img = imread('cameraman.tif');
a = img(1:8,1:8);
[LL,LH,HL,HH] = dwt2(a,'db4');
Moreover, how can I fetch more than 4 digits (after decimal) in the same HH band ?
Star Strider on 4 Dec 2019
x = pi
AfterDecimal = rem(x,1)
FirstFour = fix(AfterDecimal*1E+4)*1E-4