FitSegmentToRidges


Performs a series of 1D ridge detections and finds a segment that best matches the detected points.

Applications:Precise detection of a thin straight line, whose rough location is known beforehand.

Syntax

C++
C#
Python
 
def FitSegmentToRidges(
	inImage: Image,
	inFittingMap: SegmentFittingMap,
	inRidgeScanParams: RidgeScanParams,
	inRidgeSelection: Selection,
	inMaxIncompleteness: float,
	/,
	*,
	inLocalBlindness: LocalBlindness | None = None,
	inOutlierSuppression: LineMEstimator | None = None
)
-> (
	outSegment: Segment2D | None,
	outRidges: list[Ridge1D | None],
	outDeviationProfile: Profile | None,
	outInliers: list[Point2D],
	outBrightnessProfiles: list[Profile],
	outResponseProfiles: list[Profile]
)

Parameters

Name Type Range Default Description
Input value inImage Image Image to fit segment to
Input value inFittingMap SegmentFittingMap Input fitting map
Input value inRidgeScanParams RidgeScanParams Parameters controlling the ridge extraction process
Input value inRidgeSelection Selection Selection mode of ridges
Input value inLocalBlindness LocalBlindness | None None Defines conditions in which weaker ridges can be detected in the vicinity of stronger ridges
Input value inMaxIncompleteness float 0.0 - 0.999 Maximal fraction of ridge points not found
Input value inOutlierSuppression LineMEstimator | None None Selects a method for ignoring incorrectly detected points
Output value outSegment Segment2D | None Fitted segment or nothing if the fitting fails
Output value outRidges list[Ridge1D | None] Found ridges
Output value outDeviationProfile Profile | None Profile of distances between the actual segment points and the corresponding reference segment points
Output value outInliers list[Point2D] Points matching the fitting segment
Output value outBrightnessProfiles list[Profile] Extracted image profiles
Output value outResponseProfiles list[Profile] Profiles of the ridge operator response

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.