基于MATLAB的图象压缩程序实现

时间:2020-08-28 13:47:06 数学毕业论文 我要投稿

基于MATLAB的图象压缩程序实现

摘要

游程编码(RLC:Run Length Coding)是图像压缩基本算法,它对于有较多灰度相同的图像具有较高的压缩比,RLC的`原理简单,计算效率高。但RLC算法存在的1个致命弱点,即:如果图像中每两个相邻点的颜色都不同,用这种算法不但不能压缩,反而数据量会增加。为了克服游程编码的这个弱点,本文设计了1种算法分块RLC算法,利用分块编码(Block Truncation Coding)的思想对灰度图像进行处理后,再进行游程编码,实现了灰度图像的有损压缩,图像分块越大,所得到的压缩比越高,但较高的压缩比是以提高图像的失真度为代价的。本文还将分块RLC算法与DCT(Discrete Cosine Transform)图像压缩算法进行了比较:分块RLC算法具有较高的压缩比,但其保真度却不如DCT图像压缩算法。本文使用MATLAB语言实现算法,将图像存储为矩阵的形式,充分利用了MATLAB语言在矩阵运算和图像处理工具方面的便利性,使得编程简单、速度快、误差小。

关键词:MATLAB软件;游程编码;分块RLC编码;DCT变换;图像压缩

Abstract

Run length coding (RLC) is a basic algorithm of image compression. When using on the image of many same gray level ,RLC has a higher compression ratio. The principle of RLC is simple and the efficiency of computing is high.But RLC has a fatal disadvantage,it is that the gray level of two pixel together are all different, that will led RLC cannot to compress image and the quantity of the data will increase.In order to overcome this disadvantage ,this paper designed a algorithm ,namely block run length coding,which used the idea of block truncation coding to deal with each block of grayscale image,and then used RLC to each block and realized the damaged compression of grayscale image. The bigger the block is,the higher the compression ratio is,but the higher compression ratio take the increasing of distortion degree as the price.This paper compared algorithm of block run length coding to algorithm of DCT image compression, algorithm of block run length coding has a higher compression ratio,but its lifelike degree is inferior to the algorithm of DCT image compression. In order to fully used the convenience of MATLAB language in the matrix operation and the picture processing tool ,this paper used the MATLAB language to realize this algorithm and saved the picture for the matrix form ,therefore, the programming is easy,the speed is quick and the error is to be little.

Key Words:MATLAB software; Block truncation RLC coding; Run length coding; DCT;Image compression

【基于MATLAB的图象压缩程序实现】相关文章:

1.基于ESMTP的电子邮件发送程序的设计与实现

2.中小型异步电动机计算程序编程及MATLAB实现

3.有关基于Matlab的计算机数据采集系统

4.浅谈基于Matlab的层次分析法与运用

5.试论基于Matlab的层次分析法与运用

6.基于Vxworks实时操作系统的串口通信程序设计与实现

7.实现鼠标画图的Java程序

8.基于Matlab平台的水力学教学模式探索论文

9.基于FPGA的HDLC通信模块的实现