unravel.m
来自「冈萨雷斯的经典教材数字图像处理的matlab版源代码」· M 代码 · 共 18 行
M
18 行
%UNRAVEL Decodes a variable-length bit stream.
% X = UNRAVEL(Y, LINK, XLEN) decodes UINT16 input vector Y based on
% transition and output table LINK. The elements of Y are
% considered to be a contiguous stream of encoded bits--i.e., the
% MSB of one element follows the LSB of the previous element. Input
% XLEN is the number code words in Y, and thus the size of output
% vector X (class DOUBLE). Input LINK is a transition and output
% table (that drives a series of binary searches):
%
% 1. LINK(0) is the entry point for decoding, i.e., state n = 0.
% 2. If LINK(n) < 0, the decoded output is |LINK(n)|; set n = 0.
% 3. If LINK(n) > 0, get the next encoded bit and transition to
% state [LINK(n) - 1] if the bit is 0, else LINK(n).
% Copyright 2002-2004 R. C. Gonzalez, R. E. Woods, & S. L. Eddins
% Digital Image Processing Using MATLAB, Prentice-Hall, 2004
% $Revision: 1.4 $ $Date: 2003/10/26 18:41:41 $
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?