Skip to content

points_harrisPointsHarrisPointsHarrispoints_harrisT_points_harris🔗

説明🔗

points_harrisPointsHarrisPointsHarrispoints_harrisT_points_harris — Harris オペレーターを用いた特徴点を検出する。

書式🔗

points_harris( image Image, real SigmaGrad, real SigmaSmooth, real Alpha, number Threshold, out point.y Row, out point.x Column )void PointsHarris( const HObject& Image, const HTuple& SigmaGrad, const HTuple& SigmaSmooth, const HTuple& Alpha, const HTuple& Threshold, HTuple* Row, HTuple* Column )static void HOperatorSet.PointsHarris( HObject image, HTuple sigmaGrad, HTuple sigmaSmooth, HTuple alpha, HTuple threshold, out HTuple row, out HTuple column )def points_harris( image: HObject, sigma_grad: float, sigma_smooth: float, alpha: float, threshold: Union[float, int] ) -> Tuple[Sequence[float], Sequence[float]]

Herror T_points_harris( const Hobject Image, const Htuple SigmaGrad, const Htuple SigmaSmooth, const Htuple Alpha, const Htuple Threshold, Htuple* Row, Htuple* Column )

void HImage::PointsHarris( double SigmaGrad, double SigmaSmooth, double Alpha, const HTuple& Threshold, HTuple* Row, HTuple* Column ) const

void HImage::PointsHarris( double SigmaGrad, double SigmaSmooth, double Alpha, double Threshold, HTuple* Row, HTuple* Column ) const

void HImage.PointsHarris( double sigmaGrad, double sigmaSmooth, double alpha, HTuple threshold, out HTuple row, out HTuple column )

void HImage.PointsHarris( double sigmaGrad, double sigmaSmooth, double alpha, double threshold, out HTuple row, out HTuple column )

説明🔗

points_harrisPointsHarris は画像から特徴点を抽出します。Harris オペレーターは平滑化行列を元にしています。

\[\begin{eqnarray*} M = G_{\sigma} * \left( \begin{array}{cc} \displaystyle \sum_{c=1}^n I_{x,c}^{2} & \displaystyle \sum_{c=1}^n I_{x,c}I_{y,c} \\ \displaystyle \sum_{c=1}^n I_{x,c}I_{y,c} & \displaystyle \sum_{c=1}^n I_{y,c}^{2} \end{array} \right) \enspace , \end{eqnarray*}\]

ここで、\(G_{\sigma}\) は、サイズ SigmaSmoothsigmaSmoothsigma_smooth の ガウス平滑化を表し、\(I_{x,c}\) と \(I_{y,c}\) は、 サイズ SigmaGradsigmaGradsigma_grad のガウス微分で計算した各画像のチャンネルの 一次微分です。結果点は以下の式の正の極値です。

\[\begin{eqnarray*} \mathrm{Det}M - \textrm{Alpha}*(\mathrm{Trace}M)^{2} \end{eqnarray*}\]

必要に応じて、Thresholdthresholdthreshold の最小フィルター応答を持つ点を制 限することができます。点の座標はサブピクセル精度で計算されます。

注意🔗

システムパラメーター 'sse2_enable'"sse2_enable"が'true'"true" に設定されている 場合(SSE2が使用するマシン上で利用可能なときはデフォルト)、SSE2命令に最適化された 特別な実装を使用します。 この実装は、 数値問題のために、純粋なCで計算した場合と比べて、ごくわずかに精確でない 場合があります。 (Byte画像に対して、\(1.0e-5\) の大きさで Rowrowrow および Columncolumncolumn に 違いが起こる) もしパフォーマンスよりも精度を重視するのであれば、points_harrisPointsHarris を呼び出す前に 'sse2_enable'"sse2_enable" を 'false'"false" にしてください(set_systemSetSystemを使用)。 このようにすると、points_harrisPointsHarris は SSE2加速を使用しません。 後で、忘れずに 'sse2_enable'"sse2_enable" を 'true'"true" に戻してください。 SigmaGradsigmaGradsigma_grad および SigmaSmoothsigmaSmoothsigma_smooth が129ピクセル未満のフィルターサイズを 引き起こす場合は、points_harrisPointsHarris は OpenCL デバイス上で実行可能です。 これは、どちらのパラメーターにも、\(20.7\) 以下の値を設定することに相当します。 SSE2バージョンであれば、OpenCL実装での結果は、数値問題のために、純粋なCのバージョンと 比べてわずかに異なるかもしれません。

入力画像としてドメインを絞り込んだ画像を用いた場合、期待しない結果と なる場合があります。章Filters を確認ください。

実行情報🔗

実行情報
  • OpenCL演算デバイスによる演算をサポート

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

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

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

パラメーター🔗

Imageimageimage (input_object) (multichannel-)image → object (byte* / uint2* / real*)HObject (byte* / uint2* / real*)HImage (byte* / uint2* / real*)HObject (byte* / uint2* / real*)Hobject (byte* / uint2* / real*) *計算デバイスに対して有効

入力画像

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

勾配の計算のために使用される平滑化の大きさ

初期値: 0.70.7
推奨値: 0.7, 0.8, 0.9, 1.0, 1.2, 1.5, 2.0, 3.00.7, 0.8, 0.9, 1.0, 1.2, 1.5, 2.0, 3.0
推奨増分: 0.1
制限: SigmaGrad > 0.0

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

勾配の積分のために使用する平滑化の大きさ

初期値: 2.02.0
推奨値: 0.7, 0.8, 0.9, 1.0, 1.2, 1.5, 2.0, 3.00.7, 0.8, 0.9, 1.0, 1.2, 1.5, 2.0, 3.0
推奨増分: 0.1
制限: SigmaSmooth > 0.0

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

勾配行列のトレース(対角行列の和)の 2 乗に 対する重み

初期値: 0.080.08
推奨値: 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.080.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08
値域: 0.0 ≤ Alpha
最小増分: 0.001
推奨増分: 0.01

Thresholdthresholdthreshold (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

点の最小フィルター応答

初期値: 1000.01000.0
制限: Threshold >= 0.0

Rowrowrow (output_control) point.y-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

検出点の行座標

Columncolumncolumn (output_control) point.x-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

検出点の列座標

結果🔗

すべてのパラメーターが正しく、実行中にエラーがなかった場合、 points_harrisPointsHarris は、2 (H_MSG_TRUE) を返します。入力が空の場合、 set_system('no_object_result',<Result>) を通じて 設定することができます。必要に応じて、例外が発生します。

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

組み合わせ

後処理の候補

gen_cross_contour_xldGenCrossContourXld

他の選択候補

points_foerstnerPointsFoerstner, points_lepetitPointsLepetit, points_harris_binomialPointsHarrisBinomial

参考文献🔗

C. Harris, M. Stephens: ``A combined corner and edge detector’‘. Proceedings of the 4th Alvey Vision Conference, pp. 147-151, 1988.

V. Gouet, N.Boujemaa: ``Object-based queries using color points of interest’‘. IEEE Workshop on Content-Based Access of Image and Video Libraries, CVPR/CBAIVL 2001, Hawaii, USA, 2001.

モジュール🔗

Foundation