Back to Adaptive Vision Library website

You are here: Start » Function Reference » Shape Fitting » CreateArcFittingMap



Precomputes a data object that is required for fast arc fitting on images.


void avl::CreateArcFittingMap
	const avl::ImageFormat& inImageFormat,
	const avl::ArcFittingField& inFittingField,
	atl::Optional<const avl::CoordinateSystem2D&> inFittingFieldAlignment,
	const int inScanCount,
	const int inScanWidth,
	avl::InterpolationMethod::Type inImageInterpolation,
	avl::ArcFittingMap& outFittingMap,
	atl::Array<avl::Segment2D>& diagScanSegments,
	atl::Array<avl::Rectangle2D>& diagSamplingAreas


Name Type Range Default Description
inImageFormat const ImageFormat& Dimensions, depth and pixel type of the images on which fitting will be performed
inFittingField const ArcFittingField& Defines a ring section in which scan segments will be created
inFittingFieldAlignment Optional<const CoordinateSystem2D&> NIL Adjusts the fitting field to the position of the inspected object
inScanCount const int 3 - 10 The number of points that will be searched to estimate the position of the arc
inScanWidth const int 1 - 5 The width of each scan field (in pixels)
inImageInterpolation InterpolationMethod::Type InterpolationMethod::​NearestNeighbour Interpolation method used for extraction of image pixel values
outFittingMap ArcFittingMap& Optimized data required for arc fitting
diagScanSegments Array<Segment2D>& Segments along which the scans will be run
diagSamplingAreas Array<Rectangle2D>& Scan fields created for point detection


The operation creates a series of scan maps that can be later used by other Shape Fitting filters. Each scan map corresponds to a single scan segment of inScanWidth length.

The optional parameter inFittingFieldAlignment defines the transform to be performed on the inFittingField so that the result is defined in a new context, e.g. returned by one of Template Matching filters.


For more information about local coordinate systems please refer to the following article.

This filter is a part of the Shape Fitting toolset. To read more about this technique, one can refer to the Shape Fitting chapter of our Machine Vision Guide

See Also

  • FitArcToEdges – Performs a series of 1D edge detections and finds an arc that best matches the detected points.
  • FitArcToRidges – Performs a series of 1D ridge detections and finds an arc that best matches the detected points.
  • FitArcToStripe – Performs a series of 1D stripe detections and finds an arc that best matches the detected points.