WO2015180139A1 - 图像编码方法、装置以及图像处理设备 - Google Patents

图像编码方法、装置以及图像处理设备 Download PDF

Info

Publication number
WO2015180139A1
WO2015180139A1 PCT/CN2014/078935 CN2014078935W WO2015180139A1 WO 2015180139 A1 WO2015180139 A1 WO 2015180139A1 CN 2014078935 W CN2014078935 W CN 2014078935W WO 2015180139 A1 WO2015180139 A1 WO 2015180139A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
comparison
current pixel
image encoding
unit
Prior art date
Application number
PCT/CN2014/078935
Other languages
English (en)
French (fr)
Inventor
朱建清
徐张磊
叶姜莉
数井君彦
Original Assignee
富士通株式会社
朱建清
徐张磊
叶姜莉
数井君彦
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 富士通株式会社, 朱建清, 徐张磊, 叶姜莉, 数井君彦 filed Critical 富士通株式会社
Priority to CN201480072694.8A priority Critical patent/CN105917651B/zh
Priority to PCT/CN2014/078935 priority patent/WO2015180139A1/zh
Publication of WO2015180139A1 publication Critical patent/WO2015180139A1/zh

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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding

Definitions

  • the present invention relates to the field of graphic image technology, and in particular, to an image encoding method and apparatus, and an image processing apparatus.
  • Palette-based coding is widely used in graphic image technology (especially video coding technology).
  • a coding unit for the image area to be encoded, for example, a coding unit (CU), including a plurality of pixels having color values (for example, RGB mode, having 24 bits of true color);
  • the storage capacity of the image usually pointing the pixel to the data index of the palette.
  • the color value of each output pixel can be determined by looking up the palette with the corresponding data index.
  • the palette is a set of pixel values. For pixels whose pixel values are in the palette, only the corresponding pixel index (pixel inde X ) of the pixel value in the palette is used. Thereby, only the palette and the index corresponding to the pixels in the coding unit can be bit-stream encoded, and the bit cost of the encoding can be reduced.
  • Non-Patent Document 1 JCTVC-O0182. Xun Guo, etc, Microsoft, Major-color-based screen content coding.
  • Non-Patent Document 2 JCTVC-N0249. Liwei Guo, etc, Qualcomm, Modified Palette Mode for Screen Content Coding.
  • the pixel can be bitstream encoded in a copy mode.
  • the inventors have found that: In the current technical solution, the pixels to be encoded are compared with the pixels of the same position in the previous row or column, and the copy mode is adopted if the comparison results are the same or similar. Therefore, the scanned pixel information cannot be fully utilized, and the coding efficiency cannot be further improved.
  • Embodiments of the present invention provide an image encoding method, apparatus, and image processing apparatus. Comparing the pixel to be coded with a comparison pixel that has been scanned, and determining whether the pixel to be coded adopts a copy mode according to the comparison result; thereby fully utilizing the scanned pixel information, the coding efficiency can be further improved.
  • an image encoding method including:
  • an image encoding apparatus including:
  • a comparing unit comparing the current pixel with a compared pixel that has been scanned for a current pixel of the image area to be encoded
  • the determining unit determines whether the current pixel adopts a copy mode according to the comparison result; and the stream encoding unit, if it is determined to adopt the copy mode, performs bit stream encoding on the current pixel in a copy mode.
  • an image processing apparatus including:
  • a decoding device that decodes the bitstream to obtain an image.
  • a computer readable program wherein when the program is executed in an image processing apparatus, the program causes a computer to perform image encoding as described above in the image processing apparatus method.
  • a storage medium storing a computer readable program, wherein the computer readable program causes a computer to perform an image encoding method as described above in an image processing apparatus.
  • the beneficial effects of the embodiment of the present invention are: comparing the pixel to be encoded with a compared pixel that has been scanned, and determining whether the pixel to be encoded adopts a copy mode according to the comparison result; thus, it is not limited to only the previous row or The pixels at the same position in the previous column are compared, so that the scanned pixel information can be fully utilized, and the coding efficiency can be further improved.
  • FIG. 1 is a schematic diagram of an example of a coding unit according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of another example of a coding unit according to an embodiment of the present invention.
  • FIG. 3 is a schematic flow chart of an image encoding method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of another example of a coding unit according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of another example of an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of another example of an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of another example of an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram showing another configuration of an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 10 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention. detailed description
  • FIG. 1 is a schematic diagram showing an example of a coding unit according to an embodiment of the present invention, showing a case of a coding unit.
  • the coding unit has 8 ⁇ 8 pixels; wherein pixels having the same pixel value use the same symbol to represent pixel values, such as C0, Cl, . . . , C7.
  • the palette Palettel ⁇ C0, Cl, C2, C3, C4, C5, C6, C7 ⁇ , which has 8 elements in the palette.
  • FIG. 2 is a schematic diagram of another example of a coding unit according to an embodiment of the present invention, showing a case where the coding unit of FIG. 1 adopts a post-Plettel pixel index. If the current copy mode method is used, the pixel index in Figure 2 is used for comparison to determine whether the pixel adopts copy mode. That is, for one of the pixels, in the case of horizontal scanning, it is judged whether the pixel index of the pixel and the pixel index of the same position of the previous row are the same, and if they are the same, it is determined that the pixel adopts copy mode.
  • the index is the same as the pixel index of the same position of the first row (all 00);
  • the index of the fourth pixel (3, 1) of the second row (which is 0) is different from the pixel index of the same position of the first row (which is 2), then it can be determined that the corresponding two pixels in FIG. 1 can be Use copy mode.
  • the copy ran 2 of the pixel (1, 1). In this case, the coding efficiency cannot be further improved.
  • FIG. 3 is a schematic flowchart of an image encoding method according to an embodiment of the present invention. As shown in FIG. 3, the image encoding method includes:
  • Step 301 Compare, for a current pixel of the image area to be encoded, a current pixel with a compared pixel that has been scanned;
  • Step 302 Determine, according to the comparison result, whether the current pixel adopts a copy mode; and step 303, if it is determined to adopt a copy mode, perform bitstream encoding on the current pixel by using a copy mode.
  • a plurality of pixels may be compared and judged one by one using a pixel value or a pixel index.
  • the pixel is subjected to bit stream encoding by using a copy mode; when it is determined that the copy mode is not adopted, the pixel is subjected to an existing method (for example, using a pixel index or using a pixel) Value) Perform bitstream encoding.
  • an existing method for example, using a pixel index or using a pixel) Value
  • both horizontal scanning and vertical scanning are applicable.
  • the position of the current pixel (ie, the pixel to be encoded) in the coding unit is represented as (x, y
  • the position of the comparison pixel in the coding unit is represented as [xi, yj), or Is (x, yj), or (x+, yj); where , and is a positive integer greater than or equal to 1; further, the maximum value of and j can be determined according to the size of the coding unit.
  • the current pixel (x, y) can be compared with the comparison pixel (xl, y-1).
  • the copy direction can be said to be upper left, that is, copy_direction is above. Left. For example, if the current pixel is (1, 1 ), the comparison pixel is (0, 0).
  • the current pixel (x, y) can be compared with the comparison pixel (x, y-1).
  • the copy direction is upward, that is, the copy_direction is above. For example, if the current pixel is (1, 1 ), the comparison pixel is (1, 0).
  • the current pixel (x, y) can be compared with the comparison pixel (x+l, y-1).
  • the copy direction can be said to be upper right, that is, copy_direction is above right. For example, if the current pixel is ( 1, 1 ), then the comparison pixel is (2, 0).
  • FIG. 4 is a schematic diagram of another example of a coding unit according to an embodiment of the present invention, showing an indexing situation after the coding unit of FIG. 2 adopts the embodiment of the present invention.
  • the coding unit shown in FIG. 2 as an example, if the copy direction is the upper left, the pixel (1, 1) is compared with the pixel (0, 0), ..., the pixel (7, 1) is compared with the pixel (6, 0). .
  • the copy run 7 of the pixel (1, 1) in this way, thereby further improving the coding efficiency.
  • FIG. 5 is a schematic diagram of another example of the embodiment of the present invention, which simply shows the case where the copy direction is the upper left
  • FIG. 6 is a schematic diagram of another example of the embodiment of the present invention, which simply shows the case where the copy direction is upward
  • It is a schematic diagram of another example of the embodiment of the present invention, which simply shows the case where the copy direction is the upper right.
  • the comparison pixel corresponding to the current pixel may be determined according to the actual situation; as long as the current pixel is compared with a comparison pixel that has been scanned, it should be within the protection scope of the present invention.
  • the position of the current pixel in the coding unit is represented as (x, y); the position of the comparison pixel in the coding unit may be represented as xi, yj), or xi, y) , or xi, y+j) ; where , and is a positive integer greater than or equal to 1.
  • the comparison of the pixel index is taken as an example, but the present invention is not limited thereto.
  • the determining whether the current pixel adopts the copy mode according to the comparison result may include: when the pixel value of the current pixel is the same as the pixel value of the comparison pixel (for example, using an escape mode), determining the current The pixels are in copy mode.
  • the pixel index of the current pixel is the same as the pixel index of the comparison pixel (for example, using the palette mode)
  • the current pixel adopts the copy mode.
  • the difference between the pixel index of the current pixel and the pixel index of the comparison pixel is less than a preset threshold, it is determined that the current pixel adopts the copy mode.
  • the information identifying the copy direction can be encoded into the bit stream, whereby the compared pixels for comparison can be selected based on the information of the identification copy direction.
  • the information may be at the CU level of the coding unit or at the pixel level.
  • an identification bit for identifying a copy direction may be set for the coding unit; and a comparison pixel for comparison is selected for each pixel in the coding unit according to the identification bit.
  • each pixel of the coding unit is compared with the upper left pixel to determine whether to use the copy mode.
  • an identification bit for identifying a copy direction may be set for one or more pixels; and a comparison pixel for comparison may be selected for the one or more pixels according to the identification bit.
  • Copy_direction is 0, indicating that the copy direction is upper left
  • the pixel is compared with the upper left pixel to determine whether to use the copy mode.
  • Copy_directi 0n can be encoded in many forms. For example, it may be of a fixed length or a variable length. The present invention is not limited thereto, and a specific embodiment may be determined according to actual conditions.
  • the pixel to be encoded is compared with a compared pixel that has been scanned, and whether the pixel to be encoded adopts a copy mode is determined according to the comparison result; thus, it is not limited to being only the same as the previous row or the previous column.
  • the pixels of the position are compared, so that the scanned pixel information can be fully utilized, and the coding efficiency can be further improved.
  • An embodiment of the present invention provides an image encoding apparatus, which corresponds to the image encoding method in Embodiment 1, and the same content is not described again.
  • Fig. 8 is a block diagram showing the configuration of an image coding apparatus according to an embodiment of the present invention. It is to be noted that Fig. 8 only schematically shows the components related to the present invention, and is not shown for other components of the image encoding apparatus, and reference can be made to the prior art.
  • the image encoding apparatus 800 includes: a comparing unit 801, a determining unit 802, and a stream encoding unit 803; wherein the comparing unit 801 compares the current pixel with a current pixel of an image area to be encoded. a comparison pixel is compared; the determining unit 802 determines whether the current pixel adopts a copy mode according to the comparison result; and when the stream encoding unit 803 determines that the copy mode is adopted, performs bit stream on the current pixel in a copy mode. coding.
  • the position of the current pixel in the coding unit is represented as (x, y); the position of the comparison pixel in the coding unit is represented as xi, yj), Either (x, yj) or (x+, yj) ; where , and is a positive integer greater than or equal to 1.
  • the position of the current pixel in the coding unit is represented as (x, y); the position of the comparison pixel in the coding unit is represented as xi, yj) , or (xi, y), or xi, y+j ; where , and are positive integers greater than or equal to 1.
  • the determining unit 802 may be specifically configured to: the pixel value of the current pixel is the same as the pixel value of the comparison pixel, or the pixel index of the current pixel is the same as the pixel index of the comparison pixel. In case, the current pixel is determined to adopt a copy mode; or the difference between the pixel value of the current pixel and the pixel value of the comparison pixel is less than a preset threshold, or the pixel index of the current pixel and the comparison pixel In a case where the difference of the pixel index is less than a preset threshold, it is determined that the current pixel adopts a copy mode.
  • Fig. 9 is a block diagram showing another configuration of an image encoding apparatus according to an embodiment of the present invention.
  • the image encoding device 900 includes: a comparing unit 801, a judging unit 802, and a stream encoding unit 803; as described above.
  • the image encoding device 900 may further include: a setting unit 904 and a selecting unit 905.
  • the setting unit 904 sets an identifier bit for identifying the copy direction for the encoding unit; And the selecting unit 905 selects the compared pixels for comparison for each pixel in the coding unit according to the identification bit.
  • the setting unit 904 sets an identification bit for identifying a copy direction for one or more pixels; and the comparison unit 905 selects the comparison for the one or more pixels according to the identification bit. Pixel.
  • the pixel to be encoded is compared with a compared pixel that has been scanned, and whether the pixel to be encoded adopts a copy mode is determined according to the comparison result; thus, it is not limited to being only in the same position as the previous row or the previous column.
  • the pixels are compared, so that the scanned pixel information can be fully utilized, and the coding efficiency can be further improved.
  • An embodiment of the present invention provides an image processing apparatus, including: the image encoding apparatus according to Embodiment 2; and a decoding apparatus.
  • FIG. 10 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention.
  • the image processing apparatus 1000 may include: a central processing unit (CPU) 200 and a memory 210; the memory 210 is coupled to the central processing unit 200.
  • the memory 210 can store various data; in addition, a program for information processing is stored, and the program is executed under the control of the central processing unit 200.
  • the functions of image encoding device 800 or 900 may be integrated into central processor 200.
  • the central processing unit 200 may be configured to implement the image encoding method as described in Embodiment 1.
  • the image encoding device 800 or 900 may be configured separately from the central processing unit.
  • the image encoding device 800 may be configured as a chip connected to the central processing unit 200, and the image encoding device is implemented by control of the central processing unit. 800 features.
  • the image processing apparatus 1000 may further include: an input and output unit 220, a display unit 230, and the like; wherein the functions of the above components are similar to those of the prior art, and are not described herein again. It is to be noted that the image processing apparatus 1000 does not necessarily have to include all of the components shown in FIG. 10; in addition, the image processing apparatus 1000 may further include components not shown in FIG. 10, and reference may be made to the related art.
  • the embodiment of the present invention further provides a computer readable program, wherein when the program is executed in an image processing apparatus, the program causes a computer to execute the image encoding method described in Embodiment 1 in the image processing apparatus.
  • An embodiment of the present invention further provides a storage medium storing a computer readable program, wherein the computer readable program causes a computer to execute the image encoding method described in Embodiment 1 in an image processing apparatus.
  • the above apparatus and method of the present invention may be implemented by hardware, or may be implemented by hardware in combination with software.
  • the present invention relates to a computer readable program that, when executed by a logic component, enables the logic component to implement the apparatus or components described above, or to cause the logic component to implement the various methods described above Or steps.
  • the present invention also relates to a storage medium for storing the above program, such as a hard disk, a magnetic disk, an optical disk, a DVD, a flash memory, or the like.
  • One or more of the functional blocks described in the figures and/or one or more combinations of functional blocks may be implemented as a general purpose processor, digital signal processor (DSP) for performing the functions described herein. ), an application specific integrated circuit (AS), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or any suitable combination thereof.
  • DSP digital signal processor
  • AS application specific integrated circuit
  • FPGA field programmable gate array
  • One or more of the functional blocks described with respect to the figures and/or one or more combinations of functional blocks may also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, multiple microprocessors One or more microprocessors in conjunction with DSP communication or any other such configuration.

