NonLinearTransformationFromCalibrationPattern Method (ImagePlane, CalibrationPatternStyle, CalibrationPatternContrast, Int32, Int32, Double, Int32, NonLinearTransformationCreationProgress, Double)

CVB.Net Documentation
Create a new transformation object by automatically extracting the pixel lists required for creating a NonLinearTransformation object.

Namespace:  Stemmer.Cvb.Foundation
Assembly:  Stemmer.Cvb.Foundation (in Stemmer.Cvb.Foundation.dll) Version: 14.0.0.0
Syntax

public static NonLinearTransformation FromCalibrationPattern(
	ImagePlane plane,
	CalibrationPatternStyle style,
	CalibrationPatternContrast contrast,
	int gridSpacing,
	int minContrast,
	double maxRatio,
	int order,
	NonLinearTransformationCreationProgress progressDelegate,
	out double quality
)

Parameters

plane
Type: Stemmer.CvbImagePlane
Image plane to work on.
style
Type: Stemmer.Cvb.FoundationCalibrationPatternStyle
Calibration pattern style visible in the image. (see CalibrationPatternStyle)
contrast
Type: Stemmer.Cvb.FoundationCalibrationPatternContrast
Selects whether the image shows BlackOnWhite or WhiteOnBlack dots.
gridSpacing
Type: SystemInt32

Spacing of the calibration dot grid in the target image.

Defines the distance of the points that will end up in the transformed pixels.

minContrast
Type: SystemInt32

Minimum gray value contrast between the object and the background of the calibration target pattern.

Value to be set depends on the quality of the image taken from the pattern, but in a typical situation this contrast should not drop below 64 gray values, otherwise it might become difficult to extract the calibration points.

maxRatio
Type: SystemDouble

Maximum ratio between the biggest and the smallest calibration dot.

This value will be used to identify outliers when looking for calibration dots. It should be set high enough to allow for the area variations to be expected due to perspective distortions and small enough to eliminate the candidates that are either too big or too small to be valid calibration pattern dots.

Typically, values of about 3.0 to 5.0 are big enough - even if there is notable perspective distortion visible in the images. If an asymmetric calibration pattern has been selected, the ratio used for calculation will be adapted accordingly.

order
Type: SystemInt32
Polynomial order of the transformation to be generated.
progressDelegate
Type: Stemmer.Cvb.FoundationNonLinearTransformationCreationProgress
delegate to be used for passing progress information back to the caller
quality
Type: SystemDouble

Quality feedback.

Derived by correlating the application of the resulting transformation to the set of the calibration pattern.

Return Value

Type: NonLinearTransformation
Newly created calibration object.
Remarks

The image plane given to this method needs to contain a calibration pattern as generated by the method Create(CalibrationPatternStyle, CalibrationPatternContrast, Int32, Int32, Int32, Int32): A regularly spaced matrix of dots, the distance between the dots in x- and y-direction should be 2.5 times the diameter of the dots, if an asymmetric pattern was used, the bigger dots should have 2.5 times the area of the smaller dots (meaning that their radius is sqrt(2.5) times the radius of the small dots).

Note that, although the area of interest is given as a Area2D here (and in the processing of the Area2D the image's coordinate system will be respected), the actual output of this method uses PixelCoordinates! This seemingly inconsistent mix in this case is in fact useful, because a Area2D will better capture the actual location of a calibration pattern, especially if the image has been rotated, than a Rect style area of interest. But the calibration functions working on the output of ExtractCalibrationLists usually assume that the pixel lists are given in pixel coordinates.

To avoid misunderstandings and complications in the interpretation of the image content, it is recommended to use a default coordinate system on the input image.

See Also

Reference