CN111583158A - 一种背景简化表达的票据电子影像压缩存储方法 - Google Patents

一种背景简化表达的票据电子影像压缩存储方法 Download PDF

Info

Publication number
CN111583158A
CN111583158A CN202010423141.XA CN202010423141A CN111583158A CN 111583158 A CN111583158 A CN 111583158A CN 202010423141 A CN202010423141 A CN 202010423141A CN 111583158 A CN111583158 A CN 111583158A
Authority
CN
China
Prior art keywords
blocklist
image
width
operator
height
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
CN202010423141.XA
Other languages
English (en)
Other versions
CN111583158B (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.)
STATE GRID JILINSHENG ELECTRIC POWER SUPPLY Co ELECTRIC POWER RESEARCH INSTITUTE
State Grid Jilin Electric Power Corp
Original Assignee
STATE GRID JILINSHENG ELECTRIC POWER SUPPLY Co ELECTRIC POWER RESEARCH INSTITUTE
State Grid Jilin Electric Power Corp
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 STATE GRID JILINSHENG ELECTRIC POWER SUPPLY Co ELECTRIC POWER RESEARCH INSTITUTE, State Grid Jilin Electric Power Corp filed Critical STATE GRID JILINSHENG ELECTRIC POWER SUPPLY Co ELECTRIC POWER RESEARCH INSTITUTE
Priority to CN202010423141.XA priority Critical patent/CN111583158B/zh
Publication of CN111583158A publication Critical patent/CN111583158A/zh
Application granted granted Critical
Publication of CN111583158B publication Critical patent/CN111583158B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/94
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30176Document

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Processing (AREA)

Abstract

本发明公开了一种背景简化表达的票据电子影像压缩存储方法,将票据影像中的所有像元聚类,按照每一类的数量进行排序并找到属于背景的颜色,引入像元背景算子和背景简化表达算子对整个像元影像的背景部分进行简化表达,实现了背景简化表达的票据电子影像压缩存储方法。本发明的有益效果是,在允许颜色完全不一致的情况下自动发现背景的颜色,并对影像的背景部分进行简化表达,由于票据的大多数部分为背景,所以该方式可以极大的降低影像存储所需的数据量。

Description

