[go: up one dir, main page]

JP2004312693A - Image encoding apparatus and image encoding method - Google Patents

Image encoding apparatus and image encoding method Download PDF

Info

Publication number
JP2004312693A
JP2004312693A JP2003411280A JP2003411280A JP2004312693A JP 2004312693 A JP2004312693 A JP 2004312693A JP 2003411280 A JP2003411280 A JP 2003411280A JP 2003411280 A JP2003411280 A JP 2003411280A JP 2004312693 A JP2004312693 A JP 2004312693A
Authority
JP
Japan
Prior art keywords
image
scanning
sections
dimensional
section
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
JP2003411280A
Other languages
Japanese (ja)
Other versions
JP4083670B2 (en
Inventor
Seiichiro Kamata
清一郎 鎌田
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.)
Kitakyushu Foundation for Advancement of Industry Science and Technology
Original Assignee
Kitakyushu Foundation for Advancement of Industry Science and Technology
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 Kitakyushu Foundation for Advancement of Industry Science and Technology filed Critical Kitakyushu Foundation for Advancement of Industry Science and Technology
Priority to JP2003411280A priority Critical patent/JP4083670B2/en
Publication of JP2004312693A publication Critical patent/JP2004312693A/en
Application granted granted Critical
Publication of JP4083670B2 publication Critical patent/JP4083670B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Abstract

【課題】混成画像を視覚的な歪みが少なく、高速な符号化処理を実現することが可能な画像符号化技術を提供する。
【解決手段】符号化する原画像を所定の走査順序に従って走査する走査手段7と、走査手段7が原画像を走査して生成する1次元原画像を、各区間内の画素値の累積二乗誤差又は分散が所定の閾値以下となるように複数の区間に区分し、各区間内の画素値を当該区間内における画素値の平均値により近似した1次元近似画像データを生成する区分線型近似手段9と、を有する走査ユニット3を、異なる複数の走査順序に対応して複数個備え、各走査ユニット3の区分線型近似手段9が区分した区間数を比較して、区間数が最小の1次元近似画像データを選択する最適走査選択手段4とを備えた。
【選択図】 図1
Provided is an image encoding technique capable of realizing a high-speed encoding process with less visual distortion of a hybrid image.
A scanning means for scanning an original image to be encoded in accordance with a predetermined scanning order, and a one-dimensional original image generated by scanning the original image by the scanning means are obtained by calculating a cumulative square error of a pixel value in each section. Alternatively, a segmented linear approximation unit 9 that divides into a plurality of sections so that the variance is equal to or less than a predetermined threshold, and generates one-dimensional approximate image data in which pixel values in each section are approximated by an average value of pixel values in the section. Are provided in correspondence with a plurality of different scanning orders, and the number of sections divided by the segmented linear approximation means 9 of each scanning unit 3 is compared to obtain a one-dimensional approximation having the smallest number of sections. An optimal scanning selecting means 4 for selecting image data.
[Selection diagram] Fig. 1

Description

本発明は、画像の圧縮や伝送等に使用される画像符号化技術に係り、特に、人工画像と自然画像とが混在した混成画像を最適に符号化することが可能な画像符号化技術に関する。   The present invention relates to an image encoding technology used for image compression and transmission, and more particularly to an image encoding technology capable of optimally encoding a hybrid image in which an artificial image and a natural image are mixed.

写真のような自然画像と文字、図形、イラスト等の人工画像とが混在する画像を混成画像という。混成画像を、非可逆圧縮する技術としては、従来、JPEG、GIF、TIFF等の各種の符号化方式が広く用いられている。   An image in which a natural image such as a photograph and an artificial image such as characters, figures, and illustrations are mixed is referred to as a mixed image. As a technique for irreversibly compressing a hybrid image, various encoding schemes such as JPEG, GIF, and TIFF have been widely used.

一方、符号化の対象となる原画像は、自然画像であるか人工画像であるかにより、画像内のパターンの性質が異なる。自然画像では画素間の相関が大きく、画素値変化が連続的であるという性質を有する。一方、人工画像は、一般に、画素値が連続して同じ区間が多く存在すると共に、鋭いエッジも多く存在するという性質を有する。このような画像の属性に基づくパターンの性質の違いから、上記従来の画像符号化方式では、あらゆる混成画像を最適に符号化することは困難である。   On the other hand, the nature of the pattern in the image differs depending on whether the original image to be encoded is a natural image or an artificial image. The natural image has a property that the correlation between pixels is large and the pixel value change is continuous. On the other hand, an artificial image generally has the property that there are many continuous sections with the same pixel value and many sharp edges. Due to such a difference in pattern properties based on image attributes, it is difficult for the above-described conventional image encoding method to optimally encode all hybrid images.

例えば、混成画像をJPEGにより符号化した場合、人工画像部分の文字や図形の輪郭にモスキートノイズが発生し、視覚的に大きな劣化を生じる。これは、JPEGは、離散コサイン変換(discrete cosine transformation : 以下、「DCT」という。)により低域にスペクトルを集中させ、高帯域情報を削除するために生じる。一方、GIFやTIFFなどの方式は、人工画像の圧縮には適しているものの、自然画像の符号化効率がJPEGに比べて低い。   For example, when a hybrid image is encoded by JPEG, mosquito noise is generated in the outline of a character or figure in an artificial image portion, and visually large deterioration occurs. This occurs because JPEG concentrates the spectrum in the low frequency band by discrete cosine transformation (hereinafter referred to as “DCT”) and deletes the high frequency band information. On the other hand, methods such as GIF and TIFF are suitable for compressing artificial images, but have lower coding efficiency for natural images than JPEG.

そこで、このような混成画像の符号化を最適に行う技術として、混成画像を、人工画像を主体とする離散階調領域と、自然画像を主体とする連続階調領域との2つの領域に分離し、各領域の特性に基づいて、それぞれ、ランレングス符号化とJPEGを用いて符号化する技術が提案されている(非特許文献1参照)。
茂木健,“領域分離に基づく自然人工混在画像の圧縮”,社団法人電気情報通信学会,電子情報通信学会論文誌D−II,Vol.J82-D-II,No.7, p.1150-1160, 1999年7月
Therefore, as a technique for optimally encoding such a hybrid image, a hybrid image is divided into two regions: a discrete-tone region mainly composed of an artificial image and a continuous-tone region mainly composed of a natural image. However, a technique for encoding using run-length encoding and JPEG based on the characteristics of each region has been proposed (see Non-Patent Document 1).
Takeshi Mogi, "Compression of Natural and Artificial Mixed Images Based on Segmentation," IEICE, IEICE Transactions D-II, Vol.J82-D-II, No.7, p.1150-1160 , July 1999

しかしながら、混成画像を、人工画像を主体とする離散階調領域と、自然画像を主体とする連続階調領域との2つの領域に分離する画像符号化方式では、画像の領域分割の演算における計算量が多くなる。そのため、高速画像圧縮には適していない。   However, in an image coding method in which a hybrid image is separated into two regions, a discrete gradation region mainly composed of an artificial image and a continuous gradation region mainly composed of a natural image, the calculation in the region division calculation of the image is performed. The amount increases. Therefore, it is not suitable for high-speed image compression.

また、ハードウェア的に並列処理を行えば、高速化も可能である。しかし、この場合、回路規模が極めて大きくなる。   If parallel processing is performed by hardware, it is possible to increase the speed. However, in this case, the circuit scale becomes extremely large.

そこで、本発明の目的は、混成画像を視覚的な歪みが少なく、高速な符号化処理を実現することが可能であり、ハードウェアで並列処理する構成とした場合であっても小規模な回路で実現可能な画像符号化技術を提供することにある。   Therefore, an object of the present invention is to realize a high-speed encoding process with little visual distortion of a hybrid image, and to realize a small-scale circuit even in a case of performing parallel processing by hardware. It is an object of the present invention to provide an image coding technique which can be realized by the above.

本発明の画像符号化装置の第1の構成は、符号化する原画像を所定の走査順序に従って走査する走査手段と、前記走査手段が原画像を走査して生成する1次元原画像を、各区間内の画素値の累積二乗誤差又は分散が所定の閾値以下となるように複数の区間に区分し、各区間内の画素値を当該区間内における画素値の平均値により近似した1次元近似画像データを生成する区分線型近似手段と、を有する走査ユニットを、異なる複数の走査順序に対応して複数個備え、各走査ユニットの前記区分線型近似手段が区分した区間数を比較して、区間数が最小の1次元近似画像データを選択する最適走査選択手段と、を備えていることを特徴とする。   A first configuration of an image encoding apparatus according to the present invention includes a scanning unit that scans an original image to be encoded in a predetermined scanning order, and a one-dimensional original image generated by scanning the original image by the scanning unit. A one-dimensional approximation image obtained by dividing the interval into a plurality of sections so that the cumulative square error or variance of the pixel values in the section is equal to or less than a predetermined threshold, and approximating the pixel value in each section by the average value of the pixel values in the section. A plurality of scanning units each having a plurality of scanning units corresponding to a plurality of different scanning orders, and comparing the number of sections divided by the dividing line-type approximation means of each scanning unit, And an optimal scanning selecting means for selecting the minimum one-dimensional approximate image data.

この構成によれば、各走査ユニットは、1次元原画像を、各区間内の画素値の累積二乗誤差又は分散が所定の閾値以下となるように複数の区間に区分する。そして、各区間内の画素値を当該区間内における画素値の平均値により近似した(以下、この近似を「区分線型近似」という。)1次元近似画像データを生成する。最適走査選択手段は、各走査ユニットの前記区分線型近似手段が区分した区間数を比較する。そして、区間数が最小の1次元近似画像データを選択する。このように、最適走査選択手段は、画像を符号化する前段階において、符号化後に符号量が最小となる走査順序を、区分線型近似手段が区分した区間数が最小となる走査順序と推定する。そして、これを最適な走査順序として選定する。最適な走査順序により走査されて区分線型近似により得られる1次元近似画像データは、その後、ランレングス符号化等により符号化すれば、原画像の最適な符号化が行われることとなる。   According to this configuration, each scanning unit divides the one-dimensional original image into a plurality of sections such that the cumulative square error or variance of the pixel values in each section is equal to or less than a predetermined threshold. Then, one-dimensional approximation image data in which pixel values in each section are approximated by an average value of pixel values in the section (hereinafter, this approximation is referred to as “segmented linear approximation”) is generated. The optimum scanning selection means compares the number of sections divided by the segmented linear approximation means of each scanning unit. Then, one-dimensional approximate image data having the minimum number of sections is selected. As described above, the optimal scan selection unit estimates the scan order in which the code amount is minimum after encoding as the scan order in which the number of sections divided by the segmented linear approximation unit is minimum before the image is encoded. . Then, this is selected as the optimum scanning order. If the one-dimensional approximation image data scanned by the optimal scanning order and obtained by the piecewise linear approximation is then encoded by run-length encoding or the like, the original image is optimally encoded.

上記区分線型近似の区間数を指標とした操作順序の選択を行えば、文書画像やグラフィック画像等の人工画像のようにエッジ以外の画素値の変化が少ない画像、自然画像のように隣接する画素値の変化が多い画像などの画像の属性に応じて符号化に最適な走査順序が選択される。そのため、画像の性質に適応した走査順序による原画像の1次元化がなされる。また、本発明では、符号化のための原画像の近似に区分線型近似を使用し、完全な符号化を行う前に、区分線型近似における区間数に基づいて最適な走査順序を選定する。これにより、高速な符号化処理が可能となる。   If the operation order is selected using the number of sections of the segmented line approximation as an index, an image in which pixel values other than edges change little like an artificial image such as a document image or a graphic image, or an adjacent pixel like a natural image An optimal scanning order for encoding is selected according to the attribute of an image such as an image whose value changes frequently. Therefore, the original image is one-dimensionalized in a scanning order adapted to the properties of the image. Further, in the present invention, a segmented linear approximation is used to approximate an original image for encoding, and an optimal scanning order is selected based on the number of sections in the segmented linear approximation before performing complete encoding. This enables high-speed encoding processing.

また、本発明では、操作順序の選定を、区分線型近似を行って得られる1次元近似画像データの区間数の比較を用いて行う。これにより、アルゴリズムが簡単であり、ハードウェアにより並列処理を行う構成とした場合でも、小規模な回路構成によって実現することができる。   In the present invention, the operation order is selected by comparing the number of sections of the one-dimensional approximate image data obtained by performing the piecewise linear approximation. Thus, the algorithm is simple and can be realized with a small-scale circuit configuration even when the configuration is such that parallel processing is performed by hardware.

本発明の画像符号化装置の第2の構成は、前記第1の構成において、前記区分線型近似手段は、前記1次元原画像を区分するに際し、1次元原画像を2区間に区分したときに、両区間における画素値の累積二乗誤差又は分散の和が最小となるような区分位置で前記1次元原画像を区分する2分割処理を行うとともに、前記2分割処理により2分された両区間について、当該区間における画素値の累積二乗誤差又は分散が所定の閾値以上の場合には、当該区間において前記2分割処理を再帰的に行うことにより、前記1次元原画像を区分することを特徴とする。   According to a second configuration of the image encoding apparatus of the present invention, in the first configuration, when the segmented linear approximation unit divides the one-dimensional original image into two sections when dividing the one-dimensional original image, Performing a two-segment process of dividing the one-dimensional original image at a segment position where the sum of accumulated square errors or variances of pixel values in both segments is minimized, and performing two segments in the two-segment process. When the cumulative square error or variance of pixel values in the section is equal to or larger than a predetermined threshold, the one-dimensional original image is divided by performing the two-division process recursively in the section. .

このように、本発明では、区分線型近似手段が上記2分割処理を再帰的に実行し、1次原画像を小区間に分割する構成とした。これにより、区間分割の際に、画像のエッジ部分が分割位置として保存される。従って、人工画像のように画像のエッジが強調される画像を符号化する際でも、符号化による画像の視覚的な歪みを最小限に抑えることができる。   As described above, in the present invention, the segmented line type approximation unit recursively executes the above-described two-segment processing to divide the primary original image into small sections. Thereby, at the time of section division, the edge portion of the image is stored as the division position. Therefore, even when encoding an image in which the edges of the image are enhanced such as an artificial image, visual distortion of the image due to the encoding can be minimized.

本発明の画像符号化装置の第3の構成は、前記第1又は2の構成において、前記1次元原画像を複数の小区間に分割する小区間分割手段を備え、前記区分線型近似手段は、前記小区間分割手段が分割した各小区間の1次元原画像に対して、前記1次元近似画像データを生成することを特徴とする。   A third configuration of the image encoding apparatus according to the present invention, in the first or second configuration, further includes a small section dividing unit configured to divide the one-dimensional original image into a plurality of small sections. The one-dimensional approximate image data is generated for the one-dimensional original image of each small section divided by the small section dividing means.

このように、小区間分割手段により1次元原画像を小区間に区分して、区分線型近似手段が各小区間について区分線型近似を行うことで、区分線型近似手段が行う計算量が少なくなる。従って、符号化処理を高速化することができる。特に、区分線型近似に再帰処理を用いる場合には、小区間への区分により計算量を大幅に減少させることができる。   As described above, the one-dimensional original image is divided into small sections by the small section dividing means, and the piecewise linear approximation means performs the piecewise linear approximation for each small section, thereby reducing the amount of calculation performed by the piecewise linear approximation means. Therefore, the encoding process can be sped up. In particular, when recursive processing is used for piecewise linear approximation, the amount of calculation can be significantly reduced by dividing into small sections.

本発明の画像符号化装置の第4の構成は、前記第3の構成において、前記区分線型近似手段が生成する前記各小区間の1次元近似画像データについて、隣接する2つの小区間における相対する最端部の区間の画素値の平均値の差が所定の閾値以下であり、かつ、一方の区間の長さが所定の閾値以下の場合、当該両区間の近似値を当該両区間全体の画素値の平均値で置き換える併合処理手段を備えていることを特徴とする。   In a fourth configuration of the image encoding device according to the present invention, in the third configuration, the one-dimensional approximation image data of each of the small sections generated by the piecewise linear approximation unit is opposed to each other in two adjacent small sections. If the difference between the average values of the pixel values in the end section is equal to or less than a predetermined threshold value and the length of one of the sections is equal to or less than the predetermined threshold value, the approximate value of both sections is calculated as the pixel value of the entirety of both sections. It is characterized by comprising merging processing means for replacing with an average value.

このように、本発明では、併合手段により、隣接する2つの小区間における相対する最端部の区間を、一定の条件のもとで併合する。これにより、無駄な区間分割を減らし、1次元近似画像データ全体での区間数を減少させることができる。従って、符号化効率が向上する。   As described above, in the present invention, the opposing extreme end sections of two adjacent small sections are merged under a certain condition by the merging means. This can reduce unnecessary section division and reduce the number of sections in the entire one-dimensional approximate image data. Therefore, the coding efficiency is improved.

ここで、2つの区間を併合する条件として、両区間の画素値の平均値の差が所定の閾値以下であるとしたのは、両区間の画素値の平均値の差が大きい場合には、併合による近似誤差の増加が大きくなるからである。   Here, as a condition for merging the two sections, the difference between the average values of the pixel values in both sections is equal to or smaller than a predetermined threshold value. When the difference between the average values of the pixel values in both sections is large, This is because the increase in the approximation error due to the merging increases.

また、2つの区間を併合する条件として、一方の区間の長さが所定の閾値以下としたのは、短い区間であれば、区間の併合によりエッジ情報が失われたとしても、視覚的に目立たず、事実上無視できる程度の歪みしか生じないからである。   As a condition for merging two sections, the length of one section is set to be equal to or less than a predetermined threshold value in a short section even if edge information is lost due to merging of sections. This is because practically negligible distortion occurs.

本発明の画像符号化装置の第5の構成は、前記第1乃至4の何れか一の構成において、前記最適走査選択手段は、前記各走査ユニットの前記区分線型近似手段のうちの所定の数のものが1次元近似画像データの生成処理を終了した時点で、まだ1次元近似画像データの生成処理の終了していない区分線型近似手段については当該処理を打ち切らせるとともに、当該処理の終了した前記走査ユニットの前記区分線型近似手段が区分した区間数を比較して、区間数が最小の1次元近似画像データを選択することを特徴とする。   In a fifth configuration of the image encoding apparatus according to the present invention, in any one of the first to fourth configurations, the optimum scanning selection unit may include a predetermined number of the segmented line approximation units of each scanning unit. At the time when the one-dimensional approximation image data generation process has been completed, the one-dimensional approximation image data generation process for which the one-dimensional approximation image data generation process has not been completed is terminated and the process is terminated. The method is characterized in that the number of sections divided by the segmented linear approximation means of the scanning unit is compared, and one-dimensional approximate image data having the smallest number of sections is selected.

区分線型近似手段の区分線型近似処理の時間は、一般に、区分される区間数が多いほど増加する。従って、1次元近似画像データの生成処理が早く終了した走査ユニットの区間数が最小である可能性が大きい。従って、所定の数の走査ユニットの区分線型近似処理が終了した時点で、残りの走査ユニットについては、区分線型近似処理を打ち切ってもよい。このように、残りの走査ユニットについて区分線型近似処理を打ち切ることで、最適走査選択手段の処理を早く終了させ、高速化することが可能となる。   In general, the time for the segmented line approximation processing by the segmented line approximation means increases as the number of sections to be segmented increases. Therefore, there is a high possibility that the number of sections of the scanning unit in which the generation processing of the one-dimensional approximate image data has been completed early is the minimum. Therefore, when the segmented line approximation processing of a predetermined number of scanning units is completed, the segmented line approximation processing may be terminated for the remaining scanning units. In this way, by terminating the piecewise linear approximation processing for the remaining scanning units, the processing of the optimum scanning selection unit can be terminated early, and the processing speed can be increased.

本発明の画像符号化装置の第6の構成は、前記第1乃至4の何れか一の構成において、前記最適走査選択手段は、前記各走査ユニットの前記区分線型近似手段のうちの1つが1次元近似画像データの生成処理を終了した時点からクロックのカウントを開始し、所定の時間内に1次元近似画像データの生成処理の終了していない区分線型近似手段については当該処理を打ち切らせるとともに、前記所定の時間内に当該処理の終了した前記走査ユニットの前記区分線型近似手段が区分した区間数を比較して、区間数が最小の1次元近似画像データを選択することを特徴とする。   According to a sixth configuration of the image encoding apparatus of the present invention, in any one of the first to fourth configurations, the optimum scan selection unit is configured such that one of the segmented line approximation units of each scanning unit is one. The clock counting is started from the time when the generation processing of the one-dimensional approximate image data is completed, and the processing is discontinued for the segmented line type approximation means for which the one-dimensional approximate image data generation processing is not completed within a predetermined time. The method is characterized in that the number of sections divided by the segmented linear approximation means of the scanning unit that has completed the processing within the predetermined time is compared, and one-dimensional approximate image data having the smallest number of sections is selected.

各走査ユニットの前記区分線型近似手段のうちの1つが1次元近似画像データの生成処理を終了した時点から、所定の時間内に1次元近似画像データの生成処理の終了しない走査ユニットの区間数は、最先に区分線型近似処理が終了した走査ユニットにおける1次元近似画像データの区間数に比べて、大きいと考えられる。従って、このような処理時間のかかる走査ユニットについては、所定の時間で区分線型近似処理を打ち切ることで、走査順序の最適な選択ができ、かつ、符号化処理時間を短縮することができる。   The number of sections of the scanning unit in which the one-dimensional approximation image data generation processing is not completed within a predetermined time from the time when one of the segmented linear approximation means of each scanning unit has completed the one-dimensional approximate image data generation processing is as follows: It is considered that the number is larger than the number of sections of the one-dimensional approximate image data in the scanning unit in which the piecewise linear approximation processing is completed first. Therefore, for such a scanning unit that requires a long processing time, by terminating the piecewise linear approximation processing at a predetermined time, it is possible to optimally select a scanning order and shorten the encoding processing time.

本発明の画像符号化装置の第7の構成は、前記第1乃至4の何れか一の構成において、前記最適走査選択手段は、前記各走査ユニットの前記区分線型近似手段のうちの1つが1次元近似画像データの生成処理を終了した場合、その1次元近似画像データの区間数を基準区間数として他の前記走査ユニットに対して送信し、各走査ユニットの区分線型近似手段は、前記基準区間数を受信した場合、1次元原画像を区分した区間数が前記基準区間数に所定の値を加えた数を超えたときに1次元近似画像データの生成処理を打ち切るとともに、前記最適走査選択手段は、前記1次元近似画像データの生成処理の終了した前記走査ユニットの前記区分線型近似手段が区分した区間数を比較して、区間数が最小の1次元近似画像データを選択することを特徴とする。   According to a seventh aspect of the image encoding apparatus of the present invention, in the configuration of any one of the first to fourth aspects, the optimum scan selecting means is such that one of the segmented line approximation means of each scanning unit is one. When the generation processing of the one-dimensional approximation image data is completed, the number of sections of the one-dimensional approximation image data is transmitted to the other scanning units as the number of reference sections, and the section line type approximation means of each scanning unit transmits the reference section. When receiving the number, when the number of sections obtained by dividing the one-dimensional original image exceeds the number obtained by adding a predetermined value to the number of reference sections, the generation processing of the one-dimensional approximate image data is terminated, and Compares the number of sections divided by the segmented linear approximation means of the scanning unit after the generation processing of the one-dimensional approximate image data, and selects the one-dimensional approximate image data having the smallest number of sections. And butterflies.

このように、基準区間数に所定の数を加えた区間数を超えた場合には、その後併合処理等を行っても基準区間数を下回る可能性は少ない。従って、このような区間数が多くなった走査ユニットについては、区間数が所定の数まで達した時点で区分線型近似処理を打ち切ることで、走査順序の最適な選択ができ、かつ、符号化処理時間を短縮することができる。   As described above, when the number of sections exceeds the number of reference sections plus a predetermined number, it is unlikely that the number of sections will be less than the number of reference sections even if the merge processing or the like is performed thereafter. Therefore, for the scanning unit having such a large number of sections, the optimal selection of the scanning order can be performed by terminating the piecewise linear approximation processing when the number of sections reaches a predetermined number, and the encoding processing can be performed. Time can be reduced.

本発明の画像符号化装置の第7の構成は、前記第1乃至7の何れか一の構成において、符号化する原画像に対し直交変換を行い変換画像を生成する直交変換手段と、前記変換画像を適応ビット配分により量子化し、量子化変換画像を生成する量子化手段と、前記量子化変換画像を所定の径路で走査するとともに、走査径路に沿って同値の画素が連続するラン長、及びそのランに対する画素値の組からなるラン・データを生成するラン・データ生成手段と、を有する直交変換ユニットを、少なくとも1つ備え、前記最適走査選択手段は、各走査ユニットの前記区分線型近似手段が区分した区間数、及び直交変換ユニットのラン・データ生成手段が生成したランの数(以下、「ラン数」という。)を比較して、区間数又はラン数が最小の1次元近似画像データ又はラン・データを選択することを特徴とする。   A seventh aspect of the image encoding apparatus according to the present invention is the image encoding apparatus according to any one of the first to seventh aspects, wherein: the orthogonal transform means for performing an orthogonal transform on an original image to be encoded to generate a transformed image; Quantizing means for quantizing an image by adaptive bit allocation to generate a quantized transformed image, and a run length in which the quantized transformed image is scanned along a predetermined path, and pixels having the same value continue along the scanning path, and At least one orthogonal transformation unit having run data generation means for generating run data consisting of a set of pixel values for the run, wherein the optimal scan selection means comprises: the segmented linear approximation means for each scan unit. Are compared with the number of runs generated by the run data generating means of the orthogonal transform unit (hereinafter referred to as “run number”), and the number of sections or one-dimensional ones having the minimum number of runs is compared. And selects the image data or run-data.

この構成によれば、自然画像のように直交変換による圧縮率がよい画像に対しては、直交変換ユニットが出力するラン数が、各走査ユニットが出力する区間数よりも少なくなる。従って、最適走査選択手段は、ラン数が最小のラン・データを選択する。このようにして、画像の性質により適応して1次元近似画像データ又はラン・データが選択され、より最適な符号化が図られる。その結果、符号化効率はより向上する。   According to this configuration, the number of runs output by the orthogonal transformation unit is smaller than the number of sections output by each scanning unit for an image such as a natural image having a good compression ratio by orthogonal transformation. Therefore, the optimum scan selecting means selects the run data having the minimum number of runs. In this way, one-dimensional approximation image data or run data is selected depending on the nature of the image, and more optimal encoding is achieved. As a result, the coding efficiency is further improved.

尚、「適応ビット配分」とは、通常の画像において、画素信号の電力が集中する低周波数側の画素に対しては多くのビット数を割り当てて量子化し、画素信号の電力が小さい高周波成分に対しては少ないビット数で量子化することをいう。この適応ビット配分は、変換符号化において広く使用されている方法である。   Note that "adaptive bit allocation" means that in a normal image, a large number of bits are allocated to pixels on the low frequency side where the power of the pixel signal is concentrated and quantized, and the pixel signal power is reduced to a high frequency component having a small power. On the other hand, it means quantization with a small number of bits. This adaptive bit allocation is a widely used method in transform coding.

本発明の画像符号化方法の第1の構成は、符号化する原画像を所定の走査順序に従って走査して生成される1次元原画像を、各区間内の画素値の累積二乗誤差又は分散が所定の閾値以下となるように複数の区間に区分し、各区間内の画素値を当該区間内における画素値の平均値により近似した1次元近似画像データを生成する区分線型近似処理を、異なる複数の走査順序に対応してそれぞれ並行して行う第1のステップ、前記各走査順序について区分線型近似処理により得られた各1次元近似画像データの区間数を比較して、区間数が最小の1次元近似画像データを選択する第2のステップ、及び選択された1次元近似画像データを符号化する第3のステップを有することを特徴とする。   A first configuration of the image encoding method according to the present invention is that a one-dimensional original image generated by scanning an original image to be encoded according to a predetermined scanning order is obtained by calculating a cumulative square error or a variance of pixel values in each section. A segmented linear approximation process for generating one-dimensional approximation image data in which a plurality of sections are divided so as to be equal to or less than a predetermined threshold and pixel values in each section are approximated by an average value of pixel values in the section, A first step performed in parallel with each of the scanning orders, and comparing the number of sections of each one-dimensional approximation image data obtained by the piecewise linear approximation processing with respect to each of the scanning orders, to determine whether the number of sections is the smallest one. The method has a second step of selecting the one-dimensional approximate image data and a third step of encoding the selected one-dimensional approximate image data.

本発明の画像符号化方法の第2の構成は、前記第1の構成において、前記区分線型近似処理においては、前記1次元原画像を区分するに際し、1次元原画像を2区間に区分したときに、両区間における画素値の累積二乗誤差又は分散の和が最小となるような区分位置で前記1次元原画像を区分する2分割処理を行うとともに、前記2分割処理により2分された両区間について、当該区間における画素値の累積二乗誤差又は分散が所定の閾値以上の場合には、当該区間において前記2分割処理を再帰的に行うことにより、前記1次元原画像を区分することを特徴とする。   A second configuration of the image encoding method according to the present invention is the image processing method according to the first configuration, wherein the one-dimensional original image is divided into two sections when the one-dimensional original image is divided in the segmented linear approximation processing. In addition, a two-division process of dividing the one-dimensional original image at a division position where the sum of the accumulated square errors or the variances of the pixel values in both the intervals is minimized, and the two segments divided by the two-division process are performed. In the case where the cumulative square error or variance of pixel values in the section is equal to or greater than a predetermined threshold, the two-dimensional processing is recursively performed in the section to partition the one-dimensional original image. I do.

本発明の画像符号化方法の第3の構成は、前記第1又は2の構成において、前記第1のステップにおいて、符号化する原画像に対し直交変換を行い変換画像を生成し、前記変換画像を適応ビット配分により量子化して量子化変換画像を生成し、前記量子化変換画像を所定の径路で走査するとともに、走査径路に沿って同値の画素が連続するラン長、及びそのランに対する画素値の組からなるラン・データを生成する走査を並行して行い、前記第2のステップにおいては、前記各走査順序について区分線型近似処理により得られた各1次元近似画像データの区間数、及び前記ラン・データのランの数(以下、「ラン数」という。)を比較して、区間数又はラン数が最小の1次元近似画像データを選択し、前記第3のステップにおいては、選択された1次元近似画像データ又はラン・データを符号化することを特徴とする。   In a third configuration of the image encoding method according to the present invention, in the first or second configuration, in the first step, a transformed image is generated by performing an orthogonal transform on an original image to be encoded, and the transformed image is generated. Is quantized by adaptive bit allocation to generate a quantized conversion image, the quantized conversion image is scanned along a predetermined path, and a run length in which pixels of the same value continue along the scanning path, and a pixel value for the run. Scanning is performed in parallel to generate run data consisting of a set of .times..times..times..times..times..times..times..times..times..times..tim- es..times..times..times..times..times. The number of runs of the run data (hereinafter referred to as “run number”) is compared, and one-dimensional approximate image data having the smallest number of sections or runs is selected. In the third step, the selected one-dimensional approximate image data is selected. The one-dimensional approximation image data or run-data, characterized in that encoding.

以上のように、本発明によれば、区分線型近似の区間数を指標とした操作順序の選択を行うことにより、文書画像やグラフィック画像等の人工画像のようにエッジ以外の画素値の変化が少ない画像、自然画像のように隣接する画素値の変化が多い画像などの画像の属性に応じて符号化に最適な走査順序が選択される。そのため、画像の性質に適応した走査順序による原画像の1次元化がなされる。   As described above, according to the present invention, a change in pixel values other than edges, such as an artificial image such as a document image or a graphic image, is performed by selecting an operation order using the number of sections of the segmented line approximation as an index. The optimal scanning order for encoding is selected according to the attributes of an image such as an image having a small change and an image having a large change in adjacent pixel values such as a natural image. Therefore, the original image is one-dimensionalized in a scanning order adapted to the properties of the image.

また、符号化のための原画像の近似に区分線型近似を使用し、完全な符号化を行う前に、区分線型近似における区間数に基づいて最適な走査順序を選定することとしたことにより、高速な符号化処理が可能となる。   In addition, by using a piecewise linear approximation for approximating the original image for encoding, and before performing complete encoding, by selecting an optimal scanning order based on the number of sections in the piecewise linear approximation, High-speed encoding processing becomes possible.

以下、本発明を実施するための最良の形態について、図面を参照しながら説明する。   Hereinafter, the best mode for carrying out the present invention will be described with reference to the drawings.

図1は本発明の実施例1に係る画像符号化装置の全体構成図である。図1において、本発明の実施例1に係る画像符号化装置は、画像入力手段1、画像領域分割手段2、n個(n≧2)の走査ユニット3-1〜3-n、最適走査選択手段4、符号化手段5、及び画像圧縮データ出力手段6を有している。   FIG. 1 is an overall configuration diagram of an image encoding device according to Embodiment 1 of the present invention. In FIG. 1, an image encoding apparatus according to a first embodiment of the present invention includes an image input unit 1, an image area dividing unit 2, n (n ≧ 2) scanning units 3-1 to 3-n, and optimal scanning selection. It has means 4, encoding means 5, and compressed image data output means 6.

画像入力手段1は、画像入力装置に原画像のデータを入力するものである。画像入力手段1としては、CCD素子等の撮像素子や、テレビ受像器、磁気ディスク装置等の画像記憶装置等が用いられる。画像領域分割手段2は、画像入力手段1から入力される画像を、複数の小領域(画像ブロック)に分割する。各走査ユニット3−i(i=1,…,n)は、それぞれに決められた所定の走査順序により、画像領域分割手段2が分割した各画像ブロックを走査するとともに、区分線型近似処理を行い、1次元近似画像データを生成する。   The image input means 1 is for inputting data of an original image to an image input device. As the image input means 1, an image pickup device such as a CCD device, an image storage device such as a television receiver, a magnetic disk device, or the like is used. The image area dividing means 2 divides an image input from the image input means 1 into a plurality of small areas (image blocks). Each scanning unit 3-i (i = 1,..., N) scans each image block divided by the image area dividing means 2 and performs a segmented line type approximation process in a predetermined scanning order determined respectively. 1. Generate one-dimensional approximate image data.

最適走査選択手段4は、各走査ユニット3−i(i=1,…,n)の生成する1次元近似画像データの区間数を比較して、最小の区間数の1次元近似画像データを選択する。符号化手段5は、最適走査選択手段4が選択した1次元近似画像データを各種符号化方式に従って符号化し、符号化画像を出力する。画像圧縮データ出力手段6は、符号化手段5が生成した符号化画像を出力する。画像圧縮データ出力手段6としては、画像送信機や画像記憶装置等が用いられる。   The optimal scanning selecting means 4 compares the number of sections of the one-dimensional approximate image data generated by each scanning unit 3-i (i = 1,..., N) and selects the one-dimensional approximate image data of the minimum number of sections. I do. The encoding unit 5 encodes the one-dimensional approximation image data selected by the optimal scanning selection unit 4 according to various encoding methods, and outputs an encoded image. The image compression data output unit 6 outputs the encoded image generated by the encoding unit 5. As the compressed image data output means 6, an image transmitter, an image storage device, or the like is used.

図2は図1の各走査ユニット3−i(i=1,…,n)の構成を表すブロック図である。走査ユニット3−i(i=1,…,n)は、走査手段7、小区間分割手段8、区分線型近似手段9、及び併合処理手段10により構成されている。   FIG. 2 is a block diagram showing the configuration of each scanning unit 3-i (i = 1,..., N) in FIG. The scanning unit 3-i (i = 1,..., N) includes a scanning unit 7, a small section dividing unit 8, a segmented line approximation unit 9, and a merging processing unit 10.

走査手段7は、画像領域分割手段2が分割した各画像ブロックを、それぞれに決められた走査順序に従って走査し、1次元原画像を生成する。この走査手段7は、画像領域メモリ7aと走査アドレス生成器7bとからなる。画像領域メモリ7aには、各メモリアドレスに画像ブロック内の画素値が走査順序に従って記憶される。走査アドレス生成器7bは、各走査ユニット3−i(i=1,…,n)のそれぞれに対して決められた走査順序に従って、画像ブロック内の走査座標を生成する。画像領域メモリ7aは、画像ブロックから当該走査座標における画素値を取得することにより画像ブロックの走査を行う。   The scanning means 7 scans each image block divided by the image area dividing means 2 in accordance with the scanning order determined respectively, and generates a one-dimensional original image. The scanning means 7 comprises an image area memory 7a and a scanning address generator 7b. In the image area memory 7a, pixel values in an image block are stored in each memory address in accordance with the scanning order. The scanning address generator 7b generates scanning coordinates in an image block according to a scanning order determined for each of the scanning units 3-i (i = 1,..., N). The image area memory 7a scans the image block by acquiring the pixel value at the scanning coordinates from the image block.

小区間分割手段8は、走査手段7が生成した1次元原画像を、更に複数の小区間に分割する(以下、この各小区間内の原画像データを、「小区間データ」という)。区分線型近似手段9は、小区間分割手段8が生成した小区間データを、区分線型近似により近似した小区間近似画像を生成する。併合処理手段10は、区分線型近似手段9が生成した小区間1次元近似画像データを所定の方法で併合し、1次元近似画像データを生成する。そして、この1次元近似画像データは、最適走査選択手段4に出力される。   The small section dividing unit 8 further divides the one-dimensional original image generated by the scanning unit 7 into a plurality of small sections (hereinafter, the original image data in each small section is referred to as “small section data”). The segmented line approximation unit 9 generates a small segment approximation image obtained by approximating the small segment data generated by the small segment division unit 8 by the segmented line approximation. The merging processing unit 10 merges the small section one-dimensional approximate image data generated by the piecewise linear approximation unit 9 by a predetermined method to generate one-dimensional approximate image data. Then, the one-dimensional approximation image data is output to the optimal scanning selection unit 4.

図3は図2の区分線型近似手段9の構成を表すブロック図である。区分線型近似手段9は、小区間メモリ11、区間レジスタ12、区間分割処理部13、分割処理制御部14、及び小区間近似画像メモリ15により構成されている。   FIG. 3 is a block diagram showing a configuration of the segmented linear approximation means 9 of FIG. The segmented line type approximating means 9 includes a small section memory 11, a section register 12, a section division processing section 13, a division processing control section 14, and a small section approximate image memory 15.

小区間メモリ11は、小区間分割手段8が分割した小区間データを記憶する。区間レジスタ12は、小区間メモリ11に記憶された画素値のデータのうち、区分線型近似を行う対象となる区間のデータ(以下、「被処理区間データ」という。)を記憶する。区間分割処理部13は、区間レジスタ12に記憶された被処理区間データに対して区間分割処理を行う。ここで、「区間分割処理」とは、被処理区間データを2つの区間に分割したときに、両区間の画素値の累積二乗誤差の和が最小となる位置で、被処理区間データを分割するとともに、各分割区間のデータを当該区間における画素値の平均値で近似する処理をいう。   The small section memory 11 stores the small section data divided by the small section dividing means 8. The section register 12 stores data of a section to be subjected to a piecewise linear approximation (hereinafter, referred to as “processed section data”) among the pixel value data stored in the small section memory 11. The section division processing unit 13 performs section division processing on the section data to be processed stored in the section register 12. Here, the “section division processing” is to divide the processing section data at a position where, when the processing section data is divided into two sections, the sum of the accumulated square errors of the pixel values of both sections is minimum. In addition, it refers to a process of approximating data of each divided section with an average value of pixel values in the section.

分割処理制御部14は、区間分割処理部13により、小区間メモリ11に記憶された小区間データについて再帰的に区間分割処理を行う。そして、分割処理制御部14は、分割された小区間データの各区間における画素値の累積二乗誤差が、それぞれ所定の閾値以下となるように、再帰的に区間分割処理を行い、1次元近似画像データを生成する。小区間近似画像メモリ15は、分割処理制御部14により生成された1次元近似画像データを記憶する。   The division processing control unit 14 recursively performs the section division processing on the small section data stored in the small section memory 11 by the section division processing unit 13. Then, the division processing control unit 14 performs the section division processing recursively so that the cumulative square error of the pixel value in each section of the divided small section data is equal to or less than a predetermined threshold, and performs the one-dimensional approximation image. Generate data. The small section approximate image memory 15 stores the one-dimensional approximate image data generated by the division processing control unit 14.

図4は図3の区間分割処理部13の構成を表すブロック図である。図4において、区間分割処理部13は、アドレス生成部21、自乗算器22、自乗加算アキュミュレータ23、加算アキュミュレータ24、自乗算器25、アップカウンタ26、除算器27、減算器28、除算器29、減算アキュミュレータ30、自乗減算アキュミュレータ31、自乗算器32、ダウンカウンタ33、除算器34、減算器35、除算器36、加算器37、比較判定部38、最小累積誤差メモリ39、区分線型近似終了判定部40、左誤差レジスタ41、右誤差レジスタ42、左レベルレジスタ43、左区間長レジスタ44、右レベルレジスタ45、及び右区間長レジスタ46を備えている。各部の機能については、後述の動作説明と併せて説明する。   FIG. 4 is a block diagram illustrating a configuration of the section division processing unit 13 in FIG. In FIG. 4, the section division processing unit 13 includes an address generation unit 21, a square multiplier 22, a square addition accumulator 23, an addition accumulator 24, a square multiplier 25, an up counter 26, a divider 27, a subtracter 28, and a division unit. , A subtraction accumulator 30, a square subtraction accumulator 31, a self-multiplier 32, a down counter 33, a divider 34, a subtractor 35, a divider 36, an adder 37, a comparison judging unit 38, a minimum cumulative error memory 39, It includes a segmented linear approximation end determination unit 40, a left error register 41, a right error register 42, a left level register 43, a left section length register 44, a right level register 45, and a right section length register 46. The function of each unit will be described together with the operation description described later.

図5は図2の併合処理手段10の構成を表すブロック図である。図5において、併合処理手段10は、併合処理判定部51、併合データ生成部52、及び併合区間レジスタ53を有している。   FIG. 5 is a block diagram showing the configuration of the merging processing means 10 of FIG. In FIG. 5, the merging processing unit 10 includes a merging process determining unit 51, a merged data generating unit 52, and a merging section register 53.

併合処理判定部51は、小区間近似画像メモリ15に記憶された各小区間データについて、隣接する2つの小区間における相対する最端部の区間の画素値の平均値の差が所定の閾値以下であり、かつ、一方の区間の長さが所定の閾値以下であるかどうかの判定を行う。また、併合データ生成部52は、小区間近似画像メモリ15に記憶された各小区間データについて、隣接する2つの小区間における相対する最端部の区間の近似値を当該両区間全体の画素値の平均値で置き換える処理を行う。併合区間レジスタ53は、併合処理が行われた後の小区間データを一時的に記憶する。   The merging process determination unit 51 determines that, for each of the small section data stored in the small section approximate image memory 15, the difference between the average values of the pixel values of the opposing extreme end sections in two adjacent small sections is equal to or less than a predetermined threshold value. And whether the length of one section is equal to or less than a predetermined threshold value. Further, the merged data generation unit 52 calculates, for each of the small section data stored in the small section approximate image memory 15, the approximate value of the opposing extreme end section in two adjacent small sections to the pixel value of the entire two sections. The process of replacing with the average value is performed. The merging section register 53 temporarily stores the small section data after the merging process has been performed.

併合処理判定部51は、第1のレベル差判定部61、第2のレベル差判定部62、境界前区間長判定部63、境界後区間長判定部64、及び併合処理総合判定部65を備えている。また、併合データ生成部52は、2つの乗算器66,67、2つの加算器68,69、及び除算器70を備えている。これら各部の機能については、後述の動作説明と併せて説明する。   The merging process determining unit 51 includes a first level difference determining unit 61, a second level difference determining unit 62, a pre-boundary section length determining unit 63, a post-boundary section length determining unit 64, and a merging process comprehensive determining unit 65. ing. Further, the merged data generation unit 52 includes two multipliers 66 and 67, two adders 68 and 69, and a divider 70. The function of each of these units will be described together with the operation description described later.

図6は図1の最適走査選択手段4の構成を表すブロック図である。図6において、最適走査選択手段4は、最適走査判定部81、及び最適走査セレクタ82を備えている。   FIG. 6 is a block diagram showing the configuration of the optimum scanning selection means 4 of FIG. In FIG. 6, the optimal scanning selecting means 4 includes an optimal scanning determining unit 81 and an optimal scanning selector 82.

最適走査判定部81は、各走査ユニット3−i(i=1,…,n)の区分線型近似手段9が区分し併合処理手段により併合処理がされた1次元近似画像データのうち、最も区間数の少ないものを判定し、その走査ユニットの番号(以下、「最適走査番号」という。)mを出力する。最適走査セレクタ82は、最適走査番号mの走査ユニット3−mが出力する1次元近似画像データを選択し、符号化手段5に出力する。   The optimum scanning determination unit 81 is the one-dimensional approximate image data of the one-dimensional approximate image data that is divided by the segmented linear approximation unit 9 of each scanning unit 3-i (i = 1,..., N) and merged by the merge processing unit. A small number is determined, and the number (hereinafter, referred to as “optimal scanning number”) m of the scanning unit is output. The optimal scanning selector 82 selects the one-dimensional approximate image data output by the scanning unit 3-m of the optimal scanning number m, and outputs it to the encoding unit 5.

図7は図1の符号化手段5の構成を表すブロック図である。図7において、符号化手段5は、走査情報符号化部91、輝度情報符号化部92、区間長情報符号化部93、及び符号化情報合成部94を備えている。   FIG. 7 is a block diagram showing the configuration of the encoding means 5 of FIG. 7, the encoding unit 5 includes a scanning information encoding unit 91, a luminance information encoding unit 92, a section length information encoding unit 93, and an encoded information combining unit 94.

走査情報符号化部91は、最適走査選択手段4が出力する最適走査番号mを、走査の頻度に基づくハフマン符号等を用いたエントロピー符号化により符号化を行う。輝度情報符号化部92は、最適走査選択手段4が出力する1次元近似画像データのうちの各区間の輝度情報について、輝度レベルの差分値のハフマン符号等を用いたエントロピー符号化により符号化を行う。区間長情報符号化部93は、最適走査選択手段4が出力する1次元近似画像データのうちの各区間の区間長情報について、ワイル符号等を用いたエントロピー符号化による符号化を行う。   The scan information encoding unit 91 encodes the optimal scan number m output from the optimal scan selection unit 4 by entropy encoding using a Huffman code or the like based on the scan frequency. The luminance information encoding unit 92 encodes the luminance information of each section in the one-dimensional approximation image data output by the optimal scanning selection unit 4 by entropy encoding using a Huffman code of a luminance level difference value or the like. Do. The section length information encoding unit 93 performs encoding by entropy encoding using Weyl code or the like on the section length information of each section in the one-dimensional approximate image data output by the optimal scanning selection unit 4.

以上のように構成された本実施例の画像符号化装置について、以下その画像符号化方法について説明する。図8は実施例1における画像符号化方法の処理全体の流れを表すフローチャートである。   The image encoding method of the image encoding apparatus according to the present embodiment configured as described above will be described below. FIG. 8 is a flowchart illustrating a flow of the entire processing of the image encoding method according to the first embodiment.

本実施例における画像符号化装置が原画像の符号化を行う場合、まず、画像入力手段1に、原画像のデータが入力される(S1)。原画像が入力されると、次に、画像領域分割手段2は、原画像をM個(M>1)の画像ブロックに分割する(S2)。画像の分割が終了すると、画像領域分割手段2は、符号化対象となる画像ブロックの番号を表すパラメータiに1を設定する(S3)。 When the image encoding device in the present embodiment encodes an original image, first, data of the original image is input to the image input unit 1 (S1). When an original image is inputted, then the image area dividing unit 2 divides the original image into image blocks of M b-number (M b> 1) (S2 ). When the division of the image is completed, the image region dividing means 2 sets 1 to a parameter i representing the number of the image block to be encoded (S3).

次に、画像領域分割手段2は、各走査ユニット3−1〜3−nに対して、走査開始指示を出力する(S4)。これにより、各走査ユニット3−1〜3−nは、画像ブロックの走査と区分線型近似処理を開始する。   Next, the image area dividing means 2 outputs a scanning start instruction to each of the scanning units 3-1 to 3-n (S4). Thereby, each of the scanning units 3-1 to 3-n starts scanning of the image block and the segmented line type approximation process.

各走査ユニット3−1〜3−nは、区分線型近似処理が終了すると、最適走査選択手段4に対して処理終了信号を送信する。最適走査選択手段4は、総ての走査ユニット3−1〜3−nより処理終了信号が送信されるまで待機する(S5)。   Each of the scanning units 3-1 to 3-n transmits a processing end signal to the optimum scanning selection means 4 when the piecewise linear approximation processing is completed. The optimal scanning selection means 4 waits until a processing end signal is transmitted from all the scanning units 3-1 to 3-n (S5).

ここで、区分線型近似処理においては、走査手段7によって走査され1次元化された1次元原画像データは、区分線型近似手段9により、複数の区間に分割され、各区間の画素値が当該区間内の画素値の平均値で近似される。このとき、区間の分割の仕方は、各区間内における画素値の累積二乗誤差が所定の閾値σth 2以下となるように分割される。従って、各走査ユニット3−k(k=1,…,n)により生成される1次元近似画像データは、{(c (k),l (k));i=1,…,Nsection (k)}(但し、c (k)は区間i内の画素の平均値、l (k)は区間iの区間長、Nsection (k)は、全区間数。)のようなデータとなる。 Here, in the segmented-line approximation processing, the one-dimensional original image data scanned and made one-dimensional by the scanning unit 7 is divided into a plurality of sections by the segmented-line approximation unit 9, and the pixel value of each section is set in the section. Is approximated by the average value of the pixel values in. At this time, the section is divided so that the cumulative square error of the pixel value in each section is equal to or smaller than a predetermined threshold σ th 2 . Therefore, the one-dimensional approximate image data generated by each scanning unit 3-k (k = 1,..., N) is {(c i (k) , l i (k) ); i = 1,. section (k) } (where c i (k) is the average value of the pixels in section i, l i (k) is the section length of section i, and N section (k) is the total number of sections). Data.

また、各走査ユニット3−1〜3−nは、それぞれが異なる走査順序により画像ブロックを走査する。走査順序としては、例えば、図9に示したような、ラスタ走査、ジグザグ走査、渦巻き走査、ヒルベルト走査等の各種の走査順序を用いることができる。   Each of the scanning units 3-1 to 3-n scans an image block in a different scanning order. As the scanning order, for example, various scanning orders such as raster scanning, zigzag scanning, spiral scanning, and Hilbert scanning as shown in FIG. 9 can be used.

総ての走査ユニット3−1〜3−nより処理終了信号が送信されると、最適走査選択手段4は、各走査ユニット3−1〜3−nが生成した1次元近似画像データの区間数Nsection (k)(k=1,…,n)を比較し(S6)、区間数が最も少ない1次元近似画像データ{(c (m),l (m));i=1,…,Nsection (m)}(m=argmink Nk)を選択する(S7)。区間数Nsection (k)が少ないほど、1次元近似画像データの符号量が少ないため、符号化効率がよいからである。 When the processing end signals are transmitted from all the scanning units 3-1 to 3-n, the optimal scanning selecting unit 4 determines the number of sections of the one-dimensional approximate image data generated by each of the scanning units 3-1 to 3-n. N section (k) (k = 1,..., N) are compared (S6), and one-dimensional approximate image data {(c i (m) , l i (m) ) having the smallest number of sections; i = 1, .., N section (m) } (m = argmin k N k ) is selected (S7). This is because the smaller the number of sections N section (k) , the smaller the code amount of the one-dimensional approximation image data, and the better the coding efficiency.

このように、画像を符号化する前段階において、区分線型近似処理により得られる1次元近似画像データの区間数Nsection (k)(k=1,…,n)により、符号化後の符号量を推定し、符号量が最小となると推定される1次元近似画像データを選択することで、短い処理時間で、画像の属性に最も適合した走査順序を選択することが可能となる。また、区分線型近似処理は、後述するように、画像のエッジを区間の分割点とする傾向が強いため、画像のエッジが鋭いほど、1次元近似画像データにおいて画像のエッジがよく保存される。従って、人工画像のように、鋭いエッジを有する画像においては、画像のエッジにおける視覚的な歪みを最小限に抑えることが可能となる。 As described above, before the image is encoded, the code amount after encoding is determined by the number of sections N section (k) (k = 1,..., N) of the one-dimensional approximate image data obtained by the piecewise linear approximation processing. Is estimated, and the one-dimensional approximate image data that is estimated to have the smallest code amount can be selected in a short processing time, and the scanning order most suitable for the attribute of the image can be selected. Also, as described later, since the edge of the image has a strong tendency to be the division point of the section in the segmented line approximation processing, the sharper the edge of the image, the better the image edge is stored in the one-dimensional approximate image data. Therefore, in an image having a sharp edge such as an artificial image, visual distortion at the edge of the image can be minimized.

次に、符号化手段5は、選択された1次元近似画像データ(走査順序に関する情報も含む。)をハフマン符号化方式やランレングス符号化方式等の通常の手法により符号化する(S8)。そして、符号化されたi番目の画像ブロックのデータは、画像圧縮データ出力手段6により出力される(S9)。   Next, the encoding unit 5 encodes the selected one-dimensional approximate image data (including information on the scanning order) by a normal method such as a Huffman encoding method or a run-length encoding method (S8). Then, the encoded data of the i-th image block is output by the image compression data output means 6 (S9).

そして、画像符号化装置は、パラメータiの値を1だけインクリメントして、iがM以下である間(S11)、上記ステップS4〜S10までの動作を繰り返し行い、総ての画像ブロックについての符号化処理を行う。 Then, the image coding apparatus, the value of the parameter i is incremented by 1, i is between equal to or less than M b (S11), it repeats the operations from the step S4 to S10, for all image blocks Perform encoding processing.

最後に、ステップS11において、パラメータiがMbより大きくなったときに、画像符号化処理を終了する。   Finally, in step S11, when the parameter i becomes larger than Mb, the image encoding process ends.

以上が本実施例における画像符号化方法の全体的な処理の流れであるが、以下、画像符号化装置の各部の動作について、より詳細に説明する。
図10は走査ユニット3−k(k=1,…,n)のデータ処理を表すフローチャート、図11は画像ブロック内の走査順序の一例を示す図、図12は画像領域メモリ7aの内容を表す図、図13は走査アドレス生成器7b内のメモリの内容を表す図である。図11〜図13では、画像ブロックの大きさは、p×q画素としてある。尚、図9では走査の例として正方形領域の走査を示しているが、これらの正方形領域の走査を組み合わせて又は変形して長方形領域の走査に拡張することは容易である。
The above is the overall processing flow of the image encoding method in the present embodiment. Hereinafter, the operation of each unit of the image encoding device will be described in more detail.
FIG. 10 is a flowchart showing the data processing of the scanning unit 3-k (k = 1,..., N), FIG. 11 is a diagram showing an example of the scanning order in the image block, and FIG. 12 shows the contents of the image area memory 7a. FIG. 13 is a diagram showing the contents of the memory in the scan address generator 7b. 11 to 13, the size of the image block is p × q pixels. Note that FIG. 9 shows scanning of a square area as an example of scanning, but it is easy to extend or combine these square area scans or scan them with a rectangular area.

走査ユニット3−kは、画像領域分割手段2より走査開始指示を受信すると、まず、走査手段7が、画像ブロックの走査を行い、1次元原画像を生成する(S21)。   When the scanning unit 3-k receives the scanning start instruction from the image area dividing unit 2, first, the scanning unit 7 scans the image block to generate a one-dimensional original image (S21).

このとき、画像領域メモリ7aには、図12のような順序で原画像の画素値が格納されている。また、走査アドレス生成器7bは、走査順序を格納するメモリを有している。走査ユニット3−kが、図11のようなジグザグ走査を行う場合、走査アドレス生成器7b内のメモリには、アドレスの小さい順に、図11のようなジグザグ走査の順序に従って画像領域メモリ7aの対応するアドレスが格納されている。そして、走査アドレス生成器7bは、クロックに従って、画像領域メモリのアドレスを、走査順序に沿って順次出力する。画像領域メモリ7aは、走査アドレス生成器7bから入力されるアドレスに格納された画素データを出力する。これにより、所定の走査順序で走査された1次元原画像が生成される。   At this time, the pixel values of the original image are stored in the image area memory 7a in the order shown in FIG. The scanning address generator 7b has a memory for storing the scanning order. When the scanning unit 3-k performs the zigzag scanning as shown in FIG. 11, the memory in the scanning address generator 7b stores the correspondence of the image area memory 7a according to the zigzag scanning order as shown in FIG. Address is stored. Then, the scanning address generator 7b sequentially outputs the addresses of the image area memory in the scanning order according to the clock. The image area memory 7a outputs the pixel data stored at the address input from the scan address generator 7b. Thus, a one-dimensional original image scanned in a predetermined scanning order is generated.

次に、小区間分割手段8は、1次元原画像を、M個(M>1)の小区間に等分し、小区間データを生成する(S22)。この小区間分割は、後述の再帰的な区間分割処理を少ない演算回数で行うためにされる。各小区間データは、区分線型近似手段9の内部の小区間メモリ11に一旦格納される。   Next, the small section dividing means 8 equally divides the one-dimensional original image into M (M> 1) small sections to generate small section data (S22). This small section division is performed in order to perform a recursive section division process described later with a small number of calculations. Each small section data is temporarily stored in a small section memory 11 inside the segmented line type approximation means 9.

次に、区分線型近似手段9は、内部変数として有するカウンタiを1に設定する(S23)。このカウンタiは、区分線型近似処理を行う小区間データの番号を表すものである。   Next, the piecewise linear approximation unit 9 sets a counter i as an internal variable to 1 (S23). This counter i indicates the number of the small section data to be subjected to the segmented line type approximation processing.

次に、区分線型近似手段9は、i番目の小区間lの小区間データを区間レジスタ12に設定する(S25)。そして、区間分割処理部13及び分割処理制御部14は、i番目の小区間データについて区分線型近似処理を行う(S26〜S28)。この区分線型近似処理は、(数1)のような再帰アルゴリズムによって行われる。   Next, the section line type approximation means 9 sets the small section data of the i-th small section 1 in the section register 12 (S25). Then, the section division processing unit 13 and the division processing control unit 14 perform the segmented line approximation processing on the i-th small section data (S26 to S28). This piecewise linear approximation is performed by a recursive algorithm such as (Equation 1).

Figure 2004312693
Figure 2004312693

ここで、区間分割処理とは、区間lを2つに分割した際に、左右の区間内における画素値の累積二乗誤差が最小となる分割位置で、区間lを2つの区間ll,lrに分割する処理をいう。この区間分割処理の詳細については後述する。 Here, the section division processing is a division position where when the section l is divided into two, the cumulative square error of the pixel values in the left and right sections is minimized, and the section l is divided into two sections l l , l r Refers to the process of dividing into The details of this section division processing will be described later.

(数1)の2行目で、区間lについて区間分割処理を行うことによって、分割された2つの区間ll,lrと、各区間における画素値の累積二乗誤差el,min,er,min及び各区間における画素値の平均cl,crが求まる。尚、(数1)では、cl,crについては直接関係ないので省略している。 In the second line of (Equation 1), the section l is subjected to the section dividing process, so that the two divided sections l l and l r and the cumulative square errors e l, min and e r of the pixel values in each section are obtained. , the average c l of pixel values in min and each section, c r is obtained. Incidentally, are omitted because the (number 1), c l, not directly related to the c r.

(数1)の3〜5行目では、分割された左側の区間llにおいて、当該区間内における画素値の累積二乗誤差el,minが所定の閾値ethよりも大きい場合には、区間llについて、再帰的に区分線型近似処理を行う。一方、累積二乗誤差el,minが所定の閾値eth以下であれば、区間llについては、区分線型近似処理は行わない。 In the third to fifth rows of (Equation 1), if the cumulative square error e l, min of the pixel values in the divided left section l l is larger than a predetermined threshold value e th in the section l l , About l l, a recursive partitioned linear approximation processing. On the other hand, if the cumulative square error e l, min is equal to or less than the predetermined threshold value e th , the section line approximation processing is not performed for the section l l .

(数1)の6〜8行目では、分割された右側の区間lrにおいても同様に、当該区間内における画素値の累積二乗誤差er,minが所定の閾値ethよりも大きい場合には、区間lrについて、再帰的に区分線型近似処理を行い、累積二乗誤差er,minが所定の閾値eth以下であれば、区間lrについては、区分線型近似処理は行わない。 The 6-8 line (number 1), also in section l r of the divided right, cumulative square error e r of the pixel values within the interval, if min is greater than a predetermined threshold value e th , for the interval l r, recursively performs division linear approximation, the cumulative square error e r, if min is equal to or less than a predetermined threshold value e th, for the section l r, divided linear approximation is not performed.

以上のような区分線型近似処理により、i番目の小区間データは、更にf(i)個の区間からなる小区間1次元近似画像データに分割される。そして、各区間における画素値の累積二乗誤差は、所定の閾値eth以下に抑えられる。従って、区間内に画像の鋭いエッジを含むと、当該区間内の累積二乗誤差が所定の閾値eth以下には抑えられないため、エッジ部分において分割され、区間内には画像の鋭いエッジは含まれないように分割がされる。すなわち、上記区分線型近似処理により、画像のエッジは区間の境界として保存されることになる。 By the above piecewise linear approximation processing, the i-th small section data is further divided into small section one-dimensional approximate image data including f (i) sections. Then, the cumulative square error of the pixel value in each section is suppressed to a predetermined threshold value eth or less. Therefore, if a sharp edge of the image is included in the section, the cumulative square error in the section cannot be suppressed to the predetermined threshold value e th or less, so that the section is divided at the edge portion, and the sharp edge of the image is included in the section. Are divided so that they are not That is, the edge of the image is stored as the boundary of the section by the above-described segmented line type approximation processing.

尚、上記区間分割処理については、区間分割処理部13が行い、上述のような再帰的な処理の制御については、分割処理制御部14が行う。また、区分線型近似処理により近似値が確定した区間については、その区間長と画素値の平均値が、小区間近似画像メモリ15に蓄えられる。   The section division processing is performed by the section division processing unit 13, and the control of the recursive processing as described above is performed by the division processing control unit 14. In addition, for the section in which the approximate value is determined by the segmented line approximation processing, the average value of the section length and the pixel value is stored in the small section approximate image memory 15.

i番目の小区間データについての区分線型近似処理が終わると、区分線型近似手段9は、カウンタiの値を1だけインクリメントする(S29)。そして、iの値がMよりも大きくなければ(S30)、再び、上記ステップS25〜S29の処理を繰り返す。   When the piecewise linear approximation processing for the i-th small section data is completed, the piecewise line type approximation means 9 increments the value of the counter i by 1 (S29). If the value of i is not larger than M (S30), the processes of steps S25 to S29 are repeated again.

一方、ステップS30において、i>Mであった場合、区分線型近似手段9は、最適走査選択手段4に対して処理終了信号を送信する(S31)。そして、各小区間の最端部の区間についての併合処理を行って(S32)、走査ユニット3−kはデータ処理を終了する。   On the other hand, if i> M in step S30, the segmented linear approximation unit 9 transmits a processing end signal to the optimal scan selection unit 4 (S31). Then, the merging process is performed for the end section of each small section (S32), and the scanning unit 3-k ends the data processing.

次に、区間分割処理について補足説明をする。図14は図3,図4の区間分割処理部13による区間分割処理を表すフローチャート、図15は図14の各ノードにおける演算出力を表す図である。   Next, a supplementary explanation will be given of the section dividing process. FIG. 14 is a flowchart showing the section dividing process by the section dividing section 13 of FIGS. 3 and 4, and FIG. 15 is a diagram showing the calculation output at each node of FIG.

最初に、区間レジスタ12に区間長がNの被処理区間データ{x;i=1,…,N}が設定されると、自乗加算アキュミュレータ23及び加算アキュミュレータ24にクリア信号が入力され、両アキュミュレータの累算値は0にクリアされる。また、アップカウンタ26もリセットされる。そして、アドレス生成部21は、1クロックごとに、区間レジスタ12に対して入力するアドレス値を、昇順に1ずつ増加させる。それに伴い、区間レジスタ12の出力であるノード(1)には、クロック値i(1≦i≦N)に対して画素値xが出力される。 First, when the processing section data {x i ; i = 1,..., N} whose section length is N is set in the section register 12, the clear signal is input to the square addition accumulator 23 and the addition accumulator 24. , The accumulated values of both accumulators are cleared to zero. The up counter 26 is also reset. Then, the address generation unit 21 increases the address value input to the section register 12 by one in ascending order every clock. Along with this, the node (1) is the output of the interval register 12, the pixel value x i is output to the clock value i (1 ≦ i ≦ N) .

自乗算器22は、ノード(1)から入力される画素値xiを自乗した値xi 2を、ノード(2)に出力する。自乗加算アキュミュレータ23は、1クロックごとに、ノード(2)の出力値を累算する。従って、クロック値がi(1≦i≦N)のときには、自乗加算アキュミュレータ23には累算値としてΣk=1 i xk 2が記憶される。 The square multiplier 22 outputs a value x i 2 obtained by squaring the pixel value x i input from the node (1) to the node (2). The square addition accumulator 23 accumulates the output value of the node (2) every clock. Therefore, when the clock value is i (1 ≦ i ≦ N), Σ k = 1 i x k 2 is stored in the square addition accumulator 23 as an accumulated value.

同様に、加算アキュミュレータ24は、1クロックごとに、ノード(1)の出力値を累算する。従って、クロック値がi(1≦i≦N)のときには、加算アキュミュレータ24には累算値としてΣk=1 i xkが記憶される。 Similarly, the addition accumulator 24 accumulates the output value of the node (1) every clock. Therefore, when the clock value is i (1 ≦ i ≦ N), 加 算k = 1 i x k is stored in the addition accumulator 24 as an accumulated value.

アップカウンタ26は、クロック数をカウントし、クロック値がi(1≦i≦N)のときには、ノード(6)にはiが出力される。   The up counter 26 counts the number of clocks, and when the clock value is i (1 ≦ i ≦ N), i is output to the node (6).

クロック値iが1からNまで変化した時点で、加算アキュミュレータ24には(数2)のSr,1値が記憶され、自乗加算アキュミュレータ23には、(数3)のSr,2値が記憶されている。また、アップカウンタ26のカウント値はNとなる。 When the clock value i is changed from 1 to N, the adder accumulator 24 is stored in the S r, 1 value (number 2), the square sum accumulator 23, S r, 2 (Equation 3) The value is stored. The count value of the up counter 26 is N.

Figure 2004312693
Figure 2004312693

Figure 2004312693
Figure 2004312693

そして、クロック値がN+1となった時点で、加算アキュミュレータ24,自乗加算アキュミュレータ23の値は、それぞれ、減算アキュミュレータ30及び自乗減算アキュミュレータ31に設定される。すなわち、クロック値N+1において、減算アキュミュレータ30,自乗減算アキュミュレータ31には、(数2)、(数3)で示したSr,1,Sr,2の値が設定され、これらの値がノード(10)、(9)に出力される(S41)。 When the clock value becomes N + 1, the values of the addition accumulator 24 and the square addition accumulator 23 are set in the subtraction accumulator 30 and the square subtraction accumulator 31, respectively. That is, at the clock value N + 1, the values of S r, 1 and S r, 2 shown in (Equation 2) and (Equation 3) are set in the subtraction accumulator 30 and the square subtraction accumulator 31, respectively. Is output to the nodes (10) and (9) (S41).

それと同時に、加算アキュミュレータ24,自乗加算アキュミュレータ23にはクリア信号が入力され、両アキュミュレータの累積値は再び0にクリアされる。また、ダウンカウンタ33には、アップカウンタ26のカウント値Nが設定され、これがノード(12)に出力される。アップカウンタ26は再びリセットされる。また、アドレス生成部21の発生するアドレス値もリセットされる(S42)。このとき、初期値として、左区間長レジスタ44の値は0、右区間長レジスタ46の値はN、最小累積誤差メモリ39には(数4)の値が設定される。   At the same time, a clear signal is input to the addition accumulator 24 and the square addition accumulator 23, and the accumulated values of both accumulators are cleared to 0 again. Further, the count value N of the up counter 26 is set in the down counter 33, and this is output to the node (12). The up counter 26 is reset again. Further, the address value generated by the address generation unit 21 is also reset (S42). At this time, the value of the left section length register 44 is set to 0, the value of the right section length register 46 is set to N, and the value of (Equation 4) is set to the minimum cumulative error memory 39 as initial values.

Figure 2004312693
Figure 2004312693

更に、クロック値がN+1から1ずつ増加していくと、アドレス生成部21は、1クロックごとに、区間レジスタ12に対して入力するアドレス値を、昇順に1ずつ増加させる。それに伴い、区間レジスタ12の出力であるノード(1)には、クロック値がN+N1+1(1≦N1≦N-1)のとき、画素値xN1が出力される。そして、ノード(2)、(3)、(4)、(6)には、それぞれ、xN1 2, Sl,2k=1 N1 xk 2, Sl,1k=1 N1 xk ,N1が出力される。また、自乗加算器25は、ノード(4)の出力値を自乗した値Sl,1 2= (Σk=1 N1 xk)2をノード(5)に出力する。更に、除算器27は、ノード(5)の出力値をノード(6)の出力値で除算した値Sl,1 2/N1を出力する。除算器29は、ノード(4)の出力値をノード(6)の出力値で除算した値Sl,1/N1をノード(16)に出力する。これは、長さN1の左側区間の画素値の平均値である。減算器28は、ノード(3)の出力値からノード(7)の出力値を減算した値(数5)をノード(8)に出力する。 Further, when the clock value increases by one from N + 1, the address generation unit 21 increases the address value input to the section register 12 by one in ascending order every clock. Along with this, the node (1) is the output of the interval register 12, when the clock value is N + N 1 +1 in (1 ≦ N 1 ≦ N1), the pixel value x N1 is output. Then, nodes (2), (3), (4), and (6) have x N1 2 , S l, 2 = Σ k = 1 N1 x k 2 , S l, 1 = Σ k = 1 N1 x k, N 1 is output. The square adder 25 outputs a value S l, 1 2 = (Σ k = 1 N1 × k ) 2 obtained by squaring the output value of the node (4) to the node (5). Further, the divider 27 outputs a value Sl, 1 2 / N 1 obtained by dividing the output value of the node (5) by the output value of the node (6). Divider 29 outputs the node values S l, 1 / N 1 divided by the output value of the node (6) the output value of (4) to the node (16). This is the average value of the pixel values of the left sections of length N 1. The subtracter 28 outputs a value (Equation 5) obtained by subtracting the output value of the node (7) from the output value of the node (3) to the node (8).

Figure 2004312693
Figure 2004312693

また、自乗減算アキュミュレータ31は、1クロックごとに、設定されている値からノード(2)の出力値を減算し、ノード(9)に出力する。従って、クロック値がN+N1+1(1≦N1≦N-1)のとき、ノード(9)には、Sr,2k=N1+1 N xk 2が出力される。減算アキュミュレータ30は、1クロックごとに、設定されている値からノード(1)の出力値を減算し、ノード(10)に出力する。従って、クロック値がN+N1+1(1≦N1≦N-1)のとき、ノード(10)には、Sr,1k=N1+1 N xkが出力される。自乗算器32は、ノード(10)の出力値を自乗した値Sr,1 2をノード(11)に出力する。一方、クロック値がN+1から1ずつ増加していくと、ダウンカウンタ33は、設定値Nからクロックごとに1ずつ値を減少させていく。従って、クロック値がN+N1+1(1≦N1≦N-1)のとき、ノード(12)には、N-N1が出力される。除算器34は、ノード(11)の出力値をノード(12)の出力値で除算した値Sr,1 2/(N-N1)をノード(13)に出力する(S44)。減算器35は、ノード(9)の値からノード(13)の値を減算した値(数6)をノード(14)に出力する。 Further, the square subtraction accumulator 31 subtracts the output value of the node (2) from the set value every clock and outputs the result to the node (9). Therefore, when the clock value is N + N 1 +1 (1 ≦ N 1 ≦ N−1), S r, 2 = Σ k = N1 + 1 N × k 2 is output to the node (9). The subtraction accumulator 30 subtracts the output value of the node (1) from the set value every clock and outputs the result to the node (10). Therefore, when the clock value is N + N 1 +1 (1 ≦ N 1 ≦ N−1), S r, 1 = Σ k = N1 + 1 N × k is output to the node (10). Squaring unit 32 outputs the node value S r, 1 2 which squares the output value of (10) to the node (11). On the other hand, when the clock value increases by one from N + 1, the down counter 33 decreases the value from the set value N by one for each clock. Therefore, when the clock value is N + N 1 +1 (1 ≦ N 1 ≦ N−1), NN 1 is output to the node (12). Divider 34 outputs node node output value (11) (12) a value S r divided by the output value of, 1 2 / (NN 1) to the node (13) (S44). The subtractor 35 outputs a value (Equation 6) obtained by subtracting the value of the node (13) from the value of the node (9) to the node (14).

Figure 2004312693
Figure 2004312693

また、除算器36は、ノード(10)の出力値をノード(12)の出力値で除算した値Sr,1/(N-N1)をノード(17)に出力する。これは、長さN-N1の右側区間の画素値の平均値である。 Further, the divider 36 outputs a value S r, 1 / / (NN 1 ) obtained by dividing the output value of the node (10) by the output value of the node (12) to the node (17). This is the average value of the pixel values of the right section of length NN 1.

加算器37は、ノード(8)の出力値とノード(14)の出力値とを加算した値(数7)をノード(15)に出力する(S45)。これは、左右の区間の累積二乗誤差の和となっている。   The adder 37 outputs a value (Equation 7) obtained by adding the output value of the node (8) and the output value of the node (14) to the node (15) (S45). This is the sum of the accumulated square errors of the left and right sections.

Figure 2004312693
Figure 2004312693

比較判定部38は、ノード(15)の出力値eと、最小累積誤差メモリ39に記憶された判定値eminを比較する(S46)。そして、e<eminの場合には、比較判定部38は最小累積誤差メモリに記憶された判定値eminの値をノード(15)の出力値eに更新する。それと同時に、比較判定部38は、左誤差レジスタ41、右誤差レジスタ42、左レベルレジスタ43、右レベルレジスタ45、左区間長レジスタ44、及び右区間長レジスタ46のそれぞれを一時的に書き込み状態とする。これにより、左誤差レジスタ41及び右誤差レジスタ42には、それぞれ、ノード(8)、ノード(14)の出力値el,min, er,minが取り込まれて記憶される。また、左レベルレジスタ43及び右レベルレジスタ45には、左及び右の区間の画素値の平均値(数8)、(数9)が取り込まれて記憶される。 The comparison determination unit 38 compares the output value e of the node (15) with the determination value e min stored in the minimum cumulative error memory 39 (S46). Then, when e <e min , the comparison determination unit 38 updates the value of the determination value e min stored in the minimum cumulative error memory to the output value e of the node (15). At the same time, the comparison determination unit 38 temporarily sets each of the left error register 41, the right error register 42, the left level register 43, the right level register 45, the left section length register 44, and the right section length register 46 to a write state. I do. Thus, the left error register 41 and right error register 42, respectively, the node (8), the output value e l of the node (14), min, e r, min is captured and stored. The left level register 43 and the right level register 45 capture and store the average values (Equation 8) and (Equation 9) of the pixel values in the left and right sections.

Figure 2004312693
Figure 2004312693

Figure 2004312693
Figure 2004312693

また、左区間長レジスタ44及び右区間長レジスタ46には、それぞれ、ノード(6)、ノード(12)の出力値ll=N1, lr=N-N1が取り込まれ、記憶される(S47)。 The left section length register 44 and the right section length register 46 receive and store the output values l l = N 1 and l r = NN 1 of the nodes (6) and (12), respectively (S47). ).

そして、次のクロックでアップカウンタ26のカウンタ値N1が1だけ増加する(S48)。区分線型近似終了判定部40は、カウンタ値N1がN−1を超えたか否かを判定し(S49)、このカウンタ値がN−1を超えるまで上記S43〜S48の動作を繰り返す。 Then, the counter value N 1 of the up-counter 26 at the next clock is increased by 1 (S48). Category linear approximation end determining unit 40, the counter value N 1 is determined whether exceeds N-1 (S49), and repeats the operation of the S43~S48 until the counter value exceeds N-1.

これにより、分割点を被処理区間データの左から右に移動させながら、両分割区間の累積二乗誤差の和が最小となる分割点が総当たり検索される。そして、この総当たり検索が終了した時点で、左誤差レジスタ41、右誤差レジスタ42、左レベルレジスタ43、右レベルレジスタ45、左区間長レジスタ44、及び右区間長レジスタ46には、両分割区間の累積二乗誤差の和が最小となる分割点における左右区間の累積二乗誤差値el,min,er,min、画素値の平均値cl,cr、及び区間の長さll,lrが保持される。 Thus, while moving the division point from left to right of the section data to be processed, the division point that minimizes the sum of the accumulated square errors of both division sections is brute-force searched. When the brute force search is completed, the left error register 41, the right error register 42, the left level register 43, the right level register 45, the left section length register 44, and the right section length register 46 have both divided sections. accumulated squared error value e l of the left and right sections at the division point where the sum is minimum cumulative square error, min, e r, min, average value c l of the pixel values, c r, and the length l l of the section, l r is retained.

従って、上記処理が終了した時点で、区間分割処理部13は、分割処理制御部14に対して、これらのレジスタに保持された値を出力して(S50)、動作を終了する。   Therefore, when the above processing is completed, the section division processing unit 13 outputs the values held in these registers to the division processing control unit 14 (S50), and ends the operation.

最後に、併合処理手段の併合処理について補足説明をしておく。図16は併合処理手段による併合処理の動作を表すフローチャート、図17は小区間近似画像メモリ15の内容を表す図である。   Finally, a supplementary description of the merging process of the merging processing means will be given. FIG. 16 is a flowchart showing the operation of the merging process by the merging processing means, and FIG. 17 is a diagram showing the contents of the small section approximate image memory 15.

この併合処理は、区分線型近似処理における再帰処理の際の演算量を削減するために小区間分割手段8により小区間データに分割され、区分線型近似処理により生成されたM個の小区間1次元近似画像データを、再び結合させた際に、各結合境界における区間のレベル差及び区間長によって、所定の条件で両区間を結合させる処理である。この処理を行うことで、更に符号量を削減して符号化効率の向上が図られる。   This merging process is performed by dividing the data into small section data by the small section dividing means 8 in order to reduce the amount of calculation in the recursive processing in the piecewise line approximation processing, and generating M pieces of one-dimensional data generated by the piecewise line approximation processing. When the approximate image data is combined again, the two sections are combined under predetermined conditions according to the level difference and the section length of the section at each connection boundary. By performing this processing, the coding amount is further reduced and the coding efficiency is improved.

まず、前提として、画像ブロックのM個の小区間データについての区分線型近似処理が終了し、小区間近似画像メモリ15にM個の小区間1次元近似画像データが図17のように格納されている。併合処理では、i番目(i=1,…,N-1)の小区間内の最終区間(f(i)番目の区間)とi+1番目の小区間内の最初の区間(1番目の区間)との併合処理を行う。   First, as a premise, the piecewise linear approximation processing for M pieces of small section data of an image block is completed, and M pieces of small section one-dimensional approximate image data are stored in the small section approximate image memory 15 as shown in FIG. I have. In the merging process, the last section (f (i) th section) in the i-th (i = 1,..., N-1) small section and the first section (first section) in the i + 1-th small section Is performed.

併合処理においては、まず、併合処理手段10は、i=1として(S60)、小区間近似画像メモリ15から、i番目(i=1,…,N-1)の小区間内の最終区間(f(i)番目の区間)の画素値ci,f(i)及び区間長li,f(i)とi+1番目の小区間内の最初の区間(1番目の区間)の画素値ci+1,1及び区間長li+1,1とを読み出す(S61)。 In the merging process, first, the merging processing means 10 sets i = 1 (S60), and from the small-section approximate image memory 15, stores the last section (i = 1,..., N-1) in the i-th (i = 1,... The pixel value c i, f (i) and the section length l i, f (i) of the f (i) th section) and the pixel value c i of the first section (the first section) in the (i + 1 ) th small section +1 and 1 and the section length l i + 1 and 1 are read (S61).

そして、併合処理判定部51の第1のレベル差判定部61は、画素値ci,f(i)とci+1,1が同一であるか否かを判定し(S62)、同一であればノード(1)に1を出力し、同一でなければノード(1)に0を出力する。 Then, the first level difference determining unit 61 of the merging process determining unit 51 determines whether or not the pixel values c i, f (i) and c i + 1,1 are the same (S62). If so, 1 is output to the node (1), and if they are not the same, 0 is output to the node (1).

また、第2のレベル差判定部62は、画素値ci,f(i)とci+1,1との差の絶対値が所定の閾値Δcth以下であるかどうかを判定し(S63)、|ci,f(i)−ci+1,1|≦Δcthの場合には1をノード(2)に出力し、|ci,f(i)−ci+1,1|>Δcthの場合には0をノード(2)に出力する。 In addition, the second level difference determination unit 62 determines whether the absolute value of the difference between the pixel values c i, f (i) and c i + 1,1 is equal to or smaller than a predetermined threshold Δc th (S63). ), | C i, f (i) −c i + 1,1 | ≦ Δc th , outputs 1 to the node (2), and | c i, f (i) −c i + 1,1 If |> Δc th , 0 is output to node (2).

また、境界前区間長判定部63は、区間長li,f(i)が所定の閾値lth1以下であるかどうかを判定し、境界後区間長判定部64は、区間長li+1,1が所定の閾値lth2以下であるかどうかを判定する(S64)。そして、境界前区間長判定部63、境界後区間長判定部64は、それぞれ、li,f(i)≦lth1、li+1,1≦lth2のときには1をノード(3)、(4)に出力し、li,f(i)>lth1、li+1,1>lth2のときには0をノード(3)、(4)に出力する。 Further, the pre-boundary section length determining unit 63 determines whether the section length l i, f (i) is equal to or less than a predetermined threshold l th1 , and the post-boundary section length determining unit 64 determines that the section length l i + 1 , 1 is less than or equal to a predetermined threshold l th2 (S64). Then, the pre-boundary section length determining unit 63 and the post-boundary section length determining unit 64 respectively assign 1 to the node (3) when l i, f (i) ≦ l th1 and l i + 1,1 ≦ l th2 . (4), and outputs 0 to the nodes (3) and (4) when l i, f (i) > l th1 and l i + 1,1 > l th2 .

併合処理総合判定部65は、上記ノード(1)〜(4)に出力される論理値について、(1)∨((2)∧((3)∨(4)))の論理演算を行い、その演算結果をノード(5)に出力する。すなわち、ノード(5)の値が1のときは、両区間は併合処理すると判断され、ノード(5)の値が0のときは、両区間は併合されないと判断される。   The merging process comprehensive determination unit 65 performs a logical operation of (1) ∨ ((2) ∧ ((3) ∨ (4))) on the logical values output to the nodes (1) to (4), The calculation result is output to the node (5). That is, when the value of the node (5) is 1, it is determined that both sections are to be merged, and when the value of the node (5) is 0, it is determined that both sections are not to be merged.

ここで、上記判断方法について補足説明をしておく。まず、両区間の画素値ci,f(i),ci+1,1が等しいときには、両区間を併合することについては特に問題はない。ci,f(i),ci+1,1が等しくない場合であって、両区間の画素値ci,f(i),ci+1,1の差の絶対値|ci,f(i)−ci+1,1|が大きい場合には、画像のエッジである可能性があるため、両区間は併合すべきではない。これを、閾値Δcthで判定している。 Here, the above-mentioned determination method will be supplementarily described. First, when the pixel values c i, f (i) and c i + 1,1 of both sections are equal, there is no particular problem in merging both sections. In the case where c i, f (i) and c i + 1,1 are not equal, the absolute value | c i, of the difference between the pixel values c i, f (i) and c i + 1,1 in both sections If f (i) −c i + 1,1 | is large, both sections should not be merged because they may be image edges. This is determined by the threshold value Δc th .

一方、両区間の画素値ci,f(i),ci+1,1の差の絶対値|ci,f(i)−ci+1,1|が小さい場合であっても、どちらの区間長も長い場合、併合により両区間の近似誤差累積二乗誤差が大きくなると、視覚的に強く認識されるようになる。そこで、絶対値|ci,f(i)−ci+1,1|が小さい場合であっても、両区間長が長い場合には区間の併合は行わない。これを閾値lth1、lth2で判断している。 On the other hand, even if the absolute value | c i, f (i) −c i + 1,1 | of the difference between the pixel values c i, f (i) and c i + 1,1 in both sections is small, In the case where both sections are long, if the approximate error cumulative square error of both sections becomes large due to the merging, it becomes strongly recognized visually. Therefore, even when the absolute value | c i, f (i) −c i + 1,1 | is small, merging of sections is not performed when both section lengths are long. This is determined by threshold values l th1 and l th2 .

以上の結果、ノード(5)の出力値に1が出力された場合、併合データ生成部52による両区間の併合処理が行われる(S65)。併合データ生成部52の乗算器66は、ci,f(i)とli,f(i)との積を演算し、ノード(6)に出力する。乗算器67は、ci+1,1とli+1,1との積を演算し、ノード(7)に出力する。加算器68は、ノード(6)の出力値とノード(7)の出力値とを加算して、ノード(8)に出力する。加算器69は、li,f(i)とli+1,1とを加算してノード(9)に(数10)を出力する。 As a result, when 1 is output as the output value of the node (5), the merging data generation unit 52 performs the merging process of both sections (S65). The multiplier 66 of the merged data generation unit 52 calculates the product of c i, f (i) and l i, f (i) and outputs the result to the node (6). The multiplier 67 calculates the product of c i + 1,1 and l i + 1,1 and outputs the result to the node (7). The adder 68 adds the output value of the node (6) and the output value of the node (7) and outputs the result to the node (8). The adder 69 adds l i, f (i) and l i + 1,1 and outputs (Equation 10) to the node (9).

Figure 2004312693
Figure 2004312693

更に、除算器70は、ノード(8)の出力値をノード(9)の出力値により乗算して、ノード(10)に(数11)を出力する。   Further, the divider 70 multiplies the output value of the node (8) by the output value of the node (9), and outputs (Expression 11) to the node (10).

Figure 2004312693
Figure 2004312693

併合区間レジスタには、このようにして求められた、両区間の区間長の和l'i+1,1と両区間の画素値の平均値c'i+1,1が格納される。そして、併合処理総合判定部65によりノード(5)に1が出力された場合には、小区間近似画像メモリ15のi+1番目の小区間データの最初の区間の値(ci+1,1,li+1,1)を、(c'i+1,1,l'i+1,1)で更新する。また、小区間近似画像メモリ15のi番目の小区間データの最後の区間の値(ci,f(i),li,f(i))は、(0,0)で更新され、無効処理がされる。 The merging section register stores the sum l ′ i + 1,1 of the section lengths of both sections and the average value c ′ i + 1,1 of the pixel values of both sections, thus obtained. Then, when 1 is output to the node (5) by the merging process comprehensive determination unit 65, the value (ci + 1,1 , ... , C1 + 1,1 , ... ) Of the (i + 1) th small section data of the small section approximate image memory 15 l i + 1,1 ) is updated with (c ′ i + 1,1 , l ′ i + 1,1 ). Also, the value (ci , f (i) , li , f (i) ) of the last section of the i-th small section data in the small section approximate image memory 15 is updated with (0, 0) and becomes invalid. Processing is performed.

尚、本実施例では、区分線型近似処理において、区間の分割を行うか否かの評価基準として累積二乗誤差を使用したが、累積二乗誤差以外にも分散値を使用することも可能である。   In the present embodiment, the cumulative square error is used as an evaluation criterion for determining whether or not to divide a section in the piecewise linear approximation processing, but a variance value other than the cumulative square error may be used.

実施例1においては、図8のステップS5において、最適走査選択手段4は、総ての走査ユニット3−1〜3−nより処理終了信号が送信されるまで待機することとしたが、このように一律に総ての走査ユニット3−1〜3−nの処理を待つと、処理時間が区分線型近似処理に最も時間を要する走査順序による走査で決まってしまい、処理速度が遅くなる。一方、区分線型近似処理に要する時間は、当該処理により分割される区間数が多いほど長くなる。   In the first embodiment, in step S5 in FIG. 8, the optimal scan selection unit 4 waits until the processing end signals are transmitted from all the scan units 3-1 to 3-n. If the processing of all the scanning units 3-1 to 3-n is waited uniformly, the processing time is determined by the scanning in the scanning order that requires the longest time for the piecewise linear approximation processing, and the processing speed is reduced. On the other hand, the time required for the segmented line-type approximation processing increases as the number of sections divided by the processing increases.

そこで、本実施例においては、図8のステップS5においては、所定の数n1の走査ユニットの区分線型近似処理が終了した時点で、まだ区分線型近似処理が終了していない走査ユニットの区分線型近似処理を打ち切ることを特徴とする。 Therefore, in the present embodiment, at step S5 in FIG. 8, at the point in time when the predetermined number n 1 of the scanning units have completed the segmentation line-type approximation processing, the division units of the scanning units for which the division line-type approximation processing has not been completed yet. The feature is that the approximation processing is terminated.

図18は実施例2に係る画像符号化装置の最適走査選択手段4’を表すブロック図、図19は実施例2に係る画像符号化方法を表すフローチャート、図20は実施例2に係る画像符号化装置の操作ユニットの動作を表すフローチャートである。   FIG. 18 is a block diagram illustrating an optimal scanning selecting unit 4 ′ of the image encoding device according to the second embodiment, FIG. 19 is a flowchart illustrating an image encoding method according to the second embodiment, and FIG. It is a flowchart showing operation | movement of the operation unit of a conversion apparatus.

本実施例の最適走査選択手段4’は、処理打切判定部101を備えていることを特徴とする。尚、他の構成については実施例1で説明したものと同様であるため、説明は割愛する。   The optimal scanning selecting means 4 'of this embodiment is characterized in that it comprises a processing discontinuation determining unit 101. The other configuration is the same as that described in the first embodiment, and a description thereof will not be repeated.

処理打切判定部101は、図19に示したように、各走査ユニット3−1〜3−nから出力される処理終了信号の数をカウントし、出力された処理終了信号の数が、所定の閾値n1を超えた時点で(S71)、処理打切信号を出力する(S72)。また、最適走査判定部81は、処理打切判定部101が、処理打切信号を出力した時点で、既に処理終了信号を出力している操作ユニットの中から、最小区間数の1次元近似画像データを選択する(S73)。それ以外の動作については、実施例1の場合と同様である。 As shown in FIG. 19, the processing discontinuation determination unit 101 counts the number of processing end signals output from each of the scanning units 3-1 to 3-n, and determines that the number of output processing end signals is a predetermined number. Once the threshold is exceeded n 1 (S71), and outputs the processed abort signal (S72). Further, when the processing discontinuation determining unit 101 outputs the processing termination signal, the optimal scanning determination unit 81 outputs the one-dimensional approximate image data of the minimum number of sections from among the operation units that have already output the processing end signal. Select (S73). Other operations are the same as those in the first embodiment.

一方、各走査ユニット3−1〜3−nの区分線型近似手段9は、図20に示したように、処理打切信号を受信した場合であって、まだ区分線型近似処理が終了していない場合には、区分線型近似処理を強制的に終了する(S75)。   On the other hand, as shown in FIG. 20, the segmented line-type approximation means 9 of each of the scanning units 3-1 to 3-n is a case where the processing termination signal is received and the segmented line-type approximation processing is not yet completed. , The piecewise linear approximation processing is forcibly terminated (S75).

このように、総ての走査ユニット3−1〜3−nが区分線型近似処理を終了するまで待つことなく、先着n1個の走査ユニットの区分線型近似処理が終了した時点で、符号化処理に移行することで、符号化効率を下げることなく画像符号化処理の高速化を図ることが可能となる。 Thus, without waiting until all of the scanning units 3-1 to 3-n to end the segment linear approximation, when the divided linear approximation of arrival n 1 single scanning unit has been completed, the encoding process By moving to, it is possible to speed up the image encoding process without lowering the encoding efficiency.

尚、本実施例においては、処理打切判定部101は、先着n1個の走査ユニットの区分線型近似処理が終了した時点で、処理打切信号を出力することとしたが、他の方法として、最初に処理終了信号を受信してから所定の時間が経過した時点で、処理終了信号を出力するように構成することも可能である。 In the present embodiment, processing abort determination unit 101, when the divided linear approximation of arrival n 1 single scanning unit has been completed, it is assumed that outputs a processed abort signal, as another method, the first It is also possible to output a processing end signal when a predetermined time has elapsed after receiving the processing end signal.

図21は実施例2に係る他の画像符号化方法を表すフローチャートである。処理打切判定部101は、何れかの走査ユニットから処理終了信号が出力されると(S81)、内部に有するカウンタtを0にリセットし(S82)、カウントを開始する(S83)。そして、カウント値tが所定の閾値tmaxを超えた時点で(S84)、処理打切信号を出力する(S72)。後の動作は、上記説明したものと同様である。 FIG. 21 is a flowchart illustrating another image encoding method according to the second embodiment. When a processing end signal is output from any one of the scanning units (S81), the processing discontinuation determination unit 101 resets the internal counter t to 0 (S82) and starts counting (S83). Then, when the count value t exceeds the predetermined threshold value tmax (S84), a processing termination signal is output (S72). The subsequent operation is the same as that described above.

区分線型近似処理は、再帰処理により区間分割が多く行われるほど時間がかかる。従って、最初に処理終了信号が出力されてから所定の時間tmax以上が経過してもなお区分線型近似処理が終了しない走査ユニットについては、最初に区分線型近似処理を終了した走査ユニットが出力する1次元近似画像データの区間数を下回ることはないと考えてもよい。従って、カウント値tが所定の閾値tmaxを超えた時点で未終了の区分線型近似処理を強制的に打ち切ることで、符号化効率を低下させることなく、処理の高速化を図ることが可能となる。 The segmented-line approximation process takes longer as the section division is performed more frequently by the recursive process. Accordingly, for a scanning unit in which the segmented-line approximation processing has not been completed even if a predetermined time tmax or more has elapsed since the processing end signal was first output, the scanning unit that has finished the segmented-line approximation processing first outputs. It may be considered that the number of sections of the one-dimensional approximate image data does not fall below. Therefore, by forcibly terminating an unfinished piecewise linear approximation process when the count value t exceeds a predetermined threshold value tmax , it is possible to speed up the process without lowering the encoding efficiency. Become.

本実施例では、何れかの走査ユニット3−sが区分線型近似処理を終了し、生成された1次元近似画像データの区間数l(s)が確定すると、他の各走査ユニットはその確定した区間数l(s)又は区間数l(s)に所定の値を加えた数l(s)+Δlを基準区間数lstとして、各時点での自己の区間数liが基準区間数lst以上となったときに区分線型近似処理を強制的に打ち切ることを特徴とする。 In this embodiment, when any one of the scanning units 3-s completes the piecewise linear approximation processing and the number l (s) of sections of the generated one-dimensional approximation image data is determined, the other scanning units are determined. The number of sections l (s) or the number l (s) + Δl obtained by adding a predetermined value to the number of sections l (s) is defined as the number of reference sections l st , and the number of sections l i at each point is the number of reference sections l The feature is that the piecewise linear approximation processing is forcibly terminated when the value becomes st or more.

図22は実施例3に係る画像符号化装置の最適走査選択手段4”を表すブロック図、図23は実施例3に係る画像符号化方法を表すフローチャート、図24は実施例3に係る画像符号化装置の操作ユニットの動作を表すフローチャートである。   FIG. 22 is a block diagram illustrating an optimal scanning selecting unit 4 ″ of the image encoding device according to the third embodiment, FIG. 23 is a flowchart illustrating an image encoding method according to the third embodiment, and FIG. 24 is an image encoding according to the third embodiment. It is a flowchart showing operation | movement of the operation unit of a conversion apparatus.

本実施例の最適走査選択手段4”は、基準区間数通知部111を備えていることを特徴とする。尚、他の構成については実施例1で説明したものと同様であるため、説明は割愛する。   This embodiment is characterized in that the optimum scanning selecting unit 4 ″ includes a reference section number notifying unit 111. Since other configurations are the same as those described in the first embodiment, the description will be omitted. Omit.

最適走査選択手段4”は、何れかの走査ユニット3−sが処理終了信号を出力すると(S91)、区分線型近似処理が終了した当該走査ユニット3−sの区間数l(s)を取り込む(S92)。そして、各走査ユニット3−1〜3−nに対して、区間数l(s)又は区間数l(s)に所定の値を加えた数l(s)+Δlを基準区間数lstとして通知する(S93)。尚、ここで区間数l(s)に所定の値を加えた数l(s)+Δlを基準とする場合もあり得るとしたのは、上記併合処理により、最終的な区間数はl(i)以下となることから、その分を見越して余裕を持たせることもできるようにしたものである。 When any one of the scanning units 3-s outputs the processing end signal (S91), the optimum scanning selecting unit 4 ″ captures the number l (s) of sections of the scanning unit 3-s for which the segmented line approximation processing has been completed (S91). S92) Then, for each of the scanning units 3-1 to 3-n, the number of sections l (s) or the number l (s) + Δl obtained by adding a predetermined value to the number of sections l (s) is determined as the number of reference sections. notifying the l st (S93). here, the set to be possible if the reference number l (s) + Δl obtained by adding a predetermined value to the number of segments l (s) is by the merging process Since the final number of sections is equal to or less than l (i) , it is possible to allow a margin in anticipation of that.

まだ区分線型近似処理が終了していない各走査ユニット3−iは、基準区間数lstが入力されると(S101)、区分線型近似処理において区間分割処理(S26)を行う前に、現在の区間数lが基準区間数lst以上であるかどうかの判断をする(S102)。l<lstならば、実施例1と同様、区間分割処理を再帰的に繰り返す(S26〜S28)。一方、ステップS101でl≧lstとなった場合、最適走査選択手段4”に対して処理中断信号を出力して(S103)、強制的に区分線型近似処理を中断する。 When the reference section number l st is input (S101), each of the scanning units 3-i, for which the segmented line approximation processing has not been completed yet, performs the current section division processing (S26) in the segmented line approximation processing. It is determined whether or not the number of sections 1 is equal to or greater than the number of reference sections l st (S102). If l <l st , the section dividing process is recursively repeated as in the first embodiment (S26 to S28). On the other hand, if l ≧ l st in step S101, a processing interruption signal is output to the optimal scanning selection means 4 ″ (S103), and the segmented linear approximation processing is forcibly interrupted.

最適走査選択手段4”は、総ての走査ユニット3−1〜3−nが、処理終了信号又は処理中断信号を出力するのを待って(S94)、処理終了信号を出力した各走査ユニットの1次元近似画像データの区間数を比較する(S95)。そして、その中から最も区間数の少ない1次元近似画像を選択する(S7)。
尚、上記以外の処理は、実施例1と同様である。
The optimal scanning selection unit 4 ″ waits for all of the scanning units 3-1 to 3-n to output the processing end signal or the processing interruption signal (S94), and outputs the processing end signal of each scanning unit. The number of sections of the one-dimensional approximate image data is compared (S95), and a one-dimensional approximate image having the least number of sections is selected from among them (S7).
The other processes are the same as in the first embodiment.

このように、各走査ユニットにおいて、区分線型近似処理の途中で、基準区間数以上となったときに区分線型近似処理を強制的に打ち切ることによっても、符号化効率を落とすことなく処理の高速化を図ることが可能である。   As described above, in each scanning unit, the processing speed can be increased without lowering the encoding efficiency by forcibly terminating the piecewise-line approximation processing when the number of reference sections is exceeded during the processing of the piecewise-line approximation. It is possible to achieve.

図25は本発明の実施例4に係る画像符号化装置の全体構成図である。図25において、画像入力手段1、画像領域分割手段2、走査ユニット3−1〜3−n、最適走査選択手段4、符号化手段5、画像圧縮データ出力手段6、走査手段7、小区間分割手段8、区分線型近似手段9、及び併合処理手段10は、実施例1の図1と同様のものである。   FIG. 25 is an overall configuration diagram of an image encoding device according to Embodiment 4 of the present invention. In FIG. 25, an image input unit 1, an image area dividing unit 2, a scanning unit 3-1 to 3-n, an optimal scanning selecting unit 4, an encoding unit 5, an image compressed data output unit 6, a scanning unit 7, a small section division The means 8, the piecewise linear approximation means 9, and the merging processing means 10 are the same as those in FIG. 1 of the first embodiment.

本実施例においては、走査ユニット3−1〜3−nと並列にm個の直交変換ユニット120−1〜120−mを備えたことを特徴としている。この直交変換操作ユニット120−1〜120−mは、直交変換手段121、量子化手段122、及びラン・データ生成手段123を備えている。   The present embodiment is characterized in that m orthogonal transform units 120-1 to 120-m are provided in parallel with the scanning units 3-1 to 3-n. Each of the orthogonal transformation operation units 120-1 to 120-m includes an orthogonal transformation unit 121, a quantization unit 122, and a run data generation unit 123.

直交変換手段121は、画像領域分割手段2から入力される画像ブロックを、それぞれ決められた方法で直交変換し、変換画像を生成する。直交変換としては、DCT、離散サイン変換(discrete sine transformation : DST)、離散フーリエ変換、アダマール変換、カルーネン・レーベ変換(KL変換)、ハール変換、スラント変換等、種々の変換を使用することが可能である。   The orthogonal transformation unit 121 performs an orthogonal transformation on the image blocks input from the image area dividing unit 2 by a predetermined method to generate a transformed image. Various orthogonal transformations such as DCT, discrete sine transformation (DST), discrete Fourier transformation, Hadamard transformation, Karhunen-Loeve transformation (KL transformation), Haar transformation, Slant transformation, etc. can be used. It is.

量子化手段122は、直交変換手段121が出力する変換画像を、適応ビット配分により量子化する。この量子化された変換画像を、量子化変換画像という。これにより、スペクトルが集中する低域成分に対しては、多くのビットにより量子化が行われる。逆に、スペクトル集中度が低い高域成分に対しては、少ビット数での量子化が行われる。   The quantization means 122 quantizes the transformed image output from the orthogonal transformation means 121 by adaptive bit allocation. This quantized transformed image is called a quantized transformed image. As a result, quantization is performed with a large number of bits for a low-frequency component where the spectrum is concentrated. Conversely, quantization is performed with a small number of bits for high-frequency components with low spectral concentration.

ラン・データ生成手段123は、量子化変換画像を走査する。走査は、低域側から高域側にかけて、ジグザクな径路で行われる。この操作方法に関しては、変換符号化においては広く使用されているので、ここではこれ以上は説明しない。ラン・データ生成手段123は、上記走査を行うと共に、走査径路に沿って、同値の画素が連続するラン長、及びそのランの画素値の組からなるラン・データを生成する。このラン・データは、最適走査選択手段4に対して出力される。   The run data generator 123 scans the quantized transformed image. Scanning is performed along a zigzag path from the low frequency side to the high frequency side. This method of operation is widely used in transform coding and will not be described further here. The run data generation unit 123 performs the above-described scanning, and generates run data including a set of a run length in which pixels of the same value continue and a pixel value of the run along the scanning path. This run data is output to the optimal scanning selection means 4.

以上のように構成された本実施例に係る画像符号化装置について、以下その動作を説明する。   The operation of the image coding apparatus according to the present embodiment configured as described above will be described below.

まず、画像入力手段1に画像が入力されて、画像領域分割手段2が画像ブロックを出力するまでは、実施例1と同様である。また、各画像ブロックは、走査ユニット3−1〜3−nに入力され、走査ユニット3−1〜3−nが1次元近似画像データを出力する動作も、実施例1と同様である。   First, the process is the same as that of the first embodiment until an image is input to the image input unit 1 and the image area dividing unit 2 outputs an image block. Further, each image block is input to the scanning units 3-1 to 3-n, and the operation of the scanning units 3-1 to 3-n to output one-dimensional approximate image data is the same as in the first embodiment.

本実施例においては、画像領域分割手段2は、各画像ブロックを各直交変換ユニット120−1〜120−mに対しても出力する。直交変換ユニット120−1〜120−mにおいては、上述のように、直交変換手段121が変換画像を生成し、量子化手段が量子化変換画像を生成する。そして、ラン・データ生成手段123が、ラン・データを生成し、最適走査選択手段4に出力する。尚、変換画像において、低域側にスペクトルが集中している場合には、高域側のラン長は長くなる。従って、ラン数は少なくなる。逆に、スペクトルの集中度が低い場合には、高域側のランは短く、ラン数は多くなる。   In the present embodiment, the image area dividing means 2 also outputs each image block to each of the orthogonal transform units 120-1 to 120-m. In the orthogonal transformation units 120-1 to 120-m, as described above, the orthogonal transformation means 121 generates a transformed image, and the quantization means produces a quantized transformed image. Then, the run data generation unit 123 generates run data and outputs the generated run data to the optimal scan selection unit 4. When the spectrum is concentrated on the low frequency side in the converted image, the run length on the high frequency side becomes longer. Therefore, the number of runs is reduced. Conversely, when the spectral concentration is low, the runs on the high frequency side are short and the number of runs is large.

最適走査選択手段4は、各走査ユニット3−1〜3−nが出力する1次元近似画像データの区間数、及び各直交変換ユニット120−1〜120−mが出力するラン・データのラン数を比較する。そして、最小の区間数又はラン数の1次元近似画像データ又はラン・データを選択する。そして、符号化手段5は、選択された1次元近似画像データ又はラン・データを符号化する。以下は、実施例1と同様である。   The optimum scanning selecting means 4 is configured to calculate the number of sections of the one-dimensional approximate image data output from each of the scanning units 3-1 to 3-n, and the number of runs of the run data output from each of the orthogonal transformation units 120-1 to 120-m. Compare. Then, one-dimensional approximate image data or run data having the minimum number of sections or runs is selected. Then, the encoding means 5 encodes the selected one-dimensional approximate image data or run data. The following is the same as in the first embodiment.

このように、本実施例では、走査ユニットにより生成される1次元近似画像データに加えて、直交変換ユニットが生成するラン・データをそれぞれ対比して、最も符号量が少なくなる変換方法を選択する。これにより、画像の性質に応じて最適な変換方法が選択され、高い符号化効率で画像の符号化を行うことが可能となる。   As described above, in the present embodiment, in addition to the one-dimensional approximation image data generated by the scanning unit, the run data generated by the orthogonal transform unit is compared with each other, and the conversion method that minimizes the code amount is selected. . As a result, an optimal conversion method is selected according to the properties of the image, and the image can be encoded with high encoding efficiency.

本発明の実施例1に係る画像符号化装置の全体構成図である。FIG. 1 is an overall configuration diagram of an image encoding device according to a first embodiment of the present invention. 図1の各走査ユニット3−i(i=1,…,n)の構成を表すブロック図である。FIG. 2 is a block diagram illustrating a configuration of each scanning unit 3-i (i = 1,..., N) in FIG. 1. 図2の区分線型近似手段9の構成を表すブロック図である。FIG. 3 is a block diagram illustrating a configuration of a piecewise linear approximation unit 9 of FIG. 2. 図3の区間分割処理部13の構成を表すブロック図である。FIG. 4 is a block diagram illustrating a configuration of a section division processing unit 13 in FIG. 3. 図2の併合処理手段10の構成を表すブロック図である。FIG. 3 is a block diagram illustrating a configuration of a merge processing unit 10 of FIG. 2. 図1の最適走査選択手段4の構成を表すブロック図である。FIG. 2 is a block diagram illustrating a configuration of an optimum scanning selection unit 4 in FIG. 1. 図1の符号化手段5の構成を表すブロック図である。FIG. 2 is a block diagram illustrating a configuration of an encoding unit 5 in FIG. 1. 実施例1における画像符号化方法の処理全体の流れを表すフローチャートである。5 is a flowchart illustrating a flow of an entire process of an image encoding method according to the first embodiment. 各走査ユニットの走査順序の例を表す図である。FIG. 3 is a diagram illustrating an example of a scanning order of each scanning unit. 走査ユニット3−k(k=1,…,n)のデータ処理を表すフローチャートである。It is a flowchart showing the data processing of the scanning unit 3-k (k = 1, ..., n). 画像ブロック内の走査順序の一例を示す図である。FIG. 3 is a diagram illustrating an example of a scanning order in an image block. 画像領域メモリ7aの内容を表す図である。FIG. 4 is a diagram showing the contents of an image area memory 7a. 走査アドレス生成器7b内のメモリの内容を表す図である。FIG. 7 is a diagram showing the contents of a memory in a scanning address generator 7b. 図3,図4の区間分割処理部13による区間分割処理を表すフローチャートである。5 is a flowchart illustrating a section dividing process performed by the section dividing unit 13 of FIGS. 3 and 4. 図14の各ノードにおける演算出力を表す図である。FIG. 15 is a diagram illustrating a calculation output at each node in FIG. 14. 併合処理手段による併合処理の動作を表すフローチャートである。It is a flowchart showing operation | movement of the merging process by a merging processing means. 小区間近似画像メモリ15の内容を表す図である。FIG. 3 is a diagram illustrating the contents of a small section approximate image memory 15. 実施例2に係る画像符号化装置の最適走査選択手段4’を表すブロック図である。FIG. 14 is a block diagram illustrating an optimal scanning selection unit 4 ′ of the image encoding device according to the second embodiment. 実施例2に係る画像符号化方法を表すフローチャートである。11 is a flowchart illustrating an image encoding method according to a second embodiment. 実施例2に係る画像符号化装置の操作ユニットの動作を表すフローチャートである。13 is a flowchart illustrating the operation of the operation unit of the image encoding device according to the second embodiment. 実施例2に係る他の画像符号化方法を表すフローチャートである。13 is a flowchart illustrating another image encoding method according to the second embodiment. 実施例3に係る画像符号化装置の最適走査選択手段4”を表すブロック図である。FIG. 14 is a block diagram illustrating an optimal scanning selection unit 4 ″ of the image encoding device according to the third embodiment. 図23は実施例3に係る画像符号化方法を表すフローチャートである。FIG. 23 is a flowchart illustrating an image encoding method according to the third embodiment. 実施例3に係る画像符号化装置の操作ユニットの動作を表すフローチャートである。13 is a flowchart illustrating the operation of the operation unit of the image encoding device according to the third embodiment. 本発明の実施例4に係る画像符号化装置の全体構成図である。FIG. 13 is an overall configuration diagram of an image encoding device according to a fourth embodiment of the present invention.

符号の説明Explanation of reference numerals

1 画像入力手段
2 画像領域分割手段
3−1〜3−n 走査ユニット
4,4’,4” 最適走査選択手段
5 符号化手段
6 画像圧縮データ出力手段
7 走査手段
7a 画像領域メモリ
7b 走査アドレス生成器
8 小区間分割手段
9 区分線型近似手段
10 併合処理手段
11 小区間メモリ
12 区間レジスタ
13 区間分割処理部
14 分割処理制御部
15 小区間近似画像メモリ
21 アドレス生成部
22,25,32 自乗算器
23 自乗加算アキュミュレータ
24 加算アキュミュレータ
26 アップカウンタ
27,29,34,36,70 除算器
28,35 減算器
30 減算アキュミュレータ
31 自乗減算アキュミュレータ
33 ダウンカウンタ
37,68,69 加算器
38 比較判定部
39 最小累積誤差メモリ
40 区分線型近似終了判定部
41 左誤差レジスタ
42 右誤差レジスタ
43 左レベルレジスタ
44 左区間長レジスタ
45 右レベルレジスタ
46 右区間長レジスタ
51 併合処理判定部
52 併合データ生成部
53 併合区間レジスタ
61 第1のレベル差判定部
62 第2のレベル差判定部
63 境界前区間長判定部
64 境界後区間長判定部
65 併合処理総合判定部
66,67 乗算器
81 最適走査判定部
82 最適走査セレクタ
91 走査情報符号化部
92 輝度情報符号化部
93 区間長情報符号化部
94 符号化情報合成部
101 処理打切判定部
111 基準区間数通知部
120−1〜120−m 直交変換操作ユニット
121 直交変換手段
122 量子化手段
123 ラン・データ生成手段
DESCRIPTION OF SYMBOLS 1 Image input means 2 Image area division means 3-1-3-n Scanning unit 4, 4 ', 4 "Optimal scan selection means 5 Encoding means 6 Image compression data output means 7 Scanning means 7a Image area memory 7b Scan address generation 8 Small section dividing means 9 Separating line type approximating means 10 Merging processing means 11 Small section memory 12 Section register 13 Section dividing processing section 14 Division processing control section 15 Small section approximating image memory 21 Address generating section 22, 25, 32 Self-multiplier 23 square addition accumulator 24 addition accumulator 26 up counter 27,29,34,36,70 divider 28,35 subtractor 30 subtraction accumulator 31 square subtraction accumulator 33 down counter 37,68,69 adder 38 Part 39 Minimum cumulative error memory 40 End of piecewise linear approximation Determining unit 41 Left error register 42 Right error register 43 Left level register 44 Left section length register 45 Right level register 46 Right section length register 51 Merging processing determining unit 52 Merging data generating unit 53 Merging section register 61 First level difference determining unit 62 second level difference determination section 63 pre-boundary section length determination section 64 post-boundary section length determination section 65 merge processing overall determination section 66, 67 multiplier 81 optimal scanning determination section 82 optimal scanning selector 91 scanning information encoding section 92 luminance Information encoding section 93 Section length information encoding section 94 Encoding information synthesis section 101 Processing discontinuation determination section 111 Reference section number notification section 120-1 to 120-m Orthogonal transformation operation unit 121 Orthogonal transformation means 122 Quantization means 123 Run / Data generation means

Claims (11)

符号化する原画像を所定の走査順序に従って走査する走査手段と、
前記走査手段が原画像を走査して生成する1次元原画像を、各区間内の画素値の累積二乗誤差又は分散が所定の閾値以下となるように複数の区間に区分し、各区間内の画素値を当該区間内における画素値の平均値により近似した1次元近似画像データを生成する区分線型近似手段と、
を有する走査ユニットを、異なる複数の走査順序に対応して複数個備え、
各走査ユニットの前記区分線型近似手段が区分した区間数を比較して、区間数が最小の1次元近似画像データを選択する最適走査選択手段と、
を備えていることを特徴とする画像符号化装置。
Scanning means for scanning the original image to be encoded according to a predetermined scanning order;
The one-dimensional original image generated by scanning the original image by the scanning unit is divided into a plurality of sections so that the cumulative square error or variance of pixel values in each section is equal to or less than a predetermined threshold, and Segmented linear approximation means for generating one-dimensional approximation image data in which pixel values are approximated by an average value of pixel values in the section;
A plurality of scanning units having a plurality of corresponding to a plurality of different scanning order,
Optimal scan selection means for comparing the number of sections divided by the segmented linear approximation means of each scanning unit and selecting one-dimensional approximate image data having the minimum number of sections;
An image encoding device comprising:
前記区分線型近似手段は、前記1次元原画像を区分するに際し、
1次元原画像を2区間に区分したときに、両区間における画素値の累積二乗誤差又は分散の和が最小となるような区分位置で前記1次元原画像を区分する2分割処理を行うとともに、
前記2分割処理により2分された両区間について、当該区間における画素値の累積二乗誤差又は分散が所定の閾値以上の場合には、当該区間において前記2分割処理を再帰的に行うことにより、前記1次元原画像を区分すること
を特徴とする請求項1記載の画像符号化装置。
The dividing line-type approximating means is used to classify the one-dimensional original image,
When the one-dimensional original image is divided into two sections, a two-division process of dividing the one-dimensional original image at a division position where a sum of accumulated square errors or variances of pixel values in both sections is minimized,
If the cumulative square error or variance of the pixel values in the section is greater than or equal to a predetermined threshold for both sections divided into two by the two-partitioning process, the two-partitioning process is performed recursively in the section, 2. The image encoding apparatus according to claim 1, wherein the one-dimensional original image is divided.
前記1次元原画像を複数の小区間に分割する小区間分割手段を備え、
前記区分線型近似手段は、前記小区間分割手段が分割した各小区間の1次元原画像に対して、前記1次元近似画像データを生成すること
を特徴とする請求項1又は2記載の画像符号化装置。
A small section dividing means for dividing the one-dimensional original image into a plurality of small sections;
3. The image code according to claim 1, wherein the piecewise linear approximation unit generates the one-dimensional approximate image data for a one-dimensional original image of each small section divided by the small section division unit. 4. Device.
前記区分線型近似手段が生成する前記各小区間の1次元近似画像データについて、隣接する2つの小区間における相対する最端部の区間の画素値の平均値の差が所定の閾値以下であり、かつ、一方の区間の長さが所定の閾値以下の場合、当該両区間の近似値を当該両区間全体の画素値の平均値で置き換える併合処理手段
を備えていることを特徴とする請求項3記載の画像符号化装置。
The one-dimensional approximation image data of each of the small sections generated by the piecewise linear approximation means has a difference between the average values of the pixel values of the opposing extreme end sections of two adjacent small sections that is equal to or less than a predetermined threshold value, 4. The apparatus according to claim 3, further comprising: merging processing means for, when the length of one of the sections is equal to or less than a predetermined threshold value, replacing an approximate value of both of the sections with an average value of pixel values of both of the sections. An image encoding device according to claim 1.
前記最適走査選択手段は、前記各走査ユニットの前記区分線型近似手段のうちの所定の数のものが1次元近似画像データの生成処理を終了した時点で、まだ1次元近似画像データの生成処理の終了していない区分線型近似手段については当該処理を打ち切らせるとともに、当該処理の終了した前記走査ユニットの前記区分線型近似手段が区分した区間数を比較して、区間数が最小の1次元近似画像データを選択すること
を特徴とする請求項1乃至4の何れか一に記載の画像符号化装置。
The optimal scan selecting means is configured to execute the one-dimensional approximation image data generation processing when a predetermined number of the segmented linear approximation means of each scanning unit has completed the one-dimensional approximate image data generation processing. For the segmented line-type approximation unit that has not been completed, the process is terminated, and the number of sections divided by the segmented line-type approximation unit of the scanning unit for which the process has been completed is compared. The image encoding apparatus according to claim 1, wherein data is selected.
前記最適走査選択手段は、
前記各走査ユニットの前記区分線型近似手段のうちの1つが1次元近似画像データの生成処理を終了した時点からクロックのカウントを開始し、所定の時間内に1次元近似画像データの生成処理の終了していない区分線型近似手段については当該処理を打ち切らせるとともに、前記所定の時間内に当該処理の終了した前記走査ユニットの前記区分線型近似手段が区分した区間数を比較して、区間数が最小の1次元近似画像データを選択すること
を特徴とする請求項1乃至4の何れか一に記載の画像符号化装置。
The optimal scanning selection means,
One of the segmented linear approximation means of each of the scanning units starts counting clocks at the time when the one-dimensional approximate image data generation processing ends, and ends the one-dimensional approximate image data generation processing within a predetermined time. For the segmented linear approximation unit that has not been performed, the process is terminated, and the number of sections divided by the segmented linear approximation unit of the scanning unit that has completed the process within the predetermined time is compared. The image encoding apparatus according to claim 1, wherein the one-dimensional approximate image data is selected.
前記最適走査選択手段は、
前記各走査ユニットの前記区分線型近似手段のうちの1つが1次元近似画像データの生成処理を終了した場合、その1次元近似画像データの区間数を基準区間数として他の前記走査ユニットに対して送信し、
各走査ユニットの区分線型近似手段は、前記基準区間数を受信した場合、1次元原画像を区分した区間数が前記基準区間数に所定の値を加えた数を超えたときに1次元近似画像データの生成処理を打ち切るとともに、
前記最適走査選択手段は、前記1次元近似画像データの生成処理の終了した前記走査ユニットの前記区分線型近似手段が区分した区間数を比較して、区間数が最小の1次元近似画像データを選択すること
を特徴とする請求項1乃至4の何れか一に記載の画像符号化装置。
The optimal scanning selection means,
When one of the segmented linear approximation means of each of the scanning units completes the one-dimensional approximation image data generation process, the number of sections of the one-dimensional approximation image data is used as a reference section number for the other scanning units. Send,
The sectioning line approximation means of each scanning unit, when receiving the reference section number, when the number of sections obtained by dividing the one-dimensional original image exceeds the number obtained by adding a predetermined value to the reference section number, the one-dimensional approximation image As well as terminating the data generation process,
The optimal scan selecting means compares the number of sections divided by the segmented linear approximation means of the scanning unit after the generation processing of the one-dimensional approximate image data is completed, and selects one-dimensional approximate image data having the minimum number of sections. The image encoding apparatus according to claim 1, wherein
符号化する原画像に対し直交変換を行い変換画像を生成する直交変換手段と、
前記変換画像を適応ビット配分により量子化し、量子化変換画像を生成する量子化手段と、
前記量子化変換画像を所定の径路で走査するとともに、走査径路に沿って同値の画素が連続するラン長、及びそのランに対する画素値の組からなるラン・データを生成するラン・データ生成手段と、
を有する直交変換ユニットを、少なくとも1つ備え、
前記最適走査選択手段は、各走査ユニットの前記区分線型近似手段が区分した区間数、及び直交変換ユニットのランデータ生成手段が生成したランの数(以下、「ラン数」という。)を比較して、区間数又はラン数が最小の1次元近似画像データ又はラン・データを選択することを特徴とする請求項1乃至7の何れか一に記載の画像符号化装置。
Orthogonal transformation means for performing orthogonal transformation on an original image to be encoded to generate a transformed image,
Quantizing means for quantizing the transformed image by adaptive bit allocation to generate a quantized transformed image,
A scan data scanning unit that scans the quantized transform image along a predetermined path, and a run data generation unit that generates run data including a set of a run length in which pixels having the same value continue along the scan path and pixel values for the run. ,
And at least one orthogonal transformation unit having
The optimal scan selection unit compares the number of sections divided by the segmented linear approximation unit of each scanning unit with the number of runs generated by the run data generation unit of the orthogonal transform unit (hereinafter, referred to as “run number”). The image encoding apparatus according to claim 1, wherein one-dimensional approximate image data or run data having the minimum number of sections or runs is selected.
符号化する原画像を所定の走査順序に従って走査して生成される1次元原画像を、各区間内の画素値の累積二乗誤差又は分散が所定の閾値以下となるように複数の区間に区分し、各区間内の画素値を当該区間内における画素値の平均値により近似した1次元近似画像データを生成する区分線型近似処理を、異なる複数の走査順序に対応してそれぞれ並行して行う第1のステップ、
前記各走査順序について区分線型近似処理により得られた各1次元近似画像データの区間数を比較して、区間数が最小の1次元近似画像データを選択する第2のステップ、
及び、選択された1次元近似画像データを符号化する第3のステップ
を有することを特徴とする画像符号化方法。
The one-dimensional original image generated by scanning the original image to be encoded according to a predetermined scanning order is divided into a plurality of sections such that the cumulative square error or variance of the pixel values in each section is equal to or less than a predetermined threshold. A first method in which a piecewise linear approximation process of generating one-dimensional approximation image data in which a pixel value in each section is approximated by an average value of pixel values in the section is performed in parallel with each of a plurality of different scanning orders. Steps,
A second step of comparing the number of sections of each one-dimensional approximate image data obtained by the piecewise linear approximation processing for each of the scanning orders and selecting the one-dimensional approximate image data having the smallest number of sections;
And a third step of encoding the selected one-dimensional approximate image data.
前記区分線型近似処理においては、前記1次元原画像を区分するに際し、1次元原画像を2区間に区分したときに、両区間における画素値の累積二乗誤差又は分散の和が最小となるような区分位置で前記1次元原画像を区分する2分割処理を行うとともに、前記2分割処理により2分された両区間について、当該区間における画素値の累積二乗誤差又は分散が所定の閾値以上の場合には、当該区間において前記2分割処理を再帰的に行うことにより、前記1次元原画像を区分することを特徴とする請求項9記載の画像符号化方法。 In the segmented linear approximation processing, when the one-dimensional original image is divided into two sections when the one-dimensional original image is divided, the sum of accumulated square errors or variances of pixel values in both sections is minimized. A two-division process for dividing the one-dimensional original image at the division position is performed. For both sections divided by the two-division processing, when the cumulative square error or variance of pixel values in the section is equal to or more than a predetermined threshold value, 10. The image encoding method according to claim 9, wherein the one-dimensional original image is divided by recursively performing the two-division process in the section. 前記第1のステップにおいて、符号化する原画像に対し直交変換を行い変換画像を生成し、前記変換画像を適応ビット配分により量子化して量子化変換画像を生成し、前記量子化変換画像を所定の径路で走査するとともに、走査径路に沿って同値の画素が連続するラン長、及びそのランに対する画素値の組からなるラン・データを生成する走査を並行して行い、
前記第2のステップにおいては、前記各走査順序について区分線型近似処理により得られた各1次元近似画像データの区間数、及び前記ランデータのランの数(以下、「ラン数」という。)を比較して、区間数又はラン数が最小の1次元近似画像データを選択し、
前記第3のステップにおいては、選択された1次元近似画像データ又はラン・データを符号化することを特徴とする請求項9又は10記載の画像符号化方法。

In the first step, a transform image is generated by performing an orthogonal transform on the original image to be coded, and the transform image is quantized by adaptive bit allocation to generate a quantized transform image. While scanning along the path, the scan is performed in parallel to generate a run length consisting of a set of pixel values for the run length and the run of pixels having the same value along the scanning path,
In the second step, the number of sections of each one-dimensional approximation image data and the number of runs of the run data (hereinafter, referred to as “run number”) obtained by the piecewise linear approximation processing for each scanning order. By comparison, select the one-dimensional approximate image data with the smallest number of sections or runs,
11. The image encoding method according to claim 9, wherein in the third step, selected one-dimensional approximate image data or run data is encoded.

JP2003411280A 2003-03-24 2003-12-10 Image coding apparatus and image coding method Expired - Fee Related JP4083670B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003411280A JP4083670B2 (en) 2003-03-24 2003-12-10 Image coding apparatus and image coding method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003081285 2003-03-24
JP2003411280A JP4083670B2 (en) 2003-03-24 2003-12-10 Image coding apparatus and image coding method

Publications (2)

Publication Number Publication Date
JP2004312693A true JP2004312693A (en) 2004-11-04
JP4083670B2 JP4083670B2 (en) 2008-04-30

Family

ID=33478139

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003411280A Expired - Fee Related JP4083670B2 (en) 2003-03-24 2003-12-10 Image coding apparatus and image coding method

Country Status (1)

Country Link
JP (1) JP4083670B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008278041A (en) * 2007-04-26 2008-11-13 Canon Inc Image coding apparatus and control method thereof
US7983482B2 (en) 2005-11-08 2011-07-19 Kitakyushu Foundation For The Advancement Of Industry, Science And Technology Matching apparatus, image search system, and histogram approximate restoring unit, and matching method, image search method, and histogram approximate restoring method
US8155451B2 (en) 2004-11-12 2012-04-10 Kitakyushu Foundation For The Advancement Of Industry, Science And Technology Matching apparatus, image search system, and histogram approximate restoring unit, and matching method, image search method, and histogram approximate restoring method
JP2013153273A (en) * 2012-01-24 2013-08-08 Fuji Xerox Co Ltd Image processing device, image reading device, and program
CN106534851A (en) * 2016-12-12 2017-03-22 苏州慧德仿真技术有限公司 Priority-based spatial domain scanning method and apparatus in video compression

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8155451B2 (en) 2004-11-12 2012-04-10 Kitakyushu Foundation For The Advancement Of Industry, Science And Technology Matching apparatus, image search system, and histogram approximate restoring unit, and matching method, image search method, and histogram approximate restoring method
US7983482B2 (en) 2005-11-08 2011-07-19 Kitakyushu Foundation For The Advancement Of Industry, Science And Technology Matching apparatus, image search system, and histogram approximate restoring unit, and matching method, image search method, and histogram approximate restoring method
JP2008278041A (en) * 2007-04-26 2008-11-13 Canon Inc Image coding apparatus and control method thereof
JP2013153273A (en) * 2012-01-24 2013-08-08 Fuji Xerox Co Ltd Image processing device, image reading device, and program
CN106534851A (en) * 2016-12-12 2017-03-22 苏州慧德仿真技术有限公司 Priority-based spatial domain scanning method and apparatus in video compression
CN106534851B (en) * 2016-12-12 2019-07-09 苏州慧德仿真技术有限公司 Spatial domain scan method and device priority-based in video compress

Also Published As

Publication number Publication date
JP4083670B2 (en) 2008-04-30

Similar Documents

Publication Publication Date Title
US6567562B1 (en) Encoding apparatus and method
US8135071B2 (en) Breakpoint determining for hybrid variable length coding using relationship to neighboring blocks
US7574063B2 (en) Image coding method and apparatus
KR100611705B1 (en) Image coding apparatus, image coding method, and image processing apparatus
WO2014190468A1 (en) Video encoder for images
JP2000069292A (en) Image processing apparatus and method, and storage medium
US6775415B1 (en) Fractal image compression using reinforcement learning
US8041135B2 (en) Image encoding apparatus and control method thereof
JP2003018602A (en) Method and device for encoding and decoding image data
US6546145B1 (en) Image compression using selection of quantization method
US6594375B1 (en) Image processing apparatus, image processing method, and storage medium
JP4083670B2 (en) Image coding apparatus and image coding method
US8023756B2 (en) Image encoding apparatus and method of controlling same
US7342517B2 (en) Apparatus and method of binary image compression
US20110194767A1 (en) Image encoding apparatus and control method therefor
US7570821B2 (en) Apparatus and method for image coding
WO2005046213A1 (en) Document image encoding/decoding
JP2002199401A (en) Image encoding device, image decoding device, electronic camera, and recording medium
JP4273284B2 (en) Image compression device
JP4002212B2 (en) Moving picture encoding method, apparatus, program, and program recording medium
JP4181699B2 (en) Encoding apparatus and method, and storage medium
JP3954032B2 (en) Image coding apparatus, image coding method, image coding program, and computer-readable recording medium on which image coding program is recorded
JPH02104180A (en) Compression processing method for image data compressor
JP3983657B2 (en) Image processing apparatus and image processing method
JP2001169118A (en) Image processing apparatus and method, computer readable memory

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060803

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071116

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080115

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: 20080208

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080213

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: 20110222

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110222

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120222

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120222

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130222

Year of fee payment: 5

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20130222

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130222

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees