You are here: Start » Function Reference » Image » Image Spatial Transforms » ImageAlongPath
ImageAlongPath
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
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
void fil::ImageAlongPath ( const fil::Image& inImage, const fil::Path& inAxisPath, ftl::Optional<const fil::CoordinateSystem2D&> inAxisPathAlignment, int inScanWidth, fil::Axis::Type inAxisType, fil::InterpolationMethod::Type inInterpolationMethod, ftl::Optional<const fil::Pixel&> inBorderColor, fil::Image& outImage, ftl::Optional<fil::Path&> outAlignedAxisPath = ftl::NIL, ftl::Array<fil::Path>& diagSamplingPoints = ftl::Dummy<ftl::Array<fil::Path>>() )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | const Image& | Input image | |||
inAxisPath | const Path& | Input path | |||
inAxisPathAlignment | Optional<const CoordinateSystem2D&> | NIL | Adjusts the axis path to the position of the inspected object | ||
inScanWidth | int | 1 - | 5 | The width of the stripe of pixels along the given path | |
inAxisType | Axis::Type | Y | Type of axis the transformed axis path will be parallel to | ||
inInterpolationMethod | InterpolationMethod::Type | Bilinear | The interpolation method used to compute pixel brightness in locations of not-integer coordinates | ||
inBorderColor | Optional<const Pixel&> | Pixel ( X: 0.0f Y: 0.0f Z: 0.0f W: 0.0f ) | Color of pixel outside image. If inBorderColor = NIL then algorithm repeats color of boarder. | ||
outImage | Image& | Output image | |||
outAlignedAxisPath | Optional<Path&> | NIL | Input path after transformation (in the image coordinates) | ||
diagSamplingPoints | Array<Path>& | Array of paths each one containing the sampling points corresponding to one row of the resulting image |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outAlignedAxisPath.
Read more about Optional Outputs.
Description
The operation transforms the stripe of pixels of width inScanWidth along the inAxisPath in the way that transforms the path into straight segment. Two modes of pixel interpolation are available, the bilinear filtering being more precise and computationally expensive.
The optional parameter inAxisPathAlignment defines the transform to be performed on the inAxisPath so that the resulting path is defined in a new context, e.g. returned by one of Template Matching filters.
Examples
See Also
- ImageProfileAlongPath – Creates a series of segments across the input path, measures the average pixel intensity on each of the segments, and creates the final profile from those values.
- ImageAlongArc – Creates an image from pixels traversed along an arc.