一种背景简化表达的票据电子影像压缩存储方法
技术领域:
本发明涉及一种背景简化表达的票据电子影像压缩存储方法,属于财务管理票据数据管理技术领域。
背景技术:
在现代的财务管理系统中,往往需要将处理的票据扫描为电子影像以利于审阅、存档以及电子审批。直接扫描的票据电子影像往往占有较大的存储空间,给计算机存储、网络传输带来巨大负担,因此十分有必要进行票据电子影像压缩存储。
对于财务系统中票据电子影像存储主要采用常规的JPG、PNG等标准的数据压缩方法,此类方法的问题是,当采用较低的压缩比时票据图像的文件大小缩减不够明显,而当采用较大的压缩比时,文件中的一些关键信息或者线条表格(如:金额)会变得模糊不清,使得票据电子影像的审批和佐证能力下降。电子票据影像的典型特点是:这些影像中只有一小部分像元是文字线条信息,大部分像元是票据的背景;与此同时,票据的背景颜色多种多样(如火车票是蓝色,而普通发票是白色),受到扫描和拍摄设备的影响颜色相对不均匀。如果能够根据票据影像的这些特点来专门构建一种压缩方法将大大提高压缩的质量,可以用较小的文件相对清晰的存储票据电子影像中的信息。
发明内容
本发明提出了一种背景简化表达的票据电子影像压缩存储方法,将票据影像中的所有像元聚类,按照每一类的数量进行排序并找到属于背景的颜色,引入像元背景算子和背景简化表达算子对整个像元影像的背景部分进行简化表达,实现了背景简化表达的票据电子影像压缩存储方法。
本发明所述的一种背景简化表达的票据电子影像压缩存储方法,其技术解决方案包括以下步骤:
S1,输入票据影像Image,输入分块尺度BlockWidth;获得影像所有像元的个数PixelNum,宽度Width,高度Height;计算获得数值中心点表CenterList,分块个数BlockNum,横向块个数RowNum,纵向块个数ColNum,分块表达表BlockList;
S101,输入票据影像Image,获得Image所有像元的个数PixelNum,获得影像的宽度Width和高度Height;
S102,利用K-Means算法对Image的所有像元进行10个类目的聚类,类目的中心点矢量存储在数组CenterArray之中。建立CenterList=空列表;
S103,ACounter=1;
S104,建立数值中心结构体CenterStruct,CenterStruct包含如下属性;
CenterVector:中心点矢量;
CenterPixNum:隶属于该中心的像元个数;
S105,CenterStruct.CenterVector=CenterArray[ACounter];
S106,CenterStruct.CenterPixNum=Image中隶属于中心矢量CenterArray[ACounter]的像元个数;
S107,将CenterStruct加入到CenterList之中;
S108,ACounter=ACounter+1;如果ACounter<=10则转到S104,否则转到S109;
S109,基于CenterPixNum的值对CenterList的所有内容进行从大到小排序;
S110,RowNum=Round(Height/BlockWidth+0.5);
ColNum=Round(Width/BlockWidth+0.5);其中Round为进行四舍五入;
S111,BlockNum=RowNum×ColNum;
S113,构建分块表达表BlockList=空列表;
S114,BCounter=1;
S115,建立块结构BlockStruct,BlockStruct包含如下属性:
BlockID:块结构的编号;
RowID:块结构的行号;
ColID:块结构的列号;
StataID:块结构的状态;
Data:数据内容;
Data2:简化后的数据;
S116,BlockStruct.BlockID=BCounter;BlckStruct.RowID=floor(BCounter/ColNum);BlockStruct.ColID=BCounter%ColNum;其中floor为向下取整,%为求余;
S117,Left=BlockStruct.ColID*BlockWidth,Top=BlockStruct.RowID*BlockWidth;
S118,PosRect=构建一个正方型区域,其左上角坐标为(Left,Top),宽度和高度均为BlockWidth;
S119,BlockStruct.Data=在Image的PosRect区域切割影像;
S120,BlockStruct.StataID=1;BlockStruct.Data2=空值;
S121,将BlockStruct加入到BlockList之中;
S122,BCounter=BCounter+1;如果BCounter>BlockNum则转到S123,否则转到S115;
S123,该步骤处理结束;
S2,基于数值中心点表CenterList,获得数据区分值CenterSeperate;
S201,SumNum=0;CenterSeperate=1;
S202,SumNum=SumNum+CenterList[CenterSeperate].CenterPixNum;
S203,如果(SumNum/PixelNum)>0.85则转到S205;
S204,CenterSeperate=CenterSeperate+1,转到S202;
S205,该步骤处理结束;
S3,建立像元背景算子OperatorBack,输入为一个像元的矢量OBVector,返回一个结果OBResult;
S301,建立像元背景算子OperatorBack,输入为一个像元的矢量OBVector;
S302,计算OBVector与CenterList中所有元素的CenterVector距离,找到距离最短元素在CenterList中的位置存储到OBPos中;
S303,如果OBPos小于CenterSeperate则OBResult=1,否则OBResult=0;
S304,返回OBResult的值;
S4,构建背景简化表达算子SOperator,该算子的输入为整型值SOPos;
S401,构建稀疏表达算子SOperator,该算子的输入为整型值SOPos;
S402,Temp1=BlockList[SOPos],tsum1=0,tsum2=0;
S403,TempImage=Temp1.Data1,获得TempImage的像元数量TPixelNum;
S404,TCounter=1;
S405,TVector=取出TempImage中的第TPixelNum个像元对应的矢量;
S406,TNeighborVectorArray=以第TPixelNum个像元为中心,取出TempImage中3×3范围的除了中心之外的所有像元;
S407,TV1=使用算子OperatorBack计算,将TVector作为算子输入;
S408,TV2Array=使用算子OperatorBack计算,将TNeighborVectorArray中的每一个元素作为算子输入,获得的结果存入数组之中;
S409,如果(TV1=0)且(TV2Array中包含值为0的元素)则tsum1=tsum1+1,否则tsum2=tsum2+1;
S410,TCounter=TCounter+1,如果TCounter>TPixelNum则转到S411,否则转到S405;
S411,如果(tsum1/(tsum1+tsum2))>0.95则转到S411,否则转到S415;
S412,BlockList[SOPos].StataID=2;
S413,BlockList[SOPos].Data2=计算BlockList[SOPos].Data所有像元的均值;
S414,转到S416;
S415,BlockList[SOPos].Data2=BlockList[SOPos].Data;
S416,释放BlockList[SOPos].Data所占用的存储空间;
S417,算子计算过程结束;
S5,基于SOperator算子,对BlockList进行处理,获取压缩结果CompressResult;
S501,SCounter=1;
S502,使用SOperator进行计算,其输入SOPos=SCounter;
S503,SCounter=SCounter+1,如果SCounter大于BlockNum则转到S504,否则转到S502;
S504,存储CompressResult=一个由[BlockWidth,Width,Height,BlockNum,RowNum,ColNum,BlockList]构成的集合;
S6,从CompressResult解压缩,获得解压缩票据影像RecoverImage;
S601,读取CompressResult内容,将其内容恢复到BlockWidth,Width,Height,BlockNum,RowNum,ColNum,BlockList之中;
S602,建立空白图像RecoverImage,其宽度为Width,高度为Height;
S603,UCounter=1;
S604,建立TempImage,其宽度和高度均为BlockWidth;
S605,如果BlockList[UCounter].StataID=2则转到S606,否则转到S607;
S606,TempImage的所有像元值设定为矢量BlockList[UCounter].Data2的值,转到S608;
S607,将BlockList[UCounter].Data2的内容复制到TempImage之中;
S608,RLeft=BlockList[UCounter].ColID*BlockWidth,
RTop=BlockList[UCounter].RowID*BlockWidth;
S609,RPosRect=构建一个正方型区域,其左上角坐标为(RLeft,RTop),宽度和高度均为BlockWidth;
S610,将TempImage写入到RecoverImage的RPosRect区域;
S611,UCounter=UCounter+1;如果UCounter大于BlockNum则转到S612,否则转到S604;
S612,输出RecoverImage。
本发明的有益效果是:
发明将票据影像中的所有像元聚类,按照每一类的数量进行排序并找到属于背景的颜色,引入像元背景算子和背景简化表达算子对整个像元影像的背景部分进行简化表达,实现了背景简化表达的票据电子影像压缩存储方法;使用本发明在允许颜色完全不一致的情况下自动发现背景的颜色,并对影像的背景部分进行简化表达,由于票据的大多数部分为背景,所以该方式可以极大的降低影像存储所需的数据量。
附图说明
图1为本发明实施例1影像文件;
图2为本发明实施例1输出影像。
具体实施方式
通过以下实施例进一步举例描述本发明,并不以任何方式限制本发明,在不背离本发明的技术解决方案的前提下,对本发明所作的本领域普通技术人员容易实现的任何改动或改变都将落入本发明的权利要求范围之内。
实施例1
本发明以吉林省XX公司的票据为例:
S1,输入票据影像Image,输入分块尺度BlockWidth;获得影像所有像元的个数PixelNum,宽度Width,高度Height;计算获得数值中心点表CenterList,分块个数BlockNum,横向块个数RowNum,纵向块个数ColNum,分块表达表BlockList;
S101,输入票据影像Image,获得Image所有像元的个数PixelNum,获得影像的宽度Width和高度Height;
输入影像文件如图1所示(该文件大小为663K):
输入的BlockWidth为50;
PixelNum=4170680;
Width=2540;
Height=1642;
S102,利用K-Means算法对Image的所有像元进行10个类目的聚类,类目的中心点矢量存储在数组CenterArray之中。建立CenterList=空列表;
S103,ACounter=1;
S104,建立数值中心结构体CenterStruct,CenterStruct包含如下属性:
CenterVector:中心点矢量;
CenterPixNum:隶属于该中心的像元个数;
S105,CenterStruct.CenterVector=CenterArray[ACounter];
S106,CenterStruct.CenterPixNum=Image中隶属于中心矢量CenterArray[ACounter]的像元个数;
S107,将CenterStruct加入到CenterList之中;
S108,ACounter=ACounter+1;如果ACounter<=10则转到S104,否则转到S109;
S109,基于CenterPixNum的值对CenterList的所有内容进行从大到小排序;
S110,RowNum=Round(Height/BlockWidth+0.5);ColNum=Round(Width/BlockWidth+0.5);其中Round为进行四舍五入;
S111,BlockNum=RowNum×ColNum;
S113,构建分块表达表BlockList=空列表;
S114,BCounter=1;
S115,建立块结构BlockStruct,BlockStruct包含如下属性:
BlockID:块结构的编号;
RowID:块结构的行号;
ColID:块结构的列号;
StataID:块结构的状态;
Data:数据内容;
Data2:简化后的数据;
S116,BlockStruct.BlockID=BCounter;BlockStruct.RowID=floor(BCounter/ColNum);BlockStruct.ColID=BCounter%ColNum;其中floor为向下取整,%为求余;
S117,Left=BlockStruct.ColID*BlockWidth,Top=BlockStruct.RowID*BlockWidth;
S118,PosRect=构建一个正方型区域,其左上角坐标为(Left,Top),宽度和高度均为BlockWidth;
S119,BlockStruct.Data=在Image的PosRect区域切割影像;
S120,BlockStruct.StataID=1;BlockStruct.Data2=空值;
S121,将BlockStruct加入到BlockList之中;
S122,BCounter=BCounter+1;如果BCounter>BlockNum则转到S123,否则转到S115;
S123,该步骤处理结束;
S2,基于数值中心点表CenterList,获得数据区分值CenterSeperate;
S201,SumNum=0;CenterSeperate=1;
S202,SumNum=SumNum+CenterList[CenterSeperate].CenterPixNum;
S203,如果(SumNum/PixelNum)>0.85则转到S205;
S204,CenterSeperate=CenterSeperate+1,转到S202;
S205,该步骤处理结束;
S3,建立像元背景算子OperatorBack,输入为一个像元的矢量OBVector,返回一个结果OBResult;
S301,建立像元背景算子OperatorBack,输入为一个像元的矢量OBVector;
S302,计算OBVector与CenterList中所有元素的CenterVector距离,找到距离最短元素在CenterList中的位置存储到OBPos中;
S303,如果OBPos小于CenterSeperate则OBResult=1,否则OBResult=0;
S304,返回OBResult的值;
S4,构建背景简化表达算子SOperator,该算子的输入为整型值SOPos;
S401,构建稀疏表达算子SOperator,该算子的输入为整型值SOPos;
S402,Temp1=BlockList[SOPos],tsum1=0,tsum2=0;
S403,TempImage=Temp1.Data1,获得TempImage的像元数量TPixelNum;
S404,TCounter=1;
S405,TVector=取出TempImage中的第TPixelNum个像元对应的矢量;
S406,TNeighborVectorArray=以第TPixelNum个像元为中心,取出TempImage中3×3范围的除了中心之外的所有像元;
S407,TV1=使用算子OperatorBack计算,将TVector作为算子输入;
S408,TV2Array=使用算子OperatorBack计算,将TNeighborVectorArray中的每一个元素作为算子输入,获得的结果存入数组之中;
S409,如果(TV1=0)且(TV2Array中包含值为0的元素)则tsum1=tsum1+1,否则tsum2=tsum2+1;
S410,TCounter=TCounter+1,如果TCounter>TPixelNum则转到S411,否则转到S405;
S411,如果(tsum1/(tsum1+tsum2))>0.95则转到S411,否则转到S415;
S412,BlockList[SOPos].StataID=2;
S413,BlockList[SOPos].Data2=计算BlockList[SOPos].Data所有像元的均值;
S414,转到S416;
S415,BlockList[SOPos].Data2=BlockList[SOPos].Data;
S416,释放BlockList[SOPos].Data所占用的存储空间;
S417,算子计算过程结束;
S5,基于SOperator算子,对BlockList进行处理,获取压缩结果CompressResult;
S501,SCounter=1;
S502,使用SOperator进行计算,其输入SOPos=SCounter;
S503,SCounter=SCounter+1,如果SCounter大于BlockNum则转到S504,否则转到S502;
S504,存储CompressResult=一个由:
[BlockWidth,Width,Height,BlockNum,RowNum,ColNum,BlockList]构成的集合;
此时CompressResult的大小值为112K,远远小于原始影像大小;
S6,从CompressResult解压缩,获得解压缩票据影像RecoverImage;
S601,读取CompressResult内容,将其内容恢复到BlockWidth,Width,Height,BlockNum,RowNum,ColNum,BlockList之中;
S602,建立空白图像RecoverImage,其宽度为Width,高度为Height;
S603,UCounter=1;
S604,建立TempImage,其宽度和高度均为BlockWidth;
S605,如果BlockList[UCounter].StataID=2则转到S606,否则转到S607;
S606,TempImage的所有像元值设定为矢量BlockList[UCounter].Data2的值,转到S608;
S607,将BlockList[UCounter].Data2的内容复制到TempImage之中;
S608,RLeft=BlockList[UCounter].ColID*BlockWidth,
RTop=BlockList[UCounter].RowID*BlockWidth;
S609,RPosRect=构建一个正方型区域,其左上角坐标为(RLeft,RTop),宽度和高度均为BlockWidth;
S610,将TempImage写入到RecoverImage的RPosRect区域;
S611,UCounter=UCounter+1;如果UCounter大于BlockNum则转到S612,否则转到S604;
S612,输出RecoverImage;
输出的结果如图2所示,与原始影像在视觉效果上基本一致,但是该影像对应的数据存储CompressResult的大小值为112K,远远小于原始影像大小。达到了保持发票内容的同时降低存储容量的目的。同时验证了本发明的准确性。

