[go: up one dir, main page]

JP4574020B2 - Image processing apparatus, image encoding apparatus, and image decoding apparatus - Google Patents

Image processing apparatus, image encoding apparatus, and image decoding apparatus Download PDF

Info

Publication number
JP4574020B2
JP4574020B2 JP2001007823A JP2001007823A JP4574020B2 JP 4574020 B2 JP4574020 B2 JP 4574020B2 JP 2001007823 A JP2001007823 A JP 2001007823A JP 2001007823 A JP2001007823 A JP 2001007823A JP 4574020 B2 JP4574020 B2 JP 4574020B2
Authority
JP
Japan
Prior art keywords
pixel data
data
pixel
output
propagation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001007823A
Other languages
Japanese (ja)
Other versions
JP2001313949A (en
Inventor
忠義 中山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2001007823A priority Critical patent/JP4574020B2/en
Priority to US09/791,545 priority patent/US6952501B2/en
Publication of JP2001313949A publication Critical patent/JP2001313949A/en
Application granted granted Critical
Publication of JP4574020B2 publication Critical patent/JP4574020B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像データをその属性データに基づいて処理する画像処理装置及び画像符号化装置及び画像復号装置に関する。
【0002】
【従来の技術】
画像(特に動画像)は、そのデータ量が非常に大きい。従って、画像を蓄積・伝送する際には、そのデータ量を大幅に削減するための圧縮処理が不可欠である。動画像を圧縮(符号化)する処理として、既にMPEG−1、MPEG−2などの国際標準が定められているが、これらはテレビカメラ等で撮影した矩形領域の画像のみを対象としている。
【0003】
画像の特徴は様々であるが、背景とその背景より手前にある被写体(オブジェクト)とからなる画像が数多く存在する。一般的に、背景となる画像は、激しい動きを伴なわず、撮影に使用するカメラの動きに合わせて全体が移動したり、背景中の様々なものが各々細かい動きをしたりする。それに対して、オブジェクトは、激しい動きを伴なう場合がある。このように、オブジェクトと背景とは異なる性質を有する。
【0004】
MPEG−1、MPEG−2に続いて標準化が進められているMPEG−4では、オブジェクトと背景とを別々に取り扱えるようにし、有用なオブジェクトを他で再利用することにより、動画コンテンツの生産性を高めたり、画像を見る側でオブジェクトを操作することができる枠組みを用意することで、画像に対して能動的な関係を築き、新しい表現ができるように考えられている。
【0005】
しかしながら、オブジェクトの形状は矩形ではなく任意であるため、従来のMPEG−1、MPEG−2で用いられてきた圧縮手法をそのまま適用することはできない。
【0006】
動画圧縮では、更にフレーム間の相関を利用してデータ量を減らす。フレーム間の相関を利用するということは、オブジェクトの現フレームのデータを符号化する際に、他のフレームにおける相関の強い領域を参照し、その差分値を符号化することである。
【0007】
オブジェクトが任意の形状であると、当然、参照される他のフレームにおけるオブジェクトの形状も任意であり、オブジェクトの外の領域においては値が無い状態である。これでは、ブロック単位の動きベクトル情報を求めることが出来ない。
【0008】
そこで、参照されるオブジェクトにパディング処理を施して矩形領域に広げた上でブロック単位の動きベクトル探索を行なう。
【0009】
2次元的な広がりを持つ画像データのパディング処理は、1次元のパディング処理を、横方向と縦方向に対して順に行なうことで実現する。1次元のパディング処理は以下のように行なうことができる。
【0010】
複数のオブジェクトで挟まれたオブジェクト外の領域(行または列)は、該領域の両端のオブジェクト内の画素データの平均値に置き換え、その他のオブジェクト外の領域は、該領域に接するオブジェクト内の画素データに置き換える。
【0011】
図1は、上記のパディング処理の一例を示す図である。図1では、水平(横)方向パディング処理を説明するため、ブロック内の1行分の2値形状情報(属性データ)と画素データとが示されている。但し、オブジェクト外の領域の画素データは、他の値で置き換えられるため、元の値は殆ど意味が無い。従って、オブジェクト外の領域の画素データの値は省略されている。
【0012】
図1(a)は2値形状情報、(b)はオブジェクト領域内の画素データを示している。この例では、ブロック1行分の画素数は16である。この16画素の中には、オブジェクト外の領域が4つある。具体的には、オブジェクト外の領域は、画素値”78”の画素の左の1画素からなる領域、画素値”74”の画素と画素値”56”の画素で挟まれた4画素からなる領域、画素値”64”の画素と画素値”42”の画素で挟まれた2画素からなる領域、画素値”42”の画素の右側の3画素からなる領域の4つである。
【0013】
両端の領域は、該領域に接するオブジェクト内の画素データで置き換えられるため、左端の1画素は画素値”78”の画素に置き換えられ、右端の3画素は画素値”42”の画素に置き換えられる。
【0014】
残りの2つの領域は、両側のオブジェクト内の画素に挟まれているので、左側の4画素は画素値”74”と”56”の平均値”65”の画素に置き換えられ、右側の2画素は画素値”64”と”42”の平均値”53”の画素に置き換えられる。その結果、図1(c)に示すような画素データが、パディング処理の結果として得られる。
【0015】
ブロックデータは、複数の行データからなり、それぞれの行データに水平方向パディング処理を施すことにより、図2(a)に示すオブジェクト領域内の画素データは、図2(b)のように広がる。ここで、斜線部は、オブジェクト内の領域及びパディング処理によってデータが補充された画素の領域を示す。
【0016】
水平方向パディング処理の次は、垂直方向パディング処理が実行される。垂直方向パディング処理は、処理の単位が横1行から縦1列に変わる点を除いて、処理方法は、水平方向パディング処理と同様である。垂直パディング処理の後には、図2(c)のようにブロック内の全てが有効な画素データで埋め尽くされる。
【0017】
【発明が解決しようとする課題】
本発明は、上記の背景に鑑みてなされたものであり、例えば、パディング処理のために要する装置規模を削減することを目的とする。
【0018】
【課題を解決するための手段】
本発明に係る画像処理装置は、入力した画像データをパディング処理し、出力する画像処理装置であって、
パディング処理対象の画像データ中の一次元に配列された画素列中の、配列位置を示す番号iを用いた第i番目の画素をP i と表現したとき、n個の画素データP 1 ,P 2 ,…,P n を入力し保持する第1のレジスタ群と、
前記n個の画素データP 1 ,P 2 ,…,P n それぞれに対応し、各画素がオブジェクト内、オブジェクト外のいずれに属するかを示す属性データA 1 ,A 2 ,…,A n を保持する第2のレジスタ群と、
前記第2のレジスタ群に保持された属性データA 1 ,A 2 ,…,A n-1 に基づき、前記第1のレジスタ群に保持されたn−1個の画素データP 1 ,P 2 ,…,P n-1 を、前記番号の若い方向に伝搬させ、伝搬後の画素データP1 1 …P1 n-1 を生成する第1の伝搬手段と、
前記第2のレジスタ群に保持された属性データA 2 ,A 3 ,…,A n に基づき、前記第1のレジスタ群に保持されたn−1個の画素データP 2 ,P 3 ,…,P n を、前記番号の大きい方向に伝搬させ、伝搬後の画素データP2 2 …P2 n を生成する第2の伝搬手段と、
前記第1の伝搬手段、及び、前記第2の伝搬手段で生成された伝搬処理後の画素データに演算を施し、前記一次元に配列されたn個の画素データに対するパディング処理結果となるn個の画素データを生成し、出力する演算手段とを備え、
前記第1の伝搬手段は、n−1個の第1選択手段を有し、
前記第2の伝搬手段は、n−1個の第2選択手段を有し、
前記n−1個の前記第1選択手段を、前記番号に対応づけてS1 1 ,…,S1 n-1 と定義し、前記n−1個の前記第2選択手段を前記番号に対応づけてS2 2 ,…,S2 n と定義したとき、
第i番目の前記第1選択手段S1 i は、
(1)前記属性データA i が、画素データP i がオブジェクト内にあることを示している場合、前記画素データP i を、伝搬済みの第i番目の画素データP1 i として選択出力し、
(2)前記属性データA i が、画素データP i がオブジェクト外にあることを示している場合であって、i<n−1の場合には、前記第1の選択手段S1 i+1 からの出力を伝搬済みの第i番目の画素データP1 i として選択出力し、i=n−1の場合には前記第2の選択手段S2 n から出力され該第1の選択手段S1 n-1 に入力されるデータを画素データP1 i として選択出力し、
第i番目の前記第2の選択手段S2 i は、
(3)前記属性データA i が、画素データP i がオブジェクト内にあることを示している場合、前記画素データP i を、伝搬済みの第i番目の画素データP2 i として選択出力し、
(4)前記属性データA i が、画素データP i がオブジェクト外にあることを示している場合であって、i>2の場合には、前記第2の選択手段S2 i-1 からの出力を、伝搬済みの第i番目の画素データP2 i として選択出力し、i=2の場合には前記第1の選択手段S1 1 から出力され該第2の選択手段S2 2 に入力されるデータを画素データP2 i として選択出力し、
前記演算手段は、1個の平均値算出器と2個のセレクタで構成される、(n−2)/2個の演算部を有し、
前記(n−2)/2個の演算部における第m番目の演算部が有する前記平均値算出器には、前記第1の選択手段S1 2m+1 が選択した画素データP1 2m+1 と、前記第2の選択手段S2 2m が選択した画素データP2 2m が平均値算出対象として供給され、
前記第m番目の演算部が有する2つのセレクタを第1セレクタ、第2セレクタとしたとき、
前記第1セレクタは、
(5)属性データA 2m が、画素データP 2m がオブジェクト内にあることを示している場合、前記画素データP 2m をパディング処理済みの画素データとして選択出力し、
(6)属性データA 2m が、画素データP 2m がオブジェクト外にあることを示している場合、前記第m番目の演算器が有する平均値算出器が算出した平均値を、パディング処理済みの画素データとして選択出力し、
前記第2セレクタは、
(7)属性データA 2m+1 が、画素データP 2m+1 がオブジェクト内にあることを示している場合、前記画素データP 2m+1 をパディング処理済みの画素データとして選択出力し、
(8)属性データA 2m+1 が、画素データP 2m+1 がオブジェクト外にあることを示している場合、前記第m番目の演算器が有する平均値算出器が算出した平均値を、パディング処理済みの画素データとして選択出力する
ことで、第2番目乃至第n−1番目のパディング処理済み画素データを出力し、
前記第1選択手段S1 1 が選択した画素データ、前記第2選択手段S2 n が選択した画素データを、第1番目、第n番目のパディング処理済み画素データとして出力することを特徴とする。
【0025】
本発明に係る画像処理装置において、前記の各演算手段は、例えば、前記第1の伝搬手段の出力と前記第2の伝搬手段の出力との平均値を演算することにより出力画像を構成する画素データを生成することが好ましい。
【0028】
本発明に係る画像処理装置において、前記属性データは、例えば、各画素データについて1ビットのデータであることが好ましい。
【0029】
本発明に係る画像処理装置において、前記属性データは、例えば、対応する画素データが画像中のオブジェクトに属するか否かを示すデータであることが好ましい。
【0031】
【発明の実施の形態】
まず、本出願人が他の出願において開示したパディング処理回路について説明する。
【0032】
本出願人が他の出願において開示したパディング処理回路は、1行が10画素のデータに対して1次元方向のパディング処理を施すが、この原理は、例えば、任意の数の画素データに対する1次元方向のパディング処理に拡張することができる。
【0033】
図3は、本出願人が他の出願において開示したパディング処理用の画像処理部の構成を示す図である。図3において、301は、パディング処理を施すべき一元の画像データを構成する複数の画素データを入力する端子群、303は、一次元の画像データを構成する複数の画素データを保持するレジスタ群、305は、一次元の画像データを構成する各画素データに係る画素がオブジェクト内の画素であるか、オブジェクト外の画素であるかを表わす属性データとしての形状情報(ここでは、各画素に対して1ビット)を入力する端子群、307は、形状情報を保持するレジスタ群、321は、形状情報に基づいて該当する画素データを左方向に伝搬させるための左伝搬処理部、323は、形状情報に基づいて該当する画素データを右方向に伝搬させるための右伝搬処理部、325b〜jは、左伝搬処理部321を構成するセレクタ群、327a〜iは、右伝搬処理部323を構成するセレクタ群、331b〜iは、2つの画素データ間の平均値を演算するための演算器群である。
【0034】
パディング処理を施すべき画素データ、該画素データに対する2値形状情報は、1個ずつ或いは10個同時に端子301、305から各々入力され、レジスタ303、307に各々保持される。形状情報(2値)の“1”は、当該画素がオブジェクト内の画素であることを表わし、“0”は、当該画素がオブジェクト外の画素であることを表わす。
【0035】
レジスタ群303に保持された複数の画素データは、各々左伝搬処理部321、右伝搬処理部323内の対応するセレクタに入力される。レジスタ群307に保持された形状情報は、各々左伝搬処理部321、右伝搬処理部323内の対応するセレクタの制御信号として入力される。
【0036】
各セレクタは、該制御信号が“1”の時はレジスタ群303から入力される画素データを選択し、“0”の時は前段のセレクタで選択された画素データを選択する。これにより、オブジェクト外の画素をオブジェクト内の画素データで置き換えるように、画素データが伝搬する。
【0037】
左伝搬処理部321では、オブジェクト内の画素データが図3の左方向に伝搬し、右伝搬処理部323では、オブジェクト内の画素データが図3の右方向に伝搬する。
【0038】
各々のセレクタで選択された画素データは演算器群331の該当する演算器に送られる。演算器群331の各演算器は、対応するセレクタから供給される2つの画素データの平均値を求めて出力する。
【0039】
図4は、図3に示す画像処理部における処理の具体例を示す図である。図4の(a)は、2値の形状情報、(b)は、入力画素データ(オブジェクト外は意味が無いので省略されている)、(c)は、左伝搬処理部321におけるセレクタの出力値(セレクタの無いところは省略)、(d)は、右伝搬処理部323におけるセレクタの出力値(セレクタの無いところは省略)、(e)は、演算器群331の平均値出力(両端は、セレクタ出力)を表わす。
【0040】
両端の画素はオブジェクトに挟まれることは有り得ないので、平均値を求めるための演算器は不要であり、また、該不要な演算器に対する入力を選択する2つのセレクタの一方は不要である。従って、両端の画素位置では、1つのセレクタで選択された値がパディング処理の結果として出力される。
【0041】
その他の画素位置では、各々2つのセレクタがあり、形状情報が“1”(オブジェクト内)の画素については入力画素データが選択され、形状情報が“0”の画素についてはオブジェクト内の画素データを左又は右に伝搬させた値が選択される。
【0042】
演算器群331は、各画素ごとに選択された2つの値の平均値を演算して、パディング処理の結果として出力する。オブジェクト内の画素(形状情報”1”に対応する画素)については、演算器に供給される2つの値が同じ値(入力画素データ)であり、演算結果は、該2つの値と同じである。
【0043】
オブジェクトに挟まれた領域の画素(形状情報が”0”に対応する画素)については、対応する演算器に供給される左伝搬画素データの値と右伝搬画素データの値とが異なるため、左伝搬画素データの値と右伝搬画素データの値との平均値が各画素ごと演算され、パディング処理の結果として出力される。
【0044】
以上の処理により、オブジェクトで挟まれたオブジェクト外の領域は、該領域の両端のオブジェクト内の画素データの平均値に置き換えられ、その他のオブジェクト外の領域は、該領域に接するオブジェクト内の画素データに置き換えられる。
【0045】
上記と同一構成で、10画素未満の任意の画素数についてのパディング処理が可能である。これは、画素入力の無い端子に対応する形状情報を“0”に固定することによって実現される。
【0046】
この構成では、N画素を同時に処理するには、(N−2)個の演算器が必要であり、また、演算器群331の回路規模は他のレジスタやセレクタ等の回路規模に比べて大きいため、回路規模を小さくする上での障害となる。そこで、以下の実施の形態では、演算器の数を削減することにより、全体の回路規模を削減する。これにより、例えば、低コストな回路を製造すること、及び/又は、同様なパディング処理回路を更に設けて処理を更に高速化することが可能になる。
【0047】
[第1の実施の形態]
以下に説明する本発明の第1の実施の形態に係る画像処理部は、図3に示す画像処理部の半分の数の演算器で同等のパディング処理性能を奏する。
【0048】
図5は、本発明の第1の実施の形態に係る画像処理部の構成を示す図である。
この画像処理部500は、例えば、コンピュータ等の画像処理装置の一部として好適に利用され得る。図5において、501〜504は、平均値を演算する演算器、505b〜iは、形状情報に基づいて、演算器501〜504で演算した平均値及び入力画素データの一方を個別に選択するセレクタ(決定手段)である。
その他の構成要素は、図3における同一番号の構成要素と同一である。
【0049】
10画素を並列にパディング処理する画像処理部500において、独立して平均値を演算する必要がある最大の数は4である。これは、以下の説明から理解できるであろう。
【0050】
M個の平均値を独立に計算する必要があるとすると、形状情報には、最低M個の“0”と、その“0”を分断し挟み込むために少なくとも(M+1)個の“1”がなければならない。即ち、(2M+1)又は(2M+2)個の一次元の画素データにおいて、独立に計算する必要のある平均値の数はM個である。また、隣接する画素の画素データの値を決定するために平均値を独立に決定する必要はない。
【0051】
4個の平均値を独立に計算するには、少なくとも4個の演算器が必要である。
ここで、この4個の演算器の配置を特定するために、次のパターンの形状情報について考える。
【0052】
(p1) 1010101010
(p2) 1010101001
(p3) 1010100101
(p4) 1010010101
(p5) 1001010101
(p6) 0101010101
上記の6つのパターンは、4個の演算器を必要とする形状情報の代表的なパターンである。上記の6つのパターンの中で、(p2)〜(p5)は、2個の“0”が連続するパターンを含んでいる。連続する2個の“0”の内どちらか一方の“0”を“1”に置き換えたパターンを含めると、4個の演算器を必要とする全てのパターンを網羅することになる。
【0053】
形状情報として2個の“0”が連続している位置に対応する画素の画素データを決定するために使用する2つの平均値は互いに等しいため、これらを独立に計算する必要は無く、1個の演算器で演算した平均値を共通に使用することができる。
【0054】
よって、右端又は左端から2画素目と3画素目の組、4画素目と5画素目の組、6画素目と7画素目の組、8画素目と9画素目の組のそれぞれに対して1つの演算器を割り当てることが妥当である。
【0055】
この妥当性を裏付ける1つの例として、“4個の演算器が必要であり且つ、右又は左端から(2n−1)番目の画素と2n番目の画素を共通の平均値で置き換えるべきパターンは存在しない”という事実に留意されたい。
【0056】
次に、どの信号を演算器に入力するかという問題について考える。
【0057】
図3において、演算器331bには、セレクタ325bの出力とセレクタ327bの出力が入力されている。セレクタ327bの制御信号(右から2画素目の形状情報)が“0”の時、該セレクタ327bの選択出力は、前段(左側)のセレクタ327cの出力と同一である。同様に、セレクタ325cの制御信号(右から3画素目の形状情報)が“0”の時、該セレクタ325cの出力は、前段(右側)のセレクタ325bの出力と同一である。
【0058】
よって、セレクタ325bの出力とセレクタ327cの出力のペアは、右から2画素目の形状情報が“0”の時に、右から2番目の画素データを置き換えるべき平均値を演算するための演算器に対する入力データとして使用することができると共に、右から3画素目の形状情報が“0”の時に、右から3番目の画素データを置き換えるべき平均値を演算するための演算器に対する入力データとして使用することができる。一方、形状情報が“1”の場合、該形状情報の位置に対応する画素についての平均値の演算は不要であるので、演算器に対する入力を考慮する必要はない。
【0059】
以上の考察より、この実施の形態に係る画像処理部500の演算器501には、セレクタ325bの出力とセレクタ327cの出力と供給すればよい。
【0060】
同様に、演算器502には、セレクタ325dの出力とセレクタ327eの出力、演算器503には、セレクタ325fの出力とセレクタ327gの出力、演算器504には、セレクタ325hの出力とセレクタ327iの出力を供給すればよい。
【0061】
図3に示す画像処理部では、演算器が各画素について独立に設けられているため、対応する形状情報が“0”であるか“1”であるかに拘らず、各演算器から出力される平均値をそのまま画素データとして出力することができる。しかしながら、この実施の形態に係る画像処理部500では、画素と演算器とが1対1に対応していないため、平均値による置き換えが必要の無い画素データ(形状情報が”1”の位置の画素データ、即ち、オブジェクト内の画素の画素データ)は、レジスタ群303に保持されている画素データをそのまま出力画素データとする必要がある。セレクタ505b〜505iは、そのために設けられている。
【0062】
この実施の形態に係る画像処理部に図4の(a)、(b)に各々示す形状情報、画素データを入力すると(以下にも示す)、

Figure 0004574020
各演算器501〜504には、以下に示す値が入力され、平均値が演算される。
【0063】
Figure 0004574020
この例では、上記の平均値(演算結果)は、セレクタ群505b〜505iのうち該当するセレクタを通して出力される。言い換えると、右から3番目の画素データは加算器501の出力によって置き換えられ、右から4番目の画素データは加算器502の出力によって置き換えられ、右から7番目の画素データは加算器503の出力によって置き換えられ、右から8番目の画素データは加算器504の出力によって置き換えられ、図4の(e)と同一の結果が得られる。即ち、この実施の形態に係る画像処理部500により、図3に示す画像処理部と同等のパディング処理結果を得ることができる。
【0064】
以上のように、この実施の形態によれば、図3に示す画像処理部の半分の演算器で、該画像処理部と同一の処理結果が得られる。
【0065】
[第2の実施の形態]
第1の実施の形態は、一次元の画像データを構成するN画素を同時に処理する例であるが、N画素を同時に処理する必要が無ければ、演算器の数を更に削減することができる。
【0066】
パディング処理により得られる画素データを一旦メモリ等に格納する場合、コスト等によって制限されるメモリのバス幅の関係で、例えば同時に16画素をメモリに格納するということは少ないと考えられる。一般的には、4画素、多くても8画素が一度にメモリに格納することができるデータ量である。
【0067】
そこで、ここでは、パディング処理の結果を4画素単位で出力する構成について考える。図6は、本発明の第2の実施の形態に係る画像処理部の構成を示す図である。この画像処理部600は、8画素の画素データで構成される行データにパディング処理を施して、その結果を4画素単位で出力する構成を有する。なお、この画像処理部600は、例えば、コンピュータ等の画像処理装置の一部として好適に利用され得る。
【0068】
この実施の形態に係る画像処理部600では、形状情報は、左伝搬処理部321と右伝搬処理部323を構成するセレクタの切り換え用の制御信号として利用される。なお、形状情報に関する構成は、図5に示す画像処理部と同様であるので、図6では省略されている。
【0069】
図6において、601は、平均値を演算する演算器に供給するデータを選択するためのセレクタ群(選択手段)である。該セレクタ群601は、演算器501〜504に、8画素分のデータを4画素分のデータ毎に処理させるために、演算器501〜504に供給するデータを切り換える。例えば、演算器501には、右端の画素データを生成するためのデータ又は右から5番目の画素データを生成するためのデータがセレクタ群601の該当するセレクタにより選択的に供給される。
【0070】
なお、例えば、16画素の画素データで構成される行データにパディング処理を施して4画素単位で出力するには、セレクタ群601の各セレクタを2入力から4入力に変更し、例えば、第1サイクル(第1段階)では、演算器501〜504より第1画素〜第4画素の画素データを出力し、第2サイクル(第2段階)では、演算器501〜504より第5画素〜第8画素の画素データを出力し、第3サイクル(第3段階)では、演算器501〜504より第9画素〜第12画素の画素データを出力し、第4サイクル(第4段階)では、演算器501〜504より第13画素〜第16画素を出力するように、セレクタ群を制御すればよい。
【0071】
[第3の実施の形態]
この実施の形態は、第1の実施の形態と第2の実施の形態とを組み合わせたものである。これにより、演算器の個数を更に削減し、全体の回路規模を削減することができる。
【0072】
図7は、本発明の第3の実施の形態に係る画像処理部の構成を示す図である。
この画像処理部700は、例えば、コンピュータ等の画像処理装置の一部として好適に利用され得る。
【0073】
図7に示す画像処理部700において、701は、右側の4画素の出力画素データを生成する第1サイクル及び左側の4画素出力画素データを生成する第2サイクルを切り換える切換信号に従って演算器501及び502に供給すべきデータを選択するセレクタ群(選択手段)であって、第2の実施の形態におけるセレクタ群601に相当する。703は、上記切換信号に従ってパディング処理前の画素データ(入力画素データ)のうち右側の4画素又は左側の4画素を選択的に出力するセレクタ群である。705は、対応する形状情報が“1”であればセレクタ群703の出力を選択し、“0”なら演算器501及び502で演算した平均値を選択するセレクタ群(決定手段)である。その他の構成要素は、図6における同一番号の構成要素と同じである。
【0074】
なお、セレクタ群705の切り換えは形状情報に従ってなされる。形状情報に関する構成は、第1の実施の形態と同様である。
【0075】
この実施の形態と第1の実施の形態との主要な相違点は、次の通りである。第1の実施の形態では、右から2n番目の画素と(2n+1)番目の画素に対して1つの演算器が割り当てられているが、この実施の形態では、右から(2n−1)番目の画素と2n番目の画素に対して1つの演算器が割り当てられている。
【0076】
このような割り当て方式は、第1の実施の形態においても可能であるが、第1の実施の形態においては、行データの両端の画素データを置き換えるべきデータとして平均値を使用する必要が無いため、両端の画素を除いた残りの画素に対して、2画素毎に1つの演算器を割り当てる方式が効率的である(例えば、10画素の行データに対して4個の演算器を備えればよい)。
【0077】
この実施の形態では、複数の画素データを部分的に選択(参照)しながら形状情報が”0”の画素データを平均値によって置き換えるため、演算器501及び502に供給すべき両端のデータ(4つのデータのうち左端及び右端のデータ)には、平均値を演算するために不可欠なデータも入力され得る。よって、同時処理する4画素に対して、均等に2画素毎に1つの演算器を割り当てる必要がある。
【0078】
図7の左伝搬処理部321において右から1番目の画素から2番目の画素へ伝搬する画素データと、右伝搬処理部323において右から2番目の画素から1番目の画素へ伝搬する画素データとの平均値を演算するために、これらの2つのデータが1組(第1組)としてセレクタ群701に供給される。
【0079】
同様に、右から3番目の画素から4番目の画素へ伝搬する画素データと右から4番目の画素から3番目の画素へ伝搬する画素データの組(第2組)、右から5番目の画素から6番目の画素へ伝搬する画素データと右から6番目の画素から5番目の画素へ伝搬する画素データの組(第3組)、右から7番目の画素から8番目の画素へ伝搬する画素データと右から8番目の画素から7番目の画素へ伝搬する画素データの組(第4組)が選択的にセレクタ群701に供給される。
【0080】
ここで、8画素の内、右側の4画素及び左側の4画素のいずれを処理するかに従って、即ち、切換信号に従って、セレクタ群701は、上記の4組から2組(第1組及び第2組、又は、第3組及び第4組)を選択して、演算器501及び502にデータを供給する。
【0081】
これにより、選択された2組の画素データについて、演算器501及び502により各組毎に平均値が演算されて出力される。そして、形状情報が“0”であれば、それに対応するセレクタ群705のセレクタは、演算器から出力される平均値を選択し、形状情報“1”であれば、それに対応するセレクタ群703及び705のセレクタは、元の入力画素データを選択し、パディング処理結果として4画素単位で出力する。
【0082】
[第4の実施の形態]
上記の各実施の形態は、所定のサイズの画像データを構成する画素データを固定のサイクル数(段階数)で処理するものであるが、この実施の形態は、入力される2値形状情報のパターンに応じて処理サイクル数を変更する構成に関する。
【0083】
第1の実施の形態では、どのような形状情報であっても全入力画素データを同時に処理することができる。何故なら、任意の形状情報に対して全入力画素データを同時に処理し得る個数の演算器を備えているからである。これは、演算器の個数がこれより1つでも少なければ、全入力画素データを同時に処理できない場合があることを意味する。同時処理の可否は、処理回路の構成と形状情報のパターンによって決まる。
【0084】
この実施の形態は、任意の形状情報に対して全入力画素データを同時に処理できる必要最小限の個数よりも少ない個数の演算器しか備えていないが、同時処理が可能な場合には同時処理を行なって1サイクル(第1段階)で処理を終え、同時処理が不能な場合に限り、未処理の画素を第2サイクル(第2段階)で処理する。
【0085】
この実施の形態では、形状情報のパターンが同時処理が可能なパターンであるか否かを検出すると共に、同時処理が不能な画素を検出し、該未処理の画素を第2サイクルで処理する。
【0086】
図8は、本発明の第4の実施の形態に係る画像処理装置の構成を示す図である。この画像処理部800は、例えば、コンピュータ等の画像処理装置の一部として好適に利用され得る。
【0087】
図8に示す画像処理部800は、8画素用のパディング処理回路であり、801は、8画素データの全てを1サイクルで処理することができるか否かを検出すると共に、第2サイクルで処理しレジスタに取り込むべき画素データを特定する検出器(制御手段;詳細は図11参照)、807及び809は、各々画素データの平均値を演算する演算器、811及び812は、演算器807に供給すべき2つのデータを選択するセレクタ(選択手段)、813及び814は、演算器器809に供給すべき2つのデータを選択するセレクタ(選択手段)、821〜828は、出力画素データを保持するレジスタ、832及び837は、レジスタ822及び827は、データの取り込みを制御する制御信号を生成する論理素子である。その他の構成要素は、第1の実施の形態(図5)における同一番号の構成要素と同じである。
【0088】
この実施の形態で導入されたセレクタ811〜814は、処理サイクルに従って制御される。即ち、セレクタ811〜814は、第1サイクルの処理では一方を選択し、第2サイクルの処理では他方を選択するように制御される。
【0089】
8画素を同時にパディング処理するには、上記の説明から明らかなように3個の演算器が必要であるが、この実施形態では、それより1つ少ない2個の演算器807及び809で処理を行なう。
【0090】
第1サイクル(第1段階)では、この2個の演算器807及び809の一方を右から3番目の画素と4番目の画素に対して割り当てると共に、他方を右から5番目の画素と6番目の画素に対して割り当る。
【0091】
右から2画素目の処理結果を選択するセレクタ505bには、右から3番目と4番目の画素に対して割り当てられた演算器807の出力(平均値)が供給され、右から7画素目の処理結果を選択するセレクタ505gには、右から5番目と6番目の画素に対して割り当てられた演算器809の出力(平均値)が供給される。
【0092】
2つのセレクタ505b及び505gは、処理サイクル(処理の段階)に従って、第1サイクル(第1段階)では、左伝搬処理部321あるいは右伝搬処理部323における対応するセレクタの出力を選択し、第2サイクル(第2段階)では、演算器の出力を選択する。
【0093】
この画像処理部800に次の形状情報(a)と画素データ(b)を入力すると、
Figure 0004574020
第1サイクルの処理により、レジスタ821〜828に以下の値(左端がレジスタ828、右端がレジスタ821)が取り込まれる。
(c) 156 156 99 99 99 42 42 42
この時、2つの演算器807及び809は、いずれも“99”を出力している。
【0094】
第2サイクルでは、セレクタ505b及び505gにより選択されるデータが切り換わり、レジスタ821〜828に以下の値(左端がレジスタ828、右端がレジスタ821)が供給される。
(d) 156 99 99 99 99 42 99 42
これらのデータのうち、実際にレジスタに取り込まれるのは、右から7画素目(左から2画素目)の“99”のみで、レジスタ821〜828の最終的な出力(左端がレジスタ828、右端がレジスタ821)は、以下のようになる。
(e) 156 99 99 99 99 42 42 42
この実施の形態に係る画像処理部800において、パディング処理が1サイクルで終了しない形状情報のパターンは、以下の2つの場合である。
(1)右端の2ビットが“01”で、且つ、左側の6ビットに“1”が1つ以上存在する場合
(2)左端の2ビットが“10”で、且つ、右側の6ビットに“1”が1つ以上存在する場合
(1)及び(2)のパターンは、右から2画素目と7画素目の画素データを2つの画素データの平均値で置き換える必要がある場合を示している。
【0095】
検出器801は、入力された形状情報から上記(1)及び(2)を検出し、少なくとも一方が検出された場合には、第1サイクルに次いで第2サイクルを実行し、(1)の場合には右から2画素目、(2)の場合には右から7画素目に対応する出力段のレジスタ822、827にのみ、第2サイクルにおいてセレクタ505b、505gの出力を各々取り込ませる。
【0096】
検出器801により(1)と(2)の両方が検出された場合は、2画素目と7画素目のレジスタ822、827の双方に、第2サイクルにおいてセレクタ505b、505gの出力を取り込ませる。
【0097】
上記(1)及び(2)のいずれも検出されない時は、第1サイクルで処理を終了し、次の行データ(又は列データ)を処理する。
【0098】
[第5の実施の形態]
この実施の形態は、第4の実施の形態の変形例に関する。図9は、本発明の第5の実施の形態に係る画像処理部の構成を示す図である。
【0099】
この実施の形態(図9)と第4の実施の形態(図8)とは、セレクタ505b及び505gを制御するための切換信号と、検出器801により検出する内容が相違する。
【0100】
この実施の形態では、検出器901と902を追加し、検出器901の出力でセレクタ505bを切り換え、検出器902の出力でセレクタ505gを切り換える。
【0101】
この実施の形態では、パディング処理が1サイクルで終了しない形状情報のパターンは、以下の2つの場合であり、これを検出器801’(制御手段;詳細は図12参照)で検出する。
(1)右端の3ビットが“101”である場合
(2)左端の3ビットが“101”である場合
検出器801’で上記パターンを検出した後の処理は、第4の実施の形態と同様である。
【0102】
両端から2つ目の画素データを平均値で置き換える場合でも、それが孤立していない場合(形状情報”1”で挟まれた位置の画素でない場合)には、隣接する画素のために演算された平均値を用いることができるので、パディング処理は1サイクルで終了する。しかし、置き換えるべき画素が孤立している場合には、第2サイクルで該孤立した画素を置き換えるための平均値を演算する必要があるので、パディング処理に第2サイクルを要する。上記2つのパターンは、該孤立した画素を置き換えるための平均値の演算が必要な場合を示している。
【0103】
一方、検出器901は、以下のパターン(イ)を検出してセレクタ505bを制御する。
(イ)右端から2ビット目の形状情報が“1”又は右端の形状情報が“0”
パターン(イ)が検出された場合、右端から2つ目の画素データが平均値で置き換えられることは無く、左伝搬処理部321内の対応するセレクタの出力がパディング処理結果となる。
【0104】
パターン(イ)以外では、演算器807が出力する平均値をセレクタ505bが選択するが、残りの左側6ビットが全て“0”である場合、平均値を出力するのでは都合が悪い。ところが、この場合、演算器807に入力される2つのデータは同一であるため、結果的にその同一のデータが選択され、このような不都合はない。これについて、具体的な例を示す。
【0105】
以下の形状情報(a)と画素データ(b)が入力されたとする。
Figure 0004574020
この場合、右端の2ビットの形状情報は、上記パターン(イ)に該当しないため、右端から2つ目の出力画素データを選択するセレクタ505bは、演算器807が出力する値(平均値)を選択する。該演算器に対する2つの入力は、左伝搬処理部321と右伝搬処理部323から供給されるが、どちらの値も“156”なので、演算器807の出力は“156”となる。よって、出力段のセレクタ505bが演算器807の出力を選択しても画素データは“156”に置き換えられる。
【0106】
検出器902とセレクタ505gとの関係も同様である。
【0107】
[第6の実施の形態]
この実施の形態は、第4及び第5の実施の形態における演算器の個数を増加することなく同時処理が可能なパターンが最大となるように、演算器の配置(割り当て)と出力段のセレクタの構成の一部を変更し、更に演算器の入力データを形状情報のパターンに基づいて切り換えるようにしたものである(第4及び第5の実施の形態では、処理サイクルに従って演算器の入力データが切り換えられる)。
【0108】
図10は、本発明の第6の実施の形態に係る画像処理部の構成を示す図である。この画像処理部1000は、例えば、コンピュータ等の画像処理装置の一部として好適に利用され得る。
【0109】
図10において、1001及び1002が新たに追加されたセレクタである。
中央の2画素の画素データは、該セレクタ1001及び1002により2つの演算器807及び809の出力を選択することにより得ることができる。
【0110】
検出器801”(制御手段;詳細は図13参照)では、第5の実施の形態で検出するパターン(1)及び(2)に加え、下記のパターン(3)を検出する。
(3)形状情報の右側7ビット内に“01”変化点が3個あり、且つ
形状情報の左側7ビット内に“10”変化点が3個ある。
【0111】
これを、より具体的なパターンで表わすと以下のようになる。
【0112】
(A) 1010101−
(B) 101010−1
(C) 10101−01
(D) 1010−101
(E) 101−0101
(F) 10−10101
(G) 1−010101
(H) −1010101
上記の8パターンにおいて“−”は、“0”及び“1”のいずれでもよい。
【0113】
検出器801”が、上記の(A)〜(H)に記述したパターンを検出する。該パターンが検出された時は1つの行データを2サイクルで処理し、検出されない時は1つの行データを1サイクルで処理する。
【0114】
第1の実施の形態で述べた演算器の割り当て方式では、右から2n番目の画素と(2n+1)番目の画素に対して1つの演算器を割り当てる。この割り当て方式では、処理対象の一次元の画像データを構成する画素データの数が8つの場合に、3個の演算器が必要である。
【0115】
この実施の形態では、上記の割り当て方式に準じた方式が採用されている。しかしながら、この実施の形態では、2個の演算器しか設けられていないため、この2個の演算器を3個の演算器の代わりとして動作させる。これは、2個の演算器に対して供給するデータをセレクタで切換ることにより実現される。
【0116】
セレクタによるデータの切り換え方法としては、種々の方法が考えられるが、以下に説明する方法が比較的簡単である。
【0117】
ここで述べる切換方式では、第5の実施の形態において第2サイクルで実行する処理、即ち、右から2番目と7番目の画素データの処理を優先する。即ち、形状情報の右端2ビットが“01”、且つ、第1サイクルの時は、右から2番目の画素データを処理するために、セレクタ811及び812を右側に設定する。一方、これ以外の条件では、セレクタ811及び812を左側に設定する。形状情報の右端2ビットが“01”の場合は、右から2番目の画素データは、演算された平均値で置き換える必要があるため、そのための処理を優先する。
【0118】
同様に、形状情報の左端2ビットが“10”、且つ、第1サイクルの時は、右から7番目の画素データを処理するために、セレクタ813及び814を左側に設定し、これ以外の条件では、セレクタ813及び814を右側に設定する。
【0119】
演算器807及び809の出力側にあるセレクタの内、第5の実施の形態と同様のセレクタは、切り換え方法も第5の実施の形態と同様である。
【0120】
この実施の形態で導入したセレクタ1001及び1002は、以下のように制御される。即ち、形状情報の右端3ビットが“101”であれば、演算器807は、右から2画素目に対応する平均値を演算するために使用されるため、セレクタ1001に演算器809の出力を選択させる。一方、これ以外の条件では、セレクタ1001に演算器807の出力を選択させる。
【0121】
同様に、形状情報の左端3ビットが“101”であれば、セレクタ1002に演算器807の出力を選択させ、これ以外の条件では、セレクタ1002に演算器809の出力を選択させる。
【0122】
セレクタ1001及び1002は、対応する画素の形状情報の値が“0”の時に元の画素データを置き換えるための平均値を出力する。
【0123】
上記の構成と制御により、新たに1サイクルで処理が可能になった形状情報のパターンについて説明する(第5の実施の形態では1サイクルで処理できないパターン)。
【0124】
例えば、“10000101”という形状情報では、第5の実施の形態では1サイクルで処理することができない。この実施の形態では、一方の演算器807で右から2番目の画素に対応する平均値を演算し、他方の演算器809で左側2画素(6画素目と7画素目)に対応する平均値を演算する。後者の平均値は4画素目と5画素目の画素データを置き換えるためにも用いることができる。
【0125】
演算器809の出力は、セレクタ1001と505dを通して4画素目に出力されると共に、セレクタ1002と505eを通して5画素目に出力される。そして、検出器801”は、1サイクルで処理可能なパターンであることを検出する。
【0126】
よって、上記の形状情報のパターン(“10000101”)では、形状情報が“0”の全ての画素データを置き換えるために必要な平均値を1サイクルで演算することができ、また、該平均値による置き換えに必要なセレクタとそれを制御する手段とが設けられているため、1サイクルで完全に処理を終えることができる。
【0127】
これにより、上記の(A)〜(H)のパターンのように3つの演算器を必要とする場合以外は、全て1サイクルで処理することができる。上記の(A)〜(H)のパターンは理論上は有り得るものであるが、実際の画像データの形状情報としては殆ど存在しない。よって、この実施の形態によれば、略すべての画像データを1サイクルで処理することができる。
【0128】
[第7の実施の形態]
図14は本発明の第7の実施の形態に係る画像符号化部の構成を示すブロック図である。
【0129】
図14において、1は1フレーム分の画像データを格納し、MPEG-4の手順に従ってマクロブロック単位に出力するフレームメモリであり、2は後述する予測値を減算する減算器である。3はDCT変換を施すDCT変換器であり、4は変換係数をそれぞれ量子化する量子化器である。5は量子化結果をエントロピー符号化するエントロピー符号化器である。6は量子化結果を変換係数に戻す逆量子化器であり、7は変換係数から画素データを復元する逆DCT器である。8は予測値を加算する加算器であり、9は再生画像を格納するフレームメモリである。
【0130】
10は入力されたマクロブロックの画素データとフレームメモリ9に格納された画素データから動きベクトルを検出する動きベクトル検出器である。11は検出された動きベクトルに従ってマクロブロック毎の予測値を算出する動き補償器であり、12は動きベクトルを符号化する動きベクトル符号化器である。13は2値の形状情報1フレーム分を格納し、MPEG-4の手順に従ってマクロブロック単位に切出して出力する2値のフレームメモリである。形状情報は各画素がオブジェクトの外か内かを示すデータである。14はマクロブロック単位で形状情報を算術符号化する形状符号化器である。15は前記再生画像に対応した形状情報を格納するフレームメモリである。16は該当するマクロブロックについて動きベクトル検出器10から動きベクトルを入力し、入力されたマクロブロックの形状情報とフレームメモリ15の形状情報を比較して形状情報の動きベクトルを算出して動き補償を行う動き補償器である。
【0131】
20、21は形状情報からパディングを制御するパディング制御器である。17はパディング制御器20からの制御と形状情報に従って、フレームメモリ1のオブジェクト外の画素データを補填するパディング器である。18はパディング制御器21からの制御と形状情報に従って、フレームメモリ9のオブジェクト外の画素データを補填するパディング器である。19は拡張パディングを実行する拡張パディング器である。
【0132】
上記の構成において、動画像の各フレームの符号化動作について述べる。
【0133】
まず、1フレーム分の画素データと形状情報がそれぞれフレームメモリ1とフレームメモリ13に格納される。
【0134】
入力された符号化対象のフレームがフレーム内符号化の対象であった場合はパディング制御器20とパディング器17が動作し、動き補償を伴うフレーム間符号化の対象であった場合はパディング制御器20、21、パディング器17、18及び拡張パディング器19が動作する。
【0135】
パディング器17及びパディング制御器20は、フレーム内符号化時には低域成分外挿法と呼ばれている方法でパディング処理を行ない、フレーム間符号化時には特に処理はせず、減算器2から出力される予測誤差の内、オブジェクト領域外の予測誤差の値をパディング制御器からの信号に基づいて“0”に置き換える。
【0136】
前記低域成分外挿法とは、オブジェクト内の画素の平均値でオブジェクト外の領域を埋めた後に、オブジェクト外の画素を該画素の上下左右4画素の平均値で置き換えるものである。パディング器18には、前記第1〜第6の実施形態で説明した1次元のパディング処理ユニットを2つ又は1つ用いる。2つのパディング処理ユニットを用いる場合は、一方で水平方向のパディング処理を行ない、もう一方で垂直方向のパディング処理をする。1つのパディング処理ユニットで処理する場合は、水平方向のパディング処理をした後、同じユニットで垂直方向のパディング処理を行なう。
【0137】
フレーム内符号化が選択された場合、パディング器17は符号化に先行してパディング処理を行う。パディング制御器20はフレーメモリ13に格納された形状情報からオブジェクトの境界を含むマクロブロックを検出しそのマクロブロックの位置と形状情報をパディング器17に供給する。パディング器17はオブジェクトの境界を含むマクロブロックの画素データをフレームメモリ1から読み出して、前記低域成分外挿法によりオブジェクト外の画素データをオブジェクト内の画素データから算出する。
【0138】
フレーム間符号化が選択された場合、パディング器18は符号化に先行してパディング処理を行う。パディング制御器21はフレーメモリ15に格納された形状情報からオブジェクトの境界を含むマクロブロックを検出しそのマクロブロックの位置と形状情報をパディング器18に供給する。パディング器18はオブジェクトの境界を含むマクロブロックの画素データをフレームメモリ9から読み出して、オブジェクト外の画素データをオブジェクト内の画素データから生成する。
【0139】
上記パディング処理と平行して、パディング制御器21はフレーメモリ15に格納された形状情報から左右上下がオブジェクト内部の画素を含むマクロブロックと接しているマクロブロックを検出し、マクロブロックの位置を拡張パディング器19に供給する。拡張パディング器19はMPEG-4符号化方式の拡張パディングの手順に従って、隣接するマクロブロックの画素データをコピーする。
【0140】
符号化するブロックのパディング処理が終了したら、フレーム内符号化の場合は、マクロブロック単位に画素データをフレームメモリ1から読み出し、減算器2で予測値0を引き、DCT器3でDCT変換し、その変換係数を量子化器4で量子化する。
【0141】
量子化結果はエントロピ符号化器5にて符号化し、外部に出力する。と同時に量子化結果は逆量子化器6にも送られ、DCT変換係数が再生され、逆DCT器7にて画素データを再生して加算器8で予測値0を加えた後、フレームメモリ9に格納する。
【0142】
これと平行して、フレームメモリ13の2値形状情報は符号化器14にて、オブジェクト外のマクロブロックに関してはTransparentとして符号化し、境界を含むマクロブロックに関してはその形状を算術符号化し、完全にオブジェクト内に含まれる場合はOpaqueとして符号化して、外部に出力する。また該2値形状情報をフレームメモリ15にも格納し、次の形状情報の符号化に使用する。
【0143】
エントロピ符号化器5と形状符号化器14の出力が外部でMPEG-4の書式に必要なヘッダ情報等の符号化データと多重化されてMPEG-4符号化データとして出力される。
【0144】
フレーム間符号化の場合は、マクロブロック単位に画素データがフレームメモリ1から読み出され、動き検出器10に入力される。動き検出器10は入力されたマクロブロックの画素データとフレームメモリ9に格納されている再生画像データの部分画像と逐次比較し、該再生画像中の最も類似度の高い領域を特定し、その偏差を動きベクトルとして出力する。
【0145】
出力された動きベクトルは動きベクトル符号化器12で符号化され、外部に出力される。と同時に、動きベクトルは動き補償器11、16にも供給される。動き補償器11では動きベクトルに従って、フレームメモリ9から予測値を読み出し、減算器2に入力する。減算器2では符号化するマクロブロックの画素データから、前記入力された予測値を減算する。
【0146】
減算結果はDCT器3でDCT変換され、その変換係数を量子化器4で量子化される。量子化結果はエントロピ符号化器5で符号化され、外部に出力される。と同時に量子化結果は逆量子化器6に入力され、DCT変換係数を再生し、逆DCT器7で画素データを再生して加算器8で動き補償器11からの予測値を加え、フレームメモリ9に格納する。
【0147】
これと平行して、動き補償器16に動き検出器10で算出した動きベクトルを供給する。動き補償器16は、該動きベクトルを基準としてフレームメモリ15の形状情報と符号化マクロブロックの形状情報とを比較して形状情報の動きベクトルを算出し、動きベクトルと該動きベクトルが示す形状情報を予測値として形状符号化器14に供給する。
【0148】
フレームメモリ13の形状情報は形状符号化器14にて、オブジェクト外のマクロブロックに関してはTransparentとして符号化し、完全にオブジェクト内に含まれる場合はOpaqueとして符号化して、外部に出力する。
【0149】
境界を含むマクロブロックに関しては、インターモードにおいては形状情報の動きベクトルを符号化した後、その形状を動き補償器16からの予測値も参照して算術符号化し、外部に出力する。イントラモードでは動き補償器16からの予測値を参照せずに算術符号化し、外部に出力する。また形状情報はフレームメモリ15に格納し、次の形状情報の符号化に使用する。
【0150】
エントロピ符号化器5と形状符号化器14と動きベクトル符号化器12出力が外部でMPEG-4の書式に必要な情報等の符号化データと多重化されてMPEG-4符号化データとして出力される。
【0151】
拡張パディング器19は実際にはフレームメモリとそのメモリコントロールの機能で実現されるので、特別に設けなくても実現が可能な場合も有る。
【0152】
[第8の実施の形態]
図15は本発明の第8の実施の形態に係る画像復号部の構成を示すブロック図である。
【0153】
図15において、50は符号化データを入力し、量子化結果を再生するエントロピー復号器である。51は量子化結果を変換係数に戻す逆量子化器であり、52は変換係数から予測差分画素データを復元する逆DCT器である。53は予測値を加算する加算器であり、54はMPEG-4の手順に従ってマクロブロック単位に画像データを1フレーム分、格納するフレームメモリである。55は再生画像を格納するフレームメモリである。56は動きベクトルを復号して再生する動きベクトル復号器である。
【0154】
57は復号された動きベクトルに従ってマクロブロック毎の予測値を算出する動き補償器である。58はマクロブロック単位で形状データを復号する形状復号器である。
【0155】
59、60は復号された2値形状情報を格納する2値のフレームメモリである。61は該当するマクロブロックについて動きベクトル復号器56から動きベクトルを入力し、動きベクトルと形状復号器58で復号された形状情報の動きベクトルにしたがってフレームメモリ59から形状情報を読み出す動き補償器である。
【0156】
62は形状情報に従ってパディングを制御するパディング制御器である。63はフレームメモリ59の形状情報に従って、フレームメモリ55のオブジェクト外の画素データを補填するパディング器である。64は拡張パディングを実行する拡張パディング器である。
【0157】
上記の構成において、動画像の各フレームの復号動作について述べる。
【0158】
まず、フレーム内符号化されたフレームの復号から説明する。マクロブロック単位で形状情報の符号化データを形状復号器58に入力して、形状情報を復号する。
【0159】
形状復号器58は、マクロブロックのモードがTransparentの場合は形状情報としてすべて“0”を出力する。このモードの形状情報に対応したマクロブロックの画素データは存在しないので、復号処理は行なわない。
【0160】
マクロブロックのモードがOpaqueであれば、形状情報としてすべて“1” を出力する。算術符号化されている場合はこれを復号し、オブジェクトの境界の形状情報を再生する。再生された形状情報はフレームメモリ59とフレームメモリ60に格納される。
【0161】
マクロブロックの形状情報のモードがOpaqueか算術符号化であれば、マクロブロック単位で符号化データがエントロピ復号器50に入力される。エントロピ復号器50では符号化データを復号処理して量子化結果を再生する。該量子化結果を逆量子化器51に入力して、DCT変換係数を再生し、逆DCT器52で画素データを再生して加算器53で予測値“0”を加え、フレームメモリ54とフレームメモリ55に格納する。
【0162】
1フレーム分の処理が終了したら、フレームメモリ54およびフレームメモリ59の内容が外部に出力され、適宜合成される。
【0163】
次にフレーム間符号化されたフレームの復号を説明する。
【0164】
パディング器63は境界パディングの処理を行う。パディング制御器62はフレーメモリ60に格納された2値形状情報からオブジェクトの境界を含むマクロブロックを検出し、該マクロブロックのオブジェクトの境界を含むマクロブロックの画素データをフレームメモリ55から読み出して、該画素データと形状情報をパディング器63に供給する。
【0165】
パディング器63には、前記第1〜第6の実施形態で説明した1次元のパディング処理ユニットを2つ又は1つ用いて、第7の実施形態で説明したようにパディング処理する。そして、入力された画素データと2値形状情報からオブジェクト外部の画素データを生成する。
【0166】
続けて、パディング制御器62はフレーメモリ60に格納された2値形状情報から、オブジェクト内部の画素を含むマクロブロックと左右上下で接しているマクロブロックを検出し、マクロブロックの位置を拡張パディング器64に入力する。拡張パディング器64はMPEG-4符号化方式の拡張パディングの手順に従って、隣接するマクロブロックの画素データをコピーする。
【0167】
上記復号化処理と平行して、マクロブロック単位で形状情報の符号化データを形状復号器58に入力して、2値形状情報を復号する。
【0168】
マクロブロックのモードがTransparentの場合は形状情報としてすべて“0”を出力する。このモードの形状情報に対応したマクロブロックの画素データは存在しないので、復号処理は行なわない。
【0169】
マクロブロックのモードがOpaqueであれば、形状情報としてすべて“1”を出力する。イントラモードで算術符号化されている場合はこれを復号し、オブジェクトの境界の形状情報を再生し、フレームメモリ59に格納する。
【0170】
動き補償されているマクロブロックでは、まず動きベクトル復号器56にて動きベクトルを復号し、復号した動きベクトルを動き補償器57、61に供給する。
【0171】
形状情報がインターモードで算術符号化されていれば、形状復号器58は形状情報のための動きベクトルを算出するデータを復号し、動き補償器61はこの動きベクトルを用いて、フレームメモリ60から形状情報の予測値を読み出す。この予測値を参照して形状復号器58は形状情報を復号し、2値のフレームメモリ59に格納する。
【0172】
マクロブロックがフレーム内符号化されている場合は前述のフレーム内符号化データの復号動作によって復号を行いフレームメモリ54、55に画素データを格納する。
【0173】
マクロブロックがフレーム間符号化されている場合はマクロブロックの形状情報のモードがOpaqueか算術符号化であれば、マクロブロック単位で符号化データをエントロピ復号器50に入力し、該エントロピ復号器50で復号処理して量子化結果を再生する。
【0174】
量子化結果を逆量子化器51に入力してDCT変換係数を再生し、逆DCT器52にて変換係数から予測差分画素データを再生して加算器53に送る。
【0175】
平行して、動き補償器57は動きベクトル復号器56で復号された動きベクトルに基づき、フレームメモリ55から予測値を読み出し加算器53に入力する。
加算器53にて前記予測差分画素データに該予測値を加え、フレームメモリ54、55に格納する。
【0176】
フレーム内符号化の場合は前述のフレーム内符号化データの復号と同様に処理される。1フレーム分の処理が終了したら、フレームメモリ54およびフレームメモリ59の内容が外部に出力され、適宜合成される。
【0177】
[その他]
なお、本発明は、複数の機器から構成されるシステムに適用しても、一つの機器からなる装置に適用してもよい。
【0178】
【発明の効果】
本発明によれば、例えば、パディング処理のために要する装置規模を削減することができる。
【図面の簡単な説明】
【図1】入力画素データとパディング処理後の画素データを示す図である。
【図2】パディング処理によってブロック内の画素データが処理される様子を示す図である。
【図3】本出願人が他の出願において開示したパディング処理用の画像処理部の構成を示す図である。
【図4】パディング処理の一例を示す図である。
【図5】本発明の第1の実施の形態に係る画像処理部の構成を示す図である。
【図6】本発明の第2の実施の形態に係る画像処理部の構成を示す図である。
【図7】本発明の第3の実施の形態に係る画像処理部の構成を示す図である。
【図8】本発明の第4の実施の形態に係る画像処理装置の構成を示す図である。
【図9】本発明の第5の実施の形態に係る画像処理部の構成を示す図である。
【図10】本発明の第6の実施の形態に係る画像処理部の構成を示す図である。
【図11】第4の実施形態における検出器801の構成を示す図である。
【図12】第5の実施形態における検出器801’の構成を示す図である。
【図13】第6の実施形態における検出器801”の構成を示す図である。
【図14】第7の実施の形態に係る画像符号化装置の構成を示す図である。
【図15】第8の実施の形態に係る画像復号装置の構成を示す図である。
【符号の説明】
303,307 レジスタ群
325,327 セレクタ群
321 左伝搬処理部
323 右伝搬処理部
331 演算器群
501,502,503,504 演算器
505b〜i セレクタ
601,701,703,705 セレクタ群
801,901,902 検出器
807,809 演算器
811〜814 セレクタ
821〜828 レジスタ
832,837 論理素子
1001,1002 セレクタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing device, an image encoding device, and an image decoding device that process image data based on its attribute data.
[0002]
[Prior art]
An image (especially a moving image) has a very large data amount. Therefore, when storing and transmitting an image, a compression process for greatly reducing the data amount is indispensable. As processing for compressing (encoding) moving images, international standards such as MPEG-1 and MPEG-2 have already been established, but these are only intended for images in a rectangular area taken by a television camera or the like.
[0003]
There are various image characteristics, but there are many images including a background and a subject (object) in front of the background. In general, an image as a background does not involve intense movement, and the whole image moves in accordance with the movement of a camera used for photographing, and various objects in the background make fine movements. On the other hand, an object may be accompanied by intense movement. Thus, the object and the background have different properties.
[0004]
In MPEG-4, which is being standardized following MPEG-1 and MPEG-2, the object and background can be handled separately, and the useful objects can be reused elsewhere to increase the productivity of video content. By preparing a framework that can enhance and manipulate objects on the viewer side, it is thought that an active relationship can be established with images and new expressions can be made.
[0005]
However, since the shape of the object is not rectangular but arbitrary, the compression methods used in conventional MPEG-1 and MPEG-2 cannot be applied as they are.
[0006]
In video compression, the amount of data is further reduced by utilizing the correlation between frames. Using the correlation between frames refers to encoding a difference value with reference to a strongly correlated area in another frame when encoding the data of the current frame of the object.
[0007]
If the object has an arbitrary shape, naturally, the shape of the object in another frame to be referred to is also arbitrary, and there is no value in the area outside the object. This makes it impossible to obtain block-by-block motion vector information.
[0008]
Therefore, a motion vector search for each block is performed after performing padding processing on the referenced object to expand it into a rectangular area.
[0009]
Padding processing of image data having a two-dimensional spread is realized by performing one-dimensional padding processing sequentially in the horizontal direction and the vertical direction. The one-dimensional padding process can be performed as follows.
[0010]
An area outside the object (row or column) sandwiched between a plurality of objects is replaced with an average value of pixel data in the objects at both ends of the area, and other areas outside the object are pixels in the object in contact with the area. Replace with data.
[0011]
FIG. 1 is a diagram illustrating an example of the above padding process. In FIG. 1, binary shape information (attribute data) and pixel data for one row in a block are shown in order to explain horizontal (lateral) direction padding processing. However, since the pixel data in the area outside the object is replaced with another value, the original value is almost meaningless. Therefore, the pixel data values in the area outside the object are omitted.
[0012]
FIG. 1A shows binary shape information, and FIG. 1B shows pixel data in the object area. In this example, the number of pixels for one row of blocks is 16. Within these 16 pixels, there are four areas outside the object. Specifically, the area outside the object is composed of an area consisting of one pixel on the left of a pixel having a pixel value “78”, and four pixels sandwiched between a pixel having a pixel value “74” and a pixel having a pixel value “56”. There are four regions: a region composed of two pixels sandwiched between a pixel having a pixel value “64” and a pixel having a pixel value “42”, and a region composed of three pixels on the right side of the pixel having a pixel value “42”.
[0013]
Since the area at both ends is replaced with pixel data in the object in contact with the area, the leftmost pixel is replaced with a pixel having a pixel value “78”, and the rightmost three pixels are replaced with a pixel having a pixel value “42”. .
[0014]
Since the remaining two regions are sandwiched between pixels in the objects on both sides, the four pixels on the left are replaced with pixels having an average value “65” of pixel values “74” and “56”, and two pixels on the right Is replaced with a pixel having an average value “53” of pixel values “64” and “42”. As a result, pixel data as shown in FIG. 1C is obtained as a result of the padding process.
[0015]
The block data is composed of a plurality of row data, and the pixel data in the object area shown in FIG. 2A is spread as shown in FIG. 2B by applying horizontal padding processing to each row data. Here, the hatched portion indicates an area in the object and an area of the pixel supplemented with data by the padding process.
[0016]
After the horizontal padding process, the vertical padding process is executed. The vertical padding process is the same as the horizontal padding process except that the processing unit changes from one horizontal row to one vertical column. After the vertical padding process, the entire block is filled with valid pixel data as shown in FIG.
[0017]
[Problems to be solved by the invention]
The present invention has been made in view of the above background, and an object of the present invention is to reduce the scale of an apparatus required for padding processing, for example.
[0018]
[Means for Solving the Problems]
  An image processing apparatus according to the present invention includes:The input image data is padded and outputAn image processing apparatus,
  The i-th pixel using the number i indicating the arrangement position in the one-dimensionally arranged pixel row in the image data to be padded is designated as P. i N pixel data P 1 , P 2 , ..., P n A first register group for inputting and holding
  The n pieces of pixel data P 1 , P 2 , ..., P n Attribute data A corresponding to each pixel indicating whether each pixel belongs to inside or outside the object 1 , A 2 , ..., A n A second register group for holding
  Attribute data A held in the second register group 1 , A 2 , ..., A n-1 N−1 pixel data P held in the first register group. 1 , P 2 , ..., P n-1 Is propagated in the direction of the younger number, and the pixel data P1 after propagation is propagated. 1 ... P1 n-1 First propagation means for generating
  Attribute data A held in the second register group 2 , A Three , ..., A n N−1 pixel data P held in the first register group. 2 , P Three , ..., P n Is propagated in the direction of larger numbers, and the pixel data P2 after propagation is propagated. 2 ... P2 n A second propagation means for generating
  The pixel data after propagation processing generated by the first propagation means and the second propagation means is subjected to computation, and n pieces of padding processing results are obtained for the n pieces of pixel data arranged in one dimension. And a calculation means for generating and outputting the pixel data of
  The first propagation means has n-1 first selection means,
  The second propagation means has n-1 second selection means,
  The n-1 first selection means are associated with the number S1 1 , ..., S1 n-1 And the n-1 second selection means are associated with the number S2 2 , ..., S2 n When defined as
  The i-th first selection means S1 i Is
  (1) Attribute data A i Is the pixel data P i Indicates that the pixel data is within the object, the pixel data P i Are propagated to the i-th pixel data P1. i Select and output as
  (2) Attribute data A i Is the pixel data P i Indicates that the object is outside the object, and if i <n−1, the first selection means S1 i + 1 Output from the i-th pixel data P1 having been propagated i And when i = n−1, the second selection means S2 n Output from the first selection means S1 n-1 The data input to the pixel data P1 i Select and output as
  The i-th second selection means S2 i Is
  (3) The attribute data A i Is the pixel data P i Indicates that the pixel data is within the object, the pixel data P i Are propagated to the i-th pixel data P2 i Select and output as
  (4) Attribute data A i Is the pixel data P i Indicates that the object is outside the object, and if i> 2, the second selection means S2 i-1 Output from the i-th pixel data P2 that has been propagated i And when i = 2, the first selection means S1 1 Output from the second selection means S2 2 The data input to the pixel data P2 i Select and output as
  The computing means has (n−2) / 2 computing units, each composed of one average value calculator and two selectors.
  The average value calculator included in the m-th arithmetic unit in the (n−2) / 2 arithmetic units includes the first selection unit S1. 2m + 1 Selected pixel data P1 2m + 1 And the second selection means S2 2m Selected pixel data P2 2m Is supplied as an average value calculation target,
  When the two selectors of the m-th arithmetic unit are a first selector and a second selector,
  The first selectorIs
  (5) Attribute data A 2m Is the pixel data P 2m Indicates that the pixel data is within the object, the pixel data P 2m Is selected and output as padded pixel data,
  (6) Attribute data A 2m Is the pixel data P 2m Indicates that the pixel is outside the object, the average value calculated by the average value calculator included in the m-th arithmetic unit is selectively output as padded pixel data,
  The second selector
  (7) Attribute data A 2m + 1 Is the pixel data P 2m + 1 Indicates that the pixel data is within the object, the pixel data P 2m + 1 Is selected and output as padded pixel data,
  (8) Attribute data A 2m + 1 Is the pixel data P 2m + 1 Indicates that the pixel is outside the object, the average value calculated by the average value calculator included in the m-th arithmetic unit is selectively output as padded pixel data.
  Thus, the 2nd to (n-1) th padded pixel data are output,
  The first selection means S1 1 Selected pixel data, the second selection means S2 n Is output as the first and nth padded pixel data.It is characterized by that.
[0025]
In the image processing apparatus according to the present invention, each of the calculation means includes, for example, pixels constituting an output image by calculating an average value of the output of the first propagation means and the output of the second propagation means. It is preferable to generate data.
[0028]
In the image processing apparatus according to the present invention, the attribute data is preferably 1-bit data for each pixel data, for example.
[0029]
In the image processing apparatus according to the present invention, it is preferable that the attribute data is, for example, data indicating whether or not corresponding pixel data belongs to an object in the image.
[0031]
DETAILED DESCRIPTION OF THE INVENTION
First, a padding processing circuit disclosed by the present applicant in another application will be described.
[0032]
The padding processing circuit disclosed by the applicant in another application performs padding processing in a one-dimensional direction for data in which one row has 10 pixels. This principle is based on, for example, one-dimensional processing for an arbitrary number of pixel data. It can be extended to directional padding.
[0033]
FIG. 3 is a diagram showing a configuration of an image processing unit for padding processing disclosed by the present applicant in another application. In FIG. 3, reference numeral 301 denotes a terminal group for inputting a plurality of pixel data constituting a unitary image data to be subjected to padding processing, and 303 denotes a register group for holding a plurality of pixel data constituting one-dimensional image data. 305 is shape information (here, for each pixel) as attribute data indicating whether a pixel related to each pixel data constituting one-dimensional image data is a pixel in the object or a pixel outside the object. 1 bit), 307 is a register group for holding shape information, 321 is a left propagation processing unit for propagating corresponding pixel data in the left direction based on the shape information, and 323 is shape information. The right propagation processing units 325b to 325b for propagating the corresponding pixel data in the right direction based on the left group are selector groups constituting the left propagation processing unit 321, 327 ~i the selector group constituting the right propagation processing unit 323, 331B~i is an arithmetic unit group for calculating an average value between two pixel data.
[0034]
Pixel data to be subjected to padding processing and binary shape information for the pixel data are input from the terminals 301 and 305 one by one or 10 at a time, and are held in the registers 303 and 307, respectively. “1” in the shape information (binary) represents that the pixel is a pixel in the object, and “0” represents that the pixel is a pixel outside the object.
[0035]
The plurality of pixel data held in the register group 303 are input to corresponding selectors in the left propagation processing unit 321 and the right propagation processing unit 323, respectively. The shape information held in the register group 307 is input as control signals for corresponding selectors in the left propagation processing unit 321 and the right propagation processing unit 323, respectively.
[0036]
Each selector selects the pixel data input from the register group 303 when the control signal is “1”, and selects the pixel data selected by the preceding selector when the control signal is “0”. As a result, the pixel data propagates so as to replace the pixels outside the object with the pixel data in the object.
[0037]
In the left propagation processing unit 321, the pixel data in the object propagates in the left direction in FIG. 3, and in the right propagation processing unit 323, the pixel data in the object propagates in the right direction in FIG.
[0038]
Pixel data selected by each selector is sent to a corresponding computing unit of the computing unit group 331. Each computing unit of the computing unit group 331 calculates and outputs an average value of two pixel data supplied from the corresponding selector.
[0039]
FIG. 4 is a diagram showing a specific example of processing in the image processing unit shown in FIG. 4A is binary shape information, FIG. 4B is input pixel data (omitted because there is no meaning outside the object), and FIG. 4C is an output of the selector in the left propagation processing unit 321. Values (where the selector is not provided are omitted), (d) is the output value of the selector in the right propagation processing unit 323 (where the selector is not provided), (e) is the average value output of the computing unit group 331 (both ends are , Selector output).
[0040]
Since the pixels at both ends cannot be sandwiched between objects, an arithmetic unit for obtaining an average value is not required, and one of the two selectors for selecting an input to the unnecessary arithmetic unit is not required. Accordingly, at the pixel positions at both ends, the value selected by one selector is output as a result of the padding process.
[0041]
At other pixel positions, there are two selectors each, and input pixel data is selected for pixels whose shape information is “1” (in the object), and pixel data in the object is selected for pixels whose shape information is “0”. The value propagated left or right is selected.
[0042]
The calculator group 331 calculates an average value of two values selected for each pixel and outputs the result as a result of the padding process. For the pixel in the object (the pixel corresponding to the shape information “1”), the two values supplied to the calculator are the same value (input pixel data), and the calculation result is the same as the two values. .
[0043]
For the pixels in the region sandwiched between the objects (pixels whose shape information corresponds to “0”), the value of the left propagation pixel data and the value of the right propagation pixel data supplied to the corresponding calculator are different. An average value of the value of the propagation pixel data and the value of the right propagation pixel data is calculated for each pixel, and is output as a result of the padding process.
[0044]
By the above processing, the area outside the object sandwiched between the objects is replaced with the average value of the pixel data in the objects at both ends of the area, and the other area outside the object is the pixel data in the object in contact with the area. Is replaced by
[0045]
With the same configuration as described above, padding processing can be performed for any number of pixels less than 10 pixels. This is realized by fixing the shape information corresponding to the terminal having no pixel input to “0”.
[0046]
In this configuration, to process N pixels simultaneously, (N−2) arithmetic units are required, and the circuit scale of the arithmetic unit group 331 is larger than the circuit scales of other registers, selectors, and the like. This is an obstacle to reducing the circuit scale. Therefore, in the following embodiment, the overall circuit scale is reduced by reducing the number of arithmetic units. Thereby, for example, a low-cost circuit can be manufactured and / or a similar padding processing circuit can be further provided to further increase the processing speed.
[0047]
[First Embodiment]
The image processing unit according to the first embodiment of the present invention described below exhibits the same padding processing performance with half the number of arithmetic units as the image processing unit shown in FIG.
[0048]
FIG. 5 is a diagram showing the configuration of the image processing unit according to the first embodiment of the present invention.
The image processing unit 500 can be suitably used as a part of an image processing apparatus such as a computer, for example. In FIG. 5, reference numerals 501 to 504 denote arithmetic units that calculate average values, and reference numerals 505 b to i denote selectors that individually select one of the average value and input pixel data calculated by the arithmetic units 501 to 504 based on shape information. (Decision means).
The other components are the same as the components having the same numbers in FIG.
[0049]
In the image processing unit 500 that performs padding processing on 10 pixels in parallel, the maximum number that needs to calculate the average value independently is four. This can be understood from the following description.
[0050]
If it is necessary to calculate M average values independently, the shape information includes at least M “0” and at least (M + 1) “1” in order to divide and sandwich the “0”. There must be. That is, in (2M + 1) or (2M + 2) one-dimensional pixel data, the number of average values that need to be calculated independently is M. Further, it is not necessary to determine the average value independently in order to determine the value of the pixel data of adjacent pixels.
[0051]
To calculate four average values independently, at least four arithmetic units are required.
Here, in order to specify the arrangement of the four arithmetic units, the shape information of the next pattern is considered.
[0052]
(P1) 1010101010
(P2) 1010101001
(P3) 1010100101
(P4) 1010010101
(P5) 1001010101
(P6) 0101010101
The above six patterns are representative patterns of shape information that requires four computing units. Among the above six patterns, (p2) to (p5) include a pattern in which two “0” s are continuous. Including a pattern in which one of two consecutive “0” “0” s is replaced with “1” includes all patterns requiring four computing units.
[0053]
Since two average values used for determining pixel data corresponding to a position where two “0” s are continuous as shape information are equal to each other, there is no need to calculate them independently. The average value calculated by the calculator can be used in common.
[0054]
Therefore, for the second and third pixel sets from the right or left end, the fourth and fifth pixel sets, the sixth and seventh pixel sets, and the eighth and ninth pixel sets, respectively. It is reasonable to assign one arithmetic unit.
[0055]
As an example to support this validity, there is a pattern in which “four arithmetic units are necessary and the (2n−1) th pixel and the 2nth pixel from the right or left end should be replaced with a common average value. Note the fact that “do not”.
[0056]
Next, consider the problem of which signal is input to the computing unit.
[0057]
In FIG. 3, the output of the selector 325b and the output of the selector 327b are input to the arithmetic unit 331b. When the control signal (shape information of the second pixel from the right) of the selector 327b is “0”, the selection output of the selector 327b is the same as the output of the selector 327c in the previous stage (left side). Similarly, when the control signal (shape information of the third pixel from the right) of the selector 325c is “0”, the output of the selector 325c is the same as the output of the selector 325b in the previous stage (right side).
[0058]
Therefore, the pair of the output of the selector 325b and the output of the selector 327c corresponds to an arithmetic unit for calculating an average value that should replace the second pixel data from the right when the shape information of the second pixel from the right is “0”. It can be used as input data, and when the shape information of the third pixel from the right is “0”, it is used as input data for an arithmetic unit for calculating an average value that should replace the third pixel data from the right. be able to. On the other hand, when the shape information is “1”, it is not necessary to calculate the average value for the pixel corresponding to the position of the shape information, and therefore it is not necessary to consider the input to the calculator.
[0059]
From the above consideration, the output of the selector 325b and the output of the selector 327c may be supplied to the computing unit 501 of the image processing unit 500 according to this embodiment.
[0060]
Similarly, the calculator 502 outputs the selector 325d and the selector 327e, the calculator 503 outputs the selector 325f and the selector 327g, and the calculator 504 outputs the selector 325h and the selector 327i. Can be supplied.
[0061]
In the image processing unit shown in FIG. 3, since an arithmetic unit is provided independently for each pixel, the arithmetic unit is output from each arithmetic unit regardless of whether the corresponding shape information is “0” or “1”. The average value can be output as pixel data as it is. However, in the image processing unit 500 according to this embodiment, since the pixel and the computing unit do not correspond one-to-one, the pixel data that does not need to be replaced by the average value (the shape information at the position where the shape information is “1”). Pixel data, that is, pixel data of a pixel in the object) needs to use the pixel data held in the register group 303 as output pixel data as it is. The selectors 505b to 505i are provided for that purpose.
[0062]
When the shape information and pixel data shown in FIGS. 4A and 4B are input to the image processing unit according to this embodiment (also shown below),
Figure 0004574020
Each of the calculators 501 to 504 receives the following values and calculates an average value.
[0063]
Figure 0004574020
In this example, the average value (calculation result) is output through the corresponding selector among the selector groups 505b to 505i. In other words, the third pixel data from the right is replaced by the output of the adder 501, the fourth pixel data from the right is replaced by the output of the adder 502, and the seventh pixel data from the right is output from the adder 503. The eighth pixel data from the right is replaced by the output of the adder 504, and the same result as in FIG. 4E is obtained. That is, the image processing unit 500 according to this embodiment can obtain a padding processing result equivalent to that of the image processing unit shown in FIG.
[0064]
As described above, according to this embodiment, the same processing result as that of the image processing unit can be obtained by a computing unit that is half of the image processing unit shown in FIG.
[0065]
[Second Embodiment]
The first embodiment is an example in which N pixels constituting one-dimensional image data are processed simultaneously. However, if it is not necessary to process N pixels simultaneously, the number of arithmetic units can be further reduced.
[0066]
When the pixel data obtained by the padding process is once stored in a memory or the like, it is unlikely that 16 pixels are stored in the memory at the same time because of the memory bus width limited by the cost or the like. Generally, 4 pixels, at most 8 pixels, is the amount of data that can be stored in memory at one time.
[0067]
Therefore, here, a configuration in which the result of padding processing is output in units of four pixels is considered. FIG. 6 is a diagram illustrating a configuration of an image processing unit according to the second embodiment of the present invention. The image processing unit 600 is configured to perform padding processing on row data composed of 8-pixel pixel data, and output the result in units of 4 pixels. The image processing unit 600 can be suitably used as a part of an image processing apparatus such as a computer, for example.
[0068]
In the image processing unit 600 according to this embodiment, the shape information is used as a control signal for switching the selectors constituting the left propagation processing unit 321 and the right propagation processing unit 323. The configuration related to the shape information is the same as that of the image processing unit shown in FIG. 5, and is omitted in FIG.
[0069]
In FIG. 6, reference numeral 601 denotes a selector group (selection means) for selecting data to be supplied to an arithmetic unit that calculates an average value. The selector group 601 switches data to be supplied to the computing units 501 to 504 so that the computing units 501 to 504 process the data for 8 pixels for every 4 pixels. For example, data for generating rightmost pixel data or data for generating fifth pixel data from the right is selectively supplied to the computing unit 501 by a corresponding selector of the selector group 601.
[0070]
For example, in order to perform padding processing on row data composed of pixel data of 16 pixels and output in units of 4 pixels, each selector of the selector group 601 is changed from 2 inputs to 4 inputs. In the cycle (first stage), the pixel data of the first pixel to the fourth pixel are output from the arithmetic units 501 to 504, and in the second cycle (second stage), the fifth pixel to the eighth pixel are output from the arithmetic units 501 to 504. In the third cycle (third stage), the pixel data of the ninth to twelfth pixels are output from the calculators 501 to 504, and in the fourth cycle (fourth stage), the pixel data of the pixels are output. The selector group may be controlled so that the 13th to 16th pixels are output from 501 to 504.
[0071]
[Third Embodiment]
This embodiment is a combination of the first embodiment and the second embodiment. Thereby, the number of arithmetic units can be further reduced, and the overall circuit scale can be reduced.
[0072]
FIG. 7 is a diagram showing a configuration of an image processing unit according to the third embodiment of the present invention.
The image processing unit 700 can be suitably used as a part of an image processing apparatus such as a computer, for example.
[0073]
In the image processing unit 700 shown in FIG. 7, reference numeral 701 denotes an arithmetic unit 501 and a switching signal for switching between a first cycle for generating output pixel data for the right four pixels and a second cycle for generating left pixel output pixel data. A selector group (selection means) for selecting data to be supplied to 502, which corresponds to the selector group 601 in the second embodiment. Reference numeral 703 denotes a selector group that selectively outputs four pixels on the right side or four pixels on the left side among pixel data (input pixel data) before padding processing in accordance with the switching signal. Reference numeral 705 denotes a selector group (decision unit) that selects the output of the selector group 703 if the corresponding shape information is “1”, and selects the average value calculated by the calculators 501 and 502 if the value is “0”. The other components are the same as the components with the same numbers in FIG.
[0074]
The selector group 705 is switched according to the shape information. The configuration related to the shape information is the same as that in the first embodiment.
[0075]
The main differences between this embodiment and the first embodiment are as follows. In the first embodiment, one computing unit is assigned to the 2nth pixel and the (2n + 1) th pixel from the right, but in this embodiment, the (2n-1) th pixel from the right is assigned. One calculator is assigned to the pixel and the 2n-th pixel.
[0076]
Such an allocation method is also possible in the first embodiment, but in the first embodiment, it is not necessary to use an average value as data that should replace pixel data at both ends of the row data. A method of assigning one arithmetic unit every two pixels to the remaining pixels excluding the pixels at both ends is efficient (for example, if four arithmetic units are provided for 10-pixel row data) Good).
[0077]
In this embodiment, since pixel data whose shape information is “0” is replaced with an average value while partially selecting (referring to) a plurality of pixel data, data at both ends to be supplied to the computing units 501 and 502 (4 Of the two pieces of data, the data at the left end and the right end) can also be input with data indispensable for calculating the average value. Therefore, it is necessary to equally allocate one computing unit for every two pixels with respect to four pixels to be processed simultaneously.
[0078]
Pixel data that propagates from the first pixel from the right to the second pixel in the left propagation processing unit 321 in FIG. 7, and pixel data that propagates from the second pixel from the right to the first pixel in the right propagation processing unit 323 These two pieces of data are supplied to the selector group 701 as one set (first set).
[0079]
Similarly, a set of pixel data propagating from the third pixel from the right to the fourth pixel and pixel data propagating from the fourth pixel to the third pixel from the right (second set), the fifth pixel from the right A set of pixel data propagating from the sixth pixel to the sixth pixel and a pixel data propagating from the sixth pixel to the fifth pixel to the fifth pixel (third set), and a pixel propagating from the seventh pixel to the eighth pixel from the right A set (fourth set) of data and pixel data propagating from the eighth pixel to the seventh pixel from the right is selectively supplied to the selector group 701.
[0080]
Here, according to which of the four pixels on the right side and the four pixels on the left side among the eight pixels is processed, that is, in accordance with the switching signal, the selector group 701 is changed from the above four sets to two sets (first set and second set). Data set is supplied to the computing units 501 and 502.
[0081]
As a result, for the two sets of selected pixel data, the arithmetic units 501 and 502 calculate and output an average value for each group. If the shape information is “0”, the selector of the selector group 705 corresponding thereto selects the average value output from the computing unit. If the shape information is “1”, the selector group 703 corresponding thereto and A selector 705 selects the original input pixel data and outputs the result of padding processing in units of four pixels.
[0082]
[Fourth Embodiment]
In each of the above embodiments, pixel data constituting image data of a predetermined size is processed with a fixed number of cycles (number of stages). However, in this embodiment, input binary shape information is input. The present invention relates to a configuration for changing the number of processing cycles according to a pattern.
[0083]
In the first embodiment, all input pixel data can be processed at the same time regardless of the shape information. This is because the number of arithmetic units capable of simultaneously processing all input pixel data for arbitrary shape information is provided. This means that all input pixel data may not be processed at the same time if the number of arithmetic units is one or less. Whether or not simultaneous processing is possible depends on the configuration of the processing circuit and the pattern of shape information.
[0084]
This embodiment includes only a smaller number of arithmetic units than the minimum necessary number that can simultaneously process all input pixel data for arbitrary shape information. However, if simultaneous processing is possible, simultaneous processing is performed. The processing is finished in one cycle (first stage) and the unprocessed pixels are processed in the second cycle (second stage) only when simultaneous processing is impossible.
[0085]
In this embodiment, it is detected whether the pattern of shape information is a pattern that can be simultaneously processed, pixels that cannot be simultaneously processed are detected, and the unprocessed pixels are processed in the second cycle.
[0086]
FIG. 8 is a diagram showing a configuration of an image processing apparatus according to the fourth embodiment of the present invention. The image processing unit 800 can be suitably used as a part of an image processing apparatus such as a computer, for example.
[0087]
An image processing unit 800 shown in FIG. 8 is a padding processing circuit for 8 pixels, and 801 detects whether or not all 8 pixel data can be processed in one cycle and performs processing in the second cycle. A detector (control means; see FIG. 11 for details) for specifying pixel data to be loaded into the register, 807 and 809 are arithmetic units for calculating the average value of the pixel data, and 811 and 812 are supplied to the arithmetic unit 807. Selectors (selection means) for selecting two data to be selected, 813 and 814 are selectors (selection means) for selecting two data to be supplied to the computing unit 809, and 821 to 828 hold output pixel data. Registers 832 and 837 are logic elements that generate control signals for controlling data capture. The other components are the same as the components with the same numbers in the first embodiment (FIG. 5).
[0088]
The selectors 811 to 814 introduced in this embodiment are controlled according to the processing cycle. That is, the selectors 811 to 814 are controlled to select one in the first cycle process and to select the other in the second cycle process.
[0089]
In order to pad the 8 pixels simultaneously, three arithmetic units are necessary as is apparent from the above description. In this embodiment, processing is performed by two arithmetic units 807 and 809, which are one less than that. Do.
[0090]
In the first cycle (first stage), one of the two calculators 807 and 809 is assigned to the third and fourth pixels from the right, and the other is assigned to the fifth and sixth pixels from the right. Assigned to the pixels.
[0091]
The selector 505b that selects the processing result of the second pixel from the right is supplied with the output (average value) of the calculator 807 assigned to the third and fourth pixels from the right, and the seventh pixel from the right. The output (average value) of the calculator 809 assigned to the fifth and sixth pixels from the right is supplied to the selector 505g that selects the processing result.
[0092]
The two selectors 505b and 505g select the output of the corresponding selector in the left propagation processing unit 321 or the right propagation processing unit 323 in the first cycle (first stage) according to the processing cycle (processing stage), and the second In the cycle (second stage), the output of the computing unit is selected.
[0093]
When the next shape information (a) and pixel data (b) are input to the image processing unit 800,
Figure 0004574020
As a result of the processing in the first cycle, the following values (register 828 on the left end and register 821 on the right end) are loaded into the registers 821 to 828.
(C) 156 156 99 99 99 42 42 42
At this time, the two calculators 807 and 809 both output “99”.
[0094]
In the second cycle, the data selected by the selectors 505b and 505g is switched, and the following values are supplied to the registers 821 to 828 (the left end is the register 828 and the right end is the register 821).
(D) 156 99 99 99 99 99 42 99 42
Of these data, only “99” of the seventh pixel from the right (second pixel from the left) is actually taken into the register, and the final output of the registers 821 to 828 (the left end is the register 828, the right end) The register 821) is as follows.
(E) 156 99 99 99 99 42 42 42
In the image processing unit 800 according to this embodiment, there are the following two cases of shape information patterns in which the padding process does not end in one cycle.
(1) When the rightmost 2 bits are “01” and the left 6 bits have one or more “1”
(2) When the leftmost 2 bits are “10” and the right 6 bits have one or more “1”
Patterns (1) and (2) show a case where it is necessary to replace the pixel data of the second pixel and the seventh pixel from the right with the average value of the two pixel data.
[0095]
The detector 801 detects the above (1) and (2) from the input shape information, and when at least one is detected, executes the second cycle after the first cycle, and in the case of (1) In the second cycle, the outputs of the selectors 505b and 505g are fetched only in the registers 822 and 827 of the output stage corresponding to the second pixel from the right in the case of (2) and in the second cycle.
[0096]
When both (1) and (2) are detected by the detector 801, the outputs of the selectors 505b and 505g are input to both the second and seventh pixel registers 822 and 827 in the second cycle.
[0097]
When neither (1) nor (2) is detected, the process ends in the first cycle, and the next row data (or column data) is processed.
[0098]
[Fifth Embodiment]
This embodiment relates to a modification of the fourth embodiment. FIG. 9 is a diagram showing a configuration of an image processing unit according to the fifth embodiment of the present invention.
[0099]
This embodiment (FIG. 9) and the fourth embodiment (FIG. 8) differ from the switching signal for controlling the selectors 505b and 505g and the content detected by the detector 801.
[0100]
In this embodiment, detectors 901 and 902 are added, the selector 505b is switched by the output of the detector 901, and the selector 505g is switched by the output of the detector 902.
[0101]
In this embodiment, there are the following two cases of the shape information pattern in which the padding process does not end in one cycle, and this is detected by the detector 801 '(control means; see FIG. 12 for details).
(1) When the rightmost 3 bits are “101”
(2) When the leftmost 3 bits are “101”
Processing after the detector 801 'detects the pattern is the same as that in the fourth embodiment.
[0102]
Even if the second pixel data from both ends is replaced with the average value, if it is not isolated (if it is not a pixel located between the shape information “1”), it is calculated for the adjacent pixel. Since the average value can be used, the padding process is completed in one cycle. However, when the pixel to be replaced is isolated, it is necessary to calculate an average value for replacing the isolated pixel in the second cycle, so the padding process requires the second cycle. The above two patterns show a case where calculation of an average value for replacing the isolated pixel is necessary.
[0103]
On the other hand, the detector 901 detects the following pattern (A) and controls the selector 505b.
(A) The shape information of the second bit from the right end is “1”, or the shape information at the right end is “0”.
When the pattern (a) is detected, the second pixel data from the right end is not replaced with the average value, and the output of the corresponding selector in the left propagation processing unit 321 becomes the padding process result.
[0104]
Other than the pattern (A), the selector 505b selects the average value output from the computing unit 807. However, when all the remaining 6 left bits are “0”, it is not convenient to output the average value. However, in this case, since the two data input to the calculator 807 are the same, as a result, the same data is selected, and there is no such inconvenience. A specific example of this will be shown.
[0105]
Assume that the following shape information (a) and pixel data (b) are input.
Figure 0004574020
In this case, since the right-most 2-bit shape information does not correspond to the pattern (A), the selector 505b that selects the second output pixel data from the right end outputs the value (average value) output from the calculator 807. select. Two inputs to the computing unit are supplied from the left propagation processing unit 321 and the right propagation processing unit 323. Since both values are “156”, the output of the computing unit 807 is “156”. Therefore, even if the output stage selector 505b selects the output of the calculator 807, the pixel data is replaced with “156”.
[0106]
The relationship between the detector 902 and the selector 505g is the same.
[0107]
[Sixth Embodiment]
In this embodiment, the arrangement (assignment) of the arithmetic units and the selector of the output stage are set so that the pattern that can be processed simultaneously without increasing the number of arithmetic units in the fourth and fifth embodiments is maximized. The input data of the computing unit is further switched based on the pattern of the shape information (in the fourth and fifth embodiments, the input data of the computing unit is changed according to the processing cycle). Can be switched).
[0108]
FIG. 10 is a diagram showing a configuration of an image processing unit according to the sixth embodiment of the present invention. The image processing unit 1000 can be suitably used as a part of an image processing apparatus such as a computer, for example.
[0109]
In FIG. 10, reference numerals 1001 and 1002 are newly added selectors.
The pixel data of the center two pixels can be obtained by selecting the outputs of the two calculators 807 and 809 by the selectors 1001 and 1002.
[0110]
The detector 801 ″ (control means; see FIG. 13 for details) detects the following pattern (3) in addition to the patterns (1) and (2) detected in the fifth embodiment.
(3) There are three “01” changing points in the right 7 bits of the shape information, and
There are three “10” change points in the left 7 bits of the shape information.
[0111]
This can be expressed in a more specific pattern as follows.
[0112]
(A) 1010101-
(B) 101010-1
(C) 10101-01
(D) 1010-101
(E) 101-0101
(F) 10-10101
(G) 1-010101
(H) -1010101
In the above eight patterns, “−” may be “0” or “1”.
[0113]
The detector 801 ″ detects the pattern described in the above (A) to (H). When the pattern is detected, one row data is processed in two cycles, and when the pattern is not detected, one row data is detected. Are processed in one cycle.
[0114]
In the arithmetic unit assignment method described in the first embodiment, one arithmetic unit is assigned to the 2nth pixel and the (2n + 1) th pixel from the right. In this assignment method, when the number of pixel data constituting one-dimensional image data to be processed is eight, three arithmetic units are required.
[0115]
In this embodiment, a scheme according to the above allocation scheme is adopted. However, in this embodiment, since only two arithmetic units are provided, these two arithmetic units are operated in place of the three arithmetic units. This is realized by switching data to be supplied to the two arithmetic units with a selector.
[0116]
Although various methods can be considered as a method of switching data by the selector, the method described below is relatively simple.
[0117]
In the switching method described here, priority is given to the processing executed in the second cycle in the fifth embodiment, that is, the processing of the second and seventh pixel data from the right. That is, when the rightmost 2 bits of the shape information are “01” and the first cycle, the selectors 811 and 812 are set to the right side in order to process the second pixel data from the right. On the other hand, under other conditions, the selectors 811 and 812 are set on the left side. When the rightmost 2 bits of the shape information are “01”, the second pixel data from the right needs to be replaced with the calculated average value, and therefore processing for that is prioritized.
[0118]
Similarly, when the leftmost 2 bits of the shape information are “10” and the first cycle, in order to process the seventh pixel data from the right, the selectors 813 and 814 are set on the left side, and other conditions are set. Then, the selectors 813 and 814 are set on the right side.
[0119]
Among the selectors on the output side of the arithmetic units 807 and 809, the selector similar to that of the fifth embodiment has the same switching method as that of the fifth embodiment.
[0120]
The selectors 1001 and 1002 introduced in this embodiment are controlled as follows. That is, if the rightmost 3 bits of the shape information are “101”, the calculator 807 is used to calculate the average value corresponding to the second pixel from the right, and therefore the output of the calculator 809 is output to the selector 1001. Let them choose. On the other hand, under other conditions, the selector 1001 is made to select the output of the calculator 807.
[0121]
Similarly, if the leftmost 3 bits of the shape information are “101”, the selector 1002 is made to select the output of the calculator 807, and under other conditions, the selector 1002 is made to select the output of the calculator 809.
[0122]
The selectors 1001 and 1002 output an average value for replacing the original pixel data when the value of the shape information of the corresponding pixel is “0”.
[0123]
A shape information pattern that can be newly processed in one cycle by the above configuration and control will be described (a pattern that cannot be processed in one cycle in the fifth embodiment).
[0124]
For example, the shape information “10000101” cannot be processed in one cycle in the fifth embodiment. In this embodiment, one calculator 807 calculates an average value corresponding to the second pixel from the right, and the other calculator 809 calculates an average value corresponding to the left two pixels (the sixth pixel and the seventh pixel). Is calculated. The latter average value can also be used to replace the pixel data of the fourth pixel and the fifth pixel.
[0125]
The output of the calculator 809 is output to the fourth pixel through the selectors 1001 and 505d, and is output to the fifth pixel through the selectors 1002 and 505e. The detector 801 ″ detects that the pattern can be processed in one cycle.
[0126]
Therefore, in the shape information pattern (“10000101”), an average value required to replace all pixel data with shape information “0” can be calculated in one cycle. Since a selector necessary for replacement and a means for controlling the selector are provided, the processing can be completed completely in one cycle.
[0127]
Thus, all can be processed in one cycle except when three arithmetic units are required as in the patterns (A) to (H). The above patterns (A) to (H) are theoretically possible, but there is almost no shape information of actual image data. Therefore, according to this embodiment, almost all image data can be processed in one cycle.
[0128]
[Seventh Embodiment]
FIG. 14 is a block diagram showing a configuration of an image encoding unit according to the seventh embodiment of the present invention.
[0129]
In FIG. 14, 1 is a frame memory that stores image data for one frame and outputs it in units of macroblocks according to the MPEG-4 procedure, and 2 is a subtracter that subtracts a prediction value to be described later. Reference numeral 3 denotes a DCT converter that performs DCT conversion, and reference numeral 4 denotes a quantizer that quantizes the transform coefficients. Reference numeral 5 denotes an entropy encoder for entropy encoding the quantization result. Reference numeral 6 denotes an inverse quantizer that returns a quantization result to a transform coefficient, and reference numeral 7 denotes an inverse DCT device that restores pixel data from the transform coefficient. 8 is an adder for adding predicted values, and 9 is a frame memory for storing a reproduced image.
[0130]
A motion vector detector 10 detects a motion vector from the input pixel data of the macroblock and the pixel data stored in the frame memory 9. 11 is a motion compensator that calculates a prediction value for each macroblock according to the detected motion vector, and 12 is a motion vector encoder that encodes the motion vector. Reference numeral 13 denotes a binary frame memory which stores binary shape information for one frame, and cuts out and outputs in macroblock units according to the MPEG-4 procedure. The shape information is data indicating whether each pixel is outside or inside the object. Reference numeral 14 denotes a shape encoder that arithmetically encodes shape information in units of macroblocks. A frame memory 15 stores shape information corresponding to the reproduced image. 16 inputs a motion vector from the motion vector detector 10 for the corresponding macroblock, compares the shape information of the input macroblock with the shape information of the frame memory 15, calculates a motion vector of the shape information, and performs motion compensation. The motion compensator to perform.
[0131]
20 and 21 are padding controllers for controlling padding from shape information. Reference numeral 17 denotes a padding unit that compensates pixel data outside the object in the frame memory 1 in accordance with the control and shape information from the padding controller 20. Reference numeral 18 denotes a padding unit that compensates for pixel data outside the object in the frame memory 9 in accordance with control from the padding controller 21 and shape information. Reference numeral 19 denotes an extended padding unit that executes extended padding.
[0132]
In the above configuration, the encoding operation of each frame of the moving image will be described.
[0133]
First, pixel data and shape information for one frame are stored in the frame memory 1 and the frame memory 13, respectively.
[0134]
The padding controller 20 and the padding unit 17 operate when the input encoding target frame is an intraframe encoding target, and the padding controller when the input frame is an interframe encoding target with motion compensation. 20, 21, padding units 17, 18 and expansion padding unit 19 operate.
[0135]
The padding unit 17 and the padding controller 20 perform padding processing by a method called a low-frequency component extrapolation method at the time of intra-frame coding, and output from the subtracter 2 without performing any particular processing at the time of inter-frame coding. The prediction error value outside the object area is replaced with “0” based on the signal from the padding controller.
[0136]
The low-frequency component extrapolation method is a method in which a region outside an object is filled with an average value of pixels in the object, and then a pixel outside the object is replaced with an average value of four pixels above, below, left, and right of the pixel. The padding unit 18 uses two or one of the one-dimensional padding processing units described in the first to sixth embodiments. In the case of using two padding processing units, horizontal padding processing is performed on the one hand, and vertical padding processing is performed on the other hand. When processing is performed with one padding processing unit, horizontal padding processing is performed, and then vertical padding processing is performed with the same unit.
[0137]
When intra-frame coding is selected, the padding unit 17 performs padding processing prior to coding. The padding controller 20 detects a macroblock including the boundary of the object from the shape information stored in the frame memory 13 and supplies the position and shape information of the macroblock to the padding device 17. The padding unit 17 reads out the pixel data of the macro block including the boundary of the object from the frame memory 1, and calculates the pixel data outside the object from the pixel data in the object by the low-frequency component extrapolation method.
[0138]
When interframe coding is selected, the padding unit 18 performs padding processing prior to coding. The padding controller 21 detects a macroblock including the boundary of the object from the shape information stored in the frame memory 15 and supplies the position and shape information of the macroblock to the padding unit 18. The padding unit 18 reads out the pixel data of the macro block including the boundary of the object from the frame memory 9, and generates the pixel data outside the object from the pixel data in the object.
[0139]
In parallel with the padding process, the padding controller 21 detects a macroblock that is in contact with a macroblock including pixels inside the object from the shape information stored in the frame memory 15, and expands the position of the macroblock. The padding device 19 is supplied. The extension padding unit 19 copies pixel data of adjacent macroblocks according to the extension padding procedure of the MPEG-4 encoding method.
[0140]
When the padding process of the block to be encoded is completed, in the case of intra-frame encoding, the pixel data is read from the frame memory 1 in units of macroblocks, the predicted value 0 is subtracted by the subtractor 2, and DCT conversion is performed by the DCT unit 3, The transform coefficient is quantized by the quantizer 4.
[0141]
The quantization result is encoded by the entropy encoder 5 and output to the outside. At the same time, the quantized result is also sent to the inverse quantizer 6 to reproduce the DCT transform coefficient, the pixel data is reproduced by the inverse DCT device 7 and the predicted value 0 is added by the adder 8. To store.
[0142]
In parallel with this, the binary shape information in the frame memory 13 is encoded as Transparent for the macroblock outside the object by the encoder 14, and the shape is arithmetically encoded for the macroblock including the boundary, and completely If it is included in the object, it is encoded as Opaque and output to the outside. The binary shape information is also stored in the frame memory 15 and used for encoding the next shape information.
[0143]
The outputs of the entropy encoder 5 and the shape encoder 14 are multiplexed with encoded data such as header information necessary for the MPEG-4 format, and output as MPEG-4 encoded data.
[0144]
In the case of interframe coding, pixel data is read from the frame memory 1 in units of macroblocks and input to the motion detector 10. The motion detector 10 sequentially compares the input pixel data of the macroblock and the partial image of the reproduced image data stored in the frame memory 9 to identify the region having the highest similarity in the reproduced image, and its deviation As a motion vector.
[0145]
The output motion vector is encoded by the motion vector encoder 12 and output to the outside. At the same time, the motion vector is also supplied to the motion compensators 11 and 16. The motion compensator 11 reads the predicted value from the frame memory 9 according to the motion vector and inputs it to the subtracter 2. The subtracter 2 subtracts the input predicted value from the pixel data of the macroblock to be encoded.
[0146]
The subtraction result is DCT transformed by the DCT unit 3 and the transform coefficient is quantized by the quantizer 4. The quantization result is encoded by the entropy encoder 5 and output to the outside. At the same time, the quantization result is input to the inverse quantizer 6 to reproduce the DCT transform coefficient, the pixel data is reproduced by the inverse DCT device 7, the predicted value from the motion compensator 11 is added by the adder 8, and the frame memory 9 is stored.
[0147]
In parallel with this, the motion vector calculated by the motion detector 10 is supplied to the motion compensator 16. The motion compensator 16 calculates the motion vector of the shape information by comparing the shape information of the frame memory 15 with the shape information of the encoded macroblock using the motion vector as a reference, and the motion vector and the shape information indicated by the motion vector To the shape encoder 14 as a predicted value.
[0148]
The shape information in the frame memory 13 is encoded by the shape encoder 14 as a macroblock outside the object as Transparent, and when it is completely contained in the object, it is encoded as Opaque and output to the outside.
[0149]
For the macroblock including the boundary, in the inter mode, after the motion vector of the shape information is encoded, the shape is arithmetically encoded with reference to the predicted value from the motion compensator 16 and output to the outside. In the intra mode, arithmetic coding is performed without referring to the predicted value from the motion compensator 16, and the result is output to the outside. The shape information is stored in the frame memory 15 and is used for encoding the next shape information.
[0150]
The outputs of the entropy encoder 5, the shape encoder 14, and the motion vector encoder 12 are externally multiplexed with encoded data such as information necessary for the MPEG-4 format and output as MPEG-4 encoded data. The
[0151]
Since the extension padding device 19 is actually realized by the function of the frame memory and its memory control, it may be realized without special provision.
[0152]
[Eighth Embodiment]
FIG. 15 is a block diagram showing a configuration of an image decoding unit according to the eighth embodiment of the present invention.
[0153]
In FIG. 15, reference numeral 50 denotes an entropy decoder that receives encoded data and reproduces the quantization result. Reference numeral 51 denotes an inverse quantizer that returns a quantization result to a transform coefficient, and reference numeral 52 denotes an inverse DCT device that restores predicted difference pixel data from the transform coefficient. 53 is an adder for adding predicted values, and 54 is a frame memory for storing one frame of image data in units of macroblocks according to the MPEG-4 procedure. Reference numeral 55 denotes a frame memory for storing reproduced images. A motion vector decoder 56 decodes and reproduces the motion vector.
[0154]
A motion compensator 57 calculates a predicted value for each macroblock according to the decoded motion vector. A shape decoder 58 decodes shape data in units of macroblocks.
[0155]
59 and 60 are binary frame memories for storing the decoded binary shape information. Reference numeral 61 denotes a motion compensator which inputs a motion vector from the motion vector decoder 56 for the corresponding macroblock and reads shape information from the frame memory 59 in accordance with the motion vector and the motion vector of the shape information decoded by the shape decoder 58. .
[0156]
A padding controller 62 controls padding according to the shape information. A padding unit 63 compensates pixel data outside the object of the frame memory 55 according to the shape information of the frame memory 59. Reference numeral 64 denotes an extended padding unit that executes extended padding.
[0157]
In the above configuration, the decoding operation of each frame of the moving image will be described.
[0158]
First, the decoding of the intra-coded frame will be described. Encoded data of shape information is input to the shape decoder 58 in units of macroblocks, and the shape information is decoded.
[0159]
The shape decoder 58 outputs all “0” as shape information when the mode of the macroblock is Transparent. Since there is no pixel data of the macroblock corresponding to the shape information of this mode, no decoding process is performed.
[0160]
If the macroblock mode is Opaque, all the shape information “1” is output. If arithmetic coding has been performed, this is decoded and the shape information of the boundary of the object is reproduced. The reproduced shape information is stored in the frame memory 59 and the frame memory 60.
[0161]
If the mode information mode of the macroblock is Opaque or arithmetic coding, encoded data is input to the entropy decoder 50 in units of macroblocks. The entropy decoder 50 decodes the encoded data and reproduces the quantization result. The quantization result is input to the inverse quantizer 51 to reproduce the DCT transform coefficient, the inverse DCT device 52 reproduces the pixel data, the adder 53 adds the predicted value “0”, and the frame memory 54 and the frame Store in the memory 55.
[0162]
When the processing for one frame is completed, the contents of the frame memory 54 and the frame memory 59 are output to the outside and appropriately combined.
[0163]
Next, decoding of frames that have been inter-frame encoded will be described.
[0164]
The padding device 63 performs boundary padding processing. The padding controller 62 detects a macroblock including an object boundary from the binary shape information stored in the frame memory 60, reads out the pixel data of the macroblock including the object boundary of the macroblock from the frame memory 55, and The pixel data and shape information are supplied to the padding device 63.
[0165]
The padding device 63 uses two or one one-dimensional padding processing units described in the first to sixth embodiments and performs padding processing as described in the seventh embodiment. Then, pixel data outside the object is generated from the input pixel data and binary shape information.
[0166]
Subsequently, the padding controller 62 detects, from the binary shape information stored in the frame memory 60, a macroblock that is in contact with the macroblock including the pixel inside the object on the left, right, top and bottom, and the position of the macroblock is expanded padding 64. The extension padding unit 64 copies pixel data of adjacent macroblocks according to the extension padding procedure of the MPEG-4 encoding method.
[0167]
In parallel with the decoding process, encoded data of shape information is input to the shape decoder 58 in units of macroblocks, and binary shape information is decoded.
[0168]
When the macroblock mode is Transparent, all “0” are output as shape information. Since there is no pixel data of the macroblock corresponding to the shape information of this mode, no decoding process is performed.
[0169]
If the mode of the macroblock is Opaque, all “1” are output as shape information. If arithmetic coding is performed in the intra mode, this is decoded, and the shape information of the boundary of the object is reproduced and stored in the frame memory 59.
[0170]
In the macroblock for which motion compensation is performed, the motion vector is first decoded by the motion vector decoder 56, and the decoded motion vector is supplied to the motion compensators 57 and 61.
[0171]
If the shape information is arithmetically encoded in the inter mode, the shape decoder 58 decodes data for calculating a motion vector for the shape information, and the motion compensator 61 uses the motion vector to read from the frame memory 60. Read predicted value of shape information. The shape decoder 58 refers to the predicted value and decodes the shape information and stores it in the binary frame memory 59.
[0172]
When the macro block is intra-frame encoded, it is decoded by the above-described decoding operation of the intra-frame encoded data, and the pixel data is stored in the frame memories 54 and 55.
[0173]
If the macroblock is interframe coded, if the mode information mode of the macroblock is Opaque or arithmetic coding, the coded data is input to the entropy decoder 50 in units of macroblocks, and the entropy decoder 50 The decoding result is reproduced by the above.
[0174]
The quantization result is input to the inverse quantizer 51 to reproduce the DCT transform coefficient, and the inverse DCT device 52 reproduces the prediction difference pixel data from the transform coefficient and sends it to the adder 53.
[0175]
In parallel, the motion compensator 57 reads out the predicted value from the frame memory 55 based on the motion vector decoded by the motion vector decoder 56 and inputs it to the adder 53.
The predicted value is added to the predicted difference pixel data by the adder 53 and stored in the frame memories 54 and 55.
[0176]
In the case of intra-frame coding, processing is performed in the same manner as the above-described decoding of intra-frame coded data. When the processing for one frame is completed, the contents of the frame memory 54 and the frame memory 59 are output to the outside and appropriately combined.
[0177]
[Others]
Note that the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device.
[0178]
【The invention's effect】
According to the present invention, for example, the apparatus scale required for the padding process can be reduced.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating input pixel data and pixel data after padding processing.
FIG. 2 is a diagram illustrating how pixel data in a block is processed by padding processing;
FIG. 3 is a diagram illustrating a configuration of an image processing unit for padding processing disclosed by the present applicant in another application.
FIG. 4 is a diagram illustrating an example of padding processing.
FIG. 5 is a diagram showing a configuration of an image processing unit according to the first embodiment of the present invention.
FIG. 6 is a diagram illustrating a configuration of an image processing unit according to a second embodiment of the present invention.
FIG. 7 is a diagram illustrating a configuration of an image processing unit according to a third embodiment of the present invention.
FIG. 8 is a diagram showing a configuration of an image processing apparatus according to a fourth embodiment of the present invention.
FIG. 9 is a diagram illustrating a configuration of an image processing unit according to a fifth embodiment of the present invention.
FIG. 10 is a diagram illustrating a configuration of an image processing unit according to a sixth embodiment of the present invention.
FIG. 11 is a diagram showing a configuration of a detector 801 in the fourth embodiment.
FIG. 12 is a diagram showing a configuration of a detector 801 ′ according to a fifth embodiment.
FIG. 13 is a diagram showing a configuration of a detector 801 ″ according to a sixth embodiment.
FIG. 14 is a diagram illustrating a configuration of an image encoding device according to a seventh embodiment.
FIG. 15 is a diagram illustrating a configuration of an image decoding device according to an eighth embodiment.
[Explanation of symbols]
303,307 registers
325, 327 selector group
321 Left propagation processing unit
323 Right propagation processor
331 computing unit group
501, 502, 503, 504
505b ~ i selector
601, 701, 703, 705 selector group
801, 901, 902 detector
807, 809 arithmetic unit
811 to 814 selector
821-828 registers
832,837 logic elements
1001, 1002 selector

Claims (5)

入力した画像データをパディング処理し、出力する画像処理装置であって、
パディング処理対象の画像データ中の一次元に配列された画素列中の、配列位置を示す番号iを用いた第i番目の画素をPiと表現したとき、n個の画素データP1,P2,…,Pnを入力し保持する第1のレジスタ群と、
前記n個の画素データP1,P2,…,Pnそれぞれに対応し、各画素がオブジェクト内、オブジェクト外のいずれに属するかを示す属性データA1,A2,…,Anを保持する第2のレジスタ群と、
前記第2のレジスタ群に保持された属性データA1,A2,…,An-1に基づき、前記第1のレジスタ群に保持されたn−1個の画素データP1,P2,…,Pn-1を、前記番号の若い方向に伝搬させ、伝搬後の画素データP11…P1n-1を生成する第1の伝搬手段と、
前記第2のレジスタ群に保持された属性データA2,A3,…,Anに基づき、前記第1のレジスタ群に保持されたn−1個の画素データP2,P3,…,Pnを、前記番号の大きい方向に伝搬させ、伝搬後の画素データP22…P2nを生成する第2の伝搬手段と、
前記第1の伝搬手段、及び、前記第2の伝搬手段で生成された伝搬処理後の画素データに演算を施し、前記一次元に配列されたn個の画素データに対するパディング処理結果となるn個の画素データを生成し、出力する演算手段とを備え、
前記第1の伝搬手段は、n−1個の第1選択手段を有し、
前記第2の伝搬手段は、n−1個の第2選択手段を有し、
前記n−1個の前記第1選択手段を、前記番号に対応づけてS11,…,S1n-1と定義し、前記n−1個の前記第2選択手段を前記番号に対応づけてS22,…,S2nと定義したとき、
第i番目の前記第1選択手段S1iは、
(1)前記属性データAiが、画素データPiがオブジェクト内にあることを示している場合、前記画素データPiを、伝搬済みの第i番目の画素データP1iとして選択出力し、
(2)前記属性データAiが、画素データPiがオブジェクト外にあることを示している場合であって、i<n−1の場合には、前記第1の選択手段S1i+1からの出力を伝搬済みの第i番目の画素データP1iとして選択出力し、i=n−1の場合には前記第2の選択手段S2nから出力され該第1の選択手段S1n-1に入力されるデータを画素データP1iとして選択出力し、
第i番目の前記第2の選択手段S2iは、
(3)前記属性データAiが、画素データPiがオブジェクト内にあることを示している場合、前記画素データPiを、伝搬済みの第i番目の画素データP2iとして選択出力し、
(4)前記属性データAiが、画素データPiがオブジェクト外にあることを示している場合であって、i>2の場合には、前記第2の選択手段S2i-1からの出力を、伝搬済みの第i番目の画素データP2iとして選択出力し、i=2の場合には前記第1の選択手段S11から出力され該第2の選択手段S22に入力されるデータを画素データP2iとして選択出力し、
前記演算手段は、1個の平均値算出器と2個のセレクタで構成される、(n−2)/2個の演算部を有し、
前記(n−2)/2個の演算部における第m番目の演算部が有する前記平均値算出器には、前記第1の選択手段S12m+1が選択した画素データP12m+1と、前記第2の選択手段S22mが選択した画素データP22mが平均値算出対象として供給され、
前記第m番目の演算部が有する2つのセレクタを第1セレクタ、第2セレクタとしたとき、
前記第1セレクタは、
(5)属性データA2mが、画素データP2mがオブジェクト内にあることを示している場合、前記画素データP2mをパディング処理済みの画素データとして選択出力し、
(6)属性データA2mが、画素データP2mがオブジェクト外にあることを示している場合、前記第m番目の演算器が有する平均値算出器が算出した平均値を、パディング処理済みの画素データとして選択出力し、
前記第2セレクタは、
(7)属性データA2m+1が、画素データP2m+1がオブジェクト内にあることを示している場合、前記画素データP2m+1をパディング処理済みの画素データとして選択出力し、
(8)属性データA2m+1が、画素データP2m+1がオブジェクト外にあることを示している場合、前記第m番目の演算器が有する平均値算出器が算出した平均値を、パディング処理済みの画素データとして選択出力する
ことで、第2番目乃至第n−1番目のパディング処理済み画素データを出力し、
前記第1選択手段S11が選択した画素データ、前記第2選択手段S2nが選択した画素データを、第1番目、第n番目のパディング処理済み画素データとして出力する
ことを特徴とする画像処理装置。
An image processing apparatus that performs padding processing and outputs input image data,
When the i-th pixel using the number i indicating the arrangement position in the pixel array arranged in one dimension in the image data to be padded is expressed as P i , n pieces of pixel data P 1 , P 2 ,..., P n for inputting and holding a first register group;
The n pixel data P 1, P 2, ..., corresponding to each P n, each pixel in the object, attribute data A 1 indicating whether belongs to outside objects, A 2, ..., holding the A n A second group of registers to
Based on the attribute data A 1 , A 2 ,..., A n-1 held in the second register group, n−1 pieces of pixel data P 1 , P 2 , P1 held in the first register group. ..., P n-1 is propagated in the direction of the younger number, and first propagation means for generating post-propagation pixel data P1 1 ... P1 n-1 ;
The second attribute data A 2 held in the register group, A 3, ..., A on the basis of n, the first n-1 pixels held in the register group data P 2, P 3, ..., Second propagation means for propagating P n in the direction of larger numbers and generating post-propagation pixel data P2 2 ... P2 n ;
The pixel data after propagation processing generated by the first propagation means and the second propagation means is subjected to an operation, and n pieces of padding processing results are obtained for the n pieces of pixel data arranged in one dimension. And a calculation means for generating and outputting the pixel data of
The first propagation means has n-1 first selection means,
The second propagation means has n-1 second selection means,
The n-1 first selection means are defined as S1 1 ,..., S1 n-1 in association with the number, and the n-1 second selection means are associated with the number. When defined as S2 2 ,..., S2 n
The i-th first selection means S1 i is
(1) the attribute data A i is, when the pixel data P i indicates that it is in the object, the pixel data P i, selects and outputs a propagation already of the i-th pixel data P1 i,
(2) When the attribute data A i indicates that the pixel data P i is outside the object, and i <n−1, the first selection unit S1 i + 1 Is output as the i-th pixel data P1 i that has been propagated. When i = n−1, the output is output from the second selection unit S2 n and is output to the first selection unit S1 n−1 . Select and output the input data as pixel data P1 i ,
The i-th second selection means S2 i is:
(3) the attribute data A i is, when the pixel data P i indicates that it is in the object, the pixel data P i, selects and outputs a propagation already of the i-th pixel data P2 i,
(4) When the attribute data A i indicates that the pixel data P i is outside the object and i> 2, the output from the second selection unit S2 i-1 and selects and outputs a propagation already of the i-th pixel data P2 i, the data inputted to the selection means S2 2 the second output from said first selecting means S1 1 in the case of i = 2 Select and output as pixel data P2 i ,
The calculation means has (n−2) / 2 calculation units, each including one average value calculator and two selectors.
The average value calculator included in the m-th arithmetic unit in the (n−2) / 2 arithmetic units includes pixel data P1 2m + 1 selected by the first selection unit S1 2m + 1 , The pixel data P2 2m selected by the second selection means S2 2m is supplied as an average value calculation target,
When the two selectors of the m-th arithmetic unit are a first selector and a second selector,
The first selector
(5) the attribute data A 2m If the pixel data P 2m indicates that it is in the object, selects and outputs the pixel data P 2m as padding processed pixel data,
(6) When the attribute data A 2m indicates that the pixel data P 2m is outside the object, the average value calculated by the average value calculator included in the m-th arithmetic unit is used as the padded pixel. Select and output as data,
The second selector
(7) Attribute Data A 2m + 1 is, if the pixel data P 2m + 1 indicates that it is in the object, selects and outputs the pixel data P 2m + 1 as padding processed pixel data,
(8) When the attribute data A 2m + 1 indicates that the pixel data P 2m + 1 is outside the object, the average value calculated by the average value calculator included in the mth arithmetic unit is padded. By selecting and outputting as processed pixel data, the second to (n-1) th padded pixel data is output,
It said first selecting means S1 1 is selected pixel data, the pixel data to which the second selection means S2 n is selected, the first image processing and outputs the n-th padded processed pixel data apparatus.
入力した画像データをパディング処理し、出力する画像処理装置であって、
パディング処理対象の画像データ中の一次元に配列された画素列中の、配列位置を示す番号iを用いた第i番目の画素をPiと表現したとき、n個の画素データP1,P2,…,Pnを入力し保持する第1のレジスタ群と、
前記n個の画素データP1,P2,…,Pnそれぞれに対応し、各画素がオブジェクト内、オブジェクト外のいずれに属するかを示す属性データA1,A2,…,Anを保持する第2のレジスタ群と、
前記第2のレジスタ群に保持された属性データA1,A2,…,An-1に基づき、前記第1のレジスタ群に保持されたn−1個の画素データP1,P2,…,Pn-1を、前記番号の若い方向に伝搬させ、伝搬後の画素データP11…P1n-1を生成する第1の伝搬手段と、
前記第2のレジスタ群に保持された属性データA2,A3,…,Anに基づき、前記第1のレジスタ群に保持されたn−1個の画素データP2,P3,…,Pnを、前記番号の大きい方向に伝搬させ、伝搬後の画素データP22…P2nを生成する第2の伝搬手段と、
前記第1の伝搬手段、及び、前記第2の伝搬手段で生成された伝搬処理後の画素データに演算を施し、前記一次元に配列されたn個の両端の画素を除くn−2個の画素データに対するパディング処理結果となるn−2個の画素データを2回に分けて出力する演算手段とを備え、
前記第1の伝搬手段は、n−1個の第1選択手段を有し、
前記第2の伝搬手段は、n−1個の第2選択手段を有し、
前記n−1個の前記第1選択手段を、前記番号に対応づけてS11,…,S1n-1と定義し、前記n−1個の前記第2選択手段を前記番号に対応づけてS22,…,S2nと定義したとき、
第i番目の前記第1選択手段S1iは、
(1)前記属性データAiが、画素データPiがオブジェクト内にあることを示している場合、前記画素データPiを、伝搬済みの第i番目の画素データP1iとして選択出力し、
(2)前記属性データAiが、画素データPiがオブジェクト外にあることを示している場合であって、i<n−1の場合には、前記第1の選択手段S1i+1からの出力を伝搬済みの第i番目の画素データP1iとして選択出力し、i=n−1の場合には前記第2の選択手段S2nから出力され該第1の選択手段S1n-1に入力されるデータを画素データP1iとして選択出力し、
第i番目の前記第2の選択手段S2iは、
(3)前記属性データAiが、画素データPiがオブジェクト内にあることを示している場合、前記画素データPiを、伝搬済みの第i番目の画素データP2iとして選択出力し、
(4)前記属性データAiが、画素データPiがオブジェクト外にあることを示している場合であって、i>2の場合には、前記第2の選択手段S2i-1からの出力を、伝搬済みの第i番目の画素データP2iとして選択出力し、i=2の場合には前記第1の選択手段S11から出力され該第2の選択手段S22に入力されるデータを画素データP2iとして選択出力し、
前記演算手段は、
n/2個の平均値算出器と、
該n/2個の平均値演算器に、n/2個の平均値を算出するための、第1、第2の伝搬手段で得られた同じ画素位置の2つの画素データを1組とする、n−2組と両端部の2つデータを2回に分けて供給するセレクタと備え、
該セレクタによる各供給によって、前記n/2個の平均値算出器で得られたn/2個の平均値を、パディング処理結果であるn/2個の画素データとして出力する
ことを特徴とする画像処理装置。
An image processing apparatus that performs padding processing and outputs input image data,
When the i-th pixel using the number i indicating the arrangement position in the pixel array arranged in one dimension in the image data to be padded is expressed as P i , n pieces of pixel data P 1 , P 2 ,..., P n for inputting and holding a first register group;
The n pixel data P 1, P 2, ..., corresponding to each P n, each pixel in the object, attribute data A 1 indicating whether belongs to outside objects, A 2, ..., holding the A n A second group of registers to
Based on the attribute data A 1 , A 2 ,..., A n-1 held in the second register group, n−1 pieces of pixel data P 1 , P 2 , P1 held in the first register group. ..., P n-1 is propagated in the direction of the younger number, and first propagation means for generating post-propagation pixel data P1 1 ... P1 n-1 ;
The second attribute data A 2 held in the register group, A 3, ..., A on the basis of n, the first n-1 pixels held in the register group data P 2, P 3, ..., Second propagation means for propagating P n in the direction of larger numbers and generating post-propagation pixel data P2 2 ... P2 n ;
The pixel data after propagation processing generated by the first propagation means and the second propagation means is subjected to an operation, and n−2 pixels excluding the pixels at the n ends arranged in a one-dimensional manner An arithmetic means for outputting n-2 pieces of pixel data, which is a result of padding processing for the pixel data, in two divided outputs;
The first propagation means has n-1 first selection means,
The second propagation means has n-1 second selection means,
The n-1 first selection means are defined as S1 1 ,..., S1 n-1 in association with the number, and the n-1 second selection means are associated with the number. When defined as S2 2 ,..., S2 n
The i-th first selection means S1 i is
(1) the attribute data A i is, when the pixel data P i indicates that it is in the object, the pixel data P i, selects and outputs a propagation already of the i-th pixel data P1 i,
(2) When the attribute data A i indicates that the pixel data P i is outside the object, and i <n−1, the first selection unit S1 i + 1 Is output as the i-th pixel data P1 i that has been propagated. When i = n−1, the output is output from the second selection unit S2 n and is output to the first selection unit S1 n−1 . Select and output the input data as pixel data P1 i ,
The i-th second selection means S2 i is:
(3) the attribute data A i is, when the pixel data P i indicates that it is in the object, the pixel data P i, selects and outputs a propagation already of the i-th pixel data P2 i,
(4) When the attribute data A i indicates that the pixel data P i is outside the object and i> 2, the output from the second selection unit S2 i-1 and selects and outputs a propagation already of the i-th pixel data P2 i, the data inputted to the selection means S2 2 the second output from said first selecting means S1 1 in the case of i = 2 Select and output as pixel data P2 i ,
The computing means is
n / 2 average value calculators;
In this n / 2 average value calculator, two pixel data at the same pixel position obtained by the first and second propagation means for calculating n / 2 average values are taken as one set. , two data of n-2 sets both end portions provided with a selector for supplying in two steps,
According to each supply by the selector, n / 2 average values obtained by the n / 2 average value calculator are output as n / 2 pixel data as a padding processing result. Image processing device.
前記属性データは、各画素データについて1ビットのデータであることを特徴とする請求項1又は2に記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the attribute data is 1-bit data for each pixel data. 請求項1又は2に記載の画像処理装置を有することを特徴とする画像符号化装置。  An image encoding apparatus comprising the image processing apparatus according to claim 1. 請求項1又は2に記載の画像処理装置を有することを特徴とする画像復号装置。  An image decoding apparatus comprising the image processing apparatus according to claim 1.
JP2001007823A 2000-02-24 2001-01-16 Image processing apparatus, image encoding apparatus, and image decoding apparatus Expired - Fee Related JP4574020B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2001007823A JP4574020B2 (en) 2000-02-24 2001-01-16 Image processing apparatus, image encoding apparatus, and image decoding apparatus
US09/791,545 US6952501B2 (en) 2000-02-24 2001-02-26 Image processing apparatus, image encoding apparatus, and image decoding apparatus

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2000048148 2000-02-24
JP2000-48148 2000-02-24
JP2001007823A JP4574020B2 (en) 2000-02-24 2001-01-16 Image processing apparatus, image encoding apparatus, and image decoding apparatus

Publications (2)

Publication Number Publication Date
JP2001313949A JP2001313949A (en) 2001-11-09
JP4574020B2 true JP4574020B2 (en) 2010-11-04

Family

ID=26586035

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001007823A Expired - Fee Related JP4574020B2 (en) 2000-02-24 2001-01-16 Image processing apparatus, image encoding apparatus, and image decoding apparatus

Country Status (1)

Country Link
JP (1) JP4574020B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000023190A (en) * 1998-06-26 2000-01-21 Sony Corp Motion vector generation method, picture encoder, motion compensation method, motion compensation device and provision medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000023190A (en) * 1998-06-26 2000-01-21 Sony Corp Motion vector generation method, picture encoder, motion compensation method, motion compensation device and provision medium

Also Published As

Publication number Publication date
JP2001313949A (en) 2001-11-09

Similar Documents

Publication Publication Date Title
KR101684207B1 (en) Video decoder, video encoder, video decoding method, and video encoding method
KR101883932B1 (en) Intra prediction method and apparatus using the method
TWI415446B (en) Parallel processing apparatus for video compression
CN104320665B (en) Image processing equipment and method
KR101759461B1 (en) Coding apparatus, decoding apparatus, coding method, decoding method, and computer-readable storage medium
JP4844449B2 (en) Moving picture encoding apparatus, method, program, moving picture decoding apparatus, method, and program
JP5219089B2 (en) Image data generation method
JP2007329693A (en) Image coding apparatus and image coding method
TWI736557B (en) Data encoding apparatus and data encoding method
JP2009094828A (en) Image encoding device, image encoding method, image decoding device, and image decoding method
JP2008182527A (en) Image coding device and method, and imaging system
JP2008271127A (en) Coding apparatus
JP5219062B2 (en) Image data generation method
KR100771640B1 (en) H.264 encoder with fast mode decision function
JP4574020B2 (en) Image processing apparatus, image encoding apparatus, and image decoding apparatus
TWI825751B (en) Method and apparatuses for video encoding
JP5195674B2 (en) Image encoding device
JP4719650B2 (en) Image encoding device
JP4557440B2 (en) Image processing apparatus, image encoding apparatus, and image decoding apparatus
JP4574019B2 (en) Image processing apparatus, image processing method, memory medium, image encoding apparatus, and image decoding apparatus
JP4935771B2 (en) Motion vector detection apparatus and moving picture encoding apparatus
JP2021061547A (en) Image encoding device, image encoding method, and program
KR101938389B1 (en) Intra prediction method and apparatus using the method
JP2008182471A (en) Arithmetic unit
JP2002077901A (en) Image processor and processing method and image encoder and image recorder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080109

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091119

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100423

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100621

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100818

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

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees