Back to Aurora Vision Library website

You are here: Start » Function Reference » Computer Vision » Shape Fitting » CreatePathFittingMap

CreatePathFittingMap


Header: AVL.h
Namespace: avl
Module: MetrologyPro

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

Applications: Used together with path fitting, but can be moved before the loop.

Syntax

C++
C#
 
void avl::CreatePathFittingMap
(
	const avl::ImageFormat& inImageFormat,
	const avl::PathFittingField& inFittingField,
	atl::Optional<const avl::CoordinateSystem2D&> inFittingFieldAlignment,
	atl::Optional<float> inScanStep,
	const int inScanWidth,
	const avl::SamplingParams& inSamplingParams,
	avl::PathFittingMap& outFittingMap,
	atl::Array<avl::Segment2D>& diagScanSegments,
	atl::Array<avl::Rectangle2D>& diagSamplingAreas
)

Parameters

Name Type Range Default Description
Input value inImageFormat const ImageFormat& Dimensions, depth and pixel type of the images on which fitting will be performed
Input value inFittingField const PathFittingField& Defines a stripe in which scan segments will be created
Input value inFittingFieldAlignment Optional<const CoordinateSystem2D&> NIL Adjusts the fitting field to the position of the inspected object
Input value inScanStep Optional<float> 0.0 - NIL Optional implicit conversion of the input path to an equidistant one
Input value inScanWidth const int 1 - 5 The width of each scan field (in pixels)
Input value inSamplingParams const SamplingParams& .interpolation Bilinear Parameters controlling the sampling process
Output value outFittingMap PathFittingMap& Optimized data required for path fitting
Diagnostic input diagScanSegments Array<Segment2D>& Segments along which the scans will be run
Diagnostic input diagSamplingAreas Array<Rectangle2D>& Scan fields created for point detection

Description

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.

Remarks

Read more about Local Coordinate Systems in Machine Vision Guide: Local Coordinate Systems.

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

  • FitPathToEdges – Performs a series of 1D edge detections and creates a path from the detected points.
  • FitPathToRidges – Performs a series of 1D ridge detections and creates a path from the detected points.
  • FitPathToStripe – Performs a series of 1D stripe detections and creates a path from the detected points.
  • FitPathToEdges_Direct – Performs a series of 1D edge detections and creates a path from the detected points.
  • FitPathToRidges_Direct – Performs a series of 1D ridge detections and creates a path from the detected points.
  • FitPathToStripe_Direct – Performs a series of 1D stripe detections and creates a path from the detected points.