Claims (1)

1.一种背景简化表达的票据电子影像压缩存储方法,其特征在于包括以下步骤:
S1,输入票据影像Image,输入分块尺度BlockWidth;获得影像所有像元的个数PixelNum,宽度Width,高度Height;计算获得数值中心点表CenterList,分块个数BlockNum,横向块个数RowNum,纵向块个数ColNum,分块表达表BlockList;
S101,输入票据影像Image,获得Image所有像元的个数PixelNum,获得影像的宽度Width和高度Height;
S102,利用K-Means算法对Image的所有像元进行10个类目的聚类,类目的中心点矢量存储在数组CenterArray之中。建立CenterList=空列表;
S103,ACounter=1;
S104,建立数值中心结构体CenterStruct,CenterStruct包含如下属性;
CenterVector:中心点矢量;
CenterPixNum:隶属于该中心的像元个数;
S105,CenterStruct.CenterVector=CenterArray[ACounter];
S106,CenterStruct.CenterPixNum=Image中隶属于中心矢量CenterArray[ACounter]的像元个数;
S107,将CenterStruct加入到CenterList之中;
S108,ACounter=ACounter+1;如果ACounter<=10则转到S104,否则转到S109;
S109,基于CenterPixNum的值对CenterList的所有内容进行从大到小排序;
S110,RowNum=Round(Height/BlockWidth+0.5);
ColNum=Round(Width/BlockWidth+0.5);其中Round为进行四舍五入;
S111,BlockNum=RowNum×ColNum;
S113,构建分块表达表BlockList=空列表;
S114,BCounter=1;
S115,建立块结构BlockStruct,BlockStruct包含如下属性:
BlockID:块结构的编号;
RowID:块结构的行号;
ColID:块结构的列号;
StataID:块结构的状态;
Data:数据内容;
Data2:简化后的数据;
S116,BlockStruct.BlockID=BCounter;BlckStruct.RowID=floor(BCounter/ColNum);BlockStruct.ColID=BCounter%ColNum;其中floor为向下取整,%为求余;
S117,Left=BlockStruct.ColID*BlockWidth,Top=BlockStruct.RowID*BlockWidth;
S118,PosRect=构建一个正方型区域,其左上角坐标为(Left,Top),宽度和高度均为BlockWidth;
S119,BlockStruct.Data=在Image的PosRect区域切割影像;
S120,BlockStruct.StataID=1;BlockStruct.Data2=空值;
S121,将BlockStruct加入到BlockList之中;
S122,BCounter=BCounter+1;如果BCounter>BlockNum则转到S123,否则转到S115;
S123,该步骤处理结束;
S2,基于数值中心点表CenterList,获得数据区分值CenterSeperate;
S201,SumNum=0;CenterSeperate=1;
S202,SumNum=SumNum+CenterList[CenterSeperate].CenterPixNum;
S203,如果(SumNum/PixelNum)>0.85则转到S205;
S204,CenterSeperate=CenterSeperate+1,转到S202;
S205,该步骤处理结束;
S3,建立像元背景算子OperatorBack,输入为一个像元的矢量OBVector,返回一个结果OBResult;
S301,建立像元背景算子OperatorBack,输入为一个像元的矢量OBVector;
S302,计算OBVector与CenterList中所有元素的CenterVector距离,找到距离最短元素在CenterList中的位置存储到OBPos中;
S303,如果OBPos小于CenterSeperate则OBResult=1,否则OBResult=0;
S304,返回OBResult的值;
S4,构建背景简化表达算子SOperator,该算子的输入为整型值SOPos;
S401,构建稀疏表达算子SOperator,该算子的输入为整型值SOPos;
S402,Temp1=BlockList[SOPos],tsum1=0,tsum2=0;
S403,TempImage=Temp1.Data1,获得TempImage的像元数量TPixelNum;
S404,TCounter=1;
S405,TVector=取出TempImage中的第TPixelNum个像元对应的矢量;
S406,TNeighborVectorArray=以第TPixelNum个像元为中心,取出TempImage中3×3范围的除了中心之外的所有像元;
S407,TV1=使用算子OperatorBack计算,将TVector作为算子输入;
S408,TV2Array=使用算子OperatorBack计算,将TNeighborVectorArray中的每一个元素作为算子输入,获得的结果存入数组之中;
S409,如果(TV1=0)且(TV2Array中包含值为0的元素)则tsum1=tsum1+1,否则tsum2=tsum2+1;
S410,TCounter=TCounter+1,如果TCounter>TPixelNum则转到S411,否则转到S405;
S411,如果(tsum1/(tsum1+tsum2))>0.95则转到S411,否则转到S415;
S412,BlockList[SOPos].StataID=2;
S413,BlockList[SOPos].Data2=计算BlockList[SOPos].Data所有像元的均值;
S414,转到S416;
S415,BlockList[SOPos].Data2=BlockList[SOPos].Data;
S416,释放BlockList[SOPos].Data所占用的存储空间;
S417,算子计算过程结束;
S5,基于SOperator算子,对BlockList进行处理,获取压缩结果CompressResult;
S501,SCounter=1;
S502,使用SOperator进行计算,其输入SOPos=SCounter;
S503,SCounter=SCounter+1,如果SCounter大于BlockNum则转到S504,否则转到S502;
S504,存储CompressResult=一个由
[BlockWidth,Width,Height,BlockNum,RowNum,ColNum,BlockList]构成的集合;
S6,从CompressResult解压缩,获得解压缩票据影像RecoverImage;
S601,读取CompressResult内容,将其内容恢复到BlockWidth,Width,Height,BlockNum,RowNum,ColNum,BlockList之中;
S602,建立空白图像RecoverImage,其宽度为Width,高度为Height;
S603,UCounter=1;
S604,建立TempImage,其宽度和高度均为BlockWidth;
S605,如果BlockList[UCounter].StataID=2则转到S606,否则转到S607;
S606,TempImage的所有像元值设定为矢量BlockList[UCounter].Data2的值,转到S608;
S607,将BlockList[UCounter].Data2的内容复制到TempImage之中;
S608,RLeft=BlockList[UCounter].ColID*BlockWidth,
RTop=BlockList[UCounter].RowID*BlockWidth;
S609,RPosRect=构建一个正方型区域,其左上角坐标为(RLeft,RTop),宽度和高度均为BlockWidth;
S610,将TempImage写入到RecoverImage的RPosRect区域;
S611,UCounter=UCounter+1;如果UCounter大于BlockNum则转到S612,否则转到S604;
S612,输出RecoverImage。
CN202010423141.XA 2020-05-19 2020-05-19 一种背景简化表达的票据电子影像压缩存储方法 Active CN111583158B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010423141.XA CN111583158B (zh) 2020-05-19 2020-05-19 一种背景简化表达的票据电子影像压缩存储方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010423141.XA CN111583158B (zh) 2020-05-19 2020-05-19 一种背景简化表达的票据电子影像压缩存储方法

Publications (2)

Publication Number Publication Date
CN111583158A true CN111583158A (zh) 2020-08-25
CN111583158B CN111583158B (zh) 2022-09-23

Family

ID=72113687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010423141.XA Active CN111583158B (zh) 2020-05-19 2020-05-19 一种背景简化表达的票据电子影像压缩存储方法

Country Status (1)

Country Link
CN (1) CN111583158B (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112270236A (zh) * 2020-10-21 2021-01-26 长春工程学院 基于渐变尺度间隔变化规律算子的遥感影像植被分类方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030202709A1 (en) * 2002-04-25 2003-10-30 Simard Patrice Y. Clustering
CN101563926A (zh) * 2006-12-18 2009-10-21 皇家飞利浦电子股份有限公司 图像压缩与解压缩
CN102724381A (zh) * 2012-06-15 2012-10-10 杭州电子科技大学 基于jpeg压缩原理的票据类图像压缩方法
CN107612554A (zh) * 2017-09-21 2018-01-19 国家电网公司 数据压缩处理方法
CN108205676A (zh) * 2017-11-22 2018-06-26 西安万像电子科技有限公司 提取图像文字区域的方法和装置
CN110414927A (zh) * 2019-07-05 2019-11-05 西安网算数据科技有限公司 一种票据处理自动生成凭证的方法及装置
CN111582222A (zh) * 2020-05-19 2020-08-25 国网吉林省电力有限公司 一种基于标题位置参照模板的票据图像位置精确修正方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030202709A1 (en) * 2002-04-25 2003-10-30 Simard Patrice Y. Clustering
CN101563926A (zh) * 2006-12-18 2009-10-21 皇家飞利浦电子股份有限公司 图像压缩与解压缩
CN102724381A (zh) * 2012-06-15 2012-10-10 杭州电子科技大学 基于jpeg压缩原理的票据类图像压缩方法
CN107612554A (zh) * 2017-09-21 2018-01-19 国家电网公司 数据压缩处理方法
CN108205676A (zh) * 2017-11-22 2018-06-26 西安万像电子科技有限公司 提取图像文字区域的方法和装置
CN110414927A (zh) * 2019-07-05 2019-11-05 西安网算数据科技有限公司 一种票据处理自动生成凭证的方法及装置
CN111582222A (zh) * 2020-05-19 2020-08-25 国网吉林省电力有限公司 一种基于标题位置参照模板的票据图像位置精确修正方法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
RONGHUA QIAO: "Research of Computer Desktop Image Compression Clustering Algorithm", 《CHEMICAL ENGINEERING TRANSACTIONS》 *
刀客传奇: "OpenGL ES 框架详细解析(十四)——使用纹理工具压缩纹理", 《HTTPS://WWW.JIANSHU.COM/P/8DFA2187273A》 *
王峰: "票据图像压缩和基于水印条码的相关研究", 《中国优秀硕士学位论文全文数据库_信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112270236A (zh) * 2020-10-21 2021-01-26 长春工程学院 基于渐变尺度间隔变化规律算子的遥感影像植被分类方法
CN112270236B (zh) * 2020-10-21 2022-07-19 长春工程学院 基于渐变尺度间隔变化规律算子的遥感影像植被分类方法

Also Published As

Publication number Publication date
CN111583158B (zh) 2022-09-23

Similar Documents

Publication Publication Date Title
US7623259B2 (en) Image processing apparatus and image processing method to store image data for subsequent retrieval
JP3747589B2 (ja) 画像特徴量比較装置および画像特徴量比較プログラムを記録した記録媒体
JP4101290B2 (ja) 書式処理時の自動ページ登録及び自動領域検出のためのシステム及び方法
JP4859025B2 (ja) 類似画像検索装置、類似画像検索処理方法、プログラム及び情報記録媒体
US6518981B2 (en) Generating and using a color palette
US4414635A (en) Method and circuit for recognition of colors
US8582879B2 (en) Image processing device and image processing method that convert color image into monochrome image
Chan et al. Image retrieval system based on color-complexity and color-spatial features
CN101382770B (zh) 图像比对装置、图像比对方法和图像数据输出处理装置
CN101582117A (zh) 图像形成装置、图像处理装置、系统以及方法
CN111583158B (zh) 一种背景简化表达的票据电子影像压缩存储方法
JP2002142128A (ja) 画像処理装置及び記録媒体
JP2012238042A (ja) 画像処理装置、画像処理方法、及び、プログラム
CN101404020B (zh) 图像处理方法和设备、图像形成设备以及图像读取设备
US20040179717A1 (en) Printing system, method of inspecting print data, method of classifying print inspection result and program
JP4340711B2 (ja) 画像処理方法、画像処理装置、画像形成装置、コンピュータプログラム及び記録媒体
US6320984B1 (en) Method of and apparatus for extracting contour line and workstation having contour line extracting function
JP5539066B2 (ja) クラスタリング処理装置、クラスタリング処理方法
EP1246124A2 (en) Image space display method and apparatus
CN100407230C (zh) 渐变图像生成装置和渐变图像生成方法
US20130027732A1 (en) Image processing device for accurately identifying region in image without increase in memory requirement
CN113449732A (zh) 信息处理装置、图像读取装置、记录介质、信息处理方法
CN108269233B (zh) 一种基于底纹半色调的文字抖动方法
JP6546385B2 (ja) 画像処理装置及びその制御方法、プログラム
JP3890250B2 (ja) 画像符号化装置、画像符号化方法

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant