Skip to content

rft_genericRftGenericRftGenericrft_genericrft_generic🔗

説明🔗

rft_genericRftGenericRftGenericrft_genericrft_generic — 画像の実数値フーリエ変換(RFT)を計算する。

書式🔗

rft_generic( image Image, out image ImageFFT, string Direction, string Norm, string ResultType, integer Width )void RftGeneric( const HObject& Image, HObject* ImageFFT, const HTuple& Direction, const HTuple& Norm, const HTuple& ResultType, const HTuple& Width )static void HOperatorSet.RftGeneric( HObject image, out HObject imageFFT, HTuple direction, HTuple norm, HTuple resultType, HTuple width )def rft_generic( image: HObject, direction: str, norm: str, result_type: str, width: int ) -> HObject

Herror rft_generic( const Hobject Image, Hobject* ImageFFT, const char* Direction, const char* Norm, const char* ResultType, const Hlong Width )

Herror T_rft_generic( const Hobject Image, Hobject* ImageFFT, const Htuple Direction, const Htuple Norm, const Htuple ResultType, const Htuple Width )

HImage HImage::RftGeneric( const HString& Direction, const HString& Norm, const HString& ResultType, Hlong Width ) const

HImage HImage::RftGeneric( const char* Direction, const char* Norm, const char* ResultType, Hlong Width ) const

HImage HImage::RftGeneric( const wchar_t* Direction, const wchar_t* Norm, const wchar_t* ResultType, Hlong Width ) const (Windows only)

HImage HImage.RftGeneric( string direction, string norm, string resultType, int width )

説明🔗

rft_genericRftGeneric は、入力画像 Imageimageimage の高速フーリエ変換 を実行します。fft_genericFftGeneric、fft_imageFftImage、および fft_image_invFftImageInv と異なる点は、変換される入力画像が、実数値画 像になることです(複素画像ではありません)。この場合、複素出力画像 は冗長なものとなります。画像の右半分は、対応する左半分の画像の複素 共役になっています。したがって、複素画像の左半分を計算し保存するだ けでよいため、実行時間とメモリを節約することができます。

パラメーター ResultTyperesultTyperesult_type は逆変換(Directiondirectiondirection \(=\) 'from_freq'"from_freq")の結果画像タイプを指定するために使用すること ができます。フーリエ変換(Directiondirectiondirection \(=\) 'to_freq'"to_freq")の場合、ResultTyperesultTyperesult_type は 'complex'"complex" に設定する必要があります。

パラメーター direction は変換を周波数領域で行うのか、あるいは空間 領域に戻すのかどちらにすべきかを決定します。 Directiondirectiondirection \(=\) 'to_freq'"to_freq" の場合は、入力画像は実数 値タイプでなければなりません。つまり、複素画像は入力として使用され ません。実数型の画像に変換できるすべての画像タイプがサポートされて います。この場合、出力は(w/2+1)h次元の 複素画像になります。ここで、\(w\) と \(h\) は入力画像の幅と高さです。 このモードでは、指数 -1 が変換に使用されます(fft_genericFftGeneric を参照)。Directiondirectiondirection \(=\) 'from_freq'"from_freq" の場合、入力画像は複素画像でなければなりません。この場合、出力画像 のサイズを決定するのための入力画像のサイズは不十分です。この設定 は Widthwidthwidth を有効な値、つまり 2w-2 もしくは 2*w-1 に変換することによって、実行されなければなりませ ん。ここでは、\(w\) は複素画像の幅になります。 このモードでは、指数 1 を変換に使用します。

正規化された要素は Normnormnorm を用いて設定され、値 'none'"none"、'sqrt'"sqrt"、および 'n'"n" を選択することが できます。 ユーザーは、パラメーターを一致させているかを確認しなければなりませ ん。これは、フーリエ変換やフーリエ逆変換に使用されている正規化要素 は、掛けた場合に w*h のサイズで代入されなければならない からです。

注意🔗

変換は常に全画像に対して行われます。つまり、画像のドメインは無視されます。

実行情報🔗

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

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

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

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

  • 内部データレベルで自動的に並列演算処理を実施

パラメーター🔗

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

入力画像

ImageFFTimageFFTimage_fft (output_object) image(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)Hobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex)

フーリエ変換された画像

Directiondirectiondirection (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

変換の方向の指定

初期値: 'to_freq'"to_freq"
値のリスト: 'from_freq', 'to_freq'"from_freq", "to_freq"

Normnormnorm (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

変換の正規化因子

初期値: 'sqrt'"sqrt"
値のリスト: 'n', 'none', 'sqrt'"n", "none", "sqrt"

ResultTyperesultTyperesult_type (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

出力画像の画像タイプ

初期値: 'complex'"complex"
値のリスト: 'byte', 'complex', 'cyclic', 'direction', 'int1', 'int2', 'int4', 'real', 'uint2'"byte", "complex", "cyclic", "direction", "int1", "int2", "int4", "real", "uint2"

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

実行時間を最適化したい画像の幅

初期値: 512512
推奨値: 128, 160, 192, 256, 320, 384, 512, 640, 768, 1024, 2048128, 160, 192, 256, 320, 384, 512, 640, 768, 1024, 2048

結果🔗

rft_genericRftGeneric は、すべてのパラメーターが正しい場合に 2 (H_MSG_TRUE) を 返します。入力が空の場合、 set_system(::'no_object_result',<Result>:) を通じて設定す ることができます。必要に応じて、例外が発生します。

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

組み合わせ

前処理の候補

optimize_rft_speedOptimizeRftSpeed, read_fft_optimization_dataReadFftOptimizationData

後処理の候補

convol_fftConvolFft, correlation_fftCorrelationFft, phase_correlation_fftPhaseCorrelationFft, convert_image_typeConvertImageType, power_bytePowerByte, power_realPowerReal, power_lnPowerLn, phase_degPhaseDeg, phase_radPhaseRad

他の選択候補

fft_genericFftGeneric, fft_imageFftImage, fft_image_invFftImageInv

モジュール🔗

Foundation