Skip to content

points_foerstnerPointsFoerstnerPointsFoerstnerpoints_foerstnerT_points_foerstner🔗

Short description🔗

points_foerstnerPointsFoerstnerPointsFoerstnerpoints_foerstnerT_points_foerstner — Detect points of interest using the Förstner operator.

Signature🔗

points_foerstner( image Image, number SigmaGrad, number SigmaInt, number SigmaPoints, number ThreshInhom, real ThreshShape, string Smoothing, string EliminateDoublets, out point.y RowJunctions, out point.x ColumnJunctions, out number CoRRJunctions, out number CoRCJunctions, out number CoCCJunctions, out point.y RowArea, out point.x ColumnArea, out number CoRRArea, out number CoRCArea, out number CoCCArea )void PointsFoerstner( const HObject& Image, const HTuple& SigmaGrad, const HTuple& SigmaInt, const HTuple& SigmaPoints, const HTuple& ThreshInhom, const HTuple& ThreshShape, const HTuple& Smoothing, const HTuple& EliminateDoublets, HTuple* RowJunctions, HTuple* ColumnJunctions, HTuple* CoRRJunctions, HTuple* CoRCJunctions, HTuple* CoCCJunctions, HTuple* RowArea, HTuple* ColumnArea, HTuple* CoRRArea, HTuple* CoRCArea, HTuple* CoCCArea )static void HOperatorSet.PointsFoerstner( HObject image, HTuple sigmaGrad, HTuple sigmaInt, HTuple sigmaPoints, HTuple threshInhom, HTuple threshShape, HTuple smoothing, HTuple eliminateDoublets, out HTuple rowJunctions, out HTuple columnJunctions, out HTuple coRRJunctions, out HTuple coRCJunctions, out HTuple coCCJunctions, out HTuple rowArea, out HTuple columnArea, out HTuple coRRArea, out HTuple coRCArea, out HTuple coCCArea )def points_foerstner( image: HObject, sigma_grad: Union[float, int], sigma_int: Union[float, int], sigma_points: Union[float, int], thresh_inhom: Union[float, int], thresh_shape: float, smoothing: str, eliminate_doublets: str ) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

Herror T_points_foerstner( const Hobject Image, const Htuple SigmaGrad, const Htuple SigmaInt, const Htuple SigmaPoints, const Htuple ThreshInhom, const Htuple ThreshShape, const Htuple Smoothing, const Htuple EliminateDoublets, Htuple* RowJunctions, Htuple* ColumnJunctions, Htuple* CoRRJunctions, Htuple* CoRCJunctions, Htuple* CoCCJunctions, Htuple* RowArea, Htuple* ColumnArea, Htuple* CoRRArea, Htuple* CoRCArea, Htuple* CoCCArea )

void HImage::PointsFoerstner( const HTuple& SigmaGrad, const HTuple& SigmaInt, const HTuple& SigmaPoints, const HTuple& ThreshInhom, double ThreshShape, const HString& Smoothing, const HString& EliminateDoublets, HTuple* RowJunctions, HTuple* ColumnJunctions, HTuple* CoRRJunctions, HTuple* CoRCJunctions, HTuple* CoCCJunctions, HTuple* RowArea, HTuple* ColumnArea, HTuple* CoRRArea, HTuple* CoRCArea, HTuple* CoCCArea ) const

void HImage::PointsFoerstner( double SigmaGrad, double SigmaInt, double SigmaPoints, double ThreshInhom, double ThreshShape, const HString& Smoothing, const HString& EliminateDoublets, HTuple* RowJunctions, HTuple* ColumnJunctions, HTuple* CoRRJunctions, HTuple* CoRCJunctions, HTuple* CoCCJunctions, HTuple* RowArea, HTuple* ColumnArea, HTuple* CoRRArea, HTuple* CoRCArea, HTuple* CoCCArea ) const

void HImage::PointsFoerstner( double SigmaGrad, double SigmaInt, double SigmaPoints, double ThreshInhom, double ThreshShape, const char* Smoothing, const char* EliminateDoublets, HTuple* RowJunctions, HTuple* ColumnJunctions, HTuple* CoRRJunctions, HTuple* CoRCJunctions, HTuple* CoCCJunctions, HTuple* RowArea, HTuple* ColumnArea, HTuple* CoRRArea, HTuple* CoRCArea, HTuple* CoCCArea ) const

void HImage::PointsFoerstner( double SigmaGrad, double SigmaInt, double SigmaPoints, double ThreshInhom, double ThreshShape, const wchar_t* Smoothing, const wchar_t* EliminateDoublets, HTuple* RowJunctions, HTuple* ColumnJunctions, HTuple* CoRRJunctions, HTuple* CoRCJunctions, HTuple* CoCCJunctions, HTuple* RowArea, HTuple* ColumnArea, HTuple* CoRRArea, HTuple* CoRCArea, HTuple* CoCCArea ) const (Windows only)