Landscapes

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

Abstract

提供一种图像编码方法、装置以及图像处理设备。所述图像编码方法包括:对于待编码图像区域的一当前像素,将所述当前像素与已被扫描的一比较像素进行比较;根据比较结果来判断所述当前像素是否采用拷贝模式;以及在判断为采用拷贝模式的情况下,对所述当前像素采用拷贝模式进行比特流编码。可以充分利用已扫描的像素信息,进一步提高编码效率。

Description

图像编码方法、 装置以及图像处理设备 技术领域
本发明涉及一种图形图像技术领域, 特别涉及一种图像编码方法、装置以及图像 处理设备。
背景技术
基于调色板 (Palette-based) 的编码在图形图像技术 (尤其是视频编码技术) 中 得到了广泛应用。 在编码过程中, 对于待编码图像区域, 例如一个编码单元 (CU, coding Unit), 包含多个具有色彩值 (例如采用 RGB模式, 具有 24比特的真彩色) 的像素; 为了减少用于存储位图图像的存储容量, 通常可以将像素指向调色板的数据 索引。在译码过程中, 每一输出像素的色彩值可以通过査找具有相应数据索引的调色 板来决定。
其中, 调色板为一系列像素值 (pixel value) 的集合, 对于像素值位于调色板中 的像素, 仅需使用该像素值在调色板中对应的像素索引 (pixel indeX)。 由此可以仅将 调色板以及编码单元中的像素所对应的索引进行比特流编码,可以减少编码的比特代 价 (bit cost )。
下面列出了对于理解本发明和常规技术有益的文献, 通过引用将它们并入本文 中, 如同在本文中完全阐明了一样。
[非专利文献 1]: JCTVC-O0182. Xun Guo, etc, Microsoft, Major-color-based screen content coding.
[非专利文献 2]: JCTVC-N0249. Liwei Guo, etc, Qualcomm, Modified Palette Mode for Screen Content Coding.
应该注意, 上面对技术背景的介绍只是为了方便对本发明的技术方案进行清楚、 完整的说明, 并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本发 明的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。
发明内容
目前, 为了进一步降低比特代价, 若一像素在调色板中的索引值与前一行相同位 置的像素在调色板中的索引值相同, 则可以采用拷贝模式 (copy mode) 对该像素进 行比特流编码。但是发明人发现: 目前的技术方案中, 将待编码的像素与之前一行或 一列的相同位置的像素进行比较, 如果比较结果为相同或相近则采用拷贝模式。 由此 不能充分利用已扫描的像素信息, 不能进一步提高编码效率。
本发明实施例提供一种图像编码方法、装置以及图像处理设备。将待编码像素与 已被扫描的一比较像素进行比较, 根据比较结果来判断待编码像素是否采用拷贝模 式; 由此充分利用已扫描的像素信息, 可以进一步提高编码效率。
根据本发明实施例的第一个方面, 提供一种图像编码方法, 包括:
对于待编码图像区域的一当前像素,将所述当前像素与已被扫描的一比较像素进 行比较;
根据比较结果来判断所述当前像素是否采用拷贝模式; 以及
在判断为采用拷贝模式的情况下, 对当前像素采用拷贝模式进行比特流编码。 根据本发明实施例的第二个方面, 提供一种图像编码装置, 包括:
比较单元, 对于待编码图像区域的一当前像素, 将所述当前像素与已被扫描的一 比较像素进行比较;
判断单元, 根据比较结果来判断所述当前像素是否采用拷贝模式; 以及 流编码单元, 在判断为采用拷贝模式的情况下, 对所述当前像素采用拷贝模式进 行比特流编码。
根据本发明实施例的第三个方面, 提供一种图像处理设备, 包括:
如上所述的图像编码装置; 以及
解码装置, 对比特流进行解码以获得图像。
根据本发明实施例的又一个方面, 提供一种计算机可读程序, 其中当在图像处理 设备中执行所述程序时,所述程序使得计算机在所述图像处理设备中执行如上所述的 图像编码方法。
根据本发明实施例的又一个方面, 提供一种存储有计算机可读程序的存储介质, 其中所述计算机可读程序使得计算机在图像处理设备中执行如上所述的图像编码方 法。
本发明实施例的有益效果在于, 将待编码像素与已被扫描的一比较像素进行比 较, 根据比较结果来判断待编码像素是否采用拷贝模式; 由此并不限于仅与前一行或 前一列的相同位置的像素进行比较, 因此可以充分利用已扫描的像素信息, 可以进一 步提高编码效率。
参照后文的说明和附图, 详细公开了本发明的特定实施方式, 指明了本发明的原 理可以被采用的方式。应该理解, 本发明的实施方式在范围上并不因而受到限制。 在 所附权利要求的精神和条款的范围内,本发明的实施方式包括许多改变、修改和等同。
针对一种实施方式描述和 /或示出的特征可以以相同或类似的方式在一个或更多 个其它实施方式中使用, 与其它实施方式中的特征相组合, 或替代其它实施方式中的 特征。
应该强调, 术语 "包括 /包含"在本文使用时指特征、 整件、 步骤或组件的存在, 但并不排除一个或更多个其它特征、 整件、 步骤或组件的存在或附加。 附图说明
参照以下的附图可以更好地理解本发明的很多方面。 附图中的部件不是成比例 绘制的, 而只是为了示出本发明的原理。 为了便于示出和描述本发明的一些部分, 附 图中对应部分可能被放大或缩小。
在本发明的一个附图或一种实施方式中描述的元素和特征可以与一个或更多个 其它附图或实施方式中示出的元素和特征相结合。 此外, 在附图中, 类似的标号表示 几个附图中对应的部件, 并可用于指示多于一种实施方式中使用的对应部件。
图 1是本发明实施例的编码单元的一实例示意图;
图 2是本发明实施例的编码单元的另一实例示意图;
图 3是本发明实施例的图像编码方法的一流程示意图;
图 4是本发明实施例的编码单元的另一实例示意图;
图 5是本发明实施例的另一实例示意图;
图 6是本发明实施例的另一实例示意图;
图 7是本发明实施例的另一实例示意图;
图 8是本发明实施例的图像编码装置的一构成示意图;
图 9是本发明实施例的图像编码装置的另一构成示意图;
图 10是本发明实施例的图像处理设备的一构成示意图。 具体实施方式
参照附图, 通过下面的说明书, 本发明的前述以及其它特征将变得明显。 在说明 书和附图中, 具体公开了本发明的特定实施方式, 其表明了其中可以采用本发明的原 则的部分实施方式, 应了解的是, 本发明不限于所描述的实施方式, 相反, 本发明包 括落入所附权利要求的范围内的全部修改、 变型以及等同物。
图 1是本发明实施例的编码单元的一实例示意图, 示出了一个编码单元的情况。 如图 1所示, 该编码单元具有 8 X 8个像素; 其中具有相同像素值的像素采用同一符 号来表示像素值, 例如 C0、 Cl、 ……、 C7。 如果采用基于调色板的编码方法, 则会 采用调色板大小 (用 maX_palette_size表示) 大于像素值个数的调色板进行编码, 即 max_palette_size>9, 例如 max_palette_size= 32。 由此使得编码单元中的所有像素都采 用调色板模式进行编码。此时调色板 Palettel={ C0、 Cl、 C2、 C3、 C4、 C5、 C6、 C7 }, 该调色板中具有 8个元素。
图 2是本发明实施例的编码单元的另一实例示意图,示出了图 1的编码单元采用 Palettel后像素索引的情况。 如果采用目前的 copy mode方法, 则采用图 2中的像素 索引进行比较来判断像素是否采用 copy mode。 即对于其中某一个像素, 在采用水平 扫描的情况下, 判断该像素的像素索引和前一行相同位置的像素索引是否相同, 如果 相同则确定该像素采用 copy mode。
例如, 在图 2中, 对于第二行的第二个像素 (1, 1 ) 以及第三个像素 (2, 1 ), 索引与第一行的相同位置的像素索引相同(均为 00) ; 而第二行的第四个像素(3, 1 ) 的索引 (为 0) 与第一行的相同位置的像素索引 (为 2) 不相同, 则可以确定图 1中 对应的这两个像素可以采用 copy mode。 由此, 像素 (1, 1 ) 的 copy ran =2。 在这种 情况下, 不能进一步提高编码效率。
以下对本发明进行详细说明。 实施例 1
本发明实施例提供一种图像编码方法。图 3是本发明实施例的图像编码方法的一 流程示意图, 如图 3所示, 所述图像编码方法包括:
步骤 301, 对于待编码图像区域的一当前像素, 将所述当前像素与已被扫描的一 比较像素进行比较; 步骤 302, 根据比较结果来判断所述当前像素是否采用拷贝模式; 以及 步骤 303, 在判断为采用拷贝模式的情况下, 对所述当前像素采用拷贝模式进行 比特流编码。
在本实施例中, 可以使用像素值或者像素索引对多个像素一一进行比较并判断。 在判断为采用拷贝模式的情况下, 对所述像素采用拷贝模式进行比特流编码; 在判断 为不采用拷贝模式的情况下, 对所述像素按照现有的方法(例如使用像素索引或者使 用像素值) 进行比特流编码。 关于比特流编码的具体内容, 可以参考相关技术。
在本实施例中, 对于水平扫描和垂直扫描均可适用。
在一个实施方式中, 在采用水平扫描方式时, 当前像素(即待编码像素)在编码 单元中的位置表示为 (x, y 比较像素在编码单元中的位置表示为 〔x-i, y-j) , 或者 为 (x, y-j) , 或者为 (x+, y-j) ; 其中, 和 为大于或等于 1的正整数; 此外, 和 j的最大值可以根据编码单元的大小来确定。
以 ί=1, 7=1为例, 可以将当前像素 (x, y) 与比较像素 (x-l, y-1 ) 进行比较, 此时可以称这种方式中拷贝方向为左上, 即copy_direction为above left。 例如, 当前 像素为 (1, 1 ), 则比较像素为 (0, 0)。
或者, 也可以将当前像素 (x, y) 与比较像素 (x, y-1 ) 进行比较, 此时可以称 这种方式中拷贝方向为向上, 即 copy_direction为 above。 例如, 当前像素为 (1, 1 ), 则比较像素为 (1, 0)。
或者, 还可以将当前像素 (x, y) 与比较像素 (x+l, y-1 ) 进行比较, 此时可以 称这种方式中拷贝方向为右上, 即 copy_direction为 above right。 例如, 当前像素为 ( 1, 1 ), 则比较像素为 (2, 0)。
图 4是本发明实施例的编码单元的另一实例示意图,示出了图 2的编码单元采用 本发明实施例后的索引情况。 以图 2所示的编码单元为例, 如果拷贝方向为左上, 则 像素 (1, 1 ) 与像素 (0, 0 ) 比较, ……, 像素 (7, 1 ) 与像素 (6, 0 ) 比较。 如图 4所示, 这种方式下像素 (1, 1 ) 的 copy run =7, 由此可以进一步提高编码效率。
图 5是本发明实施例的另一实例示意图, 简单示出了拷贝方向为左上的情况; 图 6是本发明实施例的另一实例示意图, 简单示出了拷贝方向为向上的情况; 图 7是本 发明实施例的另一实例示意图, 简单示出了拷贝方向为右上的情况。
值得注意的是, 以上仅以 =1, 1为例, 通过拷贝方向为左上、 向上或右上对本 发明进行了说明。但本发明不限于此, 例如还可以是 =2, 1等。 可以根据实际情况 确定当前像素所具体对应的比较像素;只要将当前像素与已被扫描的一比较像素进行 比较, 均应在本发明的保护范围之内。
在另一个实施方式中, 在采用垂直扫描方式时, 当前像素在编码单元中的位置表 示为 (x, y) ; 比较像素在编码单元中的位置可以表示为 x-i, y-j) , 或者为 x-i, y) , 或者为 x-i, y+j) ; 其中, 和 为大于或等于 1的正整数。
此外, 图 1、 2、 4中均以像素索引的比较为例进行了说明, 但本发明不限于此, 例如还可以在采用非调色板模式 (例如 escape mode) 的情况下, 通过比较像素值来 确定是否采用拷贝模式。
在本实施例中, 步骤 302中根据比较结果来判断当前像素是否采用拷贝模式, 具 体可以包括: 在当前像素的像素值与比较像素的像素值相同的情况下 (例如采用 escape mode) , 确定当前像素采用拷贝模式。 或者, 在当前像素的像素索引与比较像 素的像素索引相同的情况下 (例如采用 palette mode) , 确定当前像素采用拷贝模式。
或者, 在当前像素的像素值与比较像素的像素值的差小于预设阈值的情况下, 确 定当前像素采用拷贝模式。或者当前像素的像素索引与比较像素的像素索引的差小于 预设阈值的情况下, 确定当前像素采用拷贝模式。
在本实施例中, 可以将标识拷贝方向的信息编码到比特流中, 由此可以根据该标 识拷贝方向的信息来选择进行比较的比较像素。 其中, 该信息可以是编码单元 CU级 别的, 也可以是像素级别的。
在一个实施方式中, 可以为编码单元设置用于标识拷贝方向的标识位; 以及根据 该标识位为编码单元中的每一像素选择进行比较的比较像素。
例如, 可以采用如下的伪代码表示:
"cuo
Figure imgf000008_0001
例如, Copy_direction为 0, 表示拷贝方向为左上, 则该编码单元的每一像素均 与左上的像素进行比较来确定是否采用拷贝模式。
在另一个实施方式中, 可以为一个或多个像素设置用于标识拷贝方向的标识位; 以及根据标识位为一个或多个像素选择进行比较的比较像素。
例如, 可以采用如下的伪代码表示:
cu()
{
Palette mode flag;
If (Palette mode flag=l)
{ " "
For (scan_pos=0; scan_pos <number of pixels in a CU; scan_pos +Run )
{
Run—mode;
If (Run mode=copy mode)
{ _
Copy—direction;
Copy run;
Run= Copy run;
} _
Else
{
}
}
}
}
例如, Copy_direction为 0, 表示拷贝方向为左上, 则该像素与左上的像素进行 比较来确定是否采用拷贝模式。
其中, "Copy_directi0n"能够采用多种形式进行编码。 例如可以是固定长度的, 也可以是可变长度的。 本发明不限于此, 可以根据实际情况确定具体的实施方式。
由上述实施例可知, 将待编码像素与已被扫描的一比较像素进行比较, 根据比较 结果来判断待编码像素是否采用拷贝模式; 由此并不限于仅与前一行或前一列的相同 位置的像素进行比较, 因此可以充分利用已扫描的像素信息, 可以进一步提高编码效 率。 实施例 2
本发明实施例提供一种图像编码装置, 对应于实施例 1中的图像编码方法, 相同 的内容不再赘述。
图 8是本发明实施例的图像编码装置的一构成示意图。值得注意的是, 附图 8仅 示意性示出了与本发明相关的各部件, 对于图像编码装置的其他部件没有示出, 可以 参考现有技术。
如图 8所示, 该图像编码装置 800包括: 比较单元 801、 判断单元 802和流编码 单元 803 ; 其中, 比较单元 801对于待编码图像区域的一当前像素, 将所述当前像素 与已被扫描的一比较像素进行比较;判断单元 802根据比较结果来判断所述当前像素 是否采用拷贝模式; 以及流编码单元 803在判断为采用拷贝模式的情况下, 对所述当 前像素采用拷贝模式进行比特流编码。
在一个实施方式中, 在采用水平扫描方式时, 所述当前像素在编码单元中的位置 表示为(x, y) ; 所述比较像素在所述编码单元中的位置表示为 x-i, y-j) , 或者为(x, y-j) , 或者为 (x+, y-j) ; 其中, 和 为大于或等于 1的正整数。
在另一个实施方式中, 在采用垂直扫描方式时, 所述当前像素在编码单元中的位 置表示为 (x, y) ; 所述比较像素在所述编码单元中的位置表示为 x-i, y-j) , 或者为 (x-i, y) , 或者为 x-i, y+j ; 其中, 和 为大于或等于 1的正整数。
在本实施例中, 判断单元 802具体可以用于: 在所述当前像素的像素值与所述比 较像素的像素值相同、或者所述当前像素的像素索引与所述比较像素的像素索引相同 的情况下, 确定所述当前像素采用拷贝模式; 或者在所述当前像素的像素值与所述比 较像素的像素值的差小于预设阈值、或者所述当前像素的像素索引与所述比较像素的 像素索引的差小于预设阈值的情况下, 确定所述当前像素采用拷贝模式。
图 9是本发明实施例的图像编码装置的另一构成示意图。如图 9所示, 该图像编 码装置 900包括: 比较单元 801、 判断单元 802和流编码单元 803 ; 如上所述。 如图 9所示, 图像编码装置 900还可以包括: 设置单元 904和选择单元 905。
在一个实施方式中, 设置单元 904为编码单元设置用于标识拷贝方向的标识位; 以及选择单元 905 根据所述标识位为所述编码单元中的每一像素选择进行比较的所 述比较像素。
在另一个实施方式中,设置单元 904为一个或多个像素设置用于标识拷贝方向的 标识位; 以及选择单元 905根据所述标识位为所述一个或多个像素选择进行比较的所 述比较像素。
由上述实施例可知, 将待编码像素与已被扫描的一比较像素进行比较, 根据比较 结果来判断待编码像素是否采用拷贝模式; 由此并不限于仅与前一行或前一列的相同 位置的像素进行比较, 因此可以充分利用已扫描的像素信息, 可以进一步提高编码效 率。 实施例 3
本发明实施例提供一种图像处理设备, 所述图像处理设备包括: 如实施例 2所述 的图像编码装置; 以及解码装置。
图 10是本发明实施例的图像处理设备的一构成示意图。如图 10所示, 图像处理 设备 1000可以包括: 中央处理器(CPU) 200和存储器 210; 存储器 210耦合到中央 处理器 200。 其中该存储器 210可存储各种数据; 此外还存储信息处理的程序, 并且 在中央处理器 200的控制下执行该程序。
在一个实施方式中, 图像编码装置 800或 900 的功能可以被集成到中央处理器 200中。 其中, 中央处理器 200可以被配置为实现如实施例 1所述的图像编码方法。
在另一个实施方式中, 图像编码装置 800或 900可以与中央处理器分开配置, 例 如可以将图像编码装置 800配置为与中央处理器 200连接的芯片,通过中央处理器的 控制来实现图像编码装置 800的功能。
此外, 如图 10所示, 图像处理设备 1000还可以包括: 输入输出单元 220和显示 单元 230等; 其中, 上述部件的功能与现有技术类似,此处不再赘述。值得注意的是, 图像处理设备 1000也并不是必须要包括图 10中所示的所有部件; 此外, 图像处理设 备 1000还可以包括图 10中没有示出的部件, 可以参考现有技术。
本发明实施例还提供一种计算机可读程序,其中当在图像处理设备中执行所述程 序时, 所述程序使得计算机在所述图像处理设备中执行实施例 1 所述的图像编码方 法。 本发明实施例还提供一种存储有计算机可读程序的存储介质,其中所述计算机可 读程序使得计算机在图像处理设备中执行实施例 1所述的图像编码方法。
本发明以上的装置和方法可以由硬件实现, 也可以由硬件结合软件实现。 本发明 涉及这样的计算机可读程序, 当该程序被逻辑部件所执行时, 能够使该逻辑部件实现 上文所述的装置或构成部件, 或使该逻辑部件实现上文所述的各种方法或步骤。 本发 明还涉及用于存储以上程序的存储介质, 如硬盘、 磁盘、 光盘、 DVD、 flash存储器等。
针对附图中描述的功能方框中的一个或多个和 /或功能方框的一个或多个组合, 可以实现为用于执行本申请所描述功能的通用处理器、 数字信号处理器 (DSP)、 专 用集成电路 (AS )、 现场可编程门阵列 (FPGA) 或者其它可编程逻辑器件、 分立 门或者晶体管逻辑器件、 分立硬件组件或者其任意适当组合。针对附图描述的功能方 框中的一个或多个和 /或功能方框的一个或多个组合, 还可以实现为计算设备的组合, 例如, DSP和微处理器的组合、 多个微处理器、 与 DSP通信结合的一个或多个微处 理器或者任何其它这种配置。
以上结合具体的实施方式对本发明进行了描述, 但本领域技术人员应该清楚, 这 些描述都是示例性的, 并不是对本发明保护范围的限制。 本领域技术人员可以根据本 发明的精神和原理对本发明做出各种变型和修改, 这些变型和修改也在本发明的范围 内。

