ClassesClassesClassesClasses | | | | Operators

points_sojkaT_points_sojkaPointsSojkapoints_sojkaPointsSojkaPointsSojka (Operator)

Name

points_sojkaT_points_sojkaPointsSojkapoints_sojkaPointsSojkaPointsSojka — Find corners using the Sojka operator.

Signature

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)

Herror points_sojka(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)

HTuple HImage::PointsSojka(const HTuple& MaskSize, const HTuple& SigmaW, const HTuple& SigmaD, const HTuple& MinGrad, const HTuple& MinApparentness, const HTuple& MinAngle, const HTuple& Subpix, HTuple* Column) const

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 HOperatorSetX.PointsSojka(
[in] IHUntypedObjectX* Image, [in] VARIANT MaskSize, [in] VARIANT SigmaW, [in] VARIANT SigmaD, [in] VARIANT MinGrad, [in] VARIANT MinApparentness, [in] VARIANT MinAngle, [in] VARIANT Subpix, [out] VARIANT* Row, [out] VARIANT* Column)

VARIANT HImageX.PointsSojka(
[in] Hlong MaskSize, [in] VARIANT SigmaW, [in] VARIANT SigmaD, [in] VARIANT MinGrad, [in] VARIANT MinApparentness, [in] double MinAngle, [in] BSTR Subpix, [out] VARIANT* Column)

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)

Description

points_sojkapoints_sojkaPointsSojkapoints_sojkaPointsSojkaPointsSojka 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 MaskSizeMaskSizeMaskSizeMaskSizeMaskSizemaskSize x MaskSizeMaskSizeMaskSizeMaskSizeMaskSizemaskSize 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 MinGradMinGradMinGradMinGradMinGradminGrad 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 MinApparentnessMinApparentnessMinApparentnessMinApparentnessMinApparentnessminApparentness. Typical values of MinApparentnessMinApparentnessMinApparentnessMinApparentnessMinApparentnessminApparentness should range in the region of a few multiples of MinGradMinGradMinGradMinGradMinGradminGrad.

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 SigmaWSigmaWSigmaWSigmaWSigmaWsigmaW according to its distance from the possible corner point. SigmaWSigmaWSigmaWSigmaWSigmaWsigmaW should be roughly a quarter to the half of MaskSizeMaskSizeMaskSizeMaskSizeMaskSizemaskSize 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 SigmaDSigmaDSigmaDSigmaDSigmaDsigmaD 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 SigmaDSigmaDSigmaDSigmaDSigmaDsigmaD .

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 MinAngleMinAngleMinAngleMinAngleMinAngleminAngle.

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".

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  singlechannelimage objectHImageHImageHImageHImageXHobject (byte / int1 / int2 / uint2 / int4 / real)

Input image.

MaskSizeMaskSizeMaskSizeMaskSizeMaskSizemaskSize (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Required filter size.

Default value: 9

List of values: 5, 7, 9, 11, 13

SigmaWSigmaWSigmaWSigmaWSigmaWsigmaW (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

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

Default value: 2.5

Suggested values: 2.0, 2.2, 2.4, 2.5, 2.6, 2.8, 3.0

SigmaDSigmaDSigmaDSigmaDSigmaDsigmaD (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

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

Default value: 0.75

Suggested values: 0.6, 0.7, 0.75, 0.8, 0.9, 1.0

Restriction: 0.6 <= SigmaD && SigmaD <= 1.0

MinGradMinGradMinGradMinGradMinGradminGrad (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Threshold for the magnitude of the gradient.

Default value: 30.0

Suggested values: 20.0, 15.0, 30.0, 35.0, 40.0

MinApparentnessMinApparentnessMinApparentnessMinApparentnessMinApparentnessminApparentness (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Threshold for Apparentness.

Default value: 90.0

Suggested values: 30.0, 60.0, 90.0, 150.0, 300.0, 600.0, 1500.0

MinAngleMinAngleMinAngleMinAngleMinAngleminAngle (input_control)  angle.rad HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

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

Default value: 0.5

Restriction: 0.0 <= MinAngle && MinAngle <= pi

SubpixSubpixSubpixSubpixSubpixsubpix (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Subpixel precise calculation of the corner points.

Default value: 'false' "false" "false" "false" "false" "false"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

RowRowRowRowRowrow (output_control)  point.y-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Row coordinates of the detected corner points.

ColumnColumnColumnColumnColumncolumn (output_control)  point.x-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Column coordinates of the detected corner points.

Result

points_sojkapoints_sojkaPointsSojkapoints_sojkaPointsSojkaPointsSojka returns 2 (H_MSG_TRUE) if all parameters are correct and no error occurs during the execution. If the input is empty the behavior can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

References

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.

Module

Foundation


ClassesClassesClassesClasses | | | | Operators