-
Notifications
You must be signed in to change notification settings - Fork 2
Edge detection
Cristel Chandre edited this page Dec 31, 2025
·
22 revisions
Edge detection identifies cell boundaries and contours where image brightness changes sharply. This allows for the analysis of molecular orientation relative to structural features.
Open the module by clicking the
Edge Detection tab appears on the right of the Advanced tab. The button remains **blue** while the module is active.
- Detection: Uses a Gaussian blur followed by the Canny Edge Detector.
- Filtering: Contours are extracted and filtered by a minimum Length parameter.
-
Smoothing: A Savitzky-Golay filter (
scipy.savgol_filter) is applied to create smooth, differentiable curves. -
Relative Analysis: PyPOLAR calculates the local normal to the contour and measures orientation angles
$\rho$ relative to these boundaries within a defined Layer width.
The following parameters can be adjusted on the Edge Detection tab:
| Parameter | Type | Description |
|---|---|---|
| Low threshold | Detection | Hysteresis lower bound (0-255). |
| High threshold | Detection | Hysteresis upper bound (0-255). |
| Length | Filter | Minimum pixel number for valid contours. |
| Smoothing window | Smoothing | Window size for the Savitzky-Golay filter. |
| Distance from contour | Layer | Offset from the detected boundary (in pixels). |
| Layer width | Layer | Thickness of the analysis region (in pixels). |
Tip
If your edges look "jagged," increase the Smoothing window. If you are picking up too much background noise, increase the Low threshold.
PyPOLAR is developed under the BSD 2-Clause License, Copyright © 2021 • cristel.chandre@cnrs.fr
Tutorials
- Tutorial 1 (basic analysis)
- Tutorial 2 (mask and ROI)
- Tutorial 3 (batch analysis)
- Tutorial 4 (reference angle and boundary)
- Tutorial 5 (figures and colorbars)