Welcome![Sign In][Sign Up]
Location:
Search - log2

Search list

[Compress-Decompress algrithmsSPIHT(Matlab).zip

Description:

% Matlab implementation of SPIHT (without Arithmatic coding stage)
%
% By Jing Tian, scuteejtian@hotmail.com

fprintf('-----------   Welcome to SPIHT Matlab Demo!   ----------------\n');

fprintf('-----------   Load Image   ----------------\n');
infilename = 'lena512.bmp';
outfilename = 'lena512_reconstruct.bmp';

Orig_I = double(imread(infilename));

rate = 1;

OrigSize = size(Orig_I, 1);
max_bits = floor(rate * OrigSize^2);
OutSize = OrigSize;
image_spiht = zeros(size(Orig_I));
[nRow, nColumn] = size(Orig_I);

fprintf('done!\n');
fprintf('-----------   Wavelet Decomposition   ----------------\n');
n = size(Orig_I,1);
n_log = log2(n);
level = n_log;
% wavelet decomposition level can be defined by users manually.
type = 'bior4.4';
[Lo_D,Hi_D,Lo_R,Hi_R] = wfilters(type);

[I_W, S] = func_DWT(Orig_I, level, Lo_D, Hi_D);

fprintf('done!\n');

fprintf('-----------   Encoding   ----------------\n');
img_enc = func_SPIHT_Enc(I_W, max_bits, nRow*nColumn, level);  

fprintf('done!\n');
fprintf('-----------   Decoding   ----------------\n');
img_dec = func_SPIHT_Dec(img_enc);

fprintf('done!\n');
fprintf('-----------   Wavelet Reconstruction   ----------------\n');
img_spiht = func_InvDWT(img_dec, S, Lo_R, Hi_R, level);

fprintf('done!\n');
fprintf('-----------   PSNR analysis   ----------------\n');

imwrite(img_spiht, gray(256), outfilename, 'bmp');

Q = 255;
MSE = sum(sum((img_spiht-Orig_I).^2))/nRow / nColumn;
fprintf('The psnr performance is %.2f dB\n', 10*log10(Q*Q/MSE));


Platform: | Size: 232873 | Author: jasonchang | Hits:

[Other resourceshellsort111

Description: 附有本人超级详细解释(看不懂的面壁十天!) 一、 实际问题: 希尔排序(Shell Sort)是插入排序的一种。因D.L.Shell于1959年提出而得名。它又称“缩小增量分类法”,在时间效率上比插入、比较、冒泡等排序算法有了较大改进。能对无序序列按一定规律进行排序。 二、数学模型: 先取一个小于n的整数d1作为第一个增量,把文件的全部记录分成d1个组。所有距离为dl的倍数的记录放在同一个组中。先在各组内进行直接插人排序;然后,取第二个增量d2<d1重复上述的分组和排序,直至所取的增量dt=1(dt<dt-l<…<d2<d1),即所有记录放在同一组中进行直接插入排序为止。该方法实质上是一种分组插入方法。 三、算法设计: 1、将相隔某个增量dlta[k]的元素构成一个子序列。在排序过程中,逐次减小这个增量,最后当h减到1时,进行一次插入排序,排序就完成。增量序列一般采用:dlta[k]=2t-k+1-1,其中t为排序趟数,1≤k≤t≤[log2 (n+1)],其中n为待排序序列的长度。按增量序列dlta[0..t-1]。 2、按增量dlta[k](1≤k≤t≤[log2 (n+1)])进行一趟希尔插入排序。 3、在主函数中控制程序执行流程。 4、时间复杂度:1≤k≤t≤[log2 (n+1)]时为O(n3/2)。 -with super detailed explanation (not read the Wall for 10 days!) A practical question : Sort Hill (Shell Sort) is inserted into a sort. By D. L. Shell made in 1959 and named after. It is also known as the "narrow incremental method" in the time-efficient than inserted, such as sorting algorithms and bubbling there has been a big improvement. The disorder can sequence by law must rank. Two mathematical models : first getting a less than n integers d1 as an increment. all documents should be recorded into d1 groups. All distance dl in multiples of record on the same group. In the first group for direct insertion sorting; Then, take a second increment d2
Platform: | Size: 19421 | Author: 乐乐 | Hits:

[Other resourcewave_matlab2006

Description: %WAVETEST Example Matlab script for WAVELET, using NINO3 SST dataset % % See \"http://paos.colorado.edu/research/wavelets/\" % Written January 1998 by C. Torrence % % Modified Oct 1999, changed Global Wavelet Spectrum (GWS) to be sideways, % changed all \"log\" to \"log2\", changed logarithmic axis on GWS to % a normal axis.
Platform: | Size: 10894 | Author: 韩伟光 | Hits:

[Other resourcea

Description: 快速排序法 //基本的思想:通过一趟排序将待排的记录分割成独立的两部分, //其中前一部分的 记录的关键字均比另一部分记录的关键字小, //再分别对两组记录进行递归分割,达到排序的目的 //平均时间复杂度为 O(log2(n
Platform: | Size: 906 | Author: 宇亮 | Hits:

[Other resourceY_TFun_Tournament

Description: 二叉树,堆排序模板,时间复杂度:为O(N*Log2(N))。空间复杂度: 2*N-1(个结点)
Platform: | Size: 1887 | Author: xzzz | Hits:

[Other高级计算器 V1.0

Description: 系统支持的数学函数:PI ! ^ % SQR SQRT INT/TRUNC ROUND ABS FRAC SIN COS TAN ARCSIN ARCCOS ARCTAN LN LOG2 LOG10PI:圆周率。Exp!:计算Exp(表达式)的介乘。Exp1^Exp2:计算Exp1的Exp2次方。Exp1%Exp2:计算Exp1除以Exp2后的余数。Sqr(Exp):计算Exp的平方。Sqrt(Exp):计算Exp的平方根。Int(Exp)/Trunc(Exp):把Exp截断取整。Round(Exp):把Exp四舍五入。Abs(Exp):取Exp的绝对值。Frac(Exp):取Exp的小数部分。Sin(Exp):求Exp的正玄。Cos(Exp):求Exp的余玄。Tan(Exp):求Exp的正切。ArcSin(Exp):求Exp的反正玄。ArcCos(Exp):求Exp的反余玄。ArcTan(Exp):求Exp的反正切。Ln(Exp):求Exp的自然对数。Log2(Exp):求Exp的以2为低的对数。Log10(Exp):求Exp的以10为低的对数。-system to support the Math : PI! ^% SQR SQRT INT / TRUNC ROUND ABS FRAC SIN COS TAN LN ARCSIN ARCCOS ARCTAN LOG2 LOG10PI : pi. Exp. : Computational Exp (expression) of the referral by. Exp1 ^ Exp2 : computational power of Exp1 the Exp2. Exp1% Exp2 : Exp1 calculated by dividing Exp2 the remainder. Monaco (Exp) : Exp calculating the square. Sqrt (Exp) : Exp calculating the square root. Int (Exp) / Trunc (Exp) : With Exp disconnected from the whole. Round (Exp) : With Exp rounding. Abs (Exp) : Exp take the absolute value. Frac (Exp) : Exp take part in the minority. Sin (Exp) : for the Shogen Exp. Cos (Exp) : The Yuxuan seeking Exp. Tan (Exp) : Exp for the tangent. ArcSin (Exp) : Exp seek the arc Yuen. ArcCos (Exp) : for the anti-Yuxuan Exp. ArcTan (Exp) : Exp seek the arc tangent. Ln (Exp) :
Platform: | Size: 182651 | Author: 王波 | Hits:

[Special Effects用bandelet进行图像分割的matlab代码

Description: A Matlab Tour of Second Generation Bandelets 附有每部分代码的说明 function x = perform haar transform(x, dir); x = x(:); % to be sure we have a column vector J = floor( log2(length(x)) ); % number of scales if dir==1 % forward transform for j=1:J c = x(1:2?j-1):end); % previous coarse signal x(1:2苆:end) = ... % new coarse signal ( c(1:2:end) + c(2:2:end) )/sqrt(2); x(1+2?j-1):2苆:end) = ... % new details (c(1:2:end)-c(2:2:end))/sqrt(2); end else % backward transform for j=J:-1:1 y = x(1:2?j-1):end); x(1:2苆:end) = ... ( y(1:2:end) + y(2:2:end) )/sqrt(2); x(1+2?j-1):2苆:end) = ... ( y(1:2:end) - y(2:2:end) )/sqrt(2); end end Listing 1: Function perform haar transform
Platform: | Size: 1072152 | Author: wuda5566@sina.com | Hits:

[Other高级计算器 V1.0

Description: 系统支持的数学函数:PI ! ^ % SQR SQRT INT/TRUNC ROUND ABS FRAC SIN COS TAN ARCSIN ARCCOS ARCTAN LN LOG2 LOG10PI:圆周率。Exp!:计算Exp(表达式)的介乘。Exp1^Exp2:计算Exp1的Exp2次方。Exp1%Exp2:计算Exp1除以Exp2后的余数。Sqr(Exp):计算Exp的平方。Sqrt(Exp):计算Exp的平方根。Int(Exp)/Trunc(Exp):把Exp截断取整。Round(Exp):把Exp四舍五入。Abs(Exp):取Exp的绝对值。Frac(Exp):取Exp的小数部分。Sin(Exp):求Exp的正玄。Cos(Exp):求Exp的余玄。Tan(Exp):求Exp的正切。ArcSin(Exp):求Exp的反正玄。ArcCos(Exp):求Exp的反余玄。ArcTan(Exp):求Exp的反正切。Ln(Exp):求Exp的自然对数。Log2(Exp):求Exp的以2为低的对数。Log10(Exp):求Exp的以10为低的对数。-system to support the Math : PI! ^% SQR SQRT INT/TRUNC ROUND ABS FRAC SIN COS TAN LN ARCSIN ARCCOS ARCTAN LOG2 LOG10PI : pi. Exp. : Computational Exp (expression) of the referral by. Exp1 ^ Exp2 : computational power of Exp1 the Exp2. Exp1% Exp2 : Exp1 calculated by dividing Exp2 the remainder. Monaco (Exp) : Exp calculating the square. Sqrt (Exp) : Exp calculating the square root. Int (Exp)/Trunc (Exp) : With Exp disconnected from the whole. Round (Exp) : With Exp rounding. Abs (Exp) : Exp take the absolute value. Frac (Exp) : Exp take part in the minority. Sin (Exp) : for the Shogen Exp. Cos (Exp) : The Yuxuan seeking Exp. Tan (Exp) : Exp for the tangent. ArcSin (Exp) : Exp seek the arc Yuen. ArcCos (Exp) : for the anti-Yuxuan Exp. ArcTan (Exp) : Exp seek the arc tangent. Ln (Exp) :
Platform: | Size: 182272 | Author: 王波 | Hits:

[Data structsshellsort111

Description: 附有本人超级详细解释(看不懂的面壁十天!) 一、 实际问题: 希尔排序(Shell Sort)是插入排序的一种。因D.L.Shell于1959年提出而得名。它又称“缩小增量分类法”,在时间效率上比插入、比较、冒泡等排序算法有了较大改进。能对无序序列按一定规律进行排序。 二、数学模型: 先取一个小于n的整数d1作为第一个增量,把文件的全部记录分成d1个组。所有距离为dl的倍数的记录放在同一个组中。先在各组内进行直接插人排序;然后,取第二个增量d2<d1重复上述的分组和排序,直至所取的增量dt=1(dt<dt-l<…<d2<d1),即所有记录放在同一组中进行直接插入排序为止。该方法实质上是一种分组插入方法。 三、算法设计: 1、将相隔某个增量dlta[k]的元素构成一个子序列。在排序过程中,逐次减小这个增量,最后当h减到1时,进行一次插入排序,排序就完成。增量序列一般采用:dlta[k]=2t-k+1-1,其中t为排序趟数,1≤k≤t≤[log2 (n+1)],其中n为待排序序列的长度。按增量序列dlta[0..t-1]。 2、按增量dlta[k](1≤k≤t≤[log2 (n+1)])进行一趟希尔插入排序。 3、在主函数中控制程序执行流程。 4、时间复杂度:1≤k≤t≤[log2 (n+1)]时为O(n3/2)。 -with super detailed explanation (not read the Wall for 10 days!) A practical question : Sort Hill (Shell Sort) is inserted into a sort. By D. L. Shell made in 1959 and named after. It is also known as the "narrow incremental method" in the time-efficient than inserted, such as sorting algorithms and bubbling there has been a big improvement. The disorder can sequence by law must rank. Two mathematical models : first getting a less than n integers d1 as an increment. all documents should be recorded into d1 groups. All distance dl in multiples of record on the same group. In the first group for direct insertion sorting; Then, take a second increment d2
Platform: | Size: 19456 | Author: 乐乐 | Hits:

[matlabwave_matlab2006

Description: %WAVETEST Example Matlab script for WAVELET, using NINO3 SST dataset % % See "http://paos.colorado.edu/research/wavelets/" % Written January 1998 by C. Torrence % % Modified Oct 1999, changed Global Wavelet Spectrum (GWS) to be sideways, % changed all "log" to "log2", changed logarithmic axis on GWS to % a normal axis. - WAVETEST Example Matlab script for WAVELET, using NINO3 SST dataset See http://paos.colorado.edu/research/wavelets/ Written January 1998 by C. Torrence Modified Oct 1999, changed Global Wavelet Spectrum ( GWS) to be sideways, changed all log to log2 , changed logarithmic axis on GWS to a normal axis.
Platform: | Size: 10240 | Author: 韩伟光 | Hits:

[MiddleWarea

Description: 快速排序法 //基本的思想:通过一趟排序将待排的记录分割成独立的两部分, //其中前一部分的 记录的关键字均比另一部分记录的关键字小, //再分别对两组记录进行递归分割,达到排序的目的 //平均时间复杂度为 O(log2(n-Quick sort method// basic thinking: a trip to sort through rows of records will be separated into two independent parts,// which part of the record before the keyword than another part of the record keyword small,// and then separately two sets of records recursive partitioning, to sort the purpose of// average time complexity is O (log2 (n
Platform: | Size: 1024 | Author: 宇亮 | Hits:

[Data structsY_TFun_Tournament

Description: 二叉树,堆排序模板,时间复杂度:为O(N*Log2(N))。空间复杂度: 2*N-1(个结点)-Binary Tree, HEAPSORT templates, time complexity: In order to O (N* Log2 (N)). Space complexity: 2* N-1 (nodes)
Platform: | Size: 2048 | Author: xzzz | Hits:

[Data structsWinnerTree

Description: 常见的实现方法是使用两个数组, t[n-1]和e[n],数组e存放所有的参加排序的元素,在完全二叉树中是叶子结点,t[]存放 的是比赛的阶段性胜者的编号,再进行n趟比赛排序结束,时间复杂度是O(n*log2(n)), 其实我觉得也可以只通过一个数组A[2*n-1]也可以实现,只是标号的换算有点复杂而已. -Common implementation approach is to use two array, t [n-1] and e [n], the array storage of all e sort of take part in the elements, are in complete binary tree in leaf nodes, t [] are stored stage game winner serial number and then sort the end of n times a game, time complexity is O (n* log2 (n)), in fact I think it is only through an array A [2* n-1] can also be implementation, but labeling it a bit complicated conversion.
Platform: | Size: 2048 | Author: liyuansong | Hits:

[Windows Developlog2

Description: boost-log,一个牛人为boost库写的C++的日志库。boost作为一个庞大的C++基础库,一直缺少日志模块,改代码填补了这个空白,目前还在审核阶段-boost-log, a cow artificially boost library of C++ Writing the log database. a huge boost as the C++ foundation libraries, has been the lack of log module, change the code to fill the gaps in the current audit period is also
Platform: | Size: 1003520 | Author: weihy | Hits:

[Windows DevelopFastWalshHadamardTransform

Description: The function implement the 1D sequency(Walsh) ordered fast Walsh-Hadamard transform which can be used in signal processing, pattern recongnition and Genetic alogorithms. This algorithm uses a Cooley-Tukey type signal flow graph and is implemented in N log2 N additions and subtractions. Data sequence length must be an integer power of 2. The inverse transform is the same as the forward transform except for the multiplication factor N. This can be easily achieved by deleting the last line i.e. x=inv(N)*x Example: x=[1 2 1 1] W=FWHT(x) -The function implement the 1D sequency(Walsh) ordered fast Walsh-Hadamard transform which can be used in signal processing, pattern recongnition and Genetic alogorithms. This algorithm uses a Cooley-Tukey type signal flow graph and is implemented in N log2 N additions and subtractions. Data sequence length must be an integer power of 2. The inverse transform is the same as the forward transform except for the multiplication factor N. This can be easily achieved by deleting the last line i.e. x=inv(N)*x Example: x=[1 2 1 1] W=FWHT(x)
Platform: | Size: 2048 | Author: ry | Hits:

[Graph programFastFourierTransformAlgorithm

Description: This program is open source code of fast Fourier transform in matlab. Where y is the input argument and p is the normalized size of the input. Let y = [1 2 3 4 ] x= length(y) m= log2(x) p= ceil(m) To call the function use ft2(y,p) -This program is open source code of fast Fourier transform in matlab. Where y is the input argument and p is the normalized size of the input. Let y = [1 2 3 4 ] x= length(y) m= log2(x) p= ceil(m) To call the function use ft2(y,p)
Platform: | Size: 1024 | Author: ry | Hits:

[DocumentsBCS

Description: 压缩传感是一个从2006年左右开始兴起的研究领域,它关注于如何采样信号,也就是信号的采样方式或者压缩方式。通过设计一种特殊的采样方案,可以使得采样频率降低为信号的“信息率”,而不是传统的奈奎斯特采样率,于是,实际的采样率可以大大低于奈奎斯特频率,却只损失很少的信息量,依然保持了充足的信息量足以恢复出采样前的原始信号。这个研究思想挑战了奈奎斯特频率的理论极限,会对整个信号处理领域产生极其深远的影响,同时,信号处理的许多应用领域也会随之发生根本性的发展和变化。 -Compressive sensing (CS) is an emerging fi eld based on the revelation that a small collection of linear projections of a sparse signal contains enough information for sta- ble, sub-Nyquist signal acquisition. When a statistical characterization of the signal is available, Bayesian inference can complement conventional CS methods based on linear programming or greedy algorithms. We perform approximate Bayesian infer- ence using belief propagation (BP) decoding, which represents the CS encoding matrix as a graphical model. Fast encoding and decoding is provided using sparse encoding matrices, which also improve BP convergence by reducing the presence of loops in the graph. To decode a length-N signal containing K large coeffi cients, our CS-BP decoding algorithm uses O(K log(N)) measurements and O(N log2 (N)) computation. Finally, sparse encoding matrices and the CS-BP decoding algorithm can be modifi ed to support a variety of signal models and measurement noi
Platform: | Size: 239616 | Author: romman | Hits:

[Otherlog2

Description: 一个关于How to compute log2(n) efficiently的源代码,非常好!-One on How to compute log2 (n) efficiently source code, very good!
Platform: | Size: 48128 | Author: tq88 | Hits:

[Windows Developnum2log

Description: this function converts number to its log2 equivalent
Platform: | Size: 5120 | Author: mark | Hits:

[Algorithmlog2.c.tar

Description: C code to comupute the integer-based log2 of a number. It uses two methods and compare the results.
Platform: | Size: 1024 | Author: alamura | Hits:
« 12 3 »

CodeBus www.codebus.net