Back to FabImage Library website
You are here: Start » Function Reference » Computer Vision » Shape Fitting 3D » FitPathToRidges3D_Direct

FitPathToRidges3D_Direct
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | Vision3DStandard |
Performs a series of 1D ridge detections in 3D and creates a path from the detected points.
Applications: Tracing of a thin line, whose rough location and shape is known beforehand.
Syntax
C++
C#
void fil::FitPathToRidges3D_Direct ( const fil::Surface& inSurface, const fil::PathFittingField& inFittingField, ftl::Optional<const fil::CoordinateSystem2D&> inFittingFieldAlignment, ftl::Optional<float> inScanStep, ftl::Optional<float> inSamplingStep, int inScanWidth, const fil::InterpolationMethod::Type inSurfaceInterpolation, const fil::RidgeScanParams3D& inRidgeScanParams, fil::Selection::Type inRidgeSelection, ftl::Optional<const fil::LocalBlindness&> inLocalBlindness, ftl::Optional<int> inMaxProfileGapWidth, ftl::Optional<int> inMaxPathInterpolationLength, ftl::Optional<float> inMaxDeviationDelta, float inMaxIncompleteness, ftl::Conditional<ftl::Array<fil::Point3D> >& outPath, ftl::Optional<ftl::Array<ftl::Conditional<fil::SurfaceRidge1D>>&> outRidges = ftl::NIL, ftl::Optional<ftl::Conditional<fil::Profile>&> outDeviationProfile = ftl::NIL, ftl::Optional<fil::PathFittingField&> outAlignedFittingField = ftl::NIL, ftl::Optional<ftl::Array<fil::Profile>&> outHeightProfiles = ftl::NIL, ftl::Optional<ftl::Array<fil::Profile>&> outResponseProfiles = ftl::NIL, ftl::Optional<ftl::Conditional<ftl::Array<fil::Segment3D> >&> outPathSegments = ftl::NIL, ftl::Array<fil::Segment2D>& diagScanSegments, ftl::Array<fil::Rectangle2D>& diagSamplingAreas )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inSurface | const Surface& | Surface to fit the path to | ||
![]() |
inFittingField | const PathFittingField& | Path fitting field | ||
![]() |
inFittingFieldAlignment | Optional<const CoordinateSystem2D&> | NIL | Adjusts the fitting field to the position of the inspected object | |
![]() |
inScanStep | Optional<float> | 0.0 - ![]() |
5.0f | Optional implicit conversion of the input path to an equidistant one |
![]() |
inSamplingStep | Optional<float> | 0.0 - ![]() |
NIL | Desired distance between consecutive sampling points on the scan segments; if Nil, the bigger of surface X and Y scales is chosen |
![]() |
inScanWidth | int | 1 - ![]() |
5 | The width of each scan field (in pixels) |
![]() |
inSurfaceInterpolation | const InterpolationMethod::Type | Bilinear | Interpolation method used for extraction of surface points | |
![]() |
inRidgeScanParams | const RidgeScanParams3D& | RidgeScanParams3D ( ProfileInterpolation: Quadratic4 SmoothingStdDev: 0.6f RidgeWidth: 5.0f RidgeMargin: 2.0f RidgeOperator: Minimum MinMagnitude: 5.0f RidgePolarity: Low ) | Parameters controlling the ridge extraction process | |
![]() |
inRidgeSelection | Selection::Type | Selection mode of ridges | ||
![]() |
inLocalBlindness | Optional<const LocalBlindness&> | NIL | Defines conditions in which weaker ridges can be detected in the vicinity of stronger ridges | |
![]() |
inMaxProfileGapWidth | Optional<int> | 0 - ![]() |
1 | Maximal number of consecutive not existing profile points |
![]() |
inMaxPathInterpolationLength | Optional<int> | 0 - ![]() |
1 | Maximal number of consecutive points not found |
![]() |
inMaxDeviationDelta | Optional<float> | 0.0 - ![]() |
NIL | Maximal difference between deviations of consecutive path points |
![]() |
inMaxIncompleteness | float | 0.0 - 0.999 | 0.1f | Maximal fraction of ridge points not found |
![]() |
outPath | Conditional<Array<Point3D> >& | Fitted path or nothing if the fitting failed | ||
![]() |
outRidges | Optional<Array<Conditional<SurfaceRidge1D>>&> | NIL | Found ridges | |
![]() |
outDeviationProfile | Optional<Conditional<Profile>&> | NIL | Profile of distances between the actual path points and the corresponding reference path points | |
![]() |
outAlignedFittingField | Optional<PathFittingField&> | NIL | Fitting field used; in the image coordinate system | |
![]() |
outHeightProfiles | Optional<Array<Profile>&> | NIL | Extracted surface height profiles | |
![]() |
outResponseProfiles | Optional<Array<Profile>&> | NIL | Profiles of the ridge operator response | |
![]() |
outPathSegments | Optional<Conditional<Array<Segment3D> >&> | NIL | Segments of the fitted path or nothing if the fitting failed | |
![]() |
diagScanSegments | Array<Segment2D>& | Segments along which the scans were run | ||
![]() |
diagSamplingAreas | Array<Rectangle2D>& | Areas from which the input image is sampled |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outRidges, outDeviationProfile, outAlignedFittingField, outHeightProfiles, outResponseProfiles, outPathSegments.
Read more about Optional Outputs.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Ridge operator parameters are too low in surface ridges detector in FitPathToRidges3D. |
DomainError | Sampling step set to zero in FitPathToRidges3D. |