points_harrisT_points_harrisPointsHarrisPointsHarrispoints_harris(算子)

名称

points_harrisT_points_harrisPointsHarrisPointsHarrispoints_harris — 使用哈里斯(Harris)算子检测兴趣点。

签名

points_harris(Image : : SigmaGrad, SigmaSmooth, Alpha, Threshold : Row, Column)

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

void PointsHarris(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

static void HOperatorSet.PointsHarris(HObject image, HTuple sigmaGrad, HTuple sigmaSmooth, HTuple alpha, HTuple threshold, out HTuple row, out HTuple column)

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)

def points_harris(image: HObject, sigma_grad: float, sigma_smooth: float, alpha: float, threshold: Union[float, int]) -> Tuple[Sequence[float], Sequence[float]]

描述

points_harrispoints_harrisPointsHarrisPointsHarrisPointsHarrispoints_harris extracts points of interest from an image. The Harris operator is based upon the smoothed matrix where stands for a Gaussian smoothing of size SigmaSmoothSigmaSmoothSigmaSmoothSigmaSmoothsigmaSmoothsigma_smooth and and are the first derivatives of each image channel, computed with Gaussian derivatives of size SigmaGradSigmaGradSigmaGradSigmaGradsigmaGradsigma_grad. The resulting points are the positive local extrema of If necessary, they can be restricted to points with a minimum filter response of ThresholdThresholdThresholdThresholdthresholdthreshold. The coordinates of the points are calculated with subpixel accuracy.

注意

points_harrispoints_harrisPointsHarrisPointsHarrisPointsHarrispoints_harris uses a special implementation that is optimized using SSE2 instructions if the system parameter 'sse2_enable'"sse2_enable""sse2_enable""sse2_enable""sse2_enable""sse2_enable" is set to 'true'"true""true""true""true""true" (which is default if SSE2 is available on your machine). This implementation is slightly inaccurate compared to the pure C version due to numerical issues (for 'byte' images the difference in RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn is in order of magnitude of 1.0e-5). If you prefer accuracy over performance you can set 'sse2_enable'"sse2_enable""sse2_enable""sse2_enable""sse2_enable""sse2_enable" to 'false'"false""false""false""false""false" (using set_systemset_systemSetSystemSetSystemSetSystemset_system) before you call points_harrispoints_harrisPointsHarrisPointsHarrisPointsHarrispoints_harris. This way points_harrispoints_harrisPointsHarrisPointsHarrisPointsHarrispoints_harris does not use SSE2 accelerations. Don't forget to set 'sse2_enable'"sse2_enable""sse2_enable""sse2_enable""sse2_enable""sse2_enable" back to 'true'"true""true""true""true""true" afterwards.

points_harrispoints_harrisPointsHarrisPointsHarrisPointsHarrispoints_harris can be executed on an OpenCL device if both SigmaGradSigmaGradSigmaGradSigmaGradsigmaGradsigma_grad and SigmaSmoothSigmaSmoothSigmaSmoothSigmaSmoothsigmaSmoothsigma_smooth induce a filter size of no more than 129 pixels. This corresponds to a value of less than 20.7 for both parameters. As with the SSE2 version, the results of the OpenCL implementation may diverge slightly from that of pure C version due to numerical issues.

请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章

执行信息

参数

ImageImageImageImageimageimage (输入对象)  (multichannel-)image objectHImageHObjectHImageHobject (byte* / uint2* / real*) *允许用于计算设备

输入图像。

SigmaGradSigmaGradSigmaGradSigmaGradsigmaGradsigma_grad (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Amount of smoothing used for the calculation of the gradient.

默认值: 0.7

建议值: 0.7, 0.8, 0.9, 1.0, 1.2, 1.5, 2.0, 3.0

建议增量: 0.1

限制: SigmaGrad > 0.0

SigmaSmoothSigmaSmoothSigmaSmoothSigmaSmoothsigmaSmoothsigma_smooth (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Amount of smoothing used for the integration of the gradients.

默认值: 2.0

建议值: 0.7, 0.8, 0.9, 1.0, 1.2, 1.5, 2.0, 3.0

建议增量: 0.1

限制: SigmaSmooth > 0.0

AlphaAlphaAlphaAlphaalphaalpha (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Weight of the squared trace of the squared gradient matrix.

默认值: 0.08

建议值: 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08

值范围: 0.0 ≤ Alpha Alpha Alpha Alpha alpha alpha

最小增量: 0.001

建议增量: 0.01

ThresholdThresholdThresholdThresholdthresholdthreshold (输入控制)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Minimum filter response for the points.

默认值: 1000.0

限制: Threshold >= 0.0

RowRowRowRowrowrow (输出控制)  point.y-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinates of the detected points.

ColumnColumnColumnColumncolumncolumn (输出控制)  point.x-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinates of the detected points.

结果

points_harrispoints_harrisPointsHarrisPointsHarrisPointsHarrispoints_harris returns 2 (H_MSG_TRUE) if all parameters are correct and no error occurs during the execution.当输入为空时,可设置行为通过算子 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。

可能的后继

gen_cross_contour_xldgen_cross_contour_xldGenCrossContourXldGenCrossContourXldGenCrossContourXldgen_cross_contour_xld

替代

points_foerstnerpoints_foerstnerPointsFoerstnerPointsFoerstnerPointsFoerstnerpoints_foerstner, points_lepetitpoints_lepetitPointsLepetitPointsLepetitPointsLepetitpoints_lepetit, points_harris_binomialpoints_harris_binomialPointsHarrisBinomialPointsHarrisBinomialPointsHarrisBinomialpoints_harris_binomial

参考文献

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.

模块

基础