Claims

权利要求书
1、 一种图像编码方法, 其特征在于, 所述图像编码方法包括:
对于待编码图像区域的一当前像素,将所述当前像素与已被扫描的一比较像素进 行比较;
根据比较结果来判断所述当前像素是否采用拷贝模式; 以及
在判断为采用拷贝模式的情况下, 对所述当前像素采用拷贝模式进行比特流编 码。
2、 根据权利要求 1所述的图像编码方法, 其中, 在采用水平扫描方式时, 所述 当前像素在编码单元中的位置表示为 (x, y) ; 所述比较像素在所述编码单元中的位 置表示为 (x-, y-j , 或者为 (x, y-j , 或者为 (x+, y-j ; 其中, 和 为大于或等 于 1的正整数。
3、 根据权利要求 1所述的图像编码方法, 其中, 在采用垂直扫描方式时, 所述 当前像素在编码单元中的位置表示为 (x, y ; 所述比较像素在所述编码单元中的位 置表示为 ίχ-i, y-j) , 或者为 ίχ-i, y) , 或者为 x-i, y+j) ; 其中, 和 为大于或等 于 1的正整数。
4、 根据权利要求 1所述的图像编码方法, 其中, 根据比较结果来判断所述当前 像素是否采用拷贝模式, 包括:
在所述当前像素的像素值与所述比较像素的像素值相同、或者所述当前像素的像 素索引与所述比较像素的像素索引相同的情况下, 确定所述当前像素采用拷贝模式; 或者
在所述当前像素的像素值与所述比较像素的像素值的差小于预设阈值、或者所述 当前像素的像素索引与所述比较像素的像素索引的差小于预设阈值的情况下,确定所 述当前像素采用拷贝模式。
5、 根据权利要求 1所述的图像编码方法, 其中, 所述图像编码方法还包括: 为编码单元设置用于标识拷贝方向的标识位; 以及
根据所述标识位为所述编码单元中的每一像素选择进行比较的所述比较像素。
6、 根据权利要求 1所述的图像编码方法, 其中, 所述图像编码方法还包括: 为一个或多个像素设置用于标识拷贝方向的标识位; 以及 根据所述标识位为所述一个或多个像素选择进行比较的所述比较像素。
7、 一种图像编码装置, 其特征在于, 所述图像编码装置包括:
比较单元, 对于待编码图像区域的一当前像素, 将所述当前像素与已被扫描的一 比较像素进行比较;
判断单元, 根据比较结果来判断所述当前像素是否采用拷贝模式; 以及 流编码单元, 在判断为采用拷贝模式的情况下, 对所述当前像素采用拷贝模式进 行比特流编码。
8、 根据权利要求 7所述的图像编码装置, 其中, 在采用水平扫描方式时, 所述 当前像素在编码单元中的位置表示为 (x, y ; 所述比较像素在所述编码单元中的位 置表示为 ίχ-i, y-j) , 或者为 (x, y-j) , 或者为 (x+, y-j) ; 其中, 和 为大于或等 于 1的正整数。
9、 根据权利要求 7所述的图像编码装置, 其中, 在采用垂直扫描方式时, 所述 当前像素在编码单元中的位置表示为 (x, y ; 所述比较像素在所述编码单元中的位 置表示为 (x-, y-j , 或者为 ίχ-i, y) , 或者为 x-i, y+j) ; 其中, 和 为大于或等 于 1的正整数。
10、 根据权利要求 7所述的图像编码装置, 其中, 所述判断单元具体用于: 在所述当前像素的像素值与所述比较像素的像素值相同、或者所述当前像素的像 素索引与所述比较像素的像素索引相同的情况下, 确定所述当前像素采用拷贝模式; 或者
在所述当前像素的像素值与所述比较像素的像素值的差小于预设阈值、或者所述 当前像素的像素索引与所述比较像素的像素索引的差小于预设阈值的情况下,确定所 述当前像素采用拷贝模式。
11、 根据权利要求 7所述的图像编码装置, 其中, 所述图像编码装置还包括: 设置单元, 为编码单元设置用于标识拷贝方向的标识位; 以及
选择单元,根据所述标识位为所述编码单元中的每一像素选择进行比较的所述比 较像素。
12、 根据权利要求 7所述的图像编码装置, 其中, 所述图像编码装置还包括: 设置单元, 为一个或多个像素设置用于标识拷贝方向的标识位; 以及
选择单元, 根据所述标识位为所述一个或多个像素选择进行比较的所述比较像
13、 一种图像处理设备, 所述图像处理设备包括: 如权利要求 7至 12任一项所述的图像编码装置; 以及 解码装置, 对比特流进行解码以获得图像。
PCT/CN2014/078935 2014-05-30 2014-05-30 图像编码方法、装置以及图像处理设备 WO2015180139A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480072694.8A CN105917651B (zh) 2014-05-30 2014-05-30 图像编码方法、装置以及图像处理设备
PCT/CN2014/078935 WO2015180139A1 (zh) 2014-05-30 2014-05-30 图像编码方法、装置以及图像处理设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/078935 WO2015180139A1 (zh) 2014-05-30 2014-05-30 图像编码方法、装置以及图像处理设备

Publications (1)

Publication Number Publication Date
WO2015180139A1 true WO2015180139A1 (zh) 2015-12-03

Family

ID=54697916

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/078935 WO2015180139A1 (zh) 2014-05-30 2014-05-30 图像编码方法、装置以及图像处理设备

Country Status (2)

Country Link
CN (1) CN105917651B (zh)
WO (1) WO2015180139A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6981540B2 (ja) * 2017-12-06 2021-12-15 富士通株式会社 モード情報のコーディングとデコーディング方法、装置及び電子機器

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101031085A (zh) * 2007-03-30 2007-09-05 中国联合通信有限公司 一种移动终端帧动画的处理方法
CN101064849A (zh) * 2006-04-29 2007-10-31 鲁海宁 动态图像编码方法、装置和计算机可读记录介质
US20100111410A1 (en) * 2008-10-30 2010-05-06 Microsoft Corporation Remote computing platforms providing high-fidelity display and interactivity for clients
CN102523367A (zh) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 基于多调色板的实时图像压缩和还原方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7038696B2 (en) * 2002-01-04 2006-05-02 Hewlett-Packard Development Company Method and apparatus for implementing color graphics on a remote computer
DE60310842T2 (de) * 2002-07-11 2007-10-11 Matsushita Electric Industrial Co., Ltd., Kadoma Verfahren zur Codierung und Decodierung von H.264 Bildern mittels eines virtuellen Anzeigepuffers.
JP3716831B2 (ja) * 2002-12-10 2005-11-16 ブラザー工業株式会社 画像形成装置
KR100679031B1 (ko) * 2004-12-03 2007-02-05 삼성전자주식회사 다 계층 기반의 비디오 인코딩 방법, 디코딩 방법 및 상기방법을 이용한 장치
US7852362B2 (en) * 2005-07-15 2010-12-14 Ricoh Company, Limited Image writing device using digital light-emitting elements
CN101098473B (zh) * 2006-06-30 2012-05-09 联想(北京)有限公司 一种图像编码方法及装置
EP2182732A1 (en) * 2008-10-28 2010-05-05 Panasonic Corporation Switching between scans in image coding
JP5402845B2 (ja) * 2010-06-17 2014-01-29 コニカミノルタ株式会社 画像処理装置及び画像処理方法並びに制御プログラム
CN102647591B (zh) * 2012-04-17 2014-07-02 中国科学院声学研究所 基于ssim评价的容错率失真优化视频编码方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064849A (zh) * 2006-04-29 2007-10-31 鲁海宁 动态图像编码方法、装置和计算机可读记录介质
CN101031085A (zh) * 2007-03-30 2007-09-05 中国联合通信有限公司 一种移动终端帧动画的处理方法
US20100111410A1 (en) * 2008-10-30 2010-05-06 Microsoft Corporation Remote computing platforms providing high-fidelity display and interactivity for clients
CN102523367A (zh) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 基于多调色板的实时图像压缩和还原方法

Also Published As

Publication number Publication date
CN105917651B (zh) 2019-05-14
CN105917651A (zh) 2016-08-31

Similar Documents

Publication Publication Date Title
WO2016082277A1 (zh) 一种视频认证方法及装置
US10198628B2 (en) Method and apparatus for determining a document suitability for server-based optical character recognition (OCR) processing
US10070133B2 (en) Methods, apparatuses, systems, and non-transitory computer readable media for improving and/or optimizing image compression quality
CN111107370B (zh) 视频水印的嵌入处理方法、装置、电子设备及存储介质
US20200394433A1 (en) Method and apparatus for detecting object in image, and storage medium thereof
US20160217341A1 (en) Encoding method and encoder
WO2022095797A1 (zh) 图像的压缩方法、装置、智能终端及计算机可读存储介质
US10354353B2 (en) Digital video content security authentication method and system
JP6070568B2 (ja) 特徴量符号化装置、特徴量符号化方法、及びプログラム
US20150379340A1 (en) Image processing device
US8705134B2 (en) Method of processing an image to clarify text in the image
WO2015180139A1 (zh) 图像编码方法、装置以及图像处理设备
US20210089785A1 (en) Video feature extraction method and device
WO2016049843A1 (zh) 调色板的编码方法、装置以及图像处理设备
WO2016192053A1 (zh) 拷贝信息的编码方法、装置以及图像处理设备
WO2015188342A1 (zh) 基于三维调色板的图像编码方法、装置以及图像处理设备
WO2015139180A1 (zh) 图像编码方法、装置以及图像处理设备
WO2015192340A1 (zh) 基于调色板的图像编码方法、装置以及图像处理设备
WO2016029420A1 (zh) 基于调色板的图像编码方法、装置以及图像处理设备
CN110941589A (zh) 一种图片导出方法、装置、电子设备及可读存储介质
WO2016119196A1 (zh) 图像编码方法、装置以及图像处理设备
JP2004062459A (ja) 画像処理装置、画像処理方法、画像処理プログラム及びそのプログラムを記録したコンピュータ読み取り可能な記録媒体
TWI669947B (zh) 圖片轉碼方法、計算設備及儲存介質
WO2016029419A1 (zh) 图像编码方法、装置以及图像处理设备
WO2015139174A1 (zh) 图像编码方法、装置以及图像处理设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14893088

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14893088

Country of ref document: EP

Kind code of ref document: A1