CN102724381A - 基于jpeg压缩原理的票据类图像压缩方法 - Google Patents

基于jpeg压缩原理的票据类图像压缩方法 Download PDF

Info

Publication number
CN102724381A
CN102724381A CN2012101974011A CN201210197401A CN102724381A CN 102724381 A CN102724381 A CN 102724381A CN 2012101974011 A CN2012101974011 A CN 2012101974011A CN 201210197401 A CN201210197401 A CN 201210197401A CN 102724381 A CN102724381 A CN 102724381A
Authority
CN
China
Prior art keywords
image
bill
compression
passage
jpeg
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012101974011A
Other languages
English (en)
Other versions
CN102724381B (zh
Inventor
陆剑锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Fenglijian Information Technology Co Ltd
Original Assignee
Hangzhou Dianzi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN201210197401.1A priority Critical patent/CN102724381B/zh
Publication of CN102724381A publication Critical patent/CN102724381A/zh
Application granted granted Critical
Publication of CN102724381B publication Critical patent/CN102724381B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

本发明涉及一种基于JPEG压缩原理的票据类图像压缩方法。现有的方法无法在保证质量的基础上,大幅度的提高压缩比。本发明包括票据图像预处理步骤和票据类图像JPEG压缩步骤。通过图像重排找到一种根据图像块的方差,均值化图像块的预处理方法;并采用经过优化的适合票据类图像的量化表进行JPEG方法压缩图像。本发明在保证一定图像质量的情况下,压缩比更高。

Description

基于JPEG压缩原理的票据类图像压缩方法
技术领域
本发明属于图像处理技术领域,具体涉及一种基于JPEG压缩原理的票据类图像压缩方法。
背景技术
随着经济的高速发展,票据类图像在金融、统计等领域应用越来越广泛,每天都有大量的这类数字图像产生,这类图像的如果不经过大量的压缩,将会消耗巨大的储存器。人们提出了许多压缩算法,如小波压缩,jpg压缩、分形压缩等。
但是这些压缩方法都是针对一般图像的,没有专门的压缩方法来压缩单据类图像。这类图像数据庞大而且重要,要求我们在保证一定质量的基础上,大幅度的提高压缩比。
图像压缩可以划分为有损压缩和无损压缩。有损压缩把图像变换到变换域,再经过量化,减少非零个数,从而达到压缩图像目的。这种压缩方式的特点是压缩是有损的,图像质量比原来略差,但是压缩比非常高,它是以保存图像主要部分,去除次要部分为代价的。无损压缩一般是通过像素重排等方法,增大图像冗余,再通过编码较大程度去除冗余从而达到图像压缩的目的。无损压缩的特点是压缩后图像质量比较好,缺点是压缩比比较低。
发明内容
本发明针对现有技术的不足,提供了一种基于JPEG压缩原理的票据类图像压缩方法。
本发明方法包括以下步骤:
1)票据图像预处理步骤:
(1)色彩空间转换;将票据图像从RGB通道转化为YCbCr通道。
(2)图像分块;将上述每个通道进行8*8的像素值分块。
(3)计算3个通道里每个8*8块的方差。
(4)对于方差小于某个阈值的块,所有像素值变为该块的均值。
2)票据类图像JPEG压缩步骤:
(1)将预处理结果图像的Y通道进行DCT变换后,利用经优化的亮度量化表进行量化。
(2)将预处理结果结果图像的Cb通道和Cr通道进行DCT变换后,利用标准色度量化表进行量化。
(3)将上述得到的量化数据根据熵编码表进行熵编码,即可得到压缩图像数据。
本发明从JPEG标准压缩过程出发,根据票据类图像特点,通过图像重排等方法的探索与研究,找到了一种根据图像块的方差,均值化图像块的预处理方法;并采用经过优化的适合票据类图像的量化表进行JPEG方法压缩图像。图像预处理和新量化表结合起来,形成了一种适合票据类图像压缩的JPEG压缩方法,使保证一定图像质量的情况下,压缩比更高。
具体实施方式
在基于JPEG压缩的票据类图像压缩技术中,我们根据扫描得到的电子票据图像的特点,将票据图像先进行增大冗余性的预处理,然后再用新提出的量化表进行JPEG压缩操作。票据图像压缩的方法主要有两大步骤:
1.图像预处理。具体步骤如下:
1)对原始票据图像I首先进行色彩空间转换,从RGB通道转换到YCbCr通道,分别为Y,Cb,Cr,公式如下:
Y = 0.299 R + 0.587 G + 0.114 B
Cb = - 0.1687 R - 0.3313 G + 0.5 B + 128
Cr = 0.5 R - 0.4187 G - 0.0813 B + 128
2)对Y,Cb,Cr三个矩阵都进行分块,每个8*8块为一块,若不足8*8,算作一块。
3)计算Y,Cb,Cr三个矩阵每个块像素值的方差。
4)若某个块的方差小于30,计算该块的平均值,则该块的像素值都变为它的块的平均值。
经过上述预处理过程的票据图像,Y变成了Y1,Cb变成了Cb1,Cr变成了Cr1。
2.票据图像JPEG 压缩。具体步骤如下:
1)将上述的Y1,Cb1和Cr1分别进行快速DCT变换,得到DCT频率系数(包括亮度DCT系数Y2和色度DCT频率系数C2)。DCT变换全称是离散余弦变换(Discrete Cosine Transform)。
2)量化。JPEG压缩量化表有一套标准量化表,但是针对一般图像,并没有专门时候票据图像特点进行过优化。本发明通过探索量化表选取规律和大量实验,提出适合票据图像的亮度量化表,如表1所示。用得到的亮度DCT频率系数Y2除以我们提出的优化亮度量化表,并且取整后,即可以得到压缩后的亮度DCT系数的量化数据Y3。用得到的色度DCT系数C2除以标准色度量化表并且取整后,即可以得到量化数据C3。
3)后续步骤按照JPEG标准压缩方法中的哈夫曼编码方法进行压缩。
表1
26 35 48 62 76 90 104 118
  35 48 62 76 90 104 118 132
  48 62 76 90 104 118 132 146
  62 76 90 104 118 132 146 160
  76 90 104 118 132 165 160 150
  90 104 118 132 146 160 174 188
  104 118 132 146 160 217 216 202
118 132 146 160 174 188 202 202

Claims (1)

1. 基于JPEG压缩原理的票据类图像压缩方法,其特征在于该方法包括票据图像预处理步骤和票据类图像JPEG压缩步骤;
1)票据图像预处理步骤:
(1)色彩空间转换;将票据图像从RGB通道转化为YCbCr通道;
(2)图像分块;将上述每个通道进行8*8的像素值分块;
(3)计算3个通道里每个8*8块的方差;
(4)对于方差小于某个阈值的块,所有像素值变为该块的均值;
2)票据类图像JPEG压缩步骤:
(1)将预处理结果图像的Y通道进行DCT变换后,利用经优化的亮度量化表进行量化;
(2)将预处理结果结果图像的Cb通道和Cr通道进行DCT变换后,利用标准色度量化表进行量化;
(3)将上述得到的量化数据根据熵编码表进行熵编码,即可得到压缩图像数据。
CN201210197401.1A 2012-06-15 2012-06-15 基于jpeg压缩原理的票据类图像压缩方法 Active CN102724381B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210197401.1A CN102724381B (zh) 2012-06-15 2012-06-15 基于jpeg压缩原理的票据类图像压缩方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210197401.1A CN102724381B (zh) 2012-06-15 2012-06-15 基于jpeg压缩原理的票据类图像压缩方法

Publications (2)

Publication Number Publication Date
CN102724381A true CN102724381A (zh) 2012-10-10
CN102724381B CN102724381B (zh) 2014-04-02

Family

ID=46950036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210197401.1A Active CN102724381B (zh) 2012-06-15 2012-06-15 基于jpeg压缩原理的票据类图像压缩方法

Country Status (1)

