JP2011015041A - Method and apparatus for processing image - Google Patents

Method and apparatus for processing image Download PDF

Info

Publication number
JP2011015041A
JP2011015041A JP2009155716A JP2009155716A JP2011015041A JP 2011015041 A JP2011015041 A JP 2011015041A JP 2009155716 A JP2009155716 A JP 2009155716A JP 2009155716 A JP2009155716 A JP 2009155716A JP 2011015041 A JP2011015041 A JP 2011015041A
Authority
JP
Japan
Prior art keywords
gradation
value
representative value
label
gradation representative
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
JP2009155716A
Other languages
Japanese (ja)
Other versions
JP5246067B2 (en
Inventor
Shoichi Nomura
庄一 野村
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.)
Konica Minolta Business Technologies Inc
Original Assignee
Konica Minolta Business Technologies Inc
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 Konica Minolta Business Technologies Inc filed Critical Konica Minolta Business Technologies Inc
Priority to JP2009155716A priority Critical patent/JP5246067B2/en
Publication of JP2011015041A publication Critical patent/JP2011015041A/en
Application granted granted Critical
Publication of JP5246067B2 publication Critical patent/JP5246067B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing method for reducing block noise by a relatively simple process, and an image processing apparatus.SOLUTION: In the image processing method, an image is divided into a plurality of regions, and each region is encoded to be represented by a plurality of gradation representative values each representing a gradation value of a pixel belonging to the region and label information showing which one of the plurality of gradation representative values each pixel belonging to the region corresponds, or decoded by converting the label information to a gradation value based on the gradation representative value corresponding to the label information. In the image processing method, a noticeable gradation representative value related to a processing object region is corrected based on the gradation representative value of an adjacent region to perform encoding or decoding.

Description

本発明は、画像情報の符号化(圧縮)/復号化(伸張)処理、特に、画像を複数の領域に分割し、各々の領域で符号化(圧縮)、復号化(伸張)を行う画像処理方法に係り、特に、領域境界で発生する階調不連続によるノイズ(所謂ブロックノイズ)を軽減する画像処理方法、画像処理装置に関する。   The present invention relates to image information encoding (compression) / decoding (decompression) processing, and in particular, image processing for dividing an image into a plurality of regions and performing encoding (compression) and decoding (decompression) in each region. In particular, the present invention relates to an image processing method and an image processing apparatus that reduce noise (so-called block noise) due to gradation discontinuity that occurs at a region boundary.

カラー化、高解像度化された画像情報は膨大な情報量を有するので、その保存、転送等の扱いを容易にできるように、画像を符号化(圧縮)して保存・転送し、プリント出力などの利用時に復号化(伸張)することが一般に行われる。   Colored and high-resolution image information has an enormous amount of information, so images can be encoded (compressed), stored and transferred, and printed out so that they can be easily stored and transferred. In general, decryption (decompression) is performed when using.

符号化(圧縮)/復号化(伸張)には、処理が容易なことから、単一サイズの矩形(ブロック)領域で画像を分割し、各々の領域で独立して符号化(圧縮)/復号化(伸張)を行う手法が広く用いられる。   Since encoding (compression) / decoding (decompression) is easy, the image is divided into rectangular (block) areas of a single size, and encoding (compression) / decoding is independently performed in each area. A method of performing (decompression) is widely used.

図19は、従来から使用されているBTC(Block Truncation Coding)符号化(圧縮)処理/復号化(伸張)処理の一例を示す流れ図である。まず符号化対象の画像の画像情報を取得し(ステップS101)、図20に示すように、その画像(元画像)30を複数の矩形のブロック(領域)31に分割する(ステップS102)。ここで、ブロック31のサイズは画像の解像度や利用目的に応じて適宜決められる。たとえば、縦4画素×横4画素(以下、4画素×4画素の様に表記する)の矩形のブロックに分割される。   FIG. 19 is a flowchart showing an example of BTC (Block Truncation Coding) encoding (compression) processing / decoding (decompression) processing conventionally used. First, image information of an image to be encoded is acquired (step S101), and the image (original image) 30 is divided into a plurality of rectangular blocks (areas) 31 as shown in FIG. 20 (step S102). Here, the size of the block 31 is appropriately determined according to the resolution of the image and the purpose of use. For example, it is divided into rectangular blocks of 4 vertical pixels × 4 horizontal pixels (hereinafter referred to as 4 pixels × 4 pixels).

分割した中の1ブロック(領域)を抽出し(ステップS103)、その領域内の各画素を類似階調を有する複数のグループにグループ化し、グループ毎に、識別番号(これをラベル番号とする)を付与すると共に、そのグループに所属する画素の階調値を代表する階調代表値を定義する(ステップS104)。たとえば、4画素×4画素の1ブロックに含まれる16画素を3つのグループに分け、ラベル番号1、2、3を付与し、ラベル番号1に対応する代表階調値と、ラベル番号2に対応する代表階調値と、ラベル番号3に対する代表階調値とを決定する、といったことが行われる。   One block (area) in the divided area is extracted (step S103), the pixels in the area are grouped into a plurality of groups having similar gradations, and an identification number (this is used as a label number) for each group. And a representative gradation value representative of the gradation values of the pixels belonging to the group is defined (step S104). For example, 16 pixels included in one block of 4 pixels × 4 pixels are divided into three groups, given label numbers 1, 2, and 3, corresponding to representative gradation values corresponding to label number 1 and label number 2. The representative gradation value to be determined and the representative gradation value for label number 3 are determined.

次に、そのブロック(領域)内の各画素にその画素が所属するグループのラベル番号を付与(この画素各々に付与されたラベル番号をラベル情報とする)して符号化する(ステップS105)。   Next, a label number of a group to which the pixel belongs is assigned to each pixel in the block (area) (the label number assigned to each pixel is used as label information) and encoded (step S105).

ステップS103〜S105の処理を、全ブロックについて終了するまで繰り返して行い(ステップS106;No、S107)、全ブロックについて終了すると(ステップS106;Yes)、符号化(圧縮)処理が終了する(圧縮終了)。該圧縮処理によって得た符号情報は、たとえば、画像メモリに記憶される。   The processes in steps S103 to S105 are repeated until all blocks are completed (step S106; No, S107). When all blocks are completed (step S106; Yes), the encoding (compression) process is completed (compression end). ). Code information obtained by the compression processing is stored in, for example, an image memory.

復号化(伸張)処理では、まず、復号化対象の符号情報を取得する(ステップS110)。次に、その中から1ブロック分の符号情報を抽出し(ステップS111)、各々のラベル情報(即ちラベル番号)を、そのラベル情報に対応した階調代表値に変換して復元し、画像情報を得る(ステップS112)。   In the decoding (decompression) process, first, code information to be decoded is acquired (step S110). Next, code information for one block is extracted from the list (step S111), each label information (ie, label number) is converted into a gradation representative value corresponding to the label information, restored, and image information is obtained. Is obtained (step S112).

ステップS111、S112の処理を、全ブロックについて終了するまで繰り返して行い(ステップS113;No、S114)、全ブロックについて終了すると(ステップS113;Yes)、復号化(伸張)処理が終了する(伸張終了)。   The processes in steps S111 and S112 are repeated until all blocks are completed (step S113; No, S114). When all blocks are completed (step S113; Yes), the decoding (decompression) process ends (decompression end). ).

図21は、上記符号化(圧縮)処理/復号化(伸張)処理における符号情報の生成や符号情報からの画像の復元を模式的に説明したものである。この例では、ブロックのサイズを縦横4画素としている。1つのブロック31に含まれる16個の画素各々は、Y(イエロ)、M(マゼンタ)、C(シアン)、K(ブラック)の色成分を有し、たとえば、各色8bit(0〜255)の画像情報で構成される。   FIG. 21 schematically illustrates the generation of code information and the restoration of an image from the code information in the encoding (compression) process / decoding (decompression) process. In this example, the block size is 4 pixels vertically and horizontally. Each of the 16 pixels included in one block 31 has color components of Y (yellow), M (magenta), C (cyan), and K (black). For example, each color has 8 bits (0 to 255). Consists of image information.

符号化(圧縮)処理では、元画像の1つのブロック31に所属する16個の画素を、階調値(色)の類似性に基づいて3つのグループに分割し、各グループに0〜2のラベル番号を割り当てると共に、画素各々にその画素が所属するグループのラベル番号をラベル情報として付与する。また、各グループにそのグループに所属する画素の階調値(色)を代表する階調代表値を設定する。そして、画素各々のラベル情報(図中の符号化画像32)と、3つのラベル番号に対応したYMCKの階調代表値(図中の階調代表値テーブル33)とをこのブロック31に対する符号情報として生成する。   In the encoding (compression) process, the 16 pixels belonging to one block 31 of the original image are divided into three groups based on the similarity of gradation values (colors), and each group includes 0-2. A label number is assigned, and a label number of a group to which the pixel belongs is assigned to each pixel as label information. In addition, a gradation representative value that represents the gradation value (color) of the pixels belonging to the group is set for each group. Then, the label information of each pixel (encoded image 32 in the figure) and the YMCK gradation representative values (gradation representative value table 33 in the figure) corresponding to the three label numbers are encoded information for this block 31. Generate as

たとえば、元画像の画素各々が各色8bit(0〜255)の画像情報を持っている場合、1ブロック分の画像情報は8bit×4色×16画素で512bitの情報量となる。これに対して符号化した状態では、各画素に0〜2のラベル情報(2bit)が付与され、また3つのラベル番号に対応したYMCKの階調代表値(32×3bit)が保持される。合計すると96+2×16=128bitとなる。したがって、符号化により、512/128=4倍の圧縮率を得る。   For example, when each pixel of the original image has image information of 8 bits (0 to 255) for each color, the image information for one block is 8 bits × 4 colors × 16 pixels and the information amount is 512 bits. On the other hand, in an encoded state, 0 to 2 label information (2 bits) is given to each pixel, and YMCK tone representative values (32 × 3 bits) corresponding to three label numbers are held. The total is 96 + 2 × 16 = 128 bits. Therefore, a compression rate of 512/128 = 4 times is obtained by encoding.

なお、ブロックのサイズを大きくすれば一組の階調代表値が符号化する画素数が増えるため圧縮率を向上できる傾向にあり、ブロックサイズを小さくすれば、ブロック内に存在する画素の多様性が弱まり、圧縮/伸張誤差が軽減する方向にある。また画像解像度が高いほど、1画素の欠陥は視認されにくくなり、圧縮/伸張誤差の許容範囲も広がることとなる。実用上はこれらのことを考慮し、縦横4画素(領域内の画素数は4×4=16画素)〜縦横16画素(同256画素)の範囲が良く用いられる。   Increasing the block size tends to improve the compression ratio because the number of pixels encoded by a set of representative gradation values increases, and reducing the block size reduces the diversity of pixels present in the block. Tends to weaken and reduce compression / decompression errors. In addition, as the image resolution is higher, a defect of one pixel becomes less visible and the allowable range of compression / decompression error is increased. In practical use, in consideration of these points, a range of 4 pixels vertically and horizontally (the number of pixels in the region is 4 × 4 = 16 pixels) to 16 pixels vertically and horizontally (256 pixels) is often used.

また、上記の例では階調代表値としてYMCKの組を保存したが、例えば白黒画像の場合、階調代表値は一次元ベクトル上に並ぶいくつかの離散値となる。そこで、階調代表値の最大値と最小値の2情報(または階調代表値の平均値と分布幅)を保存し、この2情報と予め設定した階調代表値の数とから中間の階調値を算出する手法などがある。これを利用し、YMCK等、複数の要素で構成されている画像でも、各々の要素を独立して白黒画像の如く符号化することもできる。   In the above example, the set of YMCK is stored as the gradation representative value. For example, in the case of a black and white image, the gradation representative value is several discrete values arranged on a one-dimensional vector. Therefore, two pieces of information (or the average value and the distribution width of the gradation representative value) of the maximum value and the minimum value of the gradation representative value are stored, and an intermediate floor is determined from the two information and the preset number of gradation representative values. There is a method for calculating a key value. By utilizing this, even in an image composed of a plurality of elements such as YMCK, each element can be encoded independently as a black and white image.

