CN105578191B - 基于直方图滑动窗口的索引图基色选择方法 - Google Patents

基于直方图滑动窗口的索引图基色选择方法 Download PDF

Info

Publication number
CN105578191B
CN105578191B CN201510933413.XA CN201510933413A CN105578191B CN 105578191 B CN105578191 B CN 105578191B CN 201510933413 A CN201510933413 A CN 201510933413A CN 105578191 B CN105578191 B CN 105578191B
Authority
CN
China
Prior art keywords
pixel value
value
interval
maximum
pixel
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.)
Expired - Fee Related
Application number
CN201510933413.XA
Other languages
English (en)
Other versions
CN105578191A (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.)
Liaoning Normal University
Original Assignee
Liaoning Normal 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 Liaoning Normal University filed Critical Liaoning Normal University
Priority to CN201510933413.XA priority Critical patent/CN105578191B/zh
Publication of CN105578191A publication Critical patent/CN105578191A/zh
Application granted granted Critical
Publication of CN105578191B publication Critical patent/CN105578191B/zh
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/20Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding
    • H04N19/21Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding with binary alpha-plane coding for video objects, e.g. context-based arithmetic encoding [CAE]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开一种基于直方图滑动窗口的索引图基色选择方法,是通过图像直方图统计量化窗口内所包含的像素数目,并选择包含最多像素的窗口相对应的像素值作为四种基色,虽然也是四种基色,却可减少逃逸色的数量,有效提高基于索引图的编码算法的压缩效率。

Description

基于直方图滑动窗口的索引图基色选择方法
技术领域
本发明涉及基于索引图的图像编码压缩方法,尤其是一种基色数量少且可减少逃逸色数量的基于直方图滑动窗口的基色选择方法。
背景技术
一方面,随着数字图书馆的兴起,大量纸质资料被扫描成数字图像格式,虽然节省了馆藏空间,但同时也对计算机的存储空间提出更高要求;另一方面,视频会议、远程教学、云计算、还有个人移动终端等的应用越来越普及,越来越多的应用要求把本地计算机屏幕显示的内容传输到远程终端上并显示,以实现屏幕共享,有些应用甚至要求两台计算机实现实时响应,这就对计算机屏幕图像的传输提出了实时性要求。
要解决上述的扫描文本存储问题和屏幕图像实时传输问题,高效的压缩编码是关键技术之一。扫描文本、屏幕图像和传真图像等的一个显著特点是均混合了文本、图形和自然图像等不同类型的内容,故此又被称为“复合图像(Compound Image)”。然而,文本/图形与自然图像在统计特性方面存在显著差别:由文本/图形元素所组成的图像是典型的非连续色调图像,包含的颜色数量较少,并且要求压缩算法能够保持文本和图形清晰的边缘;自然图像则相反,它属于连续色调图像,包含丰富的颜色信息,为了提高压缩率可以允许压缩算法产生一定的失真。虽然目前存在多种典型的图像压缩算法,如JPEG、JPEG 2000、Djvu、MRC等,但是JPEG主要针对连续色调的自然图像编码,却无法很好地满足文本图像对压缩率和质量的要求;尽管Djvu、MRC等算法能够兼顾文本图像的特点实现编码,可是其算法复杂度均较高。在此背景下,设计一种专门针对文本/图形图像的高效编码算法就显得非常迫切和必要。
由于文本图像是典型的非连续色调图像,包含的灰度值较少,于是研究者们提出了一种基于索引图的编码算法,其主要思想是将图像中出现次数最多的若干种灰度值作为基色(Base color),并分别为其指定不同索引值,再将图像中每个像素的灰度值用对应的索引值替代便形成了一幅索引图,进而对索引图进行编码即可达到压缩图像的目的。由于充分利用了文本/图形图像的非连续色调、灰度值少的特点,基于索引图的编码算法是目前对文本/图形图像进行压缩的重要算法之一。
提高基于索引图的编码算法的压缩效率主要有三个环节:首先,调色板和索引图的有效建立,即确定基色的数量、减少逃逸色(Escape color)和索引值的分配;其次,调色板的有效编码;最后,索引图的有效编码。通常,对于第一个环节,基色的数量越多,则需要更多的bit来编码基色和索引图,但逃逸色的数量会减少;反之,基色数量越少,则编码基色和索引图所需的bit数目就越少,但逃逸色会增多。目前普遍采用四种基色,但这四种基色是以图像中出现次数最多的四种像素值来确定的,逃逸色数量多。
发明内容
本发明是为了解决现有技术所存在的上述技术问题,提供一种基色数量少且可减少逃逸颜色数量的基于直方图滑动窗口的基色选择方法。
本发明的技术解决方案是:一种基于直方图滑动窗口的索引图基色选择方法,其特征在于按照如下步骤进行:
步骤1. 计算待编码图像块的直方图;
步骤2. 选取出现次数最多的4种像素值做为候选基色;
步骤3.用窗口像素统计函数统计每个像素值的量化窗口内包含的像素数目,所述的定义如下:
其中,是指以像素值为中心、以步长Δ为半径的窗口内的像素值,为直方图函数,为窗口像素统计函数,为像素值,Δ为量化步长;
步骤4. 取使函数取得最大值的像素值作为第一种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第一种基色;
步骤5. 取使函数取得最大值的像素值作为第二种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第二种基色;
步骤6. 取使函数取得最大值的像素值作为第三种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第三种基色;
步骤7. 取使函数取得最大值的像素值作为第四种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第四种基色。
本发明通过图像直方图统计量化窗口内所包含的像素数目,并选择包含最多像素的窗口相对应的像素值作为四种基色,虽然也是四种基色,却可减少逃逸色的数量,有效提高基于索引图的编码算法的压缩效率。
具体实施方式
基于直方图滑动窗口的索引图基色选择方法,按照如下步骤进行:
步骤1. 计算待编码图像块的直方图;
步骤2. 选取出现次数最多的4种像素值做为候选基色;
步骤3. 用窗口像素统计函数统计每个像素值的量化窗口内包含的像素数目,所述的定义如下:
其中,是指以像素值为中心、以步长Δ为半径的窗口内的像素值,为直方图函数,为窗口像素统计函数,为像素值,Δ为量化步长;
步骤4. 取使函数取得最大值的像素值作为第一种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第一种基色;
步骤5. 取使函数取得最大值的像素值作为第二种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第二种基色;
步骤6. 取使函数取得最大值的像素值作为第三种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第三种基色;
步骤7. 取使函数取得最大值的像素值作为第四种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第四种基色。

Claims (1)

1.一种基于直方图滑动窗口的索引图基色选择方法,其特征在于按照如下步骤进行:
步骤1. 计算待编码图像块的直方图;
步骤2. 选取出现次数最多的4种像素值做为候选基色;
步骤3. 用窗口像素统计函数统计每个像素值的量化窗口内包含的像素数目,所述的定义如下:
其中,是指以像素值为中心、以步长Δ为半径的窗口内的像素值,为直方图函数,为窗口像素统计函数,为像素值,Δ为量化步长;
步骤4. 取使函数取得最大值的像素值作为第一种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第一种基色;
步骤5. 取使函数取得最大值的像素值作为第二种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第二种基色;
步骤6. 取使函数取得最大值的像素值作为第三种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第三种基色;
步骤7. 取使函数取得最大值的像素值作为第四种基色,并将在区间内的值设为0;若在区间内出现多个使取得最大值的像素值,则分别计算它们与四种候选基色的欧氏距离,选取距离最小者对应的像素值作为第四种基色。
CN201510933413.XA 2015-12-15 2015-12-15 基于直方图滑动窗口的索引图基色选择方法 Expired - Fee Related CN105578191B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510933413.XA CN105578191B (zh) 2015-12-15 2015-12-15 基于直方图滑动窗口的索引图基色选择方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510933413.XA CN105578191B (zh) 2015-12-15 2015-12-15 基于直方图滑动窗口的索引图基色选择方法

Publications (2)

Publication Number Publication Date
CN105578191A CN105578191A (zh) 2016-05-11
CN105578191B true CN105578191B (zh) 2018-12-07

Family

ID=55887788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510933413.XA Expired - Fee Related CN105578191B (zh) 2015-12-15 2015-12-15 基于直方图滑动窗口的索引图基色选择方法

Country Status (1)

Country Link
CN (1) CN105578191B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106600659B (zh) * 2016-12-05 2019-06-04 浙江工商大学 基于随机采样点的多样化颜色表绘制方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101068350A (zh) * 2007-06-04 2007-11-07 北京派瑞根科技开发有限公司 一种基于像素统计特征和视觉特征的图像编解码处理方法
CN101217668A (zh) * 2008-01-14 2008-07-09 浙江大学 基于块分类的混合图像压缩方法
CN102523367A (zh) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 基于多调色板的实时图像压缩和还原方法
CN102881026A (zh) * 2012-08-15 2013-01-16 大连理工大学 一种具有透明度信息的图像的调色板装置与生成方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8615138B2 (en) * 2011-11-03 2013-12-24 Google Inc. Image compression using sub-resolution images

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101068350A (zh) * 2007-06-04 2007-11-07 北京派瑞根科技开发有限公司 一种基于像素统计特征和视觉特征的图像编解码处理方法
CN101217668A (zh) * 2008-01-14 2008-07-09 浙江大学 基于块分类的混合图像压缩方法
CN102523367A (zh) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 基于多调色板的实时图像压缩和还原方法
CN102881026A (zh) * 2012-08-15 2013-01-16 大连理工大学 一种具有透明度信息的图像的调色板装置与生成方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A low-complexity screen compression scheme for interactive screen sharing;Pan Z,Shen H,Lu Y,Li S.;《IEEE Transcations on circuits and systems for video technology》;20130630;第23卷(第6期);949-960 *

Also Published As

Publication number Publication date
CN105578191A (zh) 2016-05-11

Similar Documents

Publication Publication Date Title
EP1864255B1 (en) Block-based image compression method and apparatus
US8620071B2 (en) Adaptive compression of multi-level images
CN110446041B (zh) 一种视频编解码方法、装置、系统及存储介质
US20170324959A1 (en) Method and apparatus for encoding/decoding a high dynamic range picture into a coded bitstream
CN109842803B (zh) 一种图像压缩的方法及装置
CN109831668B (zh) 数据压缩方法及装置、数据编码/解码方法及装置
CN107852501A (zh) 用于对hdr图像和使用色彩映射函数从所述hdr图像获得的sdr图像两者进行编码的方法和设备
CN102523367A (zh) 基于多调色板的实时图像压缩和还原方法
CN102821279A (zh) 一种保留alpha通道的图片压缩方法
CN106851335B (zh) 一种图像传输带宽匹配方法、设备及系统
CN105323583A (zh) 编码方法、解码方法、编解码系统、编码器与解码器
US11741585B2 (en) Method and device for obtaining a second image from a first image when the dynamic range of the luminance of the first image is greater than the dynamic range of the luminance of the second image
CN102881026A (zh) 一种具有透明度信息的图像的调色板装置与生成方法
CN106412595B (zh) 用于编码高动态范围帧以及施加的低动态范围帧的方法和设备
CN111654721A (zh) 视频处理方法、系统、电子设备及存储介质
US20190132600A1 (en) Method and apparatus for encoding/decoding a scalar integer into a parameter representative of a pivot points of a piece-wise linear function
CN111179370A (zh) 一种图片生成方法、装置、电子设备及存储介质
CN105578191B (zh) 基于直方图滑动窗口的索引图基色选择方法
CN102271251A (zh) 无失真的图像压缩方法
US10205967B2 (en) Extended YCC format for backward-compatible P3 camera video
CN105554504B (zh) 基于升降序元组的索引图编码和解码方法
CN113473150B (zh) 一种图像处理方法、装置以及计算机可读存储装置
US20230177734A1 (en) System, Device, and Method for Improved Encoding and Enhanced Compression of Images, Videos, and Media Content
US11792359B2 (en) Efficient electro-optical transfer function (EOTF) curve for standard dynamic range (SDR) content
US20200275102A1 (en) Adaptive variation of chroma subsampling in image compression

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181207

Termination date: 20191215

CF01 Termination of patent right due to non-payment of annual fee