Country Link
CN (1) CN102724381B (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104427349A (zh) * 2013-08-20 2015-03-18 清华大学 一种Bayer图像压缩方法
CN106878584A (zh) * 2015-12-11 2017-06-20 山东新北洋信息技术股份有限公司 金融票据图像的压缩方法及装置
CN110430429A (zh) * 2019-08-06 2019-11-08 陕西土豆数据科技有限公司 一种适合于航拍影像的jpeg压缩量化方法
CN111583158A (zh) * 2020-05-19 2020-08-25 国网吉林省电力有限公司 一种背景简化表达的票据电子影像压缩存储方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0933947A2 (en) * 1998-01-26 1999-08-04 Xerox Corporation Adaptive quantization compatible with the jpeg baseline sequential mode
CN1419787A (zh) * 2000-01-28 2003-05-21 高通股份有限公司 基于质量的图像压缩
US6597811B1 (en) * 2000-03-27 2003-07-22 Eduard Batkilim Method and device for image digitized data compression and decompression
US20050135693A1 (en) * 2003-12-23 2005-06-23 Ahmed Mohamed N. JPEG encoding for document images using pixel classification
CN101594537A (zh) * 2009-06-04 2009-12-02 京北方科技股份有限公司 海量图像数据压缩方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0933947A2 (en) * 1998-01-26 1999-08-04 Xerox Corporation Adaptive quantization compatible with the jpeg baseline sequential mode
CN1419787A (zh) * 2000-01-28 2003-05-21 高通股份有限公司 基于质量的图像压缩
US6597811B1 (en) * 2000-03-27 2003-07-22 Eduard Batkilim Method and device for image digitized data compression and decompression
US20050135693A1 (en) * 2003-12-23 2005-06-23 Ahmed Mohamed N. JPEG encoding for document images using pixel classification
CN101594537A (zh) * 2009-06-04 2009-12-02 京北方科技股份有限公司 海量图像数据压缩方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104427349A (zh) * 2013-08-20 2015-03-18 清华大学 一种Bayer图像压缩方法
CN104427349B (zh) * 2013-08-20 2017-09-29 清华大学 一种Bayer图像压缩方法
CN106878584A (zh) * 2015-12-11 2017-06-20 山东新北洋信息技术股份有限公司 金融票据图像的压缩方法及装置
CN110430429A (zh) * 2019-08-06 2019-11-08 陕西土豆数据科技有限公司 一种适合于航拍影像的jpeg压缩量化方法
CN111583158A (zh) * 2020-05-19 2020-08-25 国网吉林省电力有限公司 一种背景简化表达的票据电子影像压缩存储方法
CN111583158B (zh) * 2020-05-19 2022-09-23 国网吉林省电力有限公司 一种背景简化表达的票据电子影像压缩存储方法

Also Published As

Publication number Publication date
CN102724381B (zh) 2014-04-02

Similar Documents

Publication Publication Date Title
CN108881913B (zh) 图像编码的方法和装置
CN104065976B (zh) 一种基于视频的图像压缩及保密传输方法
Zhou et al. DCT-based color image compression algorithm using an efficient lossless encoder
WO2023040600A1 (zh) 图像编码方法、图像解码方法、装置、电子设备及介质
CN103347185A (zh) 基于选择性块变换的无人机侦察图像综合压缩编码方法
EP2883356A1 (en) Two-step quantization and coding method and apparatus
CN102724381B (zh) 基于jpeg压缩原理的票据类图像压缩方法
US9998753B1 (en) Prediction dependent transform coding
CN104488266B (zh) Avs视频压缩编码方法及编码器
CN109672891B (zh) Jpeg图像的无损二次压缩方法
WO2012118569A1 (en) Visually optimized quantization
Poolakkachalil et al. Comparative analysis of lossless compression techniques in efficient DCT-based image compression system based on Laplacian Transparent Composite Model and An Innovative Lossless Compression Method for Discrete-Color Images
Salih et al. Improved image compression scheme using hybrid encoding algorithm
Wang et al. Properties of all phase biorthogonal transform matrix and its application in color image compression
Al-Khafaji¹ et al. Color image compression of inter-prediction base
CN108259896B (zh) 一种利用系数分布特性的哥伦布-莱斯初始参数自适应决策方法
Sebastian et al. Color image compression Using JPEG2000 with adaptive color space transform
Pradhan et al. A modified framework for Image compression using Burrows-Wheeler Transform
Ernawan et al. An efficient image compression using bit allocation based on psychovisual threshold
CN117459737B (zh) 一种图像预处理网络的训练方法和图像预处理方法
TWI517675B (zh) 影像編碼方法及應用該影像編碼之嵌入式系統
TWI502550B (zh) Differential layered image compression method
WO2021197158A1 (zh) 一种图像处理方法和图像处理装置
Xu et al. Sparse representation of texture patches for low bit-rate image compression
Sundaresan et al. Lossy and Lossless Compression using various Algorithms

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20151217

Address after: No. 18 Qixia Xianlin Avenue horses Street District of Nanjing City, Jiangsu province 210049

Patentee after: NANJING FENGLIJIAN INFORMATION TECHNOLOGY CO., LTD.

Address before: Hangzhou City, Zhejiang province 310018 Xiasha Higher Education Park No. 2 street

Patentee before: Hangzhou Electronic Science and Technology Univ