復号化では、階調代表値テーブル33を参照して、符号化画像32の各ラベル情報を対応する階調代表値に変換することによって画像情報(画像信号値)が復元される。   In decoding, image information (image signal value) is restored by referring to the gradation representative value table 33 and converting each label information of the encoded image 32 to a corresponding gradation representative value.

上記のように、BTCでは分割した各々の領域で独立して階調代表値を定めるので、領域境界を挟んで存在する類似階調値の画素情報が同一の階調代表値を有するグループに所属するとは限らず、領域に存在する画像情報の分布によっては目視可能な程度の階調のずれが生じる場合がある。これによって圧縮、伸張処理で用いた画像分割の境界領域が視認できる差(いわゆるブロックノイズ、ブロック歪み)として現れてしまう、という問題があった。図22は、元画像30と、これをBTCによって圧縮して伸張した後の復元画像34とを対比して示している。復元画像34ではブロック31毎の境界が視認可能となっており、ブロックノイズが生じている。   As described above, in the BTC, the gradation representative value is independently determined in each divided region, and therefore pixel information of similar gradation values existing across the region boundary belongs to a group having the same gradation representative value. However, this is not always true, and depending on the distribution of the image information existing in the region, there is a case where a gradation shift that can be visually observed occurs. As a result, there is a problem that the boundary area of the image division used in the compression / decompression process appears as a visible difference (so-called block noise, block distortion). FIG. 22 shows a comparison between the original image 30 and a restored image 34 obtained by compressing and expanding the original image 30 using BTC. In the restored image 34, the boundary of each block 31 is visible, and block noise is generated.

ブロックノイズの軽減法としては、領域境界を挟んで存在する画素情報を比較し、階調差が閾値以下の場合に平滑化フィルタを施す手法が各種提案されている。   Various methods for reducing block noise have been proposed in which pixel information existing across a region boundary is compared and a smoothing filter is applied when the gradation difference is equal to or less than a threshold value.

その一例として、特許文献1には、復元後の画像を解析してブロック間の隣接する画素同士の差分が最も小さい方向を探し出し、その方向が元画像では階調差が無かった方向であると判定し、その方向へ平滑化処理を施す技術が開示されている。   As an example, Patent Document 1 discloses that the restored image is analyzed to find a direction in which the difference between adjacent pixels between blocks is the smallest, and that direction is a direction in which there is no gradation difference in the original image. A technique for determining and performing a smoothing process in that direction is disclosed.

また、復号化した画像情報を解析して平坦な画像分布か否か判定し、その判定結果を元に双3次曲線による補間の適用可否を判断し、選択的にスムージングを行う技術(たとえば、特許文献2参照)や、復号化後の画像を解析して矩形ブロック両端の境界段差を算出し、その段差をつなぐような関数で矩形ブロック内の各画素の階調値を補正する技術(たとえば、特許文献3参照)がある。   Further, the decoded image information is analyzed to determine whether or not the image distribution is flat, and based on the determination result, it is determined whether or not to apply interpolation using a bicubic curve, and a technique for performing smoothing selectively (for example, Patent Document 2) or a technique for calculating a boundary step at both ends of a rectangular block by analyzing a decoded image and correcting a gradation value of each pixel in the rectangular block with a function that connects the steps (for example, Patent Document 3).

特開2005−5865号公報Japanese Patent Laying-Open No. 2005-5865 特開平9−65330号公報JP 9-65330 A 特開2005−236955号公報JP 2005-236955 A

特許文献1に開示の技術では、平滑化処理に複雑な判定処理が入り、誤判定の危険がある。また平滑化処理に用いる参照画素が必然的に少なくなり、ブロックノイズを軽減する十分な効果を得難い。特許文献2に開示の技術では、双3次曲線を求めたり、画素信号によるブロックごとの判定を必要としたりするので、処理が複雑である。また平坦な画像分布の領域でしか効果が発揮されない。   In the technique disclosed in Patent Document 1, complicated determination processing is included in the smoothing processing, and there is a risk of erroneous determination. In addition, the number of reference pixels used for the smoothing process is inevitably reduced, and it is difficult to obtain a sufficient effect of reducing block noise. In the technique disclosed in Patent Document 2, since a bicubic curve is obtained or determination for each block is required based on pixel signals, the processing is complicated. The effect is exhibited only in a flat image distribution region.

特許文献3に開示の技術では、ブロック両端の段差を連続的につなぐため、ブロック段差は見え難くなるが、段差の算出に時間がかかり、特にブロック内に多様な階調が存在する場合には、ブロック両端を良好に連結するための処理が複雑になる。さらに、既にノイズが存在する復号信号から画像の段差を良好に補正することは困難である。   In the technique disclosed in Patent Document 3, since the steps at both ends of the block are continuously connected, the block steps are difficult to see, but it takes time to calculate the steps, especially when there are various gradations in the block. The process for connecting the both ends of the block well becomes complicated. Furthermore, it is difficult to satisfactorily correct the step of the image from the decoded signal in which noise already exists.

このように、既存の技術は、復元後の画像に対して、その境界領域の画素にフィルタ処理を施す必要があるので、処理が複雑で膨大な回路サイズを要するという問題があった。また平滑化処理が強い場合には鮮鋭性劣化が生じて画質劣化を招いてしまう。さらにこの鮮鋭性劣化を防止しようとすると、より複雑な処理が必要になるという問題があった。   As described above, the existing technique has a problem that the processing is complicated and requires an enormous circuit size because it is necessary to filter the pixels in the boundary region of the restored image. In addition, when the smoothing process is strong, sharpness deterioration occurs and image quality deterioration is caused. Furthermore, when trying to prevent this sharpness degradation, there is a problem that more complicated processing is required.

本発明は、上記の問題を解決しようとするものであり、比較的簡単な処理でブロックノイズを軽減することのできる画像処理方法、画像処理装置を提供することを目的としている。   An object of the present invention is to provide an image processing method and an image processing apparatus capable of reducing block noise by a relatively simple process.

かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。   The gist of the present invention for achieving the object lies in the inventions of the following items.

[1]画像を複数の領域に分割し、各領域を、この領域に属する画素の階調値を代表する複数の階調代表値とこの領域に属するそれぞれの画素が前記複数の階調代表値の中のいずれに対応するかを示すラベル情報とで表わすように符号化する、もしくは前記ラベル情報をこのラベル情報に対応する階調代表値に基づいて階調値に変換することによって復号化する画像処理方法において、
処理対象の領域に係る注目する階調代表値を、隣接領域の階調代表値に基づいて補正して、前記符号化もしくは前記復号化を行う
ことを特徴とする画像処理方法。
[1] An image is divided into a plurality of areas, and each area is divided into a plurality of gradation representative values representing the gradation values of pixels belonging to this area, and each pixel belonging to this area is represented by the plurality of gradation representative values. It encodes so that it may represent with label information which shows which of these corresponds, or it decodes by converting the said label information into a gradation value based on the gradation representative value corresponding to this label information In the image processing method,
An image processing method comprising: performing the encoding or the decoding by correcting a target gradation representative value related to a processing target region based on a gradation representative value of an adjacent region.

上記発明では、処理対象の領域に係る注目する階調代表値を隣接領域の階調代表値に基づいて補正することで、画像信号を直接補正することなく、簡単に画像信号の補正ができ、ブロックノイズ発生が少ない高画質の符号化/復号化処理が実現される。「階調代表値を補正して符号化もしくは復号化を行う」とは、たとえば、符号化時は、階調代表値そのものを補正することであり、復号化時は、ある画素のラベル情報を復号化するときにそのラベル情報に対応する階調代表値を補正してその画素の階調値を求めること等である。   In the above invention, the image signal can be easily corrected without directly correcting the image signal by correcting the representative gradation value of the region to be processed based on the gradation representative value of the adjacent region, High-quality encoding / decoding processing with less block noise is realized. “Coding or decoding by correcting the gradation representative value” means, for example, correcting the gradation representative value itself at the time of encoding, and label information of a certain pixel at the time of decoding. For example, the gradation representative value corresponding to the label information is corrected at the time of decoding to obtain the gradation value of the pixel.

[2]復号化時に、前記ラベル情報をこのラベル情報に対応する階調代表値に基づいて階調値に変換する際に、該ラベル情報に対応する画素の隣接境界からの距離を加味して、前記階調代表値に対する前記補正を行う
ことを特徴とする[1]に記載の画像処理方法。
[2] At the time of decoding, when converting the label information into a gradation value based on the gradation representative value corresponding to the label information, the distance from the adjacent boundary of the pixel corresponding to the label information is considered. The image processing method according to [1], wherein the correction is performed on the gradation representative value.

上記発明では、ラベル情報に係る画素の隣接境界からの距離を加味して階調代表値の補正が行われる。すなわち、あるラベル情報を階調代表値に基づいて階調値に変換する際に、その階調代表値に対する補正量がそのラベル情報に係る画素の隣接境界からの距離に応じて調整される。このように、画像信号を直接補正することなく、距離に対応した補正量で復元時の階調代表値を補正するので、処理量が少なく、かつ、滑らかでブロックノイズの発生が少ない高画質の復号化処理が実現される。   In the above invention, the gradation representative value is corrected in consideration of the distance from the adjacent boundary of the pixel related to the label information. That is, when converting certain label information into a gradation value based on the gradation representative value, the correction amount for the gradation representative value is adjusted according to the distance from the adjacent boundary of the pixel related to the label information. In this way, since the gradation representative value at the time of restoration is corrected with the correction amount corresponding to the distance without directly correcting the image signal, the processing amount is small, and the generation of high-quality images with smooth and low block noise is achieved. Decryption processing is realized.

[3]前記注目する階調代表値との差分が所定の閾値以下に収まる隣接領域の階調代表値に基づいて前記補正を行う
ことを特徴とする[2]に記載の画像処理方法。
[3] The image processing method according to [2], wherein the correction is performed based on a gradation representative value of an adjacent region where a difference from the noted gradation representative value falls below a predetermined threshold.

上記発明では、隣接領域の階調代表値のうち、注目する階調代表値との差分が所定の閾値以下に収まるものに基づいて、注目する階調代表値の補正が行われる。大きな階調差を有する階調代表値間を平滑化しないので、副作用の少ない高画質の符号化/復号化処理が実現される。   In the above invention, the gradation representative value of interest is corrected based on the difference between the gradation representative value of the adjacent region and the difference of the gradation representative value of interest within a predetermined threshold value or less. Since gradation representative values having a large gradation difference are not smoothed, high-quality encoding / decoding processing with few side effects is realized.

[4]符号化時に、前記注目する階調代表値をこの階調代表値と隣接領域の階調代表値との差分が小さくなるように補正し、該補正後の階調代表値に基づいて前記処理対象の領域に属する画素のラベル情報を修正する
ことを特徴とする[3]に記載の画像処理方法。
[4] At the time of encoding, the gradation representative value of interest is corrected so that the difference between the gradation representative value and the gradation representative value of the adjacent region is small, and based on the corrected gradation representative value The image processing method according to [3], wherein label information of pixels belonging to the region to be processed is corrected.

上記発明では、画像信号の符号化時に、ブロックノイズが小さくなるように階調代表値の補正を行うので、復元画素を直接補正することなく、簡単にブロックノイズの発生を軽減した高画質の符号化/復号化処理が実現される。   In the above invention, the gradation representative value is corrected so as to reduce the block noise when the image signal is encoded. Therefore, the high-quality code that easily reduces the occurrence of block noise without directly correcting the restored pixels. The decoding / decoding process is realized.

[5]前記注目する階調代表値との差分が前記閾値以下に収まる隣接領域の階調代表値の数、または前記数と隣接方向との組み合わせ、のうちの少なくとも一方に基づいて、前記距離を加味した前記補正の方法を変更する
ことを特徴とする[3]または[4]に記載の画像処理方法。
[5] The distance based on at least one of the number of gradation representative values of the adjacent region where the difference from the target gradation representative value falls below the threshold value, or a combination of the number and the adjacent direction. The image processing method according to [3] or [4], wherein the correction method in consideration of the above is changed.

