ImageAlongPath


Creates an image from pixels traversed along a path.

Applications:E.g. "Unwrapping" of object contours, so that they appear as 1D structures on the output image.

Syntax

C++
C#
Python
 
def ImageAlongPath(
	inImage: Image,
	inAxisPath: Path,
	outImage: Image,
	/,
	*,
	inAxisPathAlignment: CoordinateSystem2D | None = None,
	inScanWidth: int = 5,
	inAxisType: Axis = Axis.Y,
	inInterpolationMethod: InterpolationMethod = InterpolationMethod.Bilinear,
	inBorderColor: Pixel | None = Pixel(0.0, 0.0, 0.0, 0.0),
	outAlignedAxisPath: Path | None = None
)
-> diagSamplingPoints: list[Path]

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inAxisPath Path Input path
Input value inAxisPathAlignment CoordinateSystem2D | None None Adjusts the axis path to the position of the inspected object
Input value inScanWidth int 1 - 5 The width of the stripe of pixels along the given path
Input value inAxisType Axis Axis.Y Type of axis the transformed axis path will be parallel to
Input value inInterpolationMethod InterpolationMethod InterpolationMethod.Bilinear The interpolation method used to compute pixel brightness in locations of not-integer coordinates
Input value inBorderColor Pixel | None Pixel(0.0, 0.0, 0.0, 0.0) Color of pixel outside image. If inBorderColor = NIL then algorithm repeats color of boarder.
Output value outImage Image Output image
Output value outAlignedAxisPath Path | None None Input path after transformation (in the image coordinates)
Diagnostic input diagSamplingPoints list[Path] Array of paths each one containing the sampling points corresponding to one row of the resulting image