H
hehaidaxue
Unregistered / Unconfirmed
GUEST, unregistred user!
人体心电数据量较大,为提高存储器的使用效率,需对心电数据进行压缩,现有一段压缩编码,请教各位这是什么压缩算法,有何优缺点?谢谢!
1) M = 0, L = 0, R = 2r-1, 对j = 0, j =1……2m-1, P0[j] = P1[j] = 1;
2) T = R * P0[M] / (P0[M] + P1[M]);
3) 输入待编码位xj
if (xj = 0)
P0[M]++, R = T;
else
P1[M]++, R = R-T, L = L + T
4) M = M<<1 ,M = M|xj;
5) while (R < 2r-1) 输出L最高位;
L = L<<1, R = R<<1;
if (R>~L) R = ~L+1
6) 若仍有待编码位,则执行2)否则,输出L的t个比特位。
1) M = 0, L = 0, R = 2r-1, 对j = 0, j =1……2m-1, P0[j] = P1[j] = 1;
2) T = R * P0[M] / (P0[M] + P1[M]);
3) 输入待编码位xj
if (xj = 0)
P0[M]++, R = T;
else
P1[M]++, R = R-T, L = L + T
4) M = M<<1 ,M = M|xj;
5) while (R < 2r-1) 输出L最高位;
L = L<<1, R = R<<1;
if (R>~L) R = ~L+1
6) 若仍有待编码位,则执行2)否则,输出L的t个比特位。