资源简介
静态JPEG图像的编解码程序,注释详尽,Matlab实现。
代码片段和文件信息
function jpeg
% This is a JPEG encoding & decoding program of still image.
% it does not use level shifting.
% Discrete Cosine transform (DCT) is performed both by classical & Chen‘s
% Flowgraph methods. Predefined JPEG quantization array & Zigzag order are
% used here. ‘RUN‘ ‘LEVEL‘ coding is used instead of Huffman coding.
% Compression ratio is compared for each DCT method. Effect of coarse and fine quantization is
% also examined. The execution time of 2 DCT methods is also checked.
% In addition most energatic DCT coefficients are also applied to examine
% the effect in MatLab 7.4.0 R2007a. Input is 9 gray scale pictures &
% output is 9*9=81 pictures to compare. Blocking effect is obvious.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------- Initialization -----------------------------
% JPEG default quantization array
Q_8x8 =uint8([
16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99]);
% I am interested in the energy of the dct coefficients I will use
% this matrix (found from long observation) to select dct coefficients.
% lowest number -> highest priority
dct_coefficient_priority_8x8 =[
1 2 6 7 15 16 28 29;
3 5 8 14 17 27 30 43;
4 9 13 18 26 31 42 44;
10 12 19 25 32 41 45 54;
11 20 24 33 40 46 53 55;
21 23 34 39 47 52 56 61;
22 35 38 48 51 57 60 62;
36 37 49 50 58 59 63 64];
% if we decide to take 10 coefficients with the most energy we will assign
% 99 to ignore the other coefficients and remain with a matrix of 8x8
%This suitable Zigzag order is formed from the JPEG standard
ZigZag_Order = uint8([
1 9 2 3 10 17 25 18
11 4 5 12 19 26 33 41
34 27 20 13 6 7 14 21
28 35 42 49 57 50 43 36
29 22 15 8 16 23 30 37
44 51 58 59 52 45 38 31
24 32 39 46 53 60 61 54
47 40 48 55 62 63 56 64]);
% Finding the reverse zigzag order (8x8 matrix)
reverse_zigzag_order_8x8 = zeros(88);
for k = 1:(size(ZigZag_Order1) *size(ZigZag_Order2))
reverse_zigzag_order_8x8(k) = find(ZigZag_Order== k);
end;
Compressed_image_size=0;
%---------------------------------------------------------------------
close all;
for Image_Index = 8:8 % the whole program will be tested for 9 images (0->8)
figure; %keep the input-output for each image s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2007-06-20 14:17 JPEG Encoder Decoder\JPEG Encoder Decoder\
文件 16720 2003-01-13 17:18 JPEG Encoder Decoder\JPEG Encoder Decoder\0.tif
文件 16570 2003-01-08 16:31 JPEG Encoder Decoder\JPEG Encoder Decoder\1.tif
文件 3878 2003-01-08 16:33 JPEG Encoder Decoder\JPEG Encoder Decoder\2.tif
文件 2863 2003-01-08 16:34 JPEG Encoder Decoder\JPEG Encoder Decoder\3.tif
文件 3547 2003-01-08 16:35 JPEG Encoder Decoder\JPEG Encoder Decoder\4.tif
文件 1996 2003-01-08 16:35 JPEG Encoder Decoder\JPEG Encoder Decoder\5.tif
文件 3936 2003-01-08 16:39 JPEG Encoder Decoder\JPEG Encoder Decoder\6.TIF
文件 3863 2003-01-08 16:37 JPEG Encoder Decoder\JPEG Encoder Decoder\7.tif
文件 4200 2003-01-08 16:37 JPEG Encoder Decoder\JPEG Encoder Decoder\8.tif
文件 25680 2007-06-18 13:47 JPEG Encoder Decoder\JPEG Encoder Decoder\jpeg.asv
文件 25776 2007-06-18 13:50 JPEG Encoder Decoder\JPEG Encoder Decoder\jpeg.m
目录 0 2007-06-20 14:17 JPEG Encoder Decoder\
- 上一篇:电力系统69节点算例潮流计算
- 下一篇:cv_rotatedRect.mexw64
相关资源
- 关于BF硬判决的编码以及仿真
- matlab实现PCM编码译码
- 喷泉码之LT码的编解码
- Polar码SCL译码算法
- JPEG2000 编解码实现 matlab
- matlab中pcm编码
- melp2.4k的编解码程序
- 多变量函数优化的L-BFGS算法matlab程序
- RS码编解码MATLAB程序
- LDPC编码的matlab实现
- 图像压缩编码算法EZW算法的MATLAB代码
- 卷积码 编码 解码 基于Matlab 含PPT讲解
- jpeg压缩的matlab实现
- 实验室的极化码编码译码仿真程序,
- BCD码优先编码电路设计
- (212)和(317)卷积码编解码的MTAL
- 极化码的编码与译码研究及matlab仿真
- ZF预编码MATLAB代码实现
- A率PCM编码MATLAB程序
- MIMO多用户预编码
- 循环码编码译码的Matlab实现
- 空时网格编码STTC
- MATLAB实现编码和译码
- OOK调制方法matlab代码ook.m
- 语音编码Matlab代码及其论文
- pattern时延差编码常规解码
- jpeg图像压缩matlab程序
- JPEG2000MATLAB代码
-
卷积编解码的Simuli
nk仿真 - JPEG彩色图像分块压缩量化编码matlab代
评论
共有 条评论