Back to FabImage Library website
You are here: Start » Function Reference » Computer Vision » 2D Edge Detection » DetectEdges
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Extracts a binary image of pixel-precise continuous edges.
Applications: Consistent detection of pixels that belong to contours of variable or unpredictable shape, e.g. screw thread outline or a custom piece of textile.
Syntax
C++
C#
void fil::DetectEdges ( const fil::Image& inImage, ftl::Optional<const fil::Region&> inRoi, fil::EdgeFilter::Type inEdgeFilter, float inStdDevX, ftl::Optional<float> inStdDevY, float inEdgeThreshold, float inEdgeHysteresis, float inMaxJoiningDistance, const int inMinBlobArea, fil::Image& outEdgesImage, fil::Image& diagGradientMagnitudeImage )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inImage | const Image& | Image from which edges will be extracted | ||
![]() |
inRoi | Optional<const Region&> | NIL | Region of the image from which edges will be extracted | |
![]() |
inEdgeFilter | EdgeFilter::Type | Type of edge filter used for computing gradients | ||
![]() |
inStdDevX | float | 0.0 - ![]() |
2.0f | Amount of horizontal smoothing used by the edge filter |
![]() |
inStdDevY | Optional<float> | 0.0 - ![]() |
NIL | Amount of vertical smoothing used by the edge filter (Auto = inStdDevX) |
![]() |
inEdgeThreshold | float | 0.0 - ![]() |
15.0f | Sufficient edge strength; edges of that strength will always be detected |
![]() |
inEdgeHysteresis | float | 0.0 - ![]() |
5.0f | Value by which the edge threshold is decreased for edge points neighboring with sufficiently strong edges |
![]() |
inMaxJoiningDistance | float | 0.0 - ![]() |
0.0f | Maximal distance between edges that can be joined |
![]() |
inMinBlobArea | const int | 0 - ![]() |
1 | Minimal area of an edge blob |
![]() |
outEdgesImage | Image& | Image of found edges | ||
![]() |
diagGradientMagnitudeImage | Image& | Visualization of the gradient magnitude |
In-place Processing
This function supports in-place data processing - you can pass the same reference to inImage and outEdgesImage
Read more about In-place Computation.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.