Edge Filter
This function block detects edges in an image and outputs a grayscale edge map. It is useful for extracting object boundaries, preparing images for contour detection, or highlighting structural details.
π₯ Inputs
Image Any This input accepts any image (color or grayscale) to be processed.
π€ Outputs
Grayscale Image A grayscale image showing detected edges (edge map).
πΉοΈ Controls
Filter Coefficient Slider that controls the sensitivity/strength of the edge detection. Adjusting this slider changes how aggressive the filter is at detecting edges.
βοΈ Running Mechanism
When the block runs, it processes the provided image and produces a grayscale map highlighting edges.
Color images will be handled appropriately so that the filter produces a single-channel edge result.
The block uses an automatic thresholding approach that adapts to the image content; the
Filter Coefficientlets you bias this behavior to be more or less sensitive.
π¨ Features
Produces a clean edge map suitable for downstream processing.
Real-time interactive control via
Filter Coefficientfor fast tuning.Works with both color and grayscale inputs.
Lightweight and well-suited as a preprocessing step for shape/contour analysis.
π Usage Instructions
Connect an image-producing block to
Image Any.Adjust the
Filter Coefficientslider while observing the output to get the desired edge detail.Use the resulting
Grayscale Imagefor visualization or feed it to further analysis blocks.
π‘ Tips and Tricks
Pre-filter noisy images with
BlurorDenoisingbefore feeding into this block to reduce spurious edges.Use
Image ThresholdorImage Adaptive Thresholdafter edge detection to create clean binary masks for contour extraction.Combine with ROI blocks such as
Image ROI SelectorImage ROIto focus edge detection on a specific area.Pass the output to contour and shape analysis blocks like
Find Contour,Approximate Contour,Minimum Rectangle, orShape Detectorto extract geometric features.For line-related analysis, feed the edge map to
Line DetectororHistogram On Lineto find and evaluate linear structures.Preview results with
Show Imageand save important frames usingImage LoggerorImage Write.If you need to clean up thin or broken edges, try
Morphological Transformations(e.g., dilation/erosion) after this block.
(hint: useful blocks to combine β Blur, Denoising, Image Threshold, Image Adaptive Threshold, Image ROI Select, Find Contour, Approximate Contour, Minimum Rectangle, Line Detector, Histogram On Line, Morphological Transformations, Show Image, Image Logger, Image Write)
π οΈ Troubleshooting
No edges visible: increase the
Filter Coefficientor pre-enhance contrast with blocks likeContrast OptimizationorAuto Contrast.Too many noisy edges: lower the
Filter Coefficientand tryBlurorBilateral Filterbeforehand.Broken or disconnected edges: apply
Morphological Transformations(dilate) to bridge gaps, or adjust preprocessing to improve continuity.Very large images: use
Image Resizerto reduce input size for faster processing while testing.
Last updated