points_sojkaT_points_sojkaPointsSojkaPointsSojkapoints_sojka(算子)

名称

points_sojkaT_points_sojkaPointsSojkaPointsSojkapoints_sojka — 使用索卡(Sojka)算子符查找角点。

签名

points_sojka(Image : : MaskSize, SigmaW, SigmaD, MinGrad, MinApparentness, MinAngle, Subpix : Row, Column)

Herror T_points_sojka(const Hobject Image, const Htuple MaskSize, const Htuple SigmaW, const Htuple SigmaD, const Htuple MinGrad, const Htuple MinApparentness, const Htuple MinAngle, const Htuple Subpix, Htuple* Row, Htuple* Column)

void PointsSojka(const HObject& Image, const HTuple& MaskSize, const HTuple& SigmaW, const HTuple& SigmaD, const HTuple& MinGrad, const HTuple& MinApparentness, const HTuple& MinAngle, const HTuple& Subpix, HTuple* Row, HTuple* Column)

void HImage::PointsSojka(Hlong MaskSize, const HTuple& SigmaW, const HTuple& SigmaD, const HTuple& MinGrad, const HTuple& MinApparentness, double MinAngle, const HString& Subpix, HTuple* Row, HTuple* Column) const

void HImage::PointsSojka(Hlong MaskSize, double SigmaW, double SigmaD, double MinGrad, double MinApparentness, double MinAngle, const HString& Subpix, HTuple* Row, HTuple* Column) const

void HImage::PointsSojka(Hlong MaskSize, double SigmaW, double SigmaD, double MinGrad, double MinApparentness, double MinAngle, const char* Subpix, HTuple* Row, HTuple* Column) const

void HImage::PointsSojka(Hlong MaskSize, double SigmaW, double SigmaD, double MinGrad, double MinApparentness, double MinAngle, const wchar_t* Subpix, HTuple* Row, HTuple* Column) const   ( Windows only)

static void HOperatorSet.PointsSojka(HObject image, HTuple maskSize, HTuple sigmaW, HTuple sigmaD, HTuple minGrad, HTuple minApparentness, HTuple minAngle, HTuple subpix, out HTuple row, out HTuple column)

void HImage.PointsSojka(int maskSize, HTuple sigmaW, HTuple sigmaD, HTuple minGrad, HTuple minApparentness, double minAngle, string subpix, out HTuple row, out HTuple column)

void HImage.PointsSojka(int maskSize, double sigmaW, double sigmaD, double minGrad, double minApparentness, double minAngle, string subpix, out HTuple row, out HTuple column)

def points_sojka(image: HObject, mask_size: int, sigma_w: Union[float, int], sigma_d: Union[float, int], min_grad: Union[int, float], min_apparentness: Union[int, float], min_angle: float, subpix: str) -> Tuple[Sequence[float], Sequence[float]]

描述

points_sojkapoints_sojkaPointsSojkaPointsSojkaPointsSojkapoints_sojka defines a corner as the point of intersection of two straight, non-collinear gray value edges. To decide whether a point of the input image ImageImageImageImageimageimage is a corner or not, a neighborhood of MaskSizeMaskSizeMaskSizeMaskSizemaskSizemask_size x MaskSizeMaskSizeMaskSizeMaskSizemaskSizemask_size points is inspected. Only those image regions that are relevant for the decision are considered. Pixels with a magnitude of the gradient of less than MinGradMinGradMinGradMinGradminGradmin_grad are ignored from the outset.

Furthermore, only those of the remaining points are used that belong to one of the two gray value edges that form the corner. For this, the so called Apparentness is calculated, which is an indicator of the probability that the examined point actually is a corner point. Essentially, it is determined by the number of relevant points and their gradients. A point can only be accepted as a corner when its Apparentness is at least MinApparentnessMinApparentnessMinApparentnessMinApparentnessminApparentnessmin_apparentness. Typical values of MinApparentnessMinApparentnessMinApparentnessMinApparentnessminApparentnessmin_apparentness should range in the region of a few multiples of MinGradMinGradMinGradMinGradminGradmin_grad

To calculate the Apparentness, each mask point is weighted according to two criteria: First, the influence of a mask point is weighted with a Gaussian of size SigmaWSigmaWSigmaWSigmaWsigmaWsigma_w according to its distance from the possible corner point. SigmaWSigmaWSigmaWSigmaWsigmaWsigma_w should be roughly between quarter and half of MaskSizeMaskSizeMaskSizeMaskSizemaskSizemask_size to obtain a reasonable proportion of the size of the weighting function to the mask size. Secondly, the distance of the point from the (assumed) ideal gray value edge is estimated and the point is weighted with a Gaussian of size SigmaDSigmaDSigmaDSigmaDsigmaDsigma_d according to that distance. I.e., pixels that (due to the discretization of the input image) lie farther from the ideal gray value edge have less influence on the result than pixels with a smaller distance. Typically, it is not necessary to modify the default value 0.75 of SigmaDSigmaDSigmaDSigmaDsigmaDsigma_d

As a further criterion, the angle is calculated, by which the gray value edges change their direction in the corner point. A point can only be accepted as a corner when this angle is greater than MinAngleMinAngleMinAngleMinAngleminAnglemin_angle

The position of the detected corner points is returned in (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn). RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn are calculated with subpixel accuracy if SubpixSubpixSubpixSubpixsubpixsubpix is 'true'"true""true""true""true""true". They are calculated only with pixel accuracy if SubpixSubpixSubpixSubpixsubpixsubpix is 'false'"false""false""false""false""false".

注意

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

执行信息

参数

ImageImageImageImageimageimage (输入对象)  singlechannelimage objectHImageHObjectHImageHobject (byte / int1 / int2 / uint2 / int4 / real)

输入图像。

MaskSizeMaskSizeMaskSizeMaskSizemaskSizemask_size (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

所需滤波器尺寸。

默认值: 9

值列表: 5, 7, 9, 11, 13

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

Sigma of the weight function according to the distance to the corner candidate.

默认值: 2.5

建议值: 2.0, 2.2, 2.4, 2.5, 2.6, 2.8, 3.0

限制: 2.0 <= SigmaW && SigmaW <= 3.0

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

Sigma of the weight function for the distance to the ideal gray value edge.

默认值: 0.75

建议值: 0.6, 0.7, 0.75, 0.8, 0.9, 1.0

限制: 0.6 <= SigmaD && SigmaD <= 1.0

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

Threshold for the magnitude of the gradient.

默认值: 30.0

建议值: 20.0, 15.0, 30.0, 35.0, 40.0

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

Threshold for Apparentness.

默认值: 90.0

建议值: 30.0, 60.0, 90.0, 150.0, 300.0, 600.0, 1500.0

MinAngleMinAngleMinAngleMinAngleminAnglemin_angle (输入控制)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Threshold for the direction change in a corner point (radians).

默认值: 0.5

限制: 0.0 <= MinAngle && MinAngle <= pi

SubpixSubpixSubpixSubpixsubpixsubpix (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Subpixel precise calculation of the corner points.

默认值: 'false' "false" "false" "false" "false" "false"

值列表: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

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

Row coordinates of the detected corner points.

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

Column coordinates of the detected corner points.

结果

points_sojkapoints_sojkaPointsSojkaPointsSojkaPointsSojkapoints_sojka 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>)。如有必要,则抛出异常。

参考文献

Eduard Sojka: “A New and Efficient Algorithm for Detecting the Corners in Digital Images”. Pattern Recognition, Luc Van Gool (Editor), LNCS 2449, pp. 125-132, Springer Verlag, 2002.

模块

基础