上記発明では、たとえば注目領域を挟む隣接領域各々の階調代表値と関連する注目領域の階調代表値がある場合、隣接領域各々の間で階調の連続性がより向上するよう補正量を算出することができる。これにより、ブロックノイズの発生をより一層軽減した高画質の符号化/復号化処理が実現される。   In the above invention, for example, when there is a gradation representative value of the attention area related to the gradation representative value of each adjacent area sandwiching the attention area, the correction amount is set so that the continuity of gradation between the adjacent areas is further improved. Can be calculated. As a result, high-quality encoding / decoding processing that further reduces occurrence of block noise is realized.

[6]復号化時に、注目するラベル情報をこのラベル情報に対応する階調代表値に基づいて階調値に変換する際に、前記階調代表値との差分が前記閾値以下に収まる隣接領域の階調代表値が複数存在する場合は、前記注目するラベル情報に対応する画素と、前記複数存在する階調代表値のそれぞれに対応付けされているラベル情報に対応する画素との位置関係に基づいて前記補正を行う
ことを特徴とする[3]乃至[5]のいずれか一項に記載の画像処理方法。
[6] Neighboring regions in which the difference from the gradation representative value falls below the threshold value when converting the label information of interest into a gradation value based on the gradation representative value corresponding to the label information during decoding When there are a plurality of gradation representative values, the positional relationship between the pixel corresponding to the target label information and the pixel corresponding to the label information associated with each of the plurality of gradation representative values exists. The image processing method according to any one of [3] to [5], wherein the correction is performed on the basis of the correction.

上記発明では、より関連の高い画素同士の関係に基づいて補正が行われて、より好ましい符号化/復号化処理が実現される。   In the above invention, correction is performed based on the relationship between pixels that are more related to each other, and a more preferable encoding / decoding process is realized.

[7]符号化時に、前記注目する階調代表値との差分が所定の閾値以下に収まる隣接領域の階調代表値に基づいて、前記差分が小さくなるように前記補正を行うと共に、該補正後の階調代表値に基づいて前記処理対象の領域に属する画素のラベル情報を修正する
ことを特徴とする[1]に記載の画像処理方法。
[7] At the time of encoding, the correction is performed so that the difference becomes small based on the gradation representative value of an adjacent region where the difference from the target gradation representative value falls within a predetermined threshold value or less. The image processing method according to [1], wherein label information of pixels belonging to the processing target area is corrected based on a later representative gradation value.

上記発明では、画像信号の符号化時に、ブロックノイズが小さくなるように階調代表値の補正を行うので、復元画素を直接補正することなく、簡単にブロックノイズの発生を軽減した高画質の符号化/復号化処理が実現される。   In the above invention, the gradation representative value is corrected so as to reduce the block noise when the image signal is encoded. Therefore, the high-quality code that easily reduces the occurrence of block noise without directly correcting the restored pixels. The decoding / decoding process is realized.

[8]前記注目する階調代表値との差分が前記閾値以下に収まる隣接領域の階調代表値が複数存在する場合は、前記複数存在する階調代表値の平均値に、または前記複数存在する階調代表値の中で前記注目する階調代表値により近い階調代表値を抽出しその抽出した階調代表値の平均値に、より近づくように前記補正を行う
ことを特徴とする[7]に記載の画像処理方法。
[8] When there are a plurality of gradation representative values in an adjacent region where the difference from the target gradation representative value falls below the threshold value, the average value of the plurality of gradation representative values or the plurality of gradation representative values exist A gradation representative value closer to the target gradation representative value is extracted from the gradation representative values to be selected, and the correction is performed so as to be closer to the average value of the extracted gradation representative values. 7].

上記発明では、複数の階調代表値間における類似度を好ましく評価して近似させることができ、複数の隣接領域に関わる複雑な階調代表値の関係が存在する場合にも、領域間ノイズが少ない、好ましい符号化/復号化処理が実現される。   In the above invention, the similarity between a plurality of gradation representative values can be preferably evaluated and approximated, and even when there is a complicated relationship between gradation representative values related to a plurality of adjacent areas, the noise between the areas is reduced. Less preferred encoding / decoding process is realized.

[9]前記閾値は、注目する階調代表値および隣接する領域に係る全階調代表値を母集団とする統計、または、前記注目する階調代表値との差分が第2の閾値以下に収まる隣接領域の階調代表値を母集団とする統計、のうちの少なくとも一方の統計に基づいて決定される
ことを特徴とする[7]または[8]に記載の画像処理方法。
[9] The threshold value is a statistic in which a representative gradation representative value and all gradation representative values related to adjacent regions are a population, or a difference from the attention gradation representative value is equal to or less than a second threshold value. The image processing method according to [7] or [8], wherein the image processing method is determined on the basis of at least one of statistics including a gray scale representative value of an adjacent region that falls within the population.

上記発明では、補正に係る類似の階調代表値の範囲(閾値)を、画像領域の特性に応じて適切に求めることができる。   In the above invention, a range (threshold value) of similar gradation representative values related to correction can be appropriately obtained according to the characteristics of the image region.

[10]前記統計は、分散または標準偏差の算出、相互の差分が所定値以下のサブグループへの分類、のうちの少なくとも1つを含む
ことを特徴とする[9]に記載の画像処理方法。
[10] The image processing method according to [9], wherein the statistics include at least one of calculation of variance or standard deviation and classification into subgroups in which a mutual difference is a predetermined value or less. .

上記発明では、これら統計処理によって、好ましい閾値を求めることができる。   In the said invention, a preferable threshold value can be calculated | required by these statistical processing.

[11]画像を複数の領域に分割し、各領域を、この領域に属する画素の階調値を代表する複数の階調代表値とこの領域に属するそれぞれの画素が前記複数の階調代表値の中のいずれに対応するかを示すラベル情報とで表わすように符号化する、もしくは前記ラベル情報をこのラベル情報に対応する階調代表値に基づいて階調値に変換することによって復号化する画像処理装置において、
処理対象の領域に係る注目する階調代表値を、隣接領域の階調代表値に基づいて補正して、前記符号化もしくは前記復号化を行う
ことを特徴とする画像処理装置。
[11] The image is divided into a plurality of areas, and each area is divided into a plurality of gradation representative values representing the gradation values of the pixels belonging to the area, and each pixel belonging to the area is represented by the plurality of gradation representative values. It encodes so that it may represent with label information which shows which of these corresponds, or it decodes by converting the said label information into a gradation value based on the gradation representative value corresponding to this label information In the image processing apparatus,
An image processing apparatus, wherein the encoding representative or the decoding is performed by correcting a representative gradation representative value relating to a processing target region based on a gradation representative value of an adjacent region.

本発明の画像処理方法、画像処理装置によれば、分割領域単位の画像の符号化/復号化を、比較的簡単な処理でブロックノイズを軽減して行うことができる。   According to the image processing method and the image processing apparatus of the present invention, it is possible to perform encoding / decoding of an image in units of divided areas while reducing block noise by a relatively simple process.

本発明に係る画像処理方法によって画像の符号化・復号化を行う画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus which encodes / decodes an image with the image processing method which concerns on this invention. ある画像の領域境界を跨る部分の断面を、横軸に画像上の位置、縦軸に階調値をとって表した説明図である。It is explanatory drawing which represented the cross section of the part straddling the area | region boundary of a certain image, taking the position on an image on the horizontal axis, and the gradation value on the vertical axis | shaft. 本発明に係る復号化(伸張)処理を示す流れ図である。6 is a flowchart showing a decoding (decompression) process according to the present invention. 復号化対象の領域の注目ラベルと組をなす隣接領域のラベルを示す説明図である。It is explanatory drawing which shows the label of the adjacent area | region which makes a pair with the attention label of the area | region of decoding object. ラベル(階調代表値)の組の代表的パターンと、それぞれのパターンに対する補正方法(補正特性)とを示す説明図である。It is explanatory drawing which shows the representative pattern of the group of a label (tone representative value), and the correction method (correction characteristic) with respect to each pattern. 組をなす隣接領域のラベル(に対応する階調代表値)のうち注目ラベルに近い距離のラベルを優先する様子を示す説明図である。It is explanatory drawing which shows a mode that priority is given to the label of the distance close | similar to an attention label among the labels (the gradation representative value corresponding to) of the adjacent area | region which makes a group. 復号化対象の領域にあるラベルaに対して組をなすラベルが、左側の隣接領域にあるラベルbと、上側の隣接領域にあるラベルcである場合を例示した説明図である。It is explanatory drawing which illustrated the case where the label which makes a pair with respect to the label a in the decoding object area | region is the label b in the left adjacent area, and the label c in the upper adjacent area. 復号化対象の領域にあるラベルaに対して組をなすラベルが、左側の隣接領域にあるラベルbと、上側の隣接領域にあるラベルcと、右側の隣接領域にあるラベルd、ラベルeである場合を例示した説明図である。The labels forming a pair with the label a in the decoding target area are the label b in the left adjacent area, the label c in the upper adjacent area, the label d and the label e in the right adjacent area. It is explanatory drawing which illustrated a certain case. 復号化対象の領域にあるラベルaに対して組をなすラベルが、左側の隣接領域にあるラベルbと、上側の隣接領域にあるラベルcと、右側の隣接領域にあるラベルd、ラベルeと、下側の隣接領域にあるラベルf、ラベルgである場合を例示した説明図である。Labels forming a pair with the label a in the decoding target area include a label b in the left adjacent area, a label c in the upper adjacent area, a label d and a label e in the right adjacent area, It is explanatory drawing which illustrated the case where it is the label f in the lower adjacent area | region, and the label g. 補正対象の領域と隣接領域との関係を示す説明図である。It is explanatory drawing which shows the relationship between the area | region of correction | amendment, and an adjacent area | region. 本発明に係る符号化(圧縮)処理を示す流れ図である。It is a flowchart which shows the encoding (compression) process based on this invention. 図11のステップS309の処理(ラベルの付け直し)を詳細に示す流れ図である。12 is a flowchart showing in detail a process (relabeling) in step S309 in FIG. 階調値が2変量の場合について、階調代表値の差分(距離)が閾値以下のものを組にする場合を模式的に示す説明図である。It is explanatory drawing which shows typically the case where the difference (distance) of a gradation representative value makes a group below a threshold value about the case where a gradation value is bivariate. 関連領域を含む階調代表値を信号値空間にプロットし、その分布の大きさから閾値を決定する場合を模式的に示す説明図である。It is explanatory drawing which shows typically the case where the gradation representative value containing a related area is plotted on signal value space, and a threshold value is determined from the magnitude | size of the distribution. 多数の隣接領域のラベル(階調代表値)が閾値内に入る場合に統計的手法でより小さいグループを決定して補正する場合を模式的に示す説明図である。It is explanatory drawing which shows typically the case where a smaller group is determined and correct | amended with a statistical method, when the label (gradation representative value) of many adjacent areas falls within a threshold value. 多数の隣接領域のラベル(階調代表値)が閾値内に入った場合、より小さな閾値を改めて定義する場合を模式的に示す説明図である。FIG. 11 is an explanatory diagram schematically illustrating a case where a smaller threshold is defined again when a number of labels (tone representative values) of adjacent regions fall within the threshold. ラベル(に対応する階調代表値)間距離を横軸にとった度数分布例を示す説明図である。It is explanatory drawing which shows the example of frequency distribution which took the distance between the labels (the gradation representative value corresponding to) on the horizontal axis. 画像属性に応じて処理方法の選択する場合の動作を示す流れ図である。It is a flowchart which shows operation | movement in the case of selecting a processing method according to an image attribute. 従来から使用されているBTC符号化(圧縮)処理/復号化(伸張)処理を示す流れ図である。It is a flowchart which shows the BTC encoding (compression) process / decoding (decompression) process conventionally used. 元画像を複数の矩形のブロック(領域)に分割する様子を示す説明図である。It is explanatory drawing which shows a mode that an original image is divided | segmented into a some rectangular block (area | region). 従来のBTC符号化(圧縮)処理/復号化(伸張)処理における符号情報の生成および符号情報からの復元を模式的に示す説明図である。It is explanatory drawing which shows typically the production | generation of the code information in the conventional BTC encoding (compression) process / decoding (decompression) process, and the decompression | restoration from code information. 元画像とこれをBTCによって圧縮して伸張した後の復元画像とを対比して示す説明図である。It is explanatory drawing which contrasts and shows the original image and the decompressed | restored image after compressing this by BTC and expanding.

以下、図面に基づき本発明の実施の形態を説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明に係る画像処理方法によって画像の符号化・復号化を行う画像処理装置5の構成例を示している。画像処理装置5は、画像を符号化する符号化処理部10と、符号化処理部10で符号化して得たデータ(符号情報と呼ぶ。)を記憶する画像メモリ6と、画像メモリ6から読み出された符号情報を入力してこれを復号化する復号化処理部20とから構成される。   FIG. 1 shows a configuration example of an image processing apparatus 5 that performs image encoding / decoding by an image processing method according to the present invention. The image processing apparatus 5 includes an encoding processing unit 10 that encodes an image, an image memory 6 that stores data (referred to as code information) that is encoded by the encoding processing unit 10, and reads from the image memory 6. It comprises a decoding processing unit 20 for inputting the decoded code information and decoding it.

符号化処理部10は、符号化対象の元画像の画像情報を入力する画像入力部11と、画像入力部11によって入力した画像情報を、複数の領域(ブロック)に分割する画像分割部12と、画像分割部12によって分割された各領域の画像情報を領域単位に符号化するBTC符号化部13と、BTC符号化部13で符号化して得たデータを、ブロックノイズが軽減されるように補正する符号補正部14とを備えて構成される。   The encoding processing unit 10 includes an image input unit 11 that inputs image information of an original image to be encoded, and an image dividing unit 12 that divides the image information input by the image input unit 11 into a plurality of regions (blocks). The BTC encoding unit 13 that encodes the image information of each region divided by the image dividing unit 12 in units of regions, and the data obtained by encoding the BTC encoding unit 13 so that block noise is reduced. And a code correction unit 14 for correction.

復号化処理部20は、画像メモリ6から符号情報を読み出して入力する符号入力部21と、符号入力部21によって入力した符号情報を、ブロックノイズが軽減されるように補正を行いながら復号化するBTC復号化部22と、BTC復号化部22が出力する復号化された画像情報を出力する画像出力部23とを備えて構成される。BTC復号化部22が有する階調代表値補正部24は、符号情報を復号化する際にブロックノイズが軽減されるように階調代表値を補正する機能を果たす。   The decoding processing unit 20 reads the code information from the image memory 6 and inputs the code input unit 21 and the code information input by the code input unit 21 while performing correction so as to reduce block noise. A BTC decoding unit 22 and an image output unit 23 that outputs decoded image information output from the BTC decoding unit 22 are configured. The gradation representative value correction unit 24 included in the BTC decoding unit 22 functions to correct the gradation representative value so that block noise is reduced when the code information is decoded.

図1の画像処理装置5には前記各々の処理部の起動や終了等の動作を制御する制御部、オペレータによる画像処理の実行指示等を受け付ける指示入力部、現在の処理状況等を表示する状態表示部、等、図示しない装備が適宜具備されても良い。また、図1の画像処理装置5は符号化処理部10と復号化処理部20、画像メモリ6を一つの装置としたが、これらを別体の装置とし、間をLAN(Local Area Network)等の情報通信手段で連携させても良い。   The image processing apparatus 5 in FIG. 1 includes a control unit that controls operations such as activation and termination of each processing unit, an instruction input unit that receives an image processing execution instruction by an operator, and a state in which the current processing status is displayed. Equipment (not shown) such as a display unit may be appropriately provided. In addition, the image processing apparatus 5 in FIG. 1 includes the encoding processing unit 10, the decoding processing unit 20, and the image memory 6 as one device, but these are separate devices, and a LAN (Local Area Network) or the like is provided between them. The information communication means may be linked.

ここでは、まず、本発明の復号化方法(復号化処理部20による復号化処理)について説明する。本発明において復号化対象の符号情報は、図19に示した従来から使用されているBTC符号化(圧縮)処理で符号化されているものであっても良いし、後述する本発明に係る符号化処理で符号化されたものでもかまわない。   Here, first, the decoding method of the present invention (decoding processing by the decoding processing unit 20) will be described. In the present invention, the code information to be decoded may be encoded by the BTC encoding (compression) process used conventionally shown in FIG. 19, or the code according to the present invention described later. It may be encoded by the encoding process.

本発明に係る復号化処理では、復号化対象のブロック(領域)に係る各階調代表値を、隣接領域の階調代表値に基づいて補正して、復号化を行う。より詳細には、ある画素のラベル情報を階調値に変換して復号化するときに、そのラベル情報に対応する階調代表値(注目する階調代表値)を、その階調代表値との差分が閾値以下に収まる隣接領域の階調代表値に基づいて補正し、その補正した階調値をそのラベル情報に対する復元階調値とする。   In the decoding process according to the present invention, decoding is performed by correcting each gradation representative value related to the block (area) to be decoded based on the gradation representative value of the adjacent area. More specifically, when converting the label information of a certain pixel into a gradation value and decoding it, the gradation representative value corresponding to the label information (the representative gradation representative value) is referred to as the gradation representative value. Is corrected on the basis of the gradation representative value of the adjacent region where the difference is within a threshold value or less, and the corrected gradation value is set as a restored gradation value for the label information.

すなわち、注目する階調代表値との差分が閾値以下の階調代表値が隣接領域に存在する場合は、元画像では類似の階調値であった画素がブロック単位に符号化する際に異なる階調代表値で表わされたものであると判断し、その差分によって領域境界に生じる階調値の段差が緩和されるように階調代表値を補正して復号化を行う。また上記階調値の差分を領域境界において滑らかにつなぐために、ラベル情報に対応する画素の隣接境界からの距離を加味して、そのラベル情報を階調代表値に基づいて復元階調値に変換する際の補正量を決定する。   That is, when there is a gradation representative value whose difference from the gradation representative value of interest is equal to or less than the threshold value in an adjacent region, pixels that have similar gradation values in the original image differ when encoded in block units. It is determined that the value is represented by the gradation representative value, and decoding is performed by correcting the gradation representative value so that the difference in gradation value generated at the region boundary is relaxed by the difference. In addition, in order to smoothly connect the difference between the gradation values at the region boundary, the distance from the adjacent boundary of the pixel corresponding to the label information is added, and the label information is converted into the restored gradation value based on the gradation representative value. The correction amount for conversion is determined.

図2は、ある画像の領域境界(1点鎖線)を跨る部分の断面を、横軸に画像上の位置、縦軸に階調値をとって表したものである。同図では、簡単のために1色分の階調についてのみ示してある。領域aの符号情報が示す階調代表値には、ラベル番号1aの階調代表値と、ラベル番号2aの階調代表値と、ラベル番号3aの階調代表値が存在し、領域aと隣接する領域bの符号情報が示す階調代表値には、ラベル番号1bの階調代表値と、ラベル番号2bの階調代表値と、ラベル番号3bの階調代表値が存在している。   FIG. 2 shows a cross-section of a portion straddling a region boundary (one-dot chain line) of an image, with the horizontal axis representing the position on the image and the vertical axis representing the gradation value. In the figure, for the sake of simplicity, only the gradation for one color is shown. The gradation representative value indicated by the code information of the area a includes the gradation representative value of the label number 1a, the gradation representative value of the label number 2a, and the gradation representative value of the label number 3a, and is adjacent to the area a. In the gradation representative value indicated by the code information of the area b, there are a gradation representative value with label number 1b, a gradation representative value with label number 2b, and a gradation representative value with label number 3b.

同図において、領域aのラベル1a、ラベル3aについては、差分が閾値Th以下になる階調代表値が領域bに存在しない。ラベル2aについては領域bのラベル2bとの差分が閾値Th以下になっているので、元画像においては同一階調値(より近い階調値)であったと想定される。そこで、領域aに所属するラベル2aの画素を復元するときは、ラベル2aに対応する階調代表値を補正して復元階調値を決定する。   In the figure, for the label 1a and label 3a in the region a, there is no representative gradation value in the region b where the difference is equal to or less than the threshold Th. Since the difference between the label 2a and the label 2b in the region b is equal to or less than the threshold Th, it is assumed that the label 2a has the same gradation value (closer gradation value) in the original image. Therefore, when restoring the pixel of the label 2a belonging to the area a, the restored gradation value is determined by correcting the gradation representative value corresponding to the label 2a.

ここでは、隣接領域のラベル(階調代表値)間を、点線で示すように滑らかに連結する「隣接間距離」−「修正階調値」の特性41を定義し、この特性に基づいて補正する。たとえば、注目画素が領域境界にあれば、ラベル2aの階調代表値とラベル2bの階調代表値の中央値とし、領域境界から領域a側へ1画素離れるとラベル2aの階調代表値により近い値とし、2画素ならさらにラベル2aの階調代表値に近い値にする。このように、復元時に補正するので、従来のように復元後の画像に対して空間フィルタ処理を用いることなく、領域境界ノイズ(ブロックノイズ)を軽減することができる。   Here, a characteristic 41 of “distance between adjacent” and “corrected gradation value” that smoothly connects the labels (representative gradation values) of adjacent areas as shown by dotted lines is defined, and correction is performed based on this characteristic. To do. For example, if the pixel of interest is at the region boundary, the median value of the representative gradation value of the label 2a and the representative gradation value of the label 2b is used. It is set to a close value, and if it is 2 pixels, it is set to a value closer to the gradation representative value of the label 2a. As described above, since correction is performed at the time of restoration, it is possible to reduce area boundary noise (block noise) without using a spatial filter process on the restored image as in the past.

「隣接間距離」−「修正階調値」の特性は算術的に求めてもよいが、簡単には特性をあらかじめ求めておき、参照テーブル(LUT:ルックアップテーブル)で保持しておけばよい。   The characteristic of “distance between adjacent points”-“corrected gradation value” may be obtained arithmetically, but simply, the characteristic may be obtained in advance and held in a reference table (LUT: lookup table). .

図3は、本発明に係る復号化(伸張)処理を示す流れ図である。復号化対象の符号情報を画像メモリ6から取得する(ステップS201)。次に、その中から処理対象とする1ブロック分の符号情報を抽出し(ステップS202)、さらにその隣接するブロックの符号情報を抽出する(ステップS203)。そして、各々の階調代表値を比較し、隣接領域間で階調代表値が近似する(差分が閾値以下の)ラベル番号の組を抽出する(ステップS204)。   FIG. 3 is a flowchart showing a decoding (decompression) process according to the present invention. Code information to be decoded is acquired from the image memory 6 (step S201). Next, code information for one block to be processed is extracted from among them (step S202), and further, code information of the adjacent block is extracted (step S203). Then, the respective gradation representative values are compared, and a set of label numbers whose gradation representative values are approximated between adjacent regions (the difference is equal to or smaller than a threshold value) is extracted (step S204).

次に、復元する画素のラベル情報を取得し(ステップS205)、これが先ほど抽出したラベル番号の組に該当するか否かを判断する(ステップS206)。   Next, the label information of the pixel to be restored is acquired (step S205), and it is determined whether or not this corresponds to the set of label numbers extracted earlier (step S206).

ラベル番号の組に該当しない場合は(ステップS206;No)、当該ラベル情報に対応する階調代表値で画像を復元する(ステップS208)。該当する場合は(ステップS206;Yes)、その画素がブロック境界近傍(組をなすラベル番号の存在する隣接領域との境界近傍)か否かを判断し(ステップS207)、近傍でない場合は(ステップS207;No)、該ラベル情報に対応する階調代表値で画像を復元する(ステップS208)。境界近傍の場合は(ステップS207;Yes)、図2で示した特性に基づいて補正した復元階調値でこの画素を復元する(ステップS209)。   If it does not correspond to the set of label numbers (step S206; No), the image is restored with the gradation representative value corresponding to the label information (step S208). If applicable (step S206; Yes), it is determined whether or not the pixel is in the vicinity of the block boundary (in the vicinity of the boundary with the adjacent area where the pair of label numbers exist) (step S207). S207; No), the image is restored with the representative gradation value corresponding to the label information (step S208). In the case of the vicinity of the boundary (step S207; Yes), this pixel is restored with the restored gradation value corrected based on the characteristics shown in FIG. 2 (step S209).

ステップS208またはS209にて当該画素を復元した後、このブロック(領域)の全画素の復元が終了したか否かを判断し(ステップS210)、全画像処理終了でなければ(ステップS210;No)、処理対象にする次の画素を抽出して(ステップS212)ステップS205へ移行し、処理を継続する。このブロックの全画素について復元終了の場合は(ステップS210;Yes)、全ブロックについて復元終了か否かを調べ(ステップS211)、全ブロック復元終了でない場合は(ステップS211;No)、処理対象の次のブロックを抽出して(ステップS213)ステップS202へ移行し、処理を継続する。全ブロック復元終了の場合は(ステップS211;Yes)、復元完了となって本処理を終了する。   After restoring the pixel in step S208 or S209, it is determined whether or not the restoration of all the pixels in this block (area) has been completed (step S210). If all the image processing has not been completed (step S210; No) Then, the next pixel to be processed is extracted (step S212), the process proceeds to step S205, and the process is continued. When restoration of all the pixels of this block is completed (step S210; Yes), it is checked whether or not restoration is finished for all blocks (step S211). When restoration of all blocks is not completed (step S211; No), The next block is extracted (step S213), the process proceeds to step S202, and the process is continued. If all blocks have been restored (step S211; Yes), restoration is complete and this process ends.

注目している階調代表値に対して差分が閾値以下に収まる隣接領域の階調代表値は複数存在する場合がある。図4に示すように、復号化対象のブロック(領域)42に対して隣接するブロック43はその四方にあるので、注目ラベル(該ラベルに対応する階調代表値)と組になるラベル(隣接領域にある類似の階調代表値)は四方に存在する可能性があり、さらには1つの隣接ブロック(隣接領域)の中に、注目ラベル(に対応する階調代表値)との差分が閾値以下のラベル(階調代表値)が2以上存在する場合もある。図4は、注目しているラベルaに対して上下左右の隣接領域43に、対応する階調代表値相互の差分が閾値以下になるラベルb〜ラベルgが存在している場合を例示している。   There may be a plurality of gradation representative values in adjacent areas where the difference falls below a threshold value with respect to the gradation representative value of interest. As shown in FIG. 4, since the block 43 adjacent to the block (area) 42 to be decoded is on its four sides, a label (adjacent) paired with the target label (representative gradation value corresponding to the label) Similar gradation representative values in the area) may exist in all directions, and the difference from the target label (representative gradation representative value) in one adjacent block (adjacent area) is a threshold value. There may be two or more of the following labels (representative gradation values). FIG. 4 exemplifies a case where labels b to g in which the difference between the corresponding gradation representative values is equal to or less than the threshold value exist in the adjacent region 43 in the vertical and horizontal directions with respect to the target label a. Yes.

図5は、ラベル(階調代表値)の組の代表的パターンと、それぞれのパターンに対する補正方法とを示す説明図である。パターン1は注目するラベルと組をなすラベルが1つのみの場合であり、パターン2は注目するラベルと組をなすラベルが1つの隣接領域内に2つ存在する場合であり、パターン3は注目するラベルと組をなすラベルが隣接する2つの領域にそれぞれ1つずつある場合である。階調代表値の補正処理においては、このような代表的パターンを定義し、パターン毎に補正方法を切り替えることができる。   FIG. 5 is an explanatory diagram showing a representative pattern of a set of labels (representative gradation values) and a correction method for each pattern. Pattern 1 is a case where only one label is paired with the target label, pattern 2 is a case where two labels are paired with the target label, and pattern 3 is a target. This is a case where one label is paired with each other in two adjacent areas. In the gradation representative value correction process, such a representative pattern can be defined and the correction method can be switched for each pattern.

パターン1の場合は、当該2領域間のみを滑らかに連結する曲線状の特性41を定義し、これを参照テーブル化して補正を行う。   In the case of pattern 1, a curved characteristic 41 that smoothly connects only the two regions is defined, and this is converted into a reference table for correction.

パターン2の場合は、
1.より近い画素の組み合わせに対応した特性(参照テーブル)を使用する、
2.ラベル間をつなぐ特性(図中の細線の特性45a、46a)を隣接領域側のラベル寄りにそれぞれシフトさせた特性(図中の太線の特性45、46)を用いる、
などの方法がある。2.の場合、ラベルaに対する階調代表値の補正は行わず、隣接ブロックを復号化する際に、該シフトさせた特性によってラベルdに対する階調代表値の補正とラベルeに対する階調代表値の補正を行うようにすればよい。2.の場合、ラベルa側の考慮が不要となり、処理が簡単になる。
For pattern 2,
1. Use characteristics (reference table) corresponding to the combination of closer pixels,
2. Using the characteristics (thick line characteristics 45 and 46 in the figure) obtained by shifting the characteristics connecting the labels (thin line characteristics 45a and 46a in the figure) closer to the labels on the adjacent region side, respectively.
There are methods. 2. In this case, the gradation representative value for the label a is not corrected, and when the adjacent block is decoded, the gradation representative value for the label d and the gradation representative value for the label e are corrected by the shifted characteristics. Should be done. 2. In this case, it is not necessary to consider the label a side, and the processing is simplified.

パターン3の場合は、ラベルaおよびこれを跨ぐラベルb、ラベルdの3つのラベルを滑らかにつなぐ特性47を定義して使用する。特性47の作成方法は、
1.パターン3専用のカーブ(LUT)を定義する、
2.パターン2のカーブ(LUT)を位置方向に伸張して流用する、
のどちらでもよい。
In the case of the pattern 3, a characteristic 47 that smoothly connects the three labels of the label a and the labels b and d that straddle the label a is defined and used. The method of creating the characteristic 47 is
1. Define a dedicated curve (LUT) for pattern 3.
2. Use the pattern 2 curve (LUT) by extending it in the position direction.
Either of them may be used.

パターン2の場合は、隣接領域にある2つのラベルのうち、関係するラベル情報が持つ隣接領域の画素がより近いものを優先する、という方法がある。図6はこの関係を示している。注目画素(ラベルa)に対してラベルdとラベルeが組をなす関係(対応する階調代表値の差分が閾値以下の関係)にあるものとする。このとき、ラベルaを有する注目画素に最も近い距離の画素のラベル情報がラベルdまたはラベルeの場合は、その最も近い距離の画素のラベルを優先する。図中のケース1の場合はラベルaとラベルdの関係を使用して補正する。図中のケース2の場合はラベルaとラベルeの関係を使用して補正する。図中のケース3の場合は最も近い画素がラベルd、e以外のラベルxの場合である。この場合は、組をなすラベルd、eを持つ画素のうち注目画素に最も近い画素のラベルとの関係を使用する。図中のケース3では、ラベルaとラベルdの関係を使用する。   In the case of pattern 2, there is a method in which priority is given to a label having a closer pixel in the adjacent area of the related label information among the two labels in the adjacent area. FIG. 6 shows this relationship. It is assumed that there is a relationship in which a label d and a label e form a set with respect to the target pixel (label a) (a relationship between corresponding gradation representative values is equal to or less than a threshold value). At this time, when the label information of the pixel closest to the target pixel having label a is label d or label e, priority is given to the label of the pixel closest to the target pixel. In case 1 in the figure, correction is performed using the relationship between label a and label d. In case 2 in the figure, correction is performed using the relationship between label a and label e. Case 3 in the figure is the case where the nearest pixel is a label x other than labels d and e. In this case, the relationship with the label of the pixel closest to the target pixel among the pixels having labels d and e forming a pair is used. In case 3 in the figure, the relationship between label a and label d is used.

なお、等距離のラベル番号の組が存在する場合や近距離に組となるラベル番号が見つからない場合には、以下の方式から選択することができる。
1.ランダムに利用するLUTを切り替える。
2.中間特性を利用する(2つのLUTの中間値を使用するなど)。
3.処理を行わない。
すなわち、注目するラベル(階調代表値)に対して組をなすラベルが複数あってそれらが等距離にある場合は、いずれのラベルとの関係を優先すべきかを決め難い(もともと確率50%の関係にある)。そこで、上記1.のようにランダムにLUTを切り替えることでブロックノイズを軽減できる。また、前記、等距離のラベル番号の組が存在する場合や近距離に組となるラベル番号が見つからない状態はごく局所的に発生することが多いので、2.3.のようにしても問題ない。
In addition, when there is a pair of equidistant label numbers or when a pair of label numbers cannot be found at a short distance, the following method can be selected.
1. Switch the LUT to be used at random.
2. Use intermediate characteristics (eg, use the intermediate value of two LUTs).
3. Do not process.
That is, when there are a plurality of labels that are paired with the target label (representative gradation value) and they are equidistant, it is difficult to determine which label should be given priority (originally with a probability of 50%) Is related). Therefore, the above 1. Thus, block noise can be reduced by switching the LUT randomly. In addition, when there are a pair of equidistant label numbers or a state in which a pair of label numbers cannot be found at a short distance often occurs locally, 2.3. There is no problem even if

次に、ラベルの組の関係が多方向に存在する場合の補正方法について説明する。図7は、復号化対象の領域42に存在するラベルaに対して組をなすラベルが、左側の隣接領域43Lに存在するラベルbと、上側の隣接領域43Aに存在するラベルcである場合を例示している。原則として、注目画素については、その画素から境界までの距離が近い方の隣接領域側のラベルを優先する(遠いところは関係ないとする)。図中の部分領域Aにある画素については、上側の隣接領域43Aに存在するラベルcとの関係を使用し、部分領域Bにある画素については、左側の隣接領域43Lに存在するラベルbとの関係を使用する。上側の隣接領域43Aとの境界と左側の隣接領域43Lとの境界とから等距離にあるような部分領域Cにある画素については、図5のパターン3の関係(ラベルa、ラベルb、ラベルcの関係)を使用すればよい。   Next, a description will be given of a correction method in the case where the relationship between label sets exists in multiple directions. FIG. 7 shows the case where the labels forming a pair with the label a existing in the decoding target area 42 are the label b existing in the left adjacent area 43L and the label c existing in the upper adjacent area 43A. Illustrated. In principle, with regard to the pixel of interest, priority is given to the label on the adjacent area side where the distance from the pixel to the boundary is closer (assuming that the distance is not relevant). For the pixel in the partial area A in the figure, the relationship with the label c existing in the upper adjacent area 43A is used, and for the pixel in the partial area B, the relationship with the label b existing in the left adjacent area 43L. Use relationships. For the pixels in the partial region C that are equidistant from the boundary with the upper adjacent region 43A and the boundary with the left adjacent region 43L, the relationship of the pattern 3 in FIG. 5 (label a, label b, label c )).

図8は、復号化対象の領域42に存在するラベルaに対して組をなすラベルが、左側の隣接領域43Lに存在するラベルbと、上側の隣接領域43Aに存在するラベルcと、右側の隣接領域43Rに存在するラベルd、ラベルeである場合を例示している。部分領域A、部分領域B、部分領域Cについては図7と同様の関係を使用する。右側の隣接領域43Rが最も近い隣接領域となる部分領域Dでは、ラベルa、ラベルd、ラベルeについて図5のパターン2の関係を使用する。   FIG. 8 shows that a label paired with the label a existing in the decoding target area 42 includes a label b existing in the left adjacent area 43L, a label c existing in the upper adjacent area 43A, and a right label The case where the label d and the label e exist in the adjacent region 43R is illustrated. For the partial area A, the partial area B, and the partial area C, the same relationship as in FIG. 7 is used. In the partial region D in which the adjacent region 43R on the right side is the nearest adjacent region, the relationship of the pattern 2 in FIG. 5 is used for the labels a, d, and e.

図9は、復号化対象の領域42に存在するラベルaに対して組をなすラベルが、左側の隣接領域43Lに存在するラベルbと、上側の隣接領域43Aに存在するラベルcと、右側の隣接領域43Rに存在するラベルd、ラベルeと、下側の隣接領域43Bに存在するラベルf、ラベルgである場合を例示している。部分領域A、部分領域B、部分領域C、部分領域Dについては図8と同様の関係を使用する。下側の隣接領域43Bが最も近い隣接領域となる部分領域Eでは、ラベルa、ラベルf、ラベルgについて図5のパターン2の関係を使用する。   FIG. 9 shows that a label paired with a label a existing in the decoding target area 42 includes a label b existing in the left adjacent area 43L, a label c existing in the upper adjacent area 43A, and a right label c. The case where the labels d and e exist in the adjacent area 43R and the labels f and g exist in the lower adjacent area 43B is illustrated. For the partial area A, the partial area B, the partial area C, and the partial area D, the same relationship as in FIG. 8 is used. In the partial area E in which the lower adjacent area 43B is the closest adjacent area, the relationship of the pattern 2 in FIG. 5 is used for the label a, the label f, and the label g.

なお、非常に多くの関係が存在する場合には、
1.全ての関係についてLUTを定義し、重なった部分は単純(または適当な重み付け)平均を行う、
2.各方向、1つを選択(効果大、簡単、等の指標で)する、
としてもよい。なお、効果大とは、より差分の小さい関係を使用することである。簡単な方とは、たとえば、ある隣接境界についてパターン1の関係(例、ラベルaとラベルb)があり、他の隣接境界についてパターン2の関係(例、ラベルaとラベルf、ラベルg)がある場合は、パターン1の関係を優先する、などである。
If there are a lot of relationships,
1. Define LUTs for all relationships and do a simple (or appropriate weighted) average over the overlaps,
2. Select one direction (with indicators such as large effect, simple, etc.)
It is good. Note that “large effect” means that a relationship having a smaller difference is used. The simpler means, for example, the relationship of pattern 1 (eg, label a and label b) for a certain adjacent boundary, and the relationship of pattern 2 (eg, label a, label f, label g) for another adjacent boundary. In some cases, the relationship of pattern 1 is given priority.

次に、本発明の符号化方法(符号化処理部10のBTC符号化部13および符号補正部14による符号化処理)について説明する。   Next, the encoding method of the present invention (encoding processing by the BTC encoding unit 13 and the code correcting unit 14 of the encoding processing unit 10) will be described.

本発明の符号化処理は、従来のBTC符号化によって符号化して得た符号情報に対して、ブロックノイズが軽減されるように補正を施す。たとえば、図10に示すように、補正対象のブロック51(領域)に係る各階調代表値(注目する階調代表値)を、隣接領域52の符号情報に含まれる階調代表値に基づいて補正する。詳細には、補正対象のブロックの符号情報の中の注目する階調代表値を、この階調代表値と隣接領域の階調代表値との差分が小さくなるように補正する。なお図10の隣接領域52は、補正対象のブロック51の左右2領域を示しているが、上下や
斜め方向の領域も隣接領域に含めて良いことはもちろんである。
The encoding process of the present invention corrects code information obtained by encoding by conventional BTC encoding so that block noise is reduced. For example, as shown in FIG. 10, each gradation representative value (remarked gradation representative value) related to the correction target block 51 (area) is corrected based on the gradation representative value included in the code information of the adjacent area 52. To do. Specifically, the target gradation representative value in the code information of the block to be corrected is corrected so that the difference between the gradation representative value and the gradation representative value of the adjacent region becomes small. Although the adjacent area 52 in FIG. 10 shows the left and right areas of the block 51 to be corrected, it goes without saying that areas in the vertical and diagonal directions may be included in the adjacent area.

ここでは、注目する階調代表値との差分が所定の閾値以下の隣接領域の階調代表値を抽出し、それらの差分が小さくなるように、注目する階調代表値を補正する。そして、補正後の階調代表値に基づいて、補正対象のブロックに属する各画素のラベル情報を修正する(より近い階調代表値があれば、その階調代表値のラベルに付け替える)ことを行う。   Here, the gradation representative value of the adjacent area whose difference from the gradation representative value of interest is equal to or smaller than a predetermined threshold is extracted, and the gradation representative value of interest is corrected so that the difference between them is small. Then, based on the corrected gradation representative value, the label information of each pixel belonging to the correction target block is corrected (if there is a closer gradation representative value, the label is replaced with the label of the gradation representative value). Do.

注目する階調代表値との差分が閾値以下の階調代表値が隣接領域に存在する場合は、元画像では同一(もしくは類似)の階調値であった画素が、ブロック単位に従来のBTC符号化処理を行った際に、異なる階調代表値で表わされたと想定される。そこで、注目する階調代表値との差分が閾値以下の階調代表値が隣接領域に存在する場合は、その差分が小さくなるように、注目する階調代表値を補正する。   When there is a gradation representative value whose difference from the target gradation representative value is equal to or less than the threshold value in the adjacent region, pixels having the same (or similar) gradation value in the original image are converted into the conventional BTC for each block. When the encoding process is performed, it is assumed that different gradation representative values are represented. Therefore, when there is a gradation representative value whose difference from the gradation representative value of interest is equal to or less than the threshold value in the adjacent region, the gradation representative value of interest is corrected so that the difference becomes small.

図11は、本発明に係る符号化(圧縮)処理を示す流れ図である。符号化対象の画像全体に従来と同様のBTC符号化処理を行って符号情報を生成し、この符号情報に対して順次補正を施すという手順で行ってもよいが、図11の処理では、従来と同様のBTC符号化処理を行い、その途中で補正対象のブロックとその隣接ブロックの符号情報が揃った時点で、順次補正を行うようになっている。   FIG. 11 is a flowchart showing an encoding (compression) process according to the present invention. The entire image to be encoded may be performed by performing the same BTC encoding process as before to generate code information and sequentially correcting the code information. However, in the process of FIG. The same BTC encoding processing is performed, and correction is sequentially performed when code information of a block to be corrected and its adjacent blocks are gathered in the middle.

図11の処理では、まず、符号化対象の画像情報を取得し(ステップS301)、この画像を格子状に区分してブロックに分割する(ステップS302)。次に、符号化対象の1ブロック分の画像情報を抽出し(ステップS303、従来のBTC符号化と同様の処理で、そのブロックを符号化する(ステップS304)。続いて、そのブロックの補正に必要なブロック(符号化対象のブロックの隣接ブロック)の符号情報が揃っているか否かを判断し(ステップS305)、揃っていなければ(ステップS305;No)、次のブロックを抽出して(ステップS306)ステップS303に移行して処理を継続する。   In the process of FIG. 11, first, image information to be encoded is acquired (step S301), and this image is divided into a grid and divided into blocks (step S302). Next, image information for one block to be encoded is extracted (step S303, the block is encoded by the same processing as the conventional BTC encoding (step S304). Subsequently, the block is corrected. It is determined whether or not the code information of a necessary block (adjacent block of the block to be encoded) is complete (step S305). If not (step S305; No), the next block is extracted (step S305). S306) The process proceeds to step S303 and the process is continued.

符号化対象のブロックの補正に必要な隣接ブロックの符号情報が揃っている場合は(ステップS305;Yes)、符号化対象のブロックの各階調代表値について、その階調代表値(注目する階調代表値)との差分が所定の閾値以下の隣接ブロック内の階調代表値を抽出(注目する階調代表値のラベル番号と抽出した階調代表値のラベル番号の組を抽出)し(ステップS307)、抽出された組の類似性がより高くなるよう、すなわち、階調差がより小さくなるような値に階調代表値を修正する(ステップS308)。   When the code information of adjacent blocks necessary for correction of the encoding target block is complete (step S305; Yes), for each gradation representative value of the encoding target block, the gradation representative value (the target gradation) A gradation representative value in an adjacent block whose difference from the representative value is equal to or less than a predetermined threshold is extracted (a set of a label number of the gradation representative value to be noted and a label number of the extracted gradation representative value is extracted) (step) In step S307), the gradation representative value is corrected to a value such that the similarity of the extracted set is higher, that is, the gradation difference is smaller (step S308).

そして、修正された階調代表値に基づいて画素各々のラベル情報を見直し、必要に応じて(画素本来の階調値に最も近い階調代表値を有するラベル番号への)ラベルの付け替えを行う(ステップS309)。   Then, the label information of each pixel is reviewed based on the corrected gradation representative value, and the label is changed as necessary (to the label number having the gradation representative value closest to the original gradation value of the pixel). (Step S309).

その後、全ブロックについて以上の処理が終了したか否かを判断し(ステップS310)、全ブロック終了でなければ(ステップS310;No)、符号化対象の次のブロックを抽出して(ステップS311)ステップS303へ移行し、処理を継続する。全ブロック終了の場合は(ステップS310;Yes)、符号化完了となって本処理を終了する。   Thereafter, it is determined whether or not the above processing has been completed for all blocks (step S310). If all blocks have not been completed (step S310; No), the next block to be encoded is extracted (step S311). The process proceeds to step S303 and the process is continued. When all the blocks are completed (step S310; Yes), the encoding is completed and the process is terminated.

これにより、復号化(伸張)処理を従来の手法で行っても隣接ブロック間で発生する階調差が軽減され、領域境界ノイズ(ブロックノイズ)の発生が軽減される。なお、本発明に係る符号化処理で生成された符号情報に対する復号化処理は従来のものでもよいが、前術した本発明の復号化処理で復号化すれば、より一層ブロックノイズの軽減された画像が復元される。本発明の符号化処理では、類似する階調代表値はより類似するように近づけられるので、本発明の符号化処理で得た符号情報に対して本発明の復号化処理を適用すれば、復号時に類似の判断(ラベルの組の抽出)を行い易くなり、より適切に復号化での補正を行うことができる。   As a result, even if decoding (decompression) processing is performed by a conventional method, a gradation difference generated between adjacent blocks is reduced, and generation of region boundary noise (block noise) is reduced. Note that the decoding process for the code information generated by the encoding process according to the present invention may be conventional. However, if the decoding process of the present invention is performed as described above, the block noise is further reduced. The image is restored. In the encoding process of the present invention, similar gradation representative values are brought closer to each other so that if the decoding process of the present invention is applied to the code information obtained by the encoding process of the present invention, decoding is performed. Sometimes it becomes easy to make a similar determination (extraction of a set of labels), and correction by decoding can be performed more appropriately.

図12は、図11のステップS309の処理(ラベルの付け直し)を詳細に示す流れ図である。元画像において、ラベル付け直し対象のブロック(領域)に属する1つの画素の画像情報を取得し(ステップS321)、該画素の階調値と補正前のラベル情報に対応する階調代表値との階調差を算出し(ステップS322)、より近いラベル情報がある場合は(ステップS323;Yes)、この画像のラベル情報をより近いラベル情報に付け替える(ステップS324)。   FIG. 12 is a flowchart showing in detail the process (relabeling) in step S309 of FIG. In the original image, image information of one pixel belonging to the block (area) to be relabeled is acquired (step S321), and the gradation value of the pixel and the gradation representative value corresponding to the label information before correction are obtained. A gradation difference is calculated (step S322), and if there is closer label information (step S323; Yes), the label information of this image is replaced with closer label information (step S324).

より近いものがない場合は(ステップS323;No)、その画素については現在のラベル情報を維持する。以上の判断を当該ブロックの全画素について終了したか否かを判断し(ステップS325)、全画素終了でなければ(ステップS325;No)、次の画素を取得し(ステップS326)ステップS321に移行して処理を継続する。全画素終了であれば(ステップS325;Yes)本処理を終了する。   When there is no closer one (step S323; No), the current label information is maintained for the pixel. It is determined whether or not the above determination is finished for all the pixels of the block (step S325). If all the pixels are not finished (step S325; No), the next pixel is acquired (step S326) and the process proceeds to step S321. And continue processing. If all pixels are finished (step S325; Yes), this process is finished.

以上説明したように、本発明では、階調代表値が近い組について補正処理を行う。この際、隣接領域にある最も近い階調代表値のラベル番号と組にしてもよいが、所定の閾値を定義して組となるラベルを選択するようにすれば処理が簡単になる。   As described above, in the present invention, correction processing is performed for a set having close gradation representative values. At this time, it may be paired with the label number of the closest gradation representative value in the adjacent area, but the processing becomes simple if a predetermined threshold value is defined and a pair of labels is selected.

図13は、階調値が2変量の場合について、階調代表値の差分(距離)が閾値以下のものを組にする場合を模式的に示している。注目するラベル番号の階調代表値54からの距離が閾値th以内のエリア56に存在する隣接領域の階調代表値55(ラベル番号)を組にする。   FIG. 13 schematically shows a case where the difference (distance) between the gradation representative values is a threshold or less when the gradation value is bivariate. The gradation representative value 55 (label number) of the adjacent region existing in the area 56 whose distance from the gradation representative value 54 of the label number of interest is within the threshold th is set.

前述の閾値Thはあらかじめ定めたものでもよいが、関連領域を含む階調代表値を信号値空間にプロットし、その分布の大きさから定めてもよい。図14はその一例を示している。同図は全体分布57の1/5のサイズを元に閾値Thを定めた例である。なお全体分布はデータの標準偏差を統計的に求め、データの大半が含まれる範囲を標準偏差の所定倍として定めてもよい。   The above-described threshold Th may be determined in advance, but the gradation representative value including the related region may be plotted in the signal value space and determined from the size of the distribution. FIG. 14 shows an example. The figure shows an example in which the threshold value Th is determined based on the size of 1/5 of the overall distribution 57. For the overall distribution, the standard deviation of the data may be obtained statistically, and the range including most of the data may be determined as a predetermined multiple of the standard deviation.

図11に示す符号化処理で、所定の閾値を設定してラベル番号(階調代表値)の組(注目するラベル番号(に対応する階調代表値)とその補正に関連する隣接領域のラベル番号(に対応する階調代表値)との組)を抽出した場合、複数の隣接領域のラベル(階調代表値)が閾値内に入ることが考えられる。このような場合は、隣接領域のラベル番号に対応する階調代表値の平均値(重心位置)を算出し、平均値との間で階調差が小さくなるよう、注目ラベルの階調代表値を補正することができる。   In the encoding process shown in FIG. 11, a predetermined threshold value is set, and a set of label numbers (representative gradation values) (representative gradation number corresponding to (representative gradation number)) and a label of an adjacent area related to the correction When a number (a pair with a gradation representative value corresponding to the number) is extracted, it is conceivable that labels (gradation representative values) of a plurality of adjacent regions fall within the threshold value. In such a case, the average value (center of gravity position) of the gradation representative value corresponding to the label number of the adjacent area is calculated, and the gradation representative value of the target label is reduced so that the gradation difference from the average value becomes small. Can be corrected.

また、たとえば図15に示すように、多数の隣接領域のラベル(階調代表値)が閾値Th内のエリア56に入ることが考えられる。この場合、単純に閾値Th内の全ラベル(階調代表値)の平均を取る方法よりも、たとえば閾値Th内のラベル(階調代表値)をクラスター分析等の統計的手法でさらに分割し、注目するラベル(階調代表値)54が含まれる、より小さなグループGとの間で階調差が小さくなるよう、補正することもできる。また、平均は単純平均でも良く、各種重み付け平均や中央値、中間値、最頻値、等、各種算術法を用いることができる。   Further, for example, as shown in FIG. 15, it is conceivable that labels (gradation representative values) of a large number of adjacent regions enter an area 56 within a threshold value Th. In this case, for example, labels (gradation representative values) within the threshold Th are further divided by a statistical method such as cluster analysis, rather than a method of simply averaging all labels (gradation representative values) within the threshold Th. It is also possible to perform correction so that the gradation difference with a smaller group G including the target label (gradation representative value) 54 is small. The average may be a simple average, and various arithmetic methods such as various weighted averages, median values, intermediate values, and mode values can be used.

また、図16に示すように、所定の閾値Thを設定し、多数の隣接領域のラベル(階調代表値)が閾値th内に入った場合、より小さな閾値(第2の閾値F)を改めて定義し、この閾値F内に入ったラベル(階調代表値)に基づいて補正を行うように構成されてもよい。たとえば、前出のクラスター分析によってより小さなラベル(階調代表値)の「まとまり」を見つけ、これを包含する範囲を閾値で定義しても良く、図17に示すように、ラベル(に対応する階調代表値)間距離を横軸にとった度数分布を作成し、谷を見つけてここを閾値としてもよい。このように、隣接領域のラベル(階調代表値)の中で注目する階調代表値に対して明らかに近いものと遠いものとを分類し、近いものに基づいて補正を行うことで、より適切な補正が実現される。   In addition, as shown in FIG. 16, when a predetermined threshold Th is set and the labels (gradation representative values) of many adjacent regions fall within the threshold th, the smaller threshold (second threshold F) is changed. It is also possible to define and perform correction based on the label (gradation representative value) that falls within the threshold value F. For example, the “cluster” of smaller labels (gradation representative values) may be found by the cluster analysis described above, and the range including this may be defined by a threshold value, and as shown in FIG. It is also possible to create a frequency distribution with the distance between the gradation representative values) on the horizontal axis, find a valley, and use this as the threshold value. In this way, by classifying the ones that are clearly close and far from the target gradation representative value among the labels (gradation representative values) in the adjacent area, and performing correction based on the closest one, Appropriate correction is realized.

なお、これまでの説明では、説明を容易にするためにラベル(に対応する階調代表値)間距離を「1階調値の階調差」、「2階調値(2変量値)の空間距離」として説明したが、実際には画像処理を行なう信号値空間、即ちcmykの4次元の信号値空間やRGBの3次元の信号値空間における空間距離を用いる。この距離は、直接ユークリッド距離を求めてもよいし、一旦、L*a*b*等の均等色空間に画像変換し(この際、均等色空間への射影は実用上差し支えない程度の誤差があってももちろんかまわない)、ΔEやΔE00等の色差を基に距離を定めてもよい。またさらに、本発明で考える階調差は微小ブロック間差に関するものであるから、色差を考慮する際にプリンタの解像度と視覚の(分解能に関する)特性を考慮して色差の変調を加えてもよい。たとえば、人の視覚は色相、彩度成分に関する空間分解能力が輝度成分と比較して極端に低いから、より輝度差に重きを置く変調を加えることができる。   In the description so far, in order to facilitate the description, the distance between the labels (corresponding gradation representative values) is set to “gradation difference of one gradation value” and “two gradation values (bivariate value)”. Although described as “spatial distance”, actually, a spatial value in a signal value space for image processing, that is, a four-dimensional signal value space of cmyk or a three-dimensional signal value space of RGB is used. For this distance, the Euclidean distance may be obtained directly, or the image is once converted to a uniform color space such as L * a * b * (in this case, the projection to the uniform color space has an error that does not interfere with practical use). Of course, the distance may be determined based on a color difference such as ΔE or ΔE00. Furthermore, since the gradation difference considered in the present invention relates to a difference between minute blocks, the color difference may be modulated in consideration of the printer resolution and visual characteristics (related to resolution) when considering the color difference. . For example, since human vision has an extremely low spatial resolution capability with respect to hue and saturation components compared to luminance components, it is possible to apply modulation that places more emphasis on luminance differences.

本発明は各種の画像情報に対し好ましく適用できるが、画像の種類によって適用すべき処理や閾値が異なる場合が考えられ、また、色数の少ないパターンデータでは階調の補正処理を要しない場合もある。そこで、あらかじめ画像の属性情報を取得し、属性に対応して本発明の処理(補正による符号化や復号化)を適用するか否かの判断や閾値の設定、圧縮時、伸張時処理の選択を行うことが望ましい。   The present invention can be preferably applied to various types of image information, but the processing to be applied and the threshold value may be different depending on the type of image, and there is a case where gradation correction processing is not required for pattern data with a small number of colors. is there. Therefore, image attribute information is acquired in advance, and determination of whether to apply the processing of the present invention (encoding or decoding by correction) corresponding to the attribute, setting of a threshold value, selection of processing at the time of compression and expansion It is desirable to do.

図18は、上記選択を行うための処理の流れを示している。処理対象の画像情報およびその画像属性情報を取得し(ステップS401)、該取得した画像属性情報に対応した処理方法の指定情報を取得し(ステップS402)、この情報に基づいて本発明の処理の要否を判断する(ステップS403)。なお、画像属性情報は、画像/領域の種別(たとえば、スキャナで読み取った画像、CG、パターン、テキスト、等)を示す情報でもよいし、本発明処理要否を直接指示する情報であってもかまわない。   FIG. 18 shows a flow of processing for performing the above selection. The image information to be processed and its image attribute information are acquired (step S401), the processing method designation information corresponding to the acquired image attribute information is acquired (step S402), and the processing of the present invention is performed based on this information. The necessity is determined (step S403). The image attribute information may be information indicating the type of image / region (for example, an image read by a scanner, CG, pattern, text, etc.), or may be information directly instructing whether or not the present invention is necessary. It doesn't matter.

本発明の処理が不要と判断した場合は(ステップS403;No)、従来処理を適用して(ステップS404)終了する。本発明の処理が必要と判断した場合は(ステップS403;Yes)、パラメータ情報の変更要求有無を判断する(ステップS405)。パラメータの内容は、・圧縮側処理/伸張側処理の選択、・閾値の初期値、・伸張時に修正階調値を得るための基本参照テーブル(LUT)などである。   If it is determined that the process of the present invention is not necessary (step S403; No), the conventional process is applied (step S404) and the process ends. If it is determined that the processing of the present invention is necessary (step S403; Yes), it is determined whether or not there is a request for changing parameter information (step S405). The contents of the parameter are: selection of compression side processing / decompression side processing, initial value of threshold value, basic reference table (LUT) for obtaining corrected gradation value at the time of expansion, and the like.

パラメータ情報に対する変更要求がある場合は(ステップS405;Yes)、パラメータの再設定を受け(ステップS406)、その再設定されたパラメータにて本発明の処理を適用して(ステップS407)終了する。パラメータ情報なしの場合は(ステップS405;No)、現在のパラメータにて本発明の処理を適用して(ステップS407)終了する。   If there is a change request for the parameter information (step S405; Yes), the parameter is reset (step S406), the processing of the present invention is applied with the reset parameter (step S407), and the process ends. If there is no parameter information (step S405; No), the processing of the present invention is applied with the current parameters (step S407), and the process ends.

以上、本発明の実施の形態を図面によって説明してきたが、具体的な構成は実施の形態に示したものに限られるものではなく、本発明の要旨を逸脱しない範囲における変更や追加があっても本発明に含まれる。   The embodiment of the present invention has been described with reference to the drawings. However, the specific configuration is not limited to that shown in the embodiment, and there are changes and additions within the scope of the present invention. Are also included in the present invention.

たとえば、実施の形態では、ラベル番号の組を抽出して処理するようにしたが、注目する階調代表値に対して所定の関係(差分が閾値以下などの関係)にある隣接領域の階調代表値が抽出されればよく、ラベル番号の組を抽出しなくてもかまわない。   For example, in the embodiment, a set of label numbers is extracted and processed, but the gradation of an adjacent region that has a predetermined relationship (a difference is a threshold value or less) with respect to the gradation representative value of interest. A representative value may be extracted, and a set of label numbers need not be extracted.

5…画像処理装置
6…画像メモリ
10…符号化処理部
11…画像入力部
12…画像分割部
13…BTC符号化部
14…符号補正部
20…復号化処理部
21…符号入力部
22…BTC復号化部
23…画像出力部
24…階調代表値補正部
30…元画像
31…ブロック
32…符号化画像
33…階調代表値テーブル
34…復元画像
41…点線
42…復号化対象のブロック
43…隣接するブロック
43A…上側の隣接領域
43B…下側の隣接領域
43L…左側の隣接領域
43R…右側の隣接領域
51…補正対象のブロック
52…隣接領域
A、B、C、D、E…部分領域
F…第2の閾値
DESCRIPTION OF SYMBOLS 5 ... Image processing apparatus 6 ... Image memory 10 ... Encoding process part 11 ... Image input part 12 ... Image division part 13 ... BTC encoding part 14 ... Code correction part 20 ... Decoding process part 21 ... Code input part 22 ... BTC Decoding unit 23 ... Image output unit 24 ... Tone representative value correcting unit 30 ... Original image 31 ... Block 32 ... Encoded image 33 ... Tone representative value table 34 ... Restored image 41 ... Dotted line 42 ... Decoding target block 43 ... adjacent block 43A ... upper adjacent area 43B ... lower adjacent area 43L ... left adjacent area 43R ... right adjacent area 51 ... correction target block 52 ... adjacent area A, B, C, D, E ... part Area F ... second threshold

Claims (11)

画像を複数の領域に分割し、各領域を、この領域に属する画素の階調値を代表する複数の階調代表値とこの領域に属するそれぞれの画素が前記複数の階調代表値の中のいずれに対応するかを示すラベル情報とで表わすように符号化する、もしくは前記ラベル情報をこのラベル情報に対応する階調代表値に基づいて階調値に変換することによって復号化する画像処理方法において、
処理対象の領域に係る注目する階調代表値を、隣接領域の階調代表値に基づいて補正して、前記符号化もしくは前記復号化を行う
ことを特徴とする画像処理方法。
The image is divided into a plurality of areas, and each area is divided into a plurality of gradation representative values representing the gradation values of the pixels belonging to the area, and each pixel belonging to the area is included in the plurality of gradation representative values. An image processing method that encodes so as to be represented by label information indicating which one corresponds to, or decodes the label information by converting the label information into a gradation value based on a gradation representative value corresponding to the label information In
An image processing method comprising: performing the encoding or the decoding by correcting a target gradation representative value related to a processing target region based on a gradation representative value of an adjacent region.
復号化時に、前記ラベル情報をこのラベル情報に対応する階調代表値に基づいて階調値に変換する際に、該ラベル情報に対応する画素の隣接境界からの距離を加味して、前記階調代表値に対する前記補正を行う
ことを特徴とする請求項1に記載の画像処理方法。
At the time of decoding, when converting the label information into a gradation value based on the gradation representative value corresponding to the label information, the distance from the adjacent boundary of the pixel corresponding to the label information is taken into account, and The image processing method according to claim 1, wherein the correction is performed on the key representative value.
前記注目する階調代表値との差分が所定の閾値以下に収まる隣接領域の階調代表値に基づいて前記補正を行う
ことを特徴とする請求項2に記載の画像処理方法。
The image processing method according to claim 2, wherein the correction is performed based on a gradation representative value of an adjacent region where a difference from the target gradation representative value falls within a predetermined threshold value or less.
符号化時に、前記注目する階調代表値をこの階調代表値と隣接領域の階調代表値との差分が小さくなるように補正し、該補正後の階調代表値に基づいて前記処理対象の領域に属する画素のラベル情報を修正する
ことを特徴とする請求項3に記載の画像処理方法。
At the time of encoding, the target gradation representative value is corrected so that a difference between the gradation representative value and the gradation representative value of the adjacent region is small, and the processing target is based on the corrected gradation representative value. The image processing method according to claim 3, wherein label information of pixels belonging to the region is corrected.
前記注目する階調代表値との差分が前記閾値以下に収まる隣接領域の階調代表値の数、または前記数と隣接方向との組み合わせ、のうちの少なくとも一方に基づいて、前記距離を加味した前記補正の方法を変更する
ことを特徴とする請求項3または4に記載の画像処理方法。
The distance is taken into account based on at least one of the number of gradation representative values in the adjacent area where the difference from the target gradation representative value falls below the threshold or the combination of the number and the adjacent direction. The image processing method according to claim 3, wherein the correction method is changed.
復号化時に、注目するラベル情報をこのラベル情報に対応する階調代表値に基づいて階調値に変換する際に、前記階調代表値との差分が前記閾値以下に収まる隣接領域の階調代表値が複数存在する場合は、前記注目するラベル情報に対応する画素と、前記複数存在する階調代表値のそれぞれに対応付けされているラベル情報に対応する画素との位置関係に基づいて前記補正を行う
ことを特徴とする請求項3乃至5のいずれか一項に記載の画像処理方法。
At the time of decoding, when converting the label information of interest into a gradation value based on the gradation representative value corresponding to this label information, the gradation of an adjacent region where the difference from the gradation representative value falls below the threshold value When there are a plurality of representative values, based on the positional relationship between the pixel corresponding to the target label information and the pixel corresponding to the label information associated with each of the plurality of gradation representative values. The image processing method according to claim 3, wherein correction is performed.
符号化時に、前記注目する階調代表値との差分が所定の閾値以下に収まる隣接領域の階調代表値に基づいて、前記差分が小さくなるように前記補正を行うと共に、該補正後の階調代表値に基づいて前記処理対象の領域に属する画素のラベル情報を修正する
ことを特徴とする請求項1に記載の画像処理方法。
At the time of encoding, the correction is performed so that the difference becomes smaller based on the gradation representative value of the adjacent region where the difference from the target gradation representative value falls within a predetermined threshold value or less. The image processing method according to claim 1, wherein label information of pixels belonging to the processing target region is corrected based on a key representative value.
前記注目する階調代表値との差分が前記閾値以下に収まる隣接領域の階調代表値が複数存在する場合は、前記複数存在する階調代表値の平均値に、または前記複数存在する階調代表値の中で前記注目する階調代表値により近い階調代表値を抽出しその抽出した階調代表値の平均値に、より近づくように前記補正を行う
ことを特徴とする請求項7に記載の画像処理方法。
In the case where there are a plurality of gradation representative values in adjacent areas where the difference from the target gradation representative value falls below the threshold value, the average value of the plurality of gradation representative values or the plurality of gradations present The gradation representative value closer to the target gradation representative value is extracted from the representative values, and the correction is performed so as to be closer to the average value of the extracted gradation representative values. The image processing method as described.
前記閾値は、注目する階調代表値および隣接する領域に係る全階調代表値を母集団とする統計、または、前記注目する階調代表値との差分が第2の閾値以下に収まる隣接領域の階調代表値を母集団とする統計、のうちの少なくとも一方の統計に基づいて決定される
ことを特徴とする請求項7または8に記載の画像処理方法。
The threshold is a statistic in which a representative gradation representative value and all gradation representative values related to the adjacent area are a population, or an adjacent area where a difference from the attention gradation representative value falls within a second threshold or less. The image processing method according to claim 7, wherein the image processing method is determined on the basis of at least one of the statistics using the grayscale representative value as a population.
前記統計は、分散または標準偏差の算出、相互の差分が所定値以下のサブグループへの分類、のうちの少なくとも1つを含む
ことを特徴とする請求項9に記載の画像処理方法。
The image processing method according to claim 9, wherein the statistics include at least one of calculation of variance or standard deviation and classification into subgroups in which a mutual difference is a predetermined value or less.
画像を複数の領域に分割し、各領域を、この領域に属する画素の階調値を代表する複数の階調代表値とこの領域に属するそれぞれの画素が前記複数の階調代表値の中のいずれに対応するかを示すラベル情報とで表わすように符号化する、もしくは前記ラベル情報をこのラベル情報に対応する階調代表値に基づいて階調値に変換することによって復号化する画像処理装置において、
処理対象の領域に係る注目する階調代表値を、隣接領域の階調代表値に基づいて補正して、前記符号化もしくは前記復号化を行う
ことを特徴とする画像処理装置。
The image is divided into a plurality of areas, and each area is divided into a plurality of gradation representative values representing the gradation values of the pixels belonging to the area, and each pixel belonging to the area is included in the plurality of gradation representative values. An image processing apparatus that performs encoding so as to represent the label information indicating which one corresponds to the image, or decodes the label information by converting the label information into a gradation value based on a gradation representative value corresponding to the label information. In
An image processing apparatus, wherein the encoding representative or the decoding is performed by correcting a representative gradation representative value relating to a processing target region based on a gradation representative value of an adjacent region.
JP2009155716A 2009-06-30 2009-06-30 Image processing method and image processing apparatus Expired - Fee Related JP5246067B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009155716A JP5246067B2 (en) 2009-06-30 2009-06-30 Image processing method and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009155716A JP5246067B2 (en) 2009-06-30 2009-06-30 Image processing method and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2011015041A true JP2011015041A (en) 2011-01-20
JP5246067B2 JP5246067B2 (en) 2013-07-24

Family

ID=43593532

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009155716A Expired - Fee Related JP5246067B2 (en) 2009-06-30 2009-06-30 Image processing method and image processing apparatus

Country Status (1)

Country Link
JP (1) JP5246067B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108541375A (en) * 2016-02-03 2018-09-14 夏普株式会社 Moving image decoding apparatus, dynamic image encoding device and prognostic chart picture generating means
CN109300178A (en) * 2018-09-11 2019-02-01 广东智媒云图科技股份有限公司 A kind of souvenir figure generation system based on automatic sketch
CN109325986A (en) * 2018-09-11 2019-02-12 广东智媒云图科技股份有限公司 A kind of method for drafting and device of sketch
CN109949246A (en) * 2019-03-26 2019-06-28 河南理工大学 A method of processing image
CN115802056A (en) * 2023-01-31 2023-03-14 南通凯沃智能装备有限公司 User data compression storage method for mobile terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003204551A (en) * 2002-01-09 2003-07-18 Minolta Co Ltd Image processing apparatus, image forming apparatus, and image processing program
JP2005304010A (en) * 2004-03-18 2005-10-27 National Institute Of Advanced Industrial & Technology Data compression device and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003204551A (en) * 2002-01-09 2003-07-18 Minolta Co Ltd Image processing apparatus, image forming apparatus, and image processing program
JP2005304010A (en) * 2004-03-18 2005-10-27 National Institute Of Advanced Industrial & Technology Data compression device and method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108541375A (en) * 2016-02-03 2018-09-14 夏普株式会社 Moving image decoding apparatus, dynamic image encoding device and prognostic chart picture generating means
CN108541375B (en) * 2016-02-03 2022-04-12 夏普株式会社 Moving image decoding device, moving image encoding device, and predicted image generation device
CN109300178A (en) * 2018-09-11 2019-02-01 广东智媒云图科技股份有限公司 A kind of souvenir figure generation system based on automatic sketch
CN109325986A (en) * 2018-09-11 2019-02-12 广东智媒云图科技股份有限公司 A kind of method for drafting and device of sketch
CN109949246A (en) * 2019-03-26 2019-06-28 河南理工大学 A method of processing image
CN109949246B (en) * 2019-03-26 2023-03-31 河南理工大学 Method for processing image
CN115802056A (en) * 2023-01-31 2023-03-14 南通凯沃智能装备有限公司 User data compression storage method for mobile terminal

Also Published As

Publication number Publication date
JP5246067B2 (en) 2013-07-24

Similar Documents

Publication Publication Date Title
US7668383B2 (en) Image processing, compressing, decompressing, transmitting, sending and receiving devices and methods, programs thereof and displaying device
EP0650287B1 (en) Image processing method and apparatus
CN100521800C (en) Color interpolation algorithm
EP2312856A1 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP5246067B2 (en) Image processing method and image processing apparatus
JPH0750752A (en) Method and device for converting picture density
JP2017509279A (en) Image encoding / decoding method and apparatus
JP2001054123A (en) Image processing unit
JP2007036560A (en) Image processor, image processing method, and its program
CN113163202B (en) Image frame compression method and device
JP2012019357A (en) Image processing device and compression method
JP7450170B2 (en) Projection image adjustment system and method
JP4552400B2 (en) Image display device, image display method, and image display program
CN113347437B (en) Encoding method, encoder, decoder and storage medium based on string prediction
JP2012191362A (en) Image processing system and image processing method
JP3539552B2 (en) Image processing device
JP2002225381A (en) Image processor and image processing method
JP3783815B2 (en) Image processing device
JP2014003484A (en) Image processing device and image compression method
JP2001136542A (en) Signal processor
JP2009159284A (en) Color data conversion apparatus, color data conversion method and color data conversion program
JP2008167309A (en) Image processing apparatus and image processing method
CN103856685A (en) Image Processing Apparatus and Image Processing Method
US9918096B2 (en) Method for selecting a pixel positioning solution to obtain an optimal visual rendition of an image
JP2001169097A (en) Picture processor and picture processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120110

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121129

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121206

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130130

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130312

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130325

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160419

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees