JP2004054635A - Picture processor and its method - Google Patents

Picture processor and its method Download PDF

Info

Publication number
JP2004054635A
JP2004054635A JP2002211707A JP2002211707A JP2004054635A JP 2004054635 A JP2004054635 A JP 2004054635A JP 2002211707 A JP2002211707 A JP 2002211707A JP 2002211707 A JP2002211707 A JP 2002211707A JP 2004054635 A JP2004054635 A JP 2004054635A
Authority
JP
Japan
Prior art keywords
unit
filter
processing
image processing
parameter
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.)
Pending
Application number
JP2002211707A
Other languages
Japanese (ja)
Inventor
Hitoshi Ishikawa
石川 仁
Tetsugo Inada
稲田 徹悟
Hitoshi Sato
佐藤 仁
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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP2002211707A priority Critical patent/JP2004054635A/en
Publication of JP2004054635A publication Critical patent/JP2004054635A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a picture processor and its method capable of obtaining effective plotting results by small calculation quantity. <P>SOLUTION: The picture processor is provided with a vertex unit processing part 21 for calculating a filter processing parameter on the basis of a normal vector and a sight line vector provided in each vertex, a rasterizing part 22 for rasterizing vertex information as a fragment unit and rasterizing the filter processing parameter, a fragment unit processing part 23 for performing arithmetic processing on the basis of the information rasterized as the fragment unit, a memory part 24 for storing the rasterized filter processing parameter in each pixel and storing the output information from the fragment unit processing part 23, and a picture processing part 25 for finding a suitable filter kernel on the basis of the value of the filter processing parameter stored in the memory part 24 and applying filter processing to the information stored in the memory part 24 on the basis of the found filter kernel. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、3次元コンピュータグラフィックスを実現するための画像処理装置およびその方法に関するものである。
【0002】
【従来の技術】
昨今のコンピュータシステムにおける演算速度の向上や描画機能の強化とも相俟って、コンピュータ資源を用いて図形や画像の作成や処理を行う「コンピュータ・グラフィックス(CG)」技術が盛んに研究・開発され、さらに実用化されている。
【0003】
たとえば、3次元グラフィックスは、3次元オブジェクトが所定の光源によって照らされたときの光学現象を数学モデルで表現して、このモデルに基づいてオブジェクト表面に陰影や濃淡を付けたり、さらには模様を貼り付けたりして、よりリアルで3次元的な2次元高精細画像を生成するものである。
このようなコンピュータ・グラフィックスは、科学、工学、製造などの開発分野でのCAD/CAM、その他の各種応用分野においてますます盛んに利用されるようになってきている。
【0004】
3次元グラフィックスは、一般には、フロントエンドとして位置づけられる「ジオメトリ・サブシステム」と、バックエンドとして位置づけられる「ラスタ・サブシステム」とにより構成される。
【0005】
ジオメトリ・サブシステムとは、ディスプレイ・スクリーン上に表示する3次元オブジェクトの位置や姿勢などの幾何学的な演算処理を行う過程のことである。
ジオメトリ・サブシステムでは、一般にオブジェクトは多数のポリゴンの集合体として扱われ、ポリゴン単位で、「座標変換」、「クリッピング」、「光源計算」などの幾何学的な演算処理が行われる。
【0006】
一方、ラスタ・サブシステムは、オブジェクトを構成する各ピクセル(pixel)を塗りつぶす過程のことである。
ラスタライズ処理は、たとえばポリゴンの頂点毎に求められた画像パラメータを基にして、ポリゴン内部に含まれるすべてのピクセルの画像パラメータを補間することによって実現される。
ここで言う画像パラメータには、いわゆるRGB形式などで表される色(描画色)データ、奥行き方向の距離を表すz値などがある。
また、最近の高精細な3次元グラフィックス処理では、遠近感を醸し出すためのf(fog:霧)や、物体表面の素材感や模様を表現してリアリティを与えるテクスチャt(texture)なども、画像パラメータの1つとして含まれている。
【0007】
ここで、ポリゴンの頂点情報からポリゴン内部のピクセルを発生する処理では、よくDDA(Digital Differential Analyzer)と呼ばれる線形補間手法を用いて実行される。
DDAプロセスでは、頂点情報からポリゴンの辺方向へのデータの傾きを求め、この傾きを用いて辺上のデータを算出した後、続いてラスタ走査方向(X方向)の傾きを算出し、この傾きから求めたパラメータの変化分を走査の開始点のパラメータ値に加えていくことで、内部のピクセルを発生していく。
【0008】
図1は、従来のリアルタイム3次元コンピュータグラフィックスの分野における画像処理装置の構成例を示すブロック図、図2は、図1の画像処理装置の画像処理動作を示すフローチャートである。
【0009】
この画像処理装置10は、図1に示すように、頂点単位処理部11、ラスタライズ部12、フラグメント単位処理部13、およびメモリ部14を有している。
【0010】
以下、図1の画像処理装置10における描画処理について、各構成要素の機能と併せて図2のフローチャートに関連付けて説明する。
【0011】
頂点単位処理部11は、頂点情報VIを入力し、これに頂点単位の処理を行い、この結果を信号S11としてラスタライズ部12に出力する(ステップST1)。
ラスタライズ部12は、処理後の頂点情報S11を入力し、これを補間することによりフラグメント単位の情報へと変換し、この結果を信号S12としてフラグメント単位処理部13に出力する(ステップST2)。
フラグメント単位処理部13は、フラグメント情報S12を入力し、これにフラグメント単位の処理を行い、この結果を信号S13としてメモリ部14に出力する(ステップST3)。
メモリ部14は、処理後のフラグメント情報S13を入力し、これに必要なテストや演算を加えた結果を保持する(ステップST4)。
最終的にシーンに含まれる全プリミティブの描画が完了したならば終了する。一方、描画が完了していないならばステップSTlから繰り返す(ステップST5)。
【0012】
典型的な3次元コンピュータグラフィックスにおいては、ステップST1の頂点単位処理には座標変換や色計算などの処理が含まれる。また、ステップST3のフラグメント単位処理にはテクスチャマッピングなどの処理が含まれる。また、ステップST4の描画処理にはアルファブレンドやデプステストなどの処理が含まれる。
【0013】
上記の処理はいずれもパイプライン的な構成を用いることにより高スループットを実現することが可能であり、リアルタイムコンピュータグラフィックスに適している。以下ではこれらを描画パイプラインと呼ぶ場合もある。
【0014】
一方、近年の3次元コンピュータグラフィックスにおいては、描画パイプライン以外の画像処理を用いることにより画質を改善する方法が提案されている。
【0015】
図3は、従来のリアルタイム3次元コンピュータグラフィックスの分野における描画パイプライン以外の画像処理を用いることにより画質を改善する方法を採用した画像処理装置の構成例を示すブロック図、図4は、図3の画像処理装置の画像処理動作を示すフローチャートである。
【0016】
この画像処理装置10Aは、図1の構成要素である頂点単位処理部11、ラスタライズ部12、フラグメント単位処理部13、およびメモリ部14に加えて、画像処理部15を有している。
また、図4のフローチャートにおいては、図2のステップST1〜ST5の処理に加えて、画像処理部15における画像処理のためのステップST6が追加されている。
【0017】
基本的には、画像処理装置10Aにおいては、シーン全体の描画が完了した後、画面全体に対して何らかの計算を行う。
なお、上記で画面全体と述べた部分は、描画手法によっては画面の一部である場合もあり得る。たとえば画面全体を複数の部分領域に分割して、それぞれを別々に描画するような場合には、画像処理はその部分領域毎に行われる。以下、このような場合も含めた画像処理について述べる。
【0018】
毛皮の描画処理においては、ウィンドウ座標系での毛の方向をもとに画面全体にフィルタ処理を行うことにより画質を改善する方法がある。
また、画面全体について保持した深さ値をもとにデプスオブフィールド(Depth Of Field)を実現する方法もある。
これらは画像処理的なアプローチを用いることにより、描画パイプラインを流れる情報を多大に増加させることなく、画質を改善する手法である。
【0019】
毛皮の描画に際しては、図5に示すように複数のシェルを半透明物体として重ね描きすることによって高速に質感を表現する手法が提案されている。
しかしながら、シェル描画であることによる不連続性がエッジ近傍では増大し、図6に示すように毛が不連続に見えてしまうという問題があった。
これに対して、毛の方向を加味したフィルタを施すことにより、図7(A),(B)に示すように、毛の不連続性を解消することができる。
【0020】
Depth Of Fieldの実現に際しては、深さ値がある値からずれているピクセルほどより大きいカーネルを用いてフィルタ処理を行う。これによりぼけている効果を良好に表現できる。
【0021】
同様な方法として、画面全体に固定的なフィルタをかけることにより、簡易アンチエイリアスを実現する方法もある。
これはフレームバッファに描画された結果に対し、たとえば図8に示すようなフィルタを用いる。ここでは1つのピクセルの色情報を、近傍の複数ピクセルに重み付け加算することによりアンチエイリアスを実現する。
【0022】
これらの方法はいずれも従来の描画パイプラインを用いた描画処理に、画面全体に施す画像処理を併用することにより画質を向上させるものである。
毛皮の描画あるいはDepth Of Fieldの場合は、フィルタ処理のカーネルを選択するためのパラメータを、描画パイプラインを用いて計算していた。一方、上記簡易アンチエイリアスの実現の場合、フィルタカーネルは固定である場合が多い。
【0023】
【発明が解決しようとする課題】
以上述べたような、描画パイプラインを用いた描画処理に加え、画面全体に画像処理を行う場合、以下のような問題点がある。
【0024】
毛皮の描画に用いるフィルタ処理の場合、フィルタが必要となるのは多くの場合、オブジェクトのエッジ近傍である。エッジ近傍では大きいカーネルサイズのフィルタ処理が必要であるが、エッジ近傍でなければ不連続性は目立たないため、フィルタ処理は小さいカーネルサイズで十分である。
【0025】
一般にフィルタ処理は、カーネルサイズが大きいほど演算量も大きくなってしまう。エッジ以外での大きいカーネルサイズでのフィルタ処理は、画質には影響の少ないコストの高い演算を行っていることになる。これは性能の低下を導く。また、上記アンチエイリアスに画像処理を用いる場合、画質的な問題を生ずる。フィルタ処理を行う場合、エッジ近傍を良好にぼかすことは可能であるが、フィルタ処理を行う場合、画面全体を均質にぼかすため、エッジ以外の画像はぼかしすぎてしまうという問題がある。
【0026】
本発明は、かかる事情に鑑みてなされたものであり、その目的は、オブジェクトのエッジ部分とそれ以外の領域に対して画像処理の内容を変更することができ、少ない計算量で良好な描画結果を得ることができる画像処理装置およびその方法を提供することにある。
【0027】
【課題を解決するための手段】
上記目的を達成するため、本発明の第1の観点に係る画像処理装置は、頂点単位の演算を行う頂点単位処理部と、上記頂点単位処理部の演算した情報をラスタライズしてフラグメント単位とするラスタライズ部と、上記フラグメント単位となった情報に基づいた演算処理を行うフラグメント単位処理部と、上記フラグメント単位処理部の演算処理した情報を保持するメモリ部と、上記メモリ部の内容に対して画像処理を行う画像処理部と、を有し、上記画像処理部は、所定のフィルタ処理パラメータに応じて異なるフィルタ処理を行う。
【0028】
本発明では、上記フィルタ処理パラメータは、エッジ近傍の度合いを示すパラメータである。
【0029】
本発明では、上記頂点単位処理部は、フィルタ処理パラメータを算出して上記画像処理部に供給する。
【0030】
本発明では、上記フラグメント単位処理部は、フィルタ処理パラメータを算出して上記画像処理部に供給する。
【0031】
本発明では、上記フィルタ処理パラメータは、法線ベクトルおよび視線ベクトルに基づいて算出される。
【0032】
本発明では、上記画像処理部は、アンチエイリアスの効果を生ずるフィルタ処理を行う。
【0033】
本発明では、上記画像処理部は、毛皮のシェル描画におけるフィルタ処理を行う。
【0034】
本発明の第2の観点に係る画像処理装置は、頂点単位の演算を行い、かつ、頂点毎に与えられた法線ベクトルおよび視線ベクトルに基づいてフィルタ処理パラメータを計算する頂点単位処理部と、上記頂点単位処理部の演算した情報をラスタライズしてフラグメント単位とし、上記フィルタ処理パラメータをラスタライズするラスタライズ部と、上記フラグメント単位となった情報に基づいた演算処理を行うフラグメント単位処理部と、上記ラスタライズされたフィルタ処理パラメータをピクセル毎に保持し、上記フラグメント単位処理部の演算処理した情報を保持するメモリ部と、上記メモリ部にピクセル毎に保持されたフィルタ処理パラメータの値に基づいて適したフィルタカーネルを求め、求めたフィルタカーネルに基づいて上記メモリ部に保持されている情報に対してフィルタ処理を行う画像処理部とを有する。
【0035】
本発明の第3の観点に係る画像処理装置は、頂点情報をラスタライズしてフラグメント単位とし、頂点毎に与えられた法線ベクトルおよび視線ベクトルをラスタライズするラスタライズ部と、上記ラスタライズされた法線ベクトルおよび視線ベクトルに基づいてフィルタ処理パラメータを計算し、上記フラグメント単位となった情報に基づいた演算処理を行うフラグメント単位処理部と、上記フィルタ処理パラメータをピクセル毎に保持し、上記フラグメント単位処理部の演算処理した情報を保持するメモリ部と、上記メモリ部にピクセル毎に保持されたフィルタ処理パラメータの値に基づいてフィルタカーネルを求め、求めたフィルタカーネルに基づいて上記メモリ部に保持されている情報に対してフィルタ処理を行う画像処理部とを有する。
【0036】
本発明の第4の観点に係る画像処理方法は、オブジェクトの頂点単位情報をラスタライズしてフラグメント単位とする第1のステップと、上記フラグメント単位となった情報に基づいた演算処理を行う第2のステップと、エッジ近傍の度合いを示すフィルタ処理パラメータに応じて上記演算処理情報に対して異なるフィルタ処理を行う第3のステップとを有する。
【0037】
本発明によれば、たとえば頂点単位処理部に対して頂点情報および頂点毎に与えられた法線ベクトルN、視線ベクトルEが入力される。
頂点単位処理部においては、頂点毎に与えられた法線ベクトルN、視線ベクトルEに基づいてエッジ近傍の度合いを示すフィルタ処理パラメータが計算され、ラスタライズ部に出力される。
また、頂点単位処理部においては、入力した頂点情報に基づいて頂点単位の処理、すなわちフィルタ処理パラメータの計算以外の、通常処理すべき内容、たとえば頂点の座標変換などが行われ、頂点単位処理部から処理結果がラスタライズ部に出力される。
【0038】
ラスタライズ部においては、処理後の頂点情報に対してたとえば補間処理が行われて、フラグメント単位の情報への変換が行われる。そして、ラスタライズ部から処理結果がフラグメント単位処理部に出力される。
また、ラスタライズ部に供給されたフィルタ処理パラメータはラスタライズされてメモリ部に保持される。
フラグメント単位処理部においては、ラスタライズ部によるフラグメント情報に対してテクスチャマッピング等のフラグメント単位の処理が行われる。そして、フラグメント単位処理部からフラグメント情報がメモリ部に出力され、保持される。
そして、画像処理部において、メモリ部に保持された、たとえばエッジ近傍の割合を示すフィルタ処理パラメータおよびフラグメント情報が読み出される。画像処理部においては、エッジ近傍の割合を示すフィルタ処理パラメータに基づいてフィルタカーネルが選択され、選択したフィルタカーネルを用いてフィルタ処理が行われる。
このように、本発明によれば、エッジ近傍の割合を示すフィルタ処理パラメータをもとに、フィルタカーネルを選択することにより、全体として少ない計算量で良好な描画結果を得ることができる。
【0039】
【発明の実施の形態】
第1実施形態
図9は、本発明に係る画像処理装置の第1の実施形態を示すブロック図である。
【0040】
本画像処理装置20は、図9に示すように、頂点単位処理部21、ラスタライズ部22、フラグメント単位処理部23、メモリ部24、および画像処理部25を有している。
【0041】
頂点単位処理部21は、頂点毎に与えられた法線ベクトルN、視線ベクトルEに基づいてフィルタ処理パラメータpを計算する。頂点単位処理部21が算出するフィルタ処理パラメータは、エッジ近傍の度合いを示すパラメータである。
また、フィルタ処理パラメータの算出には、法線ベクトルNと視線ベクトルEの内積の逆数を用いる。
また、頂点単位処理部21は、頂点情報VIを入力し、これに頂点単位の処理を行い、この結果(演算処理した情報)を信号S21としてラスタライズ部22に出力する。
【0042】
図10は、頂点単位処理部21の具体的な処理を説明するための図である。
【0043】
頂点単位処理部21は、図10に示すように、図示しない上位装置からの頂点毎の法線ベクトルN、視線ベクトルEを入力し(ステップST21)、入力した法線ベクトルN、視線ベクトルEに基づいてフィルタ処理パラメータpを数1のように計算する(ステップST22)。この式は法線と視線が垂直に近いほど大きい値をとる。
【0044】
【数1】
p=1−|N・E|
【0045】
なお、数1は計算方法の一例であり、法線ベクトルNと視線ベクトルEの値から、エッジ周辺とそれ以外を区別できる計算方法であればどのようなものでも良い。
たとえば、以下に示す数2はやはり法線と視線が垂直に近いほど大きい値をとる。
【0046】
【数2】
p=|sin(N・E)|
【0047】
頂点単位処理部21は、算出したフィルタ処理パラメータpを後段、すなわちラスタライズ部22に出力する(ステップST23)。
また、頂点単位処理部21は、フィルタ処理パラメータの計算以外の、通常処理すべき内容、たとえば頂点の座標変換などの処理を行う(ステップST24)。
【0048】
ラスタライズ部22は、処理後の頂点情報S21を入力し、これを補間することによりフラグメント単位の情報へと変換し、この結果を信号S22としてフラグメント単位処理部23に出力する。
また、ラスタライズ部22は、頂点単位処理部21により算出されたフィルタ処理パラメータpをラスタライズし、フラグメント単位処理部23を通してメモリ部24にピクセル毎に保持させる。
【0049】
フラグメント単位処理部23は、ラスタライズ部22によるフラグメント情報S22を入力し、入力情報に対してテクスチャマッピング等のフラグメント単位の処理を行い、この結果であるフラグメント情報dinを信号S23としてメモリ部24に出力し、保持させる。
【0050】
メモリ部24は、処理後のフラグメント情報dinを入力し、これに必要なテストや演算を加えた結果を保持する。
メモリ部24は、頂点単位処理部21で演算され、ラスタライズ部22でラスタライズされたフィルタ処理パラメータpをピクセル毎に保持し、また、画像処理部25による画像処理後のフラグメント情報dout を保持する。
【0051】
画像処理部25は、メモリ部24に保持されたエッジ近傍の割合を示すフィルタ処理パラメータをもとに、フィルタカーネルを選択し、選択したフィルタカーネルを用いてフィルタ処理を行い、処理後のフラグメント情報をメモリ部24に出力し、保持させる。
【0052】
図11は、画像処理部25の具体的な処理を説明するための図である。
【0053】
画像処理部25は、図11に示すように、メモリ部24に保持されているフィルタ処理パラメータpを入力し(ステップST31)、フラグメント情報dinを入力する(ステップST32)。
そして、画像処理部25は、フィルタ処理を行う(ステップST33)。
画像処理部25は、フィルタ処理後のフラグメント情報dout をメモリ部24に出力する(ステップST34)。
画像処理部25は、ステップST31〜ST34の処理を画面全体について繰り返す(ステップST35)。
【0054】
画像処理部25が行うフィルタ処理としては、入力dinおよび出力dout が単一/複数のそれぞれの組み合わせが存在する。本実施形態においては、フィルタ処理のカーネルをフィルタ処理パラメータpにより変更させる場合は、これらのいずれの場合も含む。
【0055】
以下では単一ピクセルの入力を、複数ピクセルに出力する場合について述べる。数3は単一ピクセルの入力dinを、複数ピクセルへの出力dout [i]とした場合を示している。
【0056】
【数3】
out [i]=a[i]*din
【0057】
ここで、[i]と配列形式で複数ピクセルを表現している。a[i]は入力が出力にどれだけ関与するかを表す係数であり、フィルタカーネルと考えることができる。
一般に、フィルタカーネルa[i]はフィルタ処理パラメータpに依存しない。
【0058】
図12は、毛皮の描画に関するフィルタカーネルa[i]の例を示す図である。
【0059】
典型的には、フィルタカーネルa[i]は画像処理部25がテーブルに所持しており、毛の方向をインデックスとしてテーブルを参照することにより与えられる。
ところで、図12の例は5×5のフィルタカーネルであり、エッジ近傍でなければこれだけのサイズのフィルタカーネルの演算を行う必要はない場合がある。その場合、フィルタ処理パラメータpをもとに図13に示すように、3×3の小さいフィルタカーネルa[i]sを引くことにより演算量を抑えることが可能となる。
【0060】
また、図14は、アンチエイリアスを行う場合のフィルタカーネルの例を示す図である。
図14の例のように、中央の係数値が大きく、周辺が小さいようなフィルタカーネルを用いることで、全体にぼかすことが可能である。
しかしながら、エッジ近傍以外ではこのようなフィルタカーネルを用いるとぼけすぎるという欠点がある。
そこで、フィルタカーネルを固定値ではなく、図15に示すように、フィルタ処理パラメータpによって変化する変数値al、a2とすることが有効である。al、a2はたとえば、数4のように計算することができる。
【0061】
【数4】
a1=1/2+1/2*(1−p)
a2=1/16*p
【0062】
数4によればp=1(すなわちエッジ近傍)の場合、al、a2はそれぞれ1/2、1/16となる。一方、p=0の場合、a1=1、a2=0となる。
すなわち、エッジ近傍はぼがすが、それ以外はぼけにくくなり、より良好な画像を得ることが可能となる。
【0063】
次に、図9の画像処理装置の動作を説明する。
【0064】
頂点単位処理部21に対して頂点情報VIおよび頂点毎に与えられた法線ベクトルN、視線ベクトルEが入力される。
頂点単位処理部21においては、頂点毎に与えられた法線ベクトルN、視線ベクトルEに基づいてエッジ近傍の度合いを示すフィルタ処理パラメータpが計算され、ラスタライズ部22に出力される。
また、頂点単位処理部21においては、入力した頂点情報VIに基づいて頂点単位の処理、すなわちフィルタ処理パラメータの計算以外の、通常処理すべき内容、たとえば頂点の座標変換などが行われる。頂点単位処理部21から処理結果が信号S21としてラスタライズ部22に出力される。
【0065】
ラスタライズ部22においては、処理後の頂点情報S21に対して補間処理が行われて、フラグメント単位の情報への変換が行われる。そして、ラスタライズ部22から処理結果が信号S22としてフラグメント単位処理部23に出力される。
また、ラスタライズ部22に供給されたフィルタ処理パラメータpはフラグメント単位処理部23を通してメモリ部24に保持される。
【0066】
フラグメント単位処理部23においては、ラスタライズ部22によるフラグメント情報S22に対してテクスチャマッピング等のフラグメント単位の処理が行われる。そして、フラグメント単位処理部23からフラグメント情報dinが信号S23としてメモリ部24に出力され、保持される。
【0067】
そして、画像処理部25において、メモリ部24に保持されたエッジ近傍の割合を示すフィルタ処理パラメータpおよびフラグメント情報dinが読み出される。画像処理部25においては、エッジ近傍の割合を示すフィルタ処理パラメータpに基づいてフィルタカーネルが選択され、選択したフィルタカーネルを用いてフィルタ処理が行われる。そして、処理後のフラグメント情報がメモリ部24に出力され、保持される。
【0068】
以上説明したように、本第1の実施形態によれば、頂点毎に与えられた法線ベクトルおよび視線ベクトルに基づいてフィルタ処理パラメータを計算する頂点単位処理部21と、頂点情報をラスタライズしフラグメント単位とし、フィルタ処理パラメータをラスタライズするラスタライズ部22と、フラグメント単位となった情報に基づいた演算処理を行うフラグメント単位処理部23と、ラスタライズされたフィルタ処理パラメータをピクセル毎に保持し、フラグメント単位処理部23の出力情報を保持するメモリ部24と、メモリ部24に保持されたフィルタ処理パラメータの値に基づいて適したフィルタカーネルを求め、求めたフィルタカーネルに基づいてメモリ部24に保持されている情報に対してフィルタ処理を行う画像処理部25とを設けたので、オブジェクトのエッジ部分とそれ以外の領域に対して画像処理の内容を変更することができ、少ない計算量で良好な描画結果を得ることができる。
【0069】
第2実施形態
図16は、本発明に係る画像処理装置の第2の実施形態を示すブロック図である。
【0070】
本第2の実施形態が上述した第1の実施形態と異なる点は、フィルタ処理パラメータの算出を頂点単位処理部21Aで行う代わりに、フラグメント単位処理部23Aで行うようにしたことにある。
【0071】
この場合、法線ベクトルNおよび視線ベクトルEはラスタライズ部22Aによりラスタライズされてフラグメント単位処理部23Aに与えられる。
【0072】
その他の構成および機能は、上述した図9の装置と同様である。
【0073】
本第2の実施形態のようにフィルタ処理パラメータpの算出をフラグメント単位で行う場合、より高品質のフィルタ処理を期待できる。
【0074】
【発明の効果】
以上説明したように、本発明によれば、オブジェクトのエッジ部分とそれ以外の領域に対して画像処理の内容を変更することができ、少ない計算量で良好な描画結果を得ることができる。
【図面の簡単な説明】
【図1】従来のリアルタイム3次元コンピュータグラフィックスの分野における画像処理装置の構成例を示すブロック図である。
【図2】図1の画像処理装置の画像処理動作を示すフローチャートである。
【図3】従来のリアルタイム3次元コンピュータグラフィックスの分野における描画パイプライン以外の画像処理を用いることにより画質を改善する方法を採用した画像処理装置の構成例を示すブロック図である。
【図4】図3の画像処理装置の画像処理動作を示すフローチャートである。
【図5】毛皮のシェル描画について説明するための図である。
【図6】シェル描画であることによる不連続性がエッジ近傍では増大し、毛が不連続に見えてしまうという問題点を説明するための図である。
【図7】毛の方向を加味したフィルタを施すことにより毛の不連続性を解消することができることを説明するための図である。
【図8】画面全体に固定的なフィルタをかけることにより、簡易アンチエイリアスを実現する方法を説明するための図である。
【図9】本発明に係る画像処理装置の第1の実施形態を示すブロック図である。
【図10】本第1の実施形態に係る頂点単位処理部の具体的な処理を説明するためのフローチャートである。
【図11】本第1の実施形態に係る画像処理部の具体的な処理を説明するためのフローチャートである。
【図12】毛皮の描画に関するフィルタカーネルa[i]の例を示す図である。
【図13】フィルタ処理パラメータpをもとに小さいフィルタカーネルを用いて演算量を抑える例を説明するための図である。
【図14】アンチエイリアスを行う場合のフィルタカーネルの例を示す図である。
【図15】フィルタカーネルを固定値ではなくフィルタ処理パラメータpによって変化する変数値とする例を説明するための図である。
【図16】本発明に係る画像処理装置の第2の実施形態を示すブロック図である。
【符号の説明】
20,20A…画像処理装置、21,21A…頂点単位処理部、22,22A…ラスタライズ部、23,23A…フラグメント単位処理部、24…メモリ部、25…画像処理部。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing apparatus and method for realizing three-dimensional computer graphics.
[0002]
[Prior art]
The computer graphics (CG) technology, which creates and processes graphics and images using computer resources, has been actively researched and developed in conjunction with the recent increase in computational speed and the enhancement of drawing functions in computer systems. It has been put to practical use.
[0003]
For example, three-dimensional graphics expresses an optical phenomenon when a three-dimensional object is illuminated by a predetermined light source by using a mathematical model, and based on this model, shades, shades, and even patterns on the object surface. By pasting, a more realistic three-dimensional two-dimensional high-definition image is generated.
Such computer graphics have been increasingly used in CAD / CAM and other various application fields in development fields such as science, engineering, and manufacturing.
[0004]
The three-dimensional graphics generally includes a “geometry subsystem” positioned as a front end and a “raster subsystem” positioned as a back end.
[0005]
The geometry subsystem is a process of performing a geometric operation such as a position and a posture of a three-dimensional object displayed on a display screen.
In the geometry subsystem, an object is generally treated as an aggregate of a large number of polygons, and geometric calculation processing such as “coordinate conversion”, “clipping”, and “light source calculation” is performed in units of polygons.
[0006]
On the other hand, the raster subsystem is a process of painting each pixel constituting an object.
The rasterizing process is realized by, for example, interpolating the image parameters of all the pixels included in the polygon based on the image parameters obtained for each vertex of the polygon.
The image parameters referred to here include color (rendering color) data expressed in a so-called RGB format and the like, z values indicating a distance in the depth direction, and the like.
In recent high-definition three-dimensional graphics processing, f (fog: fog) for creating perspective and texture t (texture) for expressing reality by expressing the texture and pattern of the surface of an object, It is included as one of the image parameters.
[0007]
Here, the process of generating pixels inside the polygon from the vertex information of the polygon is often performed using a linear interpolation method called DDA (Digital Differential Analyzer).
In the DDA process, the inclination of data in the direction of the side of the polygon is obtained from the vertex information, the data on the side is calculated using this inclination, and then the inclination in the raster scanning direction (X direction) is calculated. The internal pixel is generated by adding the parameter change obtained from the above to the parameter value of the scanning start point.
[0008]
FIG. 1 is a block diagram illustrating a configuration example of a conventional image processing apparatus in the field of real-time three-dimensional computer graphics, and FIG. 2 is a flowchart illustrating an image processing operation of the image processing apparatus of FIG.
[0009]
As shown in FIG. 1, the image processing apparatus 10 includes a vertex unit processing unit 11, a rasterizing unit 12, a fragment unit processing unit 13, and a memory unit 14.
[0010]
Hereinafter, the drawing process in the image processing apparatus 10 of FIG. 1 will be described with reference to the flowchart of FIG. 2 together with the function of each component.
[0011]
The vertex unit processing unit 11 receives the vertex information VI, performs a process on a per-vertex basis, and outputs the result to the rasterizing unit 12 as a signal S11 (step ST1).
The rasterizing unit 12 inputs the processed vertex information S11, converts it into information in fragment units by interpolating, and outputs the result to the fragment unit processing unit 13 as a signal S12 (step ST2).
The fragment unit processing unit 13 receives the fragment information S12, performs fragment unit processing on the fragment information S12, and outputs the result to the memory unit 14 as a signal S13 (step ST3).
The memory unit 14 receives the processed fragment information S13, and holds a result obtained by adding necessary tests and calculations to the fragment information S13 (step ST4).
Finally, when the rendering of all the primitives included in the scene is completed, the process ends. On the other hand, if the drawing is not completed, the process is repeated from step ST1 (step ST5).
[0012]
In typical three-dimensional computer graphics, the vertex unit processing in step ST1 includes processing such as coordinate conversion and color calculation. Further, the fragment unit processing in step ST3 includes processing such as texture mapping. The drawing process in step ST4 includes processes such as alpha blending and a depth test.
[0013]
Any of the above processes can realize high throughput by using a pipeline configuration, and is suitable for real-time computer graphics. Hereinafter, these may be called a drawing pipeline.
[0014]
On the other hand, in recent three-dimensional computer graphics, a method for improving image quality by using image processing other than a drawing pipeline has been proposed.
[0015]
FIG. 3 is a block diagram showing a configuration example of an image processing apparatus adopting a method of improving image quality by using image processing other than a drawing pipeline in the field of conventional real-time three-dimensional computer graphics, and FIG. 13 is a flowchart illustrating an image processing operation of the image processing apparatus of No. 3;
[0016]
The image processing apparatus 10A includes an image processing unit 15 in addition to the vertex unit processing unit 11, the rasterizing unit 12, the fragment unit processing unit 13, and the memory unit 14, which are the components of FIG.
Further, in the flowchart of FIG. 4, a step ST6 for image processing in the image processing unit 15 is added in addition to the processing of steps ST1 to ST5 of FIG.
[0017]
Basically, in the image processing apparatus 10A, after drawing of the entire scene is completed, some calculation is performed on the entire screen.
The portion described as the entire screen above may be a part of the screen depending on the drawing method. For example, in a case where the entire screen is divided into a plurality of partial areas and each is separately drawn, image processing is performed for each of the partial areas. Hereinafter, image processing including such a case will be described.
[0018]
In the fur drawing process, there is a method of improving the image quality by performing a filtering process on the entire screen based on the direction of the fur in the window coordinate system.
There is also a method of realizing a depth of field based on a depth value held for the entire screen.
These are techniques for improving the image quality by using an image processing approach without greatly increasing the information flowing through the drawing pipeline.
[0019]
In drawing fur, there has been proposed a method of expressing a texture at high speed by overlapping and drawing a plurality of shells as a translucent object as shown in FIG.
However, there is a problem that discontinuity due to shell drawing increases near an edge, and hairs appear discontinuous as shown in FIG.
On the other hand, by applying a filter considering the direction of the hair, discontinuity of the hair can be eliminated as shown in FIGS. 7A and 7B.
[0020]
In realizing Depth Of Field, filtering is performed using a larger kernel for pixels whose depth value deviates from a certain value. Thereby, the blurring effect can be expressed well.
[0021]
As a similar method, there is a method of realizing simple anti-aliasing by applying a fixed filter to the entire screen.
This uses a filter as shown in FIG. 8, for example, for the result drawn in the frame buffer. Here, anti-aliasing is realized by weighting and adding the color information of one pixel to a plurality of neighboring pixels.
[0022]
All of these methods improve image quality by using image processing performed on the entire screen in combination with conventional drawing processing using a drawing pipeline.
In the case of fur drawing or depth of field, parameters for selecting a kernel for filter processing have been calculated using a drawing pipeline. On the other hand, in the case of realizing the simple anti-aliasing, the filter kernel is often fixed.
[0023]
[Problems to be solved by the invention]
When image processing is performed on the entire screen in addition to the drawing processing using the drawing pipeline as described above, there are the following problems.
[0024]
In the case of filter processing used for drawing fur, a filter is often required near the edge of an object. Filtering with a large kernel size is necessary near the edge, but discontinuity is not noticeable outside the edge, so a small kernel size is sufficient for filtering.
[0025]
Generally, in the filtering process, the calculation amount increases as the kernel size increases. Filtering with a large kernel size other than at edges results in high-cost calculations with little effect on image quality. This leads to reduced performance. Further, when image processing is used for the anti-aliasing, there is a problem in image quality. When performing the filter processing, it is possible to satisfactorily blur the vicinity of the edge. However, when performing the filter processing, there is a problem that an image other than the edge is excessively blurred because the entire screen is uniformly blurred.
[0026]
The present invention has been made in view of such circumstances, and an object of the present invention is to make it possible to change the content of image processing for an edge portion of an object and other regions, and to obtain a good drawing result with a small amount of calculation. To provide an image processing apparatus and a method for obtaining the image processing apparatus.
[0027]
[Means for Solving the Problems]
In order to achieve the above object, an image processing apparatus according to a first aspect of the present invention includes a vertex unit processing unit that performs a calculation in units of vertices, and information calculated by the unit of vertices is rasterized into fragments. A rasterizing unit, a fragment unit processing unit that performs arithmetic processing based on the information in fragment units, a memory unit that holds the information processed by the fragment unit processing unit, and an image An image processing unit for performing processing, wherein the image processing unit performs different filter processing according to predetermined filter processing parameters.
[0028]
In the present invention, the filter processing parameter is a parameter indicating the degree of the vicinity of the edge.
[0029]
In the present invention, the vertex unit processing unit calculates a filter processing parameter and supplies the filter processing parameter to the image processing unit.
[0030]
In the present invention, the fragment unit processing unit calculates a filter processing parameter and supplies it to the image processing unit.
[0031]
In the present invention, the filter processing parameter is calculated based on the normal vector and the line-of-sight vector.
[0032]
According to the present invention, the image processing section performs a filter process that produces an anti-aliasing effect.
[0033]
In the present invention, the image processing unit performs a filter process in drawing a shell of fur.
[0034]
An image processing apparatus according to a second aspect of the present invention performs a calculation in units of vertices, and calculates a filter processing parameter based on a normal vector and a line-of-sight vector given to each vertex, and a vertex unit processing unit. A rasterizing unit that rasterizes the information calculated by the vertex unit processing unit into fragment units and rasterizes the filter processing parameters; a fragment unit processing unit that performs arithmetic processing based on the information in fragment units; A memory unit that holds the processed filter processing parameters for each pixel, and that holds the information processed by the fragment unit processing unit, and a filter that is suitable based on the values of the filter processing parameters stored for each pixel in the memory unit. Calculate the kernel and make the above memo based on the obtained filter kernel. And an image processing unit that performs filter processing on information held in the section.
[0035]
An image processing apparatus according to a third aspect of the present invention includes: a rasterizing unit that rasterizes vertex information into fragments and rasterizes a normal vector and a line-of-sight vector given to each vertex; A fragment unit processing unit that calculates a filter processing parameter based on the line-of-sight vector and performs an arithmetic process based on the information in the fragment unit, and a filter unit that holds the filter processing parameter for each pixel, A memory unit for storing the information obtained by the arithmetic processing, a filter kernel is obtained based on the value of the filter processing parameter stored for each pixel in the memory unit, and the information stored in the memory unit based on the obtained filter kernel And an image processing unit that performs filter processing on .
[0036]
An image processing method according to a fourth aspect of the present invention includes a first step of rasterizing vertex unit information of an object into fragment units and a second step of performing an arithmetic process based on the information in fragment units. And a third step of performing different filter processing on the arithmetic processing information in accordance with a filter processing parameter indicating a degree of edge proximity.
[0037]
According to the present invention, for example, the vertex information and the normal vector N and the line-of-sight vector E given to each vertex are input to the vertex unit processing unit.
In the vertex unit processing unit, a filter processing parameter indicating the degree of the vicinity of the edge is calculated based on the normal vector N and the line-of-sight vector E given to each vertex, and output to the rasterizing unit.
Further, the vertex unit processing unit performs processing per vertex based on the input vertex information, that is, contents to be normally processed other than calculation of filter processing parameters, for example, vertex coordinate conversion, and the like. Output the processing result to the rasterizing unit.
[0038]
In the rasterizing unit, for example, interpolation processing is performed on the processed vertex information, and conversion into information in fragment units is performed. Then, the processing result is output from the rasterizing unit to the fragment unit processing unit.
The filter processing parameters supplied to the rasterizing unit are rasterized and stored in the memory unit.
In the fragment unit processing unit, fragment unit processing such as texture mapping is performed on the fragment information by the rasterizing unit. Then, the fragment information is output from the fragment unit processing unit to the memory unit and held.
Then, in the image processing unit, the filter processing parameter and the fragment information, which are stored in the memory unit and indicate, for example, the ratio near the edge, are read. In the image processing unit, a filter kernel is selected based on a filter processing parameter indicating a ratio in the vicinity of the edge, and a filter process is performed using the selected filter kernel.
As described above, according to the present invention, by selecting a filter kernel based on the filter processing parameter indicating the ratio of the vicinity of the edge, a good drawing result can be obtained with a small amount of calculation as a whole.
[0039]
BEST MODE FOR CARRYING OUT THE INVENTION
First Embodiment FIG. 9 is a block diagram showing a first embodiment of an image processing device according to the present invention.
[0040]
As shown in FIG. 9, the image processing apparatus 20 includes a vertex unit processing unit 21, a rasterizing unit 22, a fragment unit processing unit 23, a memory unit 24, and an image processing unit 25.
[0041]
The vertex unit processing unit 21 calculates a filter processing parameter p based on the normal vector N and the line-of-sight vector E given for each vertex. The filter processing parameter calculated by the vertex unit processing unit 21 is a parameter indicating a degree near the edge.
The reciprocal of the inner product of the normal vector N and the line-of-sight vector E is used for calculating the filter processing parameter.
Further, the vertex unit processing unit 21 receives the vertex information VI, performs a process on a per-vertex basis, and outputs the result (information on which the arithmetic processing is performed) to the rasterizing unit 22 as a signal S21.
[0042]
FIG. 10 is a diagram for explaining specific processing of the vertex unit processing unit 21.
[0043]
As shown in FIG. 10, the vertex unit processing unit 21 receives a normal vector N and a line-of-sight vector E for each vertex from a higher-level device (not shown) (step ST21). Based on this, the filter processing parameter p is calculated as in Equation 1 (Step ST22). This equation takes a larger value as the normal and the line of sight are closer to vertical.
[0044]
(Equation 1)
p = 1− | N · E |
[0045]
Note that Equation 1 is an example of a calculation method, and any calculation method may be used as long as it is possible to distinguish the periphery of the edge and the rest from the values of the normal vector N and the line-of-sight vector E.
For example, Equation 2 shown below takes a larger value as the normal and the line of sight are closer to vertical.
[0046]
(Equation 2)
p = | sin (NE) |
[0047]
The vertex unit processing section 21 outputs the calculated filter processing parameter p to the subsequent stage, that is, to the rasterizing section 22 (step ST23).
Also, the vertex unit processing unit 21 performs processing other than the calculation of the filter processing parameters, such as the contents to be normally processed, for example, the coordinate conversion of the vertices (step ST24).
[0048]
The rasterizing unit 22 receives the processed vertex information S21, converts it into information on a fragment basis by interpolating the same, and outputs the result to the fragment unit processing unit 23 as a signal S22.
The rasterizing unit 22 rasterizes the filter processing parameter p calculated by the vertex unit processing unit 21, and causes the memory unit 24 to store the pixel by pixel through the fragment unit processing unit 23.
[0049]
Fragments unit processing section 23 inputs the fragment information S22 by rasterizing unit 22, performs processing of fragments units such as texture mapping to the input information, in the memory unit 24 the fragment information d in a result as signal S23 Output and hold.
[0050]
Memory unit 24 receives the fragment information d in the processed, holds the result of adding the test or operations required thereto.
The memory unit 24 holds, for each pixel, a filter processing parameter p calculated by the vertex unit processing unit 21 and rasterized by the rasterizing unit 22, and also holds fragment information d out after image processing by the image processing unit 25. .
[0051]
The image processing unit 25 selects a filter kernel based on the filter processing parameter indicating the ratio of the vicinity of the edge held in the memory unit 24, performs a filter process using the selected filter kernel, and processes the fragment information after the process. Is output to the memory unit 24 and stored.
[0052]
FIG. 11 is a diagram for explaining specific processing of the image processing unit 25.
[0053]
The image processing unit 25, as shown in FIG. 11, enter the filter parameter p stored in the memory unit 24 (step ST31), and inputs the fragment information d in (step ST32).
Then, the image processing unit 25 performs a filter process (step ST33).
The image processing unit 25 outputs the fragment information d out after the filter processing to the memory unit 24 (Step ST34).
The image processing unit 25 repeats the processing of steps ST31 to ST34 for the entire screen (step ST35).
[0054]
As the filter processing performed by the image processing unit 25, there are combinations of single / plural input d in and output d out . In the present embodiment, the case where the kernel of the filter processing is changed by the filter processing parameter p also includes any of these cases.
[0055]
Hereinafter, a case where an input of a single pixel is output to a plurality of pixels will be described. Equation 3 shows a case where the input d in of a single pixel is set as the output d out [i] to a plurality of pixels.
[0056]
[Equation 3]
d out [i] = a [i] * d in
[0057]
Here, [i] expresses a plurality of pixels in an array format. a [i] is a coefficient indicating how much the input contributes to the output, and can be considered as a filter kernel.
In general, the filter kernel a [i] does not depend on the filtering parameter p.
[0058]
FIG. 12 is a diagram illustrating an example of a filter kernel a [i] related to fur drawing.
[0059]
Typically, the filter kernel a [i] is provided in the table by the image processing unit 25, and is given by referring to the table using the direction of hair as an index.
By the way, the example in FIG. 12 is a 5 × 5 filter kernel, and there is a case where it is not necessary to calculate a filter kernel of this size unless it is near an edge. In this case, the amount of calculation can be reduced by subtracting a small filter kernel a [i] s of 3 × 3 based on the filter processing parameter p as shown in FIG.
[0060]
FIG. 14 is a diagram illustrating an example of a filter kernel when performing anti-aliasing.
As shown in the example of FIG. 14, by using a filter kernel in which the coefficient value at the center is large and the periphery is small, it is possible to blur the whole.
However, there is a disadvantage that using such a filter kernel is too blurry except for the vicinity of the edge.
Therefore, it is effective to set the filter kernel not to a fixed value but to variable values al and a2 that change depending on the filter processing parameter p as shown in FIG. al and a2 can be calculated as in Equation 4, for example.
[0061]
(Equation 4)
a1 = 1/2 + 1/2 * (1-p)
a2 = 1/16 * p
[0062]
According to Equation 4, when p = 1 (that is, near the edge), al and a2 are 、 and 1/16, respectively. On the other hand, when p = 0, a1 = 1 and a2 = 0.
In other words, blurring occurs in the vicinity of the edge, but hardly occurs in other areas, and a better image can be obtained.
[0063]
Next, the operation of the image processing apparatus of FIG. 9 will be described.
[0064]
The vertex information VI and the normal vector N and the line-of-sight vector E given for each vertex are input to the vertex unit processing unit 21.
The vertex unit processing unit 21 calculates a filter processing parameter p indicating the degree of the vicinity of the edge based on the normal vector N and the line-of-sight vector E given to each vertex, and outputs it to the rasterizing unit 22.
In addition, the vertex unit processing unit 21 performs processing per vertex based on the input vertex information VI, that is, contents to be normally processed other than calculation of the filter processing parameter, for example, coordinate conversion of the vertex. The processing result is output from the vertex unit processing unit 21 to the rasterizing unit 22 as a signal S21.
[0065]
In the rasterizing unit 22, interpolation processing is performed on the processed vertex information S21, and conversion into information in fragment units is performed. Then, the processing result is output from the rasterizing unit 22 to the fragment unit processing unit 23 as a signal S22.
The filtering parameter p supplied to the rasterizing unit 22 is stored in the memory unit 24 through the fragment unit processing unit 23.
[0066]
In the fragment unit processing unit 23, fragment unit processing such as texture mapping is performed on the fragment information S 22 by the rasterizing unit 22. The fragment information d in the fragment unit processing unit 23 is output as signal S23 to the memory unit 24, is held.
[0067]
Then, the image processing unit 25, filter parameter p and the fragment information d in showing the percentage of edge periphery held in the memory unit 24 is read out. In the image processing unit 25, a filter kernel is selected based on a filter processing parameter p indicating a ratio near the edge, and a filter process is performed using the selected filter kernel. Then, the processed fragment information is output to the memory unit 24 and held.
[0068]
As described above, according to the first embodiment, a vertex unit processing unit 21 that calculates a filter processing parameter based on a normal vector and a line-of-sight vector given for each vertex, and vertex information is rasterized and fragmented. A rasterizing unit 22 that rasterizes filter processing parameters as a unit, a fragment unit processing unit 23 that performs arithmetic processing based on information in fragment units, and holds a rasterized filter processing parameter for each pixel, and performs fragment unit processing. A memory unit 24 for holding the output information of the unit 23, and a suitable filter kernel based on the value of the filter processing parameter stored in the memory unit 24, which is stored in the memory unit 24 based on the obtained filter kernel. Image processing unit 25 that performs filter processing on information Since the provided, it is possible to change the contents of the image processing on the edge portion and the other area of the object, it is possible to obtain a good drawing results with a small amount of calculation.
[0069]
Second Embodiment FIG. 16 is a block diagram showing a second embodiment of the image processing device according to the present invention.
[0070]
The difference between the second embodiment and the first embodiment is that the filter processing parameters are calculated by the fragment unit processing unit 23A instead of being calculated by the vertex unit processing unit 21A.
[0071]
In this case, the normal vector N and the line-of-sight vector E are rasterized by the rasterizing unit 22A and provided to the fragment unit processing unit 23A.
[0072]
Other configurations and functions are the same as those of the above-described device of FIG.
[0073]
When the calculation of the filter processing parameter p is performed for each fragment as in the second embodiment, higher quality filter processing can be expected.
[0074]
【The invention's effect】
As described above, according to the present invention, the content of image processing can be changed for an edge portion of an object and other regions, and a good drawing result can be obtained with a small amount of calculation.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of a conventional image processing apparatus in the field of real-time three-dimensional computer graphics.
FIG. 2 is a flowchart illustrating an image processing operation of the image processing apparatus of FIG. 1;
FIG. 3 is a block diagram illustrating a configuration example of an image processing apparatus employing a method of improving image quality by using image processing other than a drawing pipeline in the field of conventional real-time three-dimensional computer graphics.
FIG. 4 is a flowchart illustrating an image processing operation of the image processing apparatus of FIG. 3;
FIG. 5 is a diagram for describing fur shell drawing.
FIG. 6 is a diagram for explaining a problem that discontinuity due to shell drawing increases near an edge and hairs appear discontinuous.
FIG. 7 is a diagram for explaining that the discontinuity of the hair can be eliminated by applying a filter in which the direction of the hair is added.
FIG. 8 is a diagram for explaining a method of realizing simple anti-aliasing by applying a fixed filter to the entire screen.
FIG. 9 is a block diagram illustrating a first embodiment of the image processing apparatus according to the present invention.
FIG. 10 is a flowchart illustrating a specific process of a vertex unit processing unit according to the first embodiment;
FIG. 11 is a flowchart illustrating a specific process of an image processing unit according to the first embodiment.
FIG. 12 is a diagram illustrating an example of a filter kernel a [i] related to fur drawing.
FIG. 13 is a diagram for explaining an example in which the amount of calculation is suppressed using a small filter kernel based on a filter processing parameter p.
FIG. 14 is a diagram illustrating an example of a filter kernel when performing anti-aliasing.
FIG. 15 is a diagram for describing an example in which a filter kernel is not a fixed value but a variable value that changes according to a filter processing parameter p.
FIG. 16 is a block diagram illustrating a second embodiment of the image processing apparatus according to the present invention.
[Explanation of symbols]
20, 20A image processing device, 21, 21A vertex unit processing unit, 22, 22A rasterizing unit, 23, 23A fragment unit processing unit, 24 memory unit, 25 image processing unit.

Claims (20)

頂点単位の演算を行う頂点単位処理部と、
上記頂点単位処理部の演算した情報をラスタライズしてフラグメント単位とするラスタライズ部と、
上記フラグメント単位となった情報に基づいた演算処理を行うフラグメント単位処理部と、
上記フラグメント単位処理部の演算処理した情報を保持するメモリ部と、
上記メモリ部の内容に対して画像処理を行う画像処理部と、
を有し、
上記画像処理部は、所定のフィルタ処理パラメータに応じて異なるフィルタ処理を行う
画像処理装置。
A vertex unit processing unit that performs an operation per vertex;
A rasterizing unit that rasterizes the information calculated by the vertex unit processing unit and sets it as a fragment unit;
A fragment unit processing unit for performing arithmetic processing based on the information in fragment units,
A memory unit for holding information processed by the fragment unit processing unit;
An image processing unit that performs image processing on the content of the memory unit;
Has,
An image processing apparatus, wherein the image processing unit performs different filter processing according to a predetermined filter processing parameter.
上記フィルタ処理パラメータは、エッジ近傍の度合いを示すパラメータである
請求項1記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the filter processing parameter is a parameter indicating a degree near an edge.
上記頂点単位処理部は、フィルタ処理パラメータを算出して上記画像処理部に供給する
請求項1記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the vertex unit processing unit calculates a filter processing parameter and supplies the calculated parameter to the image processing unit.
上記フラグメント単位処理部は、フィルタ処理パラメータを算出して上記画像処理部に供給する
請求項1記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the fragment unit processing unit calculates a filtering parameter and supplies the calculated parameter to the image processing unit.
上記フィルタ処理パラメータは、法線ベクトルおよび視線ベクトルに基づいて算出される
請求項1記載の画像処理装置。
The image processing device according to claim 1, wherein the filter processing parameter is calculated based on a normal vector and a visual line vector.
上記頂点単位処理部は、上記フィルタ処理パラメータを、法線ベクトルおよび視線ベクトルに基づいて算出する
請求項3記載の画像処理装置。
The image processing apparatus according to claim 3, wherein the vertex unit processing unit calculates the filter processing parameter based on a normal vector and a line-of-sight vector.
上記フラグメント単位処理部は、上記フィルタ処理パラメータを、法線ベクトルおよび視線ベクトルに基づいて算出する
請求項4記載の画像処理装置。
The image processing apparatus according to claim 4, wherein the fragment unit processing unit calculates the filter processing parameter based on a normal vector and a line-of-sight vector.
上記画像処理部は、アンチエイリアスの効果を生ずるフィルタ処理を行う
請求項1記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the image processing unit performs a filter process that produces an anti-aliasing effect.
上記画像処理部は、毛皮のシェル描画におけるフィルタ処理を行う
請求項1記載の画像処理装置。
The image processing device according to claim 1, wherein the image processing unit performs a filter process in drawing a fur shell.
頂点単位の演算を行い、かつ、頂点毎に与えられた法線ベクトルおよび視線ベクトルに基づいてフィルタ処理パラメータを計算する頂点単位処理部と、
上記頂点単位処理部の演算した情報をラスタライズしてフラグメント単位とし、上記フィルタ処理パラメータをラスタライズするラスタライズ部と、
上記フラグメント単位となった情報に基づいた演算処理を行うフラグメント単位処理部と、
上記ラスタライズされたフィルタ処理パラメータをピクセル毎に保持し、上記フラグメント単位処理部の演算処理した情報を保持するメモリ部と、
上記メモリ部にピクセル毎に保持されたフィルタ処理パラメータの値に基づいて適したフィルタカーネルを求め、求めたフィルタカーネルに基づいて上記メモリ部に保持されている情報に対してフィルタ処理を行う画像処理部と
を有する画像処理装置。
A vertex unit processing unit that performs an operation for each vertex, and calculates a filter processing parameter based on a normal vector and a line-of-sight vector given for each vertex;
A rasterizing unit that rasterizes the information calculated by the vertex unit processing unit into fragments and rasterizes the filter processing parameters;
A fragment unit processing unit for performing arithmetic processing based on the information in fragment units,
A memory unit that holds the rasterized filter processing parameters for each pixel, and holds information that has been subjected to arithmetic processing by the fragment unit processing unit;
Image processing for obtaining a suitable filter kernel based on a value of a filter processing parameter held for each pixel in the memory unit, and performing a filter process on information held in the memory unit based on the obtained filter kernel Image processing apparatus having a unit.
上記フィルタ処理パラメータは、エッジ近傍の度合いを示すパラメータである
請求項10記載の画像処理装置。
The image processing apparatus according to claim 10, wherein the filter processing parameter is a parameter indicating a degree near an edge.
上記頂点単位処理部は、法線ベクトルおよび視線ベクトルに基づいてフィルタ処理パラメータを計算する
請求項10記載の画像処理装置。
The image processing device according to claim 10, wherein the vertex unit processing unit calculates a filter processing parameter based on a normal vector and a visual line vector.
頂点情報をラスタライズしてフラグメント単位とし、頂点毎に与えられた法線ベクトルおよび視線ベクトルをラスタライズするラスタライズ部と、
上記ラスタライズされた法線ベクトルおよび視線ベクトルに基づいてフィルタ処理パラメータを計算し、上記フラグメント単位となった情報に基づいた演算処理を行うフラグメント単位処理部と、
上記フィルタ処理パラメータをピクセル毎に保持し、上記フラグメント単位処理部の演算処理した情報を保持するメモリ部と、
上記メモリ部にピクセル毎に保持されたフィルタ処理パラメータの値に基づいてフィルタカーネルを求め、求めたフィルタカーネルに基づいて上記メモリ部に保持されている情報に対してフィルタ処理を行う画像処理部と
を有する画像処理装置。
A rasterizing unit for rasterizing the vertex information into fragments and rasterizing a normal vector and a line-of-sight vector given for each vertex;
A fragment unit processing unit that calculates a filter processing parameter based on the rasterized normal vector and the line of sight vector, and performs an arithmetic process based on the information in the fragment unit.
A memory unit that holds the filter processing parameter for each pixel, and holds information processed by the fragment unit processing unit;
An image processing unit that obtains a filter kernel based on a value of a filter processing parameter held for each pixel in the memory unit, and performs a filtering process on information held in the memory unit based on the obtained filter kernel; An image processing apparatus having:
上記フィルタ処理パラメータは、エッジ近傍の度合いを示すパラメータである
請求項13記載の画像処理装置。
14. The image processing apparatus according to claim 13, wherein the filter processing parameter is a parameter indicating a degree near an edge.
上記ラスタライズ部は、法線ベクトルおよび視線ベクトルに基づいてフィルタ処理パラメータを計算する
請求項13記載の画像処理装置。
14. The image processing apparatus according to claim 13, wherein the rasterizing unit calculates a filter processing parameter based on a normal vector and a visual line vector.
オブジェクトの頂点単位情報をラスタライズしてフラグメント単位とする第1のステップと、
上記フラグメント単位となった情報に基づいた演算処理を行う第2のステップと、
エッジ近傍の度合いを示すフィルタ処理パラメータに応じて上記演算処理情報に対して異なるフィルタ処理を行う第3のステップと
を有する画像処理方法。
A first step of rasterizing the vertex unit information of the object into fragment units,
A second step of performing an arithmetic process based on the information in fragment units;
Performing a different filtering process on the calculation processing information in accordance with a filtering parameter indicating a degree of edge proximity.
上記フィルタ処理パラメータは、法線ベクトルおよび視線ベクトルに基づいている
請求項16記載の画像処理方法。
17. The image processing method according to claim 16, wherein the filtering parameter is based on a normal vector and a line-of-sight vector.
上記フィルタ処理パラメータの算出は、頂点単位処理時に行う
請求項16記載の画像処理方法。
17. The image processing method according to claim 16, wherein the calculation of the filter processing parameter is performed at a time of a vertex unit process.
上記フィルタ処理パラメータの算出は、フラグメント単位処理時に行う
請求項16記載の画像処理方法。
17. The image processing method according to claim 16, wherein the calculation of the filter processing parameter is performed at the time of fragment unit processing.
上記フィルタ処理は、アンチエイリアスの効果を生ずるフィルタ処理を含む
請求項16記載の画像処理方法。
17. The image processing method according to claim 16, wherein the filtering includes a filtering that produces an anti-aliasing effect.
JP2002211707A 2002-07-19 2002-07-19 Picture processor and its method Pending JP2004054635A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002211707A JP2004054635A (en) 2002-07-19 2002-07-19 Picture processor and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002211707A JP2004054635A (en) 2002-07-19 2002-07-19 Picture processor and its method

Publications (1)

Publication Number Publication Date
JP2004054635A true JP2004054635A (en) 2004-02-19

Family

ID=31934852

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002211707A Pending JP2004054635A (en) 2002-07-19 2002-07-19 Picture processor and its method

Country Status (1)

Country Link
JP (1) JP2004054635A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007226576A (en) * 2006-02-23 2007-09-06 Namco Bandai Games Inc Program, information storage medium and image generation system
JP2011516981A (en) * 2008-04-04 2011-05-26 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Filter processing method and apparatus for anti-aliasing
KR101239965B1 (en) 2006-11-08 2013-03-06 연세대학교 산학협력단 Rendering apparatus employed in 3D graphic accelerator and method thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007226576A (en) * 2006-02-23 2007-09-06 Namco Bandai Games Inc Program, information storage medium and image generation system
JP4734138B2 (en) * 2006-02-23 2011-07-27 株式会社バンダイナムコゲームス Program, information storage medium, and image generation system
KR101239965B1 (en) 2006-11-08 2013-03-06 연세대학교 산학협력단 Rendering apparatus employed in 3D graphic accelerator and method thereof
JP2011516981A (en) * 2008-04-04 2011-05-26 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Filter processing method and apparatus for anti-aliasing

Similar Documents

Publication Publication Date Title
US6975329B2 (en) Depth-of-field effects using texture lookup
JP5232358B2 (en) Rendering outline fonts
US8035641B1 (en) Fast depth of field simulation
JP4541786B2 (en) Method and apparatus for generating blur
JP2001052194A (en) Reconfiguration for curved surface
US9153068B2 (en) Clipless time and lens bounds for improved sample test efficiency in image rendering
KR20050030595A (en) Image processing apparatus and method
US20170011543A1 (en) Sparse Rasterization
Bertalmio et al. Real-time, accurate depth of field using anisotropic diffusion and programmable graphics cards
US7038678B2 (en) Dependent texture shadow antialiasing
JP5512218B2 (en) Graphics processing system
JP2002537615A (en) A graphics system having a supersampling sample buffer and generating output pixels using selective filtering adjustments to reduce artifacts.
US6184893B1 (en) Method and system for filtering texture map data for improved image quality in a graphics computer system
US20190172249A1 (en) Systems and Methods for Real-Time Large-Scale Point Cloud Surface Reconstruction
KR20180060198A (en) Graphic processing apparatus and method for processing texture in graphics pipeline
US7466322B1 (en) Clipping graphics primitives to the w=0 plane
US6940515B1 (en) User programmable primitive engine
US6900810B1 (en) User programmable geometry engine
JP2010055410A (en) Image processing device, image processing method, and image processing program
JP2006517705A (en) Computer graphics system and computer graphic image rendering method
US20230298212A1 (en) Locking mechanism for image classification
US11989807B2 (en) Rendering scalable raster content
WO2010134292A1 (en) Drawing device and drawing method
JP2004054635A (en) Picture processor and its method
US7385604B1 (en) Fragment scattering