ScanExactlyNRidges
Locates a specified number of the strongest dark or bright pixel peak along a given path.
Applications:Very fast detection (or presence verification) of thin structures like wires or scale marks.
Syntax
C++
C#
Python
def ScanExactlyNRidges( inImage: Image, inScanMap: ScanMap, inRidgeScanParams: RidgeScanParams, inRidgeCount: int, inRidgeSelection: Selection, inMinDistance: float, /, *, inMaxDistance: float | None = None, inLocalBlindness: LocalBlindness | None = None, outBrightnessProfile: Profile | None = None, outResponseProfile: Profile | None = None ) -> ( outRidges: list[Ridge1D] | None, outGaps: list[Gap1D] | None )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Input image | ||
![]() |
inScanMap | ScanMap | Data precomputed with CreateScanMap | ||
![]() |
inRidgeScanParams | RidgeScanParams | Parameters controlling the ridge extraction process | ||
![]() |
inRidgeCount | int | 0 - ![]() |
Number of ridges to be found | |
![]() |
inRidgeSelection | Selection | Selection mode of the resulting ridges | ||
![]() |
inMinDistance | float | 0.0 - ![]() |
Minimal distance between consecutive ridges | |
![]() |
inMaxDistance | float | None | 0.0 - ![]() |
None | Maximal distance between consecutive ridges |
![]() |
inLocalBlindness | LocalBlindness | None | None | Defines conditions in which weaker ridges can be detected in the vicinity of stronger ridges | |
![]() |
outRidges | list[Ridge1D] | None | Found ridges | ||
![]() |
outGaps | list[Gap1D] | None | Gaps between consecutive edges | ||
![]() |
outBrightnessProfile | Profile | None | None | Extracted image profile | |
![]() |
outResponseProfile | Profile | None | None | Profile of the ridge operator response |