void HImage.PointsFoerstner( HTuple sigmaGrad, HTuple sigmaInt, HTuple sigmaPoints, HTuple threshInhom, double threshShape, string smoothing, string eliminateDoublets, out HTuple rowJunctions, out HTuple columnJunctions, out HTuple coRRJunctions, out HTuple coRCJunctions, out HTuple coCCJunctions, out HTuple rowArea, out HTuple columnArea, out HTuple coRRArea, out HTuple coRCArea, out HTuple coCCArea )

void HImage.PointsFoerstner( double sigmaGrad, double sigmaInt, double sigmaPoints, double threshInhom, double threshShape, string smoothing, string eliminateDoublets, out HTuple rowJunctions, out HTuple columnJunctions, out HTuple coRRJunctions, out HTuple coRCJunctions, out HTuple coCCJunctions, out HTuple rowArea, out HTuple columnArea, out HTuple coRRArea, out HTuple coRCArea, out HTuple coCCArea )

Description🔗

points_foerstnerPointsFoerstner extracts significant points from an image. Significant points are points that differ from their neighborhood, i.e., points where the image function changes in two dimensions. These changes occur on the one hand at the intersection of image edges (called junction points), and on the other hand at places where color or brightness differs from the surrounding neighborhood (called area points).

The point extraction takes place in two steps: In the first step the point regions, i.e., the inhomogeneous, isotropic regions, are extracted from the image. To do so, the smoothed matrix

\[\begin{eqnarray*} M = S * \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*}\]

is calculated, where \(I_{x,c}\) and \(I_{y,c}\) are the first derivatives of each image channel and S stands for a smoothing. If Smoothingsmoothingsmoothing is 'gauss'"gauss", the derivatives are computed with Gaussian derivatives of size SigmaGradsigmaGradsigma_grad and the smoothing is performed by a Gaussian of size SigmaIntsigmaIntsigma_int. If Smoothingsmoothingsmoothing is 'mean'"mean", the derivatives are computed with a 3 x 3 Sobel filter (and hence SigmaGradsigmaGradsigma_grad is ignored) and the smoothing is performed by a SigmaInt x SigmaInt mean filter. Then inhomogeneity = Trace(M) is the degree of inhomogeneity in the image and

\[\begin{eqnarray*} \textit{isotropy} = 4\cdot\frac{\mathrm{Det}M}{(\mathrm{Trace}M)^{2}} \end{eqnarray*}\]

is the degree of the isotropy of the texture in the image. Image points that have an inhomogeneity greater or equal to ThreshInhomthreshInhomthresh_inhom and at the same time an isotropy greater or equal to ThreshShapethreshShapethresh_shape are subsequently examined further.

In the second step, two optimization functions are calculated for the resulting points. Essentially, these optimization functions average for each point the distances to the edge directions (for junction points) and the gradient directions (for area points) within an observation window around the point. If Smoothingsmoothingsmoothing is 'gauss'"gauss", the averaging is performed by a Gaussian of size SigmaPointssigmaPointssigma_points, if Smoothingsmoothingsmoothing is 'mean'"mean", the averaging is performed by a SigmaPoints x SigmaPoints mean filter. The local minima of the optimization functions determine the extracted points. Their subpixel precise position is returned in (RowJunctionsrowJunctionsrow_junctions, ColumnJunctionscolumnJunctionscolumn_junctions) and (RowArearowArearow_area, ColumnAreacolumnAreacolumn_area).

In addition to their position, for each extracted point the elements CoRRJunctionscoRRJunctionsco_rrjunctions, CoRCJunctionscoRCJunctionsco_rcjunctions, and CoCCJunctionscoCCJunctionsco_ccjunctions (and CoRRAreacoRRAreaco_rrarea, CoRCAreacoRCAreaco_rcarea, and CoCCAreacoCCAreaco_ccarea, respectively) of the corresponding covariance matrix are returned. This matrix facilitates conclusions about the precision of the calculated point position. To obtain the actual values, it is necessary to estimate the amount of noise in the input image and to multiply all components of the covariance matrix with the variance of the noise. (To estimate the amount of noise, apply intensityIntensity to homogeneous image regions or plane_deviationPlaneDeviation to image regions, where the gray values form a plane. In both cases the amount of noise is returned in the parameter Deviation.) This is illustrated by the example program points_foerstner_ellipses.hdev.

It lies in the nature of this operator that corners often result in two distinct points: One junction point, where the edges of the corner actually meet, and one area point inside the corner. Such doublets will be eliminated automatically, if EliminateDoubletseliminateDoubletseliminate_doublets is 'true'"true". To do so, each pair of one junction point and one area point is examined. If the points lie within each others’ observation window of the optimization function, for both points the precision of the point position is calculated and the point with the lower precision is rejected. If EliminateDoubletseliminateDoubletseliminate_doublets is 'false'"false", every detected point is returned.

Attention🔗

Note that only odd values for SigmaIntsigmaIntsigma_int and SigmaPointssigmaPointssigma_points are allowed, if Smoothingsmoothingsmoothing is 'mean'"mean". Even values automatically will be replaced by the next larger odd value.

points_foerstnerPointsFoerstner with Smoothingsmoothingsmoothing = 'gauss'"gauss" uses a special implementation that is optimized using SSE2 instructions if the system parameter 'sse2_enable'"sse2_enable" is set to '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 RowJunctionsrowJunctionsrow_junctions and ColumnJunctionscolumnJunctionscolumn_junctions is in order of magnitude of \(1.0e-5\)). If you prefer accuracy over performance you can set 'sse2_enable'"sse2_enable" to 'false'"false" (using set_systemSetSystem) before you call points_foerstnerPointsFoerstner. This way points_foerstnerPointsFoerstner does not use SSE2 accelerations. Don’t forget to set 'sse2_enable'"sse2_enable" back to 'true'"true" afterwards.

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on internal data level.

Parameters🔗

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)

Input image.

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

Amount of smoothing used for the calculation of the gradient. If Smoothingsmoothingsmoothing is ‘mean’, SigmaGradsigmaGradsigma_grad is ignored.

Default: 1.01.0
Suggested values: 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
Value range: 0.0 ≤ SigmaGrad
Recommended increment: 0.1

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

Amount of smoothing used for the integration of the gradients.

Default: 2.02.0
Suggested values: 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
Recommended increment: 0.1
Restriction: SigmaInt > 0

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

Amount of smoothing used in the optimization functions.

Default: 3.03.0
Suggested values: 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
Recommended increment: 0.1
Restriction: SigmaPoints >= SigmaInt && SigmaPoints > 0.6

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

Threshold for the segmentation of inhomogeneous image areas.

Default: 200200
Suggested values: 50, 100, 200, 500, 100050, 100, 200, 500, 1000
Value range: 0.0 ≤ ThreshInhom

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

Threshold for the segmentation of point areas.

Default: 0.30.3
Suggested values: 0.1, 0.2, 0.3, 0.4, 0.5, 0.70.1, 0.2, 0.3, 0.4, 0.5, 0.7
Value range: 0.01 ≤ ThreshShape ≤ 1
Minimum increment: 0.01
Recommended increment: 0.1

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

Used smoothing method.

Default: 'gauss'"gauss"
List of values: 'gauss', 'mean'"gauss", "mean"

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

Elimination of multiply detected points.

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

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

Row coordinates of the detected junction points.

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

Column coordinates of the detected junction points.

CoRRJunctionscoRRJunctionsco_rrjunctions (output_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row part of the covariance matrix of the detected junction points.

CoRCJunctionscoRCJunctionsco_rcjunctions (output_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Mixed part of the covariance matrix of the detected junction points.

CoCCJunctionscoCCJunctionsco_ccjunctions (output_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Column part of the covariance matrix of the detected junction points.

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

Row coordinates of the detected area points.

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

Column coordinates of the detected area points.

CoRRAreacoRRAreaco_rrarea (output_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row part of the covariance matrix of the detected area points.

CoRCAreacoRCAreaco_rcarea (output_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Mixed part of the covariance matrix of the detected area points.

CoCCAreacoCCAreaco_ccarea (output_control) number-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Column part of the covariance matrix of the detected area points.

Result🔗

points_foerstnerPointsFoerstner 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>). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible successors

gen_cross_contour_xldGenCrossContourXld, disp_crossDispCross

Alternatives

points_harrisPointsHarris, points_lepetitPointsLepetit, points_harris_binomialPointsHarrisBinomial

References🔗

W. Förstner, E. Gülch: ``A Fast Operator for Detection and Precise Location of Distinct Points, Corners and Circular features’‘. In Proceedings of the Intercommission Conference on Fast Processing of Photogrametric Data, Interlaken, pp. 281-305, 1987.

W. Förstner: ``Statistische Verfahren für die automatische Bildanalyse und ihre Bewertung bei der Objekterkennung und -vermessung’‘. Volume 370, Series C, Deutsche Geodätische Kommission, München, 1991.

W. Förstner: ``A Framework for Low Level Feature Extraction’‘. European Conference on Computer Vision, LNCS 802, pp. 383-394, Springer Verlag, 1994.

C. Fuchs: ``Extraktion polymorpher Bildstrukturen und ihre topologische und geometrische Gruppierung’‘. Volume 502, Series C, Deutsche Geodätische Kommission, München, 1998.

Module🔗

Foundation