FitSegmentToStripe_Direct
Performs a series of 1D stripe detections and finds a segment that best matches the detected points.
Applications:Precise detection of a straight stripe, whose rough location is known beforehand.
Syntax
C++
C#
Python
def FitSegmentToStripe_Direct( inImage: Image, inFittingField: SegmentFittingField, /, *, inFittingFieldAlignment: CoordinateSystem2D | None = None, inScanCount: int = 10, inScanWidth: int = 5, inSamplingParams: SamplingParams = SamplingParams(InterpolationMethod.Bilinear, 1.0, None), inStripeScanParams: StripeScanParams = StripeScanParams(ProfileInterpolationMethod.Quadratic4, 0.6, 5.0, None, Polarity.Dark, 0.0, None), inStripeSelection: Selection = Selection.Best, inLocalBlindness: LocalBlindness | None = None, inMaxIncompleteness: float = 0.1, inOutlierSuppression: LineMEstimator | None = None, outAlignedFittingField: SegmentFittingField | None = None ) -> ( outSegment: Segment2D | None, outLeftSegment: Segment2D | None, outRightSegment: Segment2D | None, outStripes: list[Stripe1D | None], outStripePoints: list[Point2D], outDeviationProfile: Profile | None, outBrightnessProfiles: list[Profile], outResponseProfiles: list[Profile], diagScanSegments: list[Segment2D], diagSamplingAreas: list[Rectangle2D] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Image to fit segment to | ||
![]() |
inFittingField | SegmentFittingField | Segment fitting field | ||
![]() |
inFittingFieldAlignment | CoordinateSystem2D | None | None | Adjusts the fitting field to the position of the inspected object | |
![]() |
inScanCount | int | 3 - ![]() |
10 | The number of points that will be searched to estimate the position of the segment |
![]() |
inScanWidth | int | 1 - ![]() |
5 | The width of each scan field (in pixels) |
![]() |
inSamplingParams | SamplingParams | SamplingParams(InterpolationMethod.Bilinear, 1.0, None) | Parameters controlling the sampling process | |
![]() |
inStripeScanParams | StripeScanParams | StripeScanParams(ProfileInterpolationMethod.Quadratic4, 0.6, 5.0, None, Polarity.Dark, 0.0, None) | Parameters controlling the stripe extraction process | |
![]() |
inStripeSelection | Selection | Selection.Best | Selection mode of stripe | |
![]() |
inLocalBlindness | LocalBlindness | None | None | Defines conditions in which weaker edges can be detected in the vicinity of stronger edges | |
![]() |
inMaxIncompleteness | float | 0.0 - 0.999 | 0.1 | Maximal fraction of stripe points not found |
![]() |
inOutlierSuppression | LineMEstimator | None | None | Selects a method for ignoring incorrectly detected points | |
![]() |
outSegment | Segment2D | None | Fitted segment in the middle of found stripe | ||
![]() |
outLeftSegment | Segment2D | None | Fitted left segment | ||
![]() |
outRightSegment | Segment2D | None | Fitted right segment | ||
![]() |
outStripes | list[Stripe1D | None] | Found stripes | ||
![]() |
outStripePoints | list[Point2D] | Extracted points of middle segment of an image stripe | ||
![]() |
outDeviationProfile | Profile | None | Profile of distances between the actual segment points and the corresponding reference segment points | ||
![]() |
outAlignedFittingField | SegmentFittingField | None | None | Fitting field used; in the image coordinate system | |
![]() |
outBrightnessProfiles | list[Profile] | Extracted image profiles | ||
![]() |
outResponseProfiles | list[Profile] | Profiles of the edge (derivative) operator response | ||
![]() |
diagScanSegments | list[Segment2D] | Segments along which the scans were run | ||
![]() |
diagSamplingAreas | list[Rectangle2D] | Areas from which the input image is sampled |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.




