Skip to content

simulate_motionSimulateMotionSimulateMotionsimulate_motionsimulate_motion🔗

説明🔗

simulate_motionSimulateMotionSimulateMotionsimulate_motionsimulate_motion — 線形的な移動によるぼけをシミュレーションする。

書式🔗

simulate_motion( image Image, out image MovedImage, real Blurring, integer Angle, integer Type )void SimulateMotion( const HObject& Image, HObject* MovedImage, const HTuple& Blurring, const HTuple& Angle, const HTuple& Type )static void HOperatorSet.SimulateMotion( HObject image, out HObject movedImage, HTuple blurring, HTuple angle, HTuple type )def simulate_motion( image: HObject, blurring: float, angle: int, type: int ) -> HObject

Herror simulate_motion( const Hobject Image, Hobject* MovedImage, double Blurring, const Hlong Angle, const Hlong Type )

Herror T_simulate_motion( const Hobject Image, Hobject* MovedImage, const Htuple Blurring, const Htuple Angle, const Htuple Type )

HImage HImage::SimulateMotion( double Blurring, Hlong Angle, Hlong Type ) const

HImage HImage.SimulateMotion( double blurring, int angle, int type )

説明🔗

simulate_motionSimulateMotion は露光の間にカメラとオブジェクト間で起こる相対的 な移動によって起こるぼけをシミュレーションします。ここでは、 一様な移動をシミュレーションします。Angleangleangle は移動方向と x 軸 間の角度(反時計回りで単位は度)を指定することによってその方向を指定 します。 シミュレーションは、ぼけを表すインパルス応答による画像の畳み込み によって行われます。その畳み込みは、フーリエ領域における乗算によっ て実現されます。simulate_motionSimulateMotion は、5つの異なる加速動作に対応したイ ンパルス応答を持ったプロトタイプを提供します。Typetypetype は、 以下に示す PSF プロトタイプの内の一つを指定します。

  1. 逆ランプ型 (加速を大まかに表したモデル)

  2. 逆台形型 (急激な加速を大まかに表したモデル)

  3. 方形波型 (一定速度を正確に表したモデル)、これがデフ ォルトです。

  4. 台形型 (減速を大まかに表したモデル)

  5. ランプ型 (急激な減速を大まかに表したモデル)

(デフォルト値は 3 です。)

シミュレーションされたぼけはその画像のすべての部分に一様に影響を及 ぼします。Blurringblurringblurring は、ぼけの程度を制御します。すなわち、 ぼけの影響を受けるピクセル数を指定します。この数は、移動速度と露光 時間によって決定されます。 Blurringblurringblurring を負の数に指定した場合 、逆方向移動に伴う焦点ぼけがシミュレーションされます。もし Angleangleangle を負 の数に指定した場合、それは時計回りの回転として解釈されます。もし Angleangleangle が 360 度を超えるか -360 度を下回るならば、それは [0..360] あるいは [-360..0] とな るように変換されます。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • tupleレベルで自動的に並列演算処理を実施

  • チャンネルレベルで自動的に並列演算処理を実施

パラメーター🔗

Imageimageimage (input_object) (multichannel-)image(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

ぼけを与える対象画像

MovedImagemovedImagemoved_image (output_object) image → object (real)HObject (real)HImage (real)HObject (real)Hobject * (real)

移動によりぼけた運動

Blurringblurringblurring (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

ぼけの程度

初期値: 20.020.0
推奨値: 5.0, 10.0, 20.0, 30.0, 40.05.0, 10.0, 20.0, 30.0, 40.0

Angleangleangle (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

移動方向と x 軸間の角度(反時計回り)

初期値: 00
推奨値: 0, 45, 90, 180, 2700, 45, 90, 180, 270

Typetypetype (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

移動によるぼけのインパルス応答の型

初期値: 33
値のリスト: 1, 2, 3, 4, 51, 2, 3, 4, 5

結果🔗

simulate_motionSimulateMotion は、すべてのパラメーターが正しい場合に 2 (H_MSG_TRUE) を返します。入力が空ならば、simulate_motionSimulateMotion はエラー メッセージを返します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

gen_psf_motionGenPsfMotion, gen_psf_motionGenPsfMotion

後処理の候補

simulate_defocusSimulateDefocus, wiener_filterWienerFilter, wiener_filter_niWienerFilterNi

関連項目

gen_psf_motionGenPsfMotion, simulate_defocusSimulateDefocus, gen_psf_defocusGenPsfDefocus

参考文献🔗

Anil K. Jain:Fundamentals of Digital Image Processing, Prentice-Hall International Inc., Englewood Cliffs, New Jersey, 1989

M. Lückenhaus:“Grundlagen des Wiener-Filters und seine Anwendung in der Bildanalyse”; Diplomarbeit; Technische Universität München, Institut für Informatik; Lehrstuhl Prof. Radig; 1995.

Kha-Chye Tan, Hock Lim, B. T. G. Tan:“Restoration of Real-World Motion-Blurred Images”;S. 291-299 in: CVGIP Graphical Models and Image Processing, Vol. 53, No. 3, May 1991

モジュール🔗

Foundation