Skip to main content

Phase Congruence Detector Parameters

Core Detection Parameters

Scales (Detection Scales)

  • Default: 4
  • Range: 2-8
  • Description: Number of scale levels for multi-scale feature detection. Each scale detects features of different sizes.
  • Guidelines:
    • Lower values (2-3): Faster processing, detects features of similar size, good for uniform textures
    • Higher values (5-8): Slower but more robust, detects features across a wider size range, better for natural images with varying feature scales
  • Recommendation: Use 4 for general purpose, increase to 6-8 for images with both fine details and large structures

Orientations (Orientation Filters)

  • Default: 8
  • Range: 4-16
  • Description: Number of orientation filters covering 180 degrees. Determines angular resolution of edge detection.
  • Guidelines:
    • Lower values (4-6): Faster, coarser angular resolution (45-30° steps), suitable for detecting main structural directions
    • Higher values (12-16): Finer angular discrimination (15-11° steps), better for curved or complex features
  • Recommendation: Use 8 for balanced performance, increase to 12-16 for images with many different edge orientations

Min Wavelength (Minimum Feature Size)

  • Default: 3.0 pixels
  • Range: 2.0-10.0
  • Description: Smallest feature size (in pixels) that will be detected. Sets the highest frequency filter.
  • Guidelines:
    • Lower values (2-3): Detects very fine details and texture, may increase noise sensitivity
    • Higher values (5-10): Ignores fine details, focuses on larger structural features, more noise-resistant
  • Recommendation: Set to slightly smaller than your smallest feature of interest; 3-4 for high-res images, 5-7 for lower resolution

Scale Multiplication factor (Scale Multiplier)

  • Default: 2.1
  • Range: 1.5-3.0
  • Description: Multiplication factor between successive scale levels. Controls how feature sizes progress from fine to coarse.
  • Guidelines:
    • Lower values (1.5-2.0): Smaller steps between scales, more thorough coverage, slower processing
    • Higher values (2.5-3.0): Larger jumps between scales, faster but may miss intermediate-sized features
  • Recommendation: 2.1 provides good coverage; use 1.7 for dense sampling, 2.5 for speed

Sigma/F (Frequency Bandwidth)

  • Default: 0.65
  • Range: 0.4-1.0
  • Description: Bandwidth of the log-Gabor filters in frequency domain. Controls frequency selectivity.
  • Guidelines:
    • Lower values (0.4-0.55): Narrow bandwidth, more selective to specific frequencies, sharper features but may miss some edges
    • Higher values (0.7-1.0): Broader bandwidth, detects wider range of frequencies, more complete edge detection but less selective
  • Recommendation: 0.55-0.65 for sharp edges, 0.7-0.85 for textured or natural images

Angular spread (Angular Tolerance)

  • Default: 15.0°
  • Range: 5.0°-45.0°
  • Description: Angular spread of each orientation filter in degrees. Controls directional selectivity.
  • Guidelines:
    • Lower values (5-10°): Tight angular selectivity, good for detecting specific orientations, may fragment curved edges
    • Higher values (20-45°): Broader angular coverage, better edge continuity, less orientation-specific
  • Recommendation: 15° for general use, 5-10° for straight edges, 20-30° for curved features

fd_nms_thresh_ (Additional Threshold)

  • Default: 0.0 (disabled)
  • Range: 0.0-0.3
  • Description: Extra threshold applied after automatic (Otsu) thresholding. Values are normalized (0-1).
  • Guidelines:
    • 0.0: Uses only automatic thresholding
    • 0.05-0.1: Mild suppression of weak responses, reduces noise
    • 0.15-0.3: Aggressive suppression, keeps only strongest features
  • Recommendation: Leave at 0 for automatic operation, use 0.05-0.1 to clean up noisy results

fd_auto_run_ (Auto-Execute)

  • Default: false
  • Description: Controls whether detection runs automatically when parameters change.
  • Guidelines:
    • false: Manual execution required (better for parameter tuning)
    • true: Immediate feedback on parameter changes (useful for interactive adjustment)
  • Recommendation: Enable during parameter exploration, disable for batch processing

Quick Setup Presets

Clear, High-Contrast Images

Best for technical drawings, CAD images, or high-quality scans with sharp edges.

ParameterValue
fd_scales_3
fd_orientations_8
fd_min_wavelength_3.0
fd_mult_2.5
fd_sigma_on_f_0.55
fd_orient_bandwidth_deg_10.0
fd_nms_thresh_0.0

Natural/Textured Images

Optimal for photographs, geological images, or surfaces with natural textures.

ParameterValue
fd_scales_5
fd_orientations_12
fd_min_wavelength_4.0
fd_mult_2.1
fd_sigma_on_f_0.75
fd_orient_bandwidth_deg_20.0
fd_nms_thresh_0.05

Fast Processing

Balanced settings for real-time or near real-time processing needs.

ParameterValue
fd_scales_3
fd_orientations_6
fd_min_wavelength_5.0
fd_mult_2.5
fd_sigma_on_f_0.65
fd_orient_bandwidth_deg_15.0
fd_nms_thresh_0.0

Maximum Quality

Best possible detection quality when processing time is not a concern.

ParameterValue
fd_scales_6
fd_orientations_16
fd_min_wavelength_3.0
fd_mult_1.8
fd_sigma_on_f_0.65
fd_orient_bandwidth_deg_15.0
fd_nms_thresh_0.0

Parameter Interaction Guide

For Straight Linear Features

  • Decrease fd_orient_bandwidth_deg_ (5-10°)
  • Decrease fd_orientations_ (6-8)
  • Decrease fd_sigma_on_f_ (0.45-0.55)

For Curved or Complex Features

  • Increase fd_orient_bandwidth_deg_ (20-30°)
  • Increase fd_orientations_ (12-16)
  • Increase fd_scales_ (5-6)

To Reduce Noise

  • Increase fd_min_wavelength_ (5-7)
  • Increase fd_nms_thresh_ (0.05-0.15)
  • Decrease fd_sigma_on_f_ (0.45-0.55)

To Detect Finer Details

  • Decrease fd_min_wavelength_ (2-3)
  • Increase fd_scales_ (5-7)
  • Decrease fd_mult_ (1.5-1.8)

For Faster Processing

  • Decrease fd_scales_ (2-3)
  • Decrease fd_orientations_ (4-6)
  • Increase fd_min_wavelength_ (5-7)
  • Increase fd_mult_ (2.5-3.0)

Understanding the Algorithm

What is Phase Congruence?

Phase congruence is a feature detection method that identifies points where Fourier components are maximally in phase. Unlike gradient-based edge detectors, it:

  • Is invariant to illumination and contrast changes
  • Detects features independent of their magnitude
  • Provides a dimensionless measure of feature significance

Multi-Scale Processing

The detector applies log-Gabor filters at multiple scales (controlled by fd_scales_ and fd_mult_) to capture features of different sizes in a single pass.

Orientation Selectivity

By using oriented filters (controlled by fd_orientations_ and fd_orient_bandwidth_deg_), the detector can identify edges at specific angles or across all orientations.

Advantages Over Traditional Edge Detection

  • Illumination invariant: Works equally well in bright and dark regions
  • Contrast independent: Detects both high and low contrast edges
  • Multi-scale: Captures features at multiple scales simultaneously
  • Phase-based: More robust to noise than gradient-based methods

Troubleshooting

Problem: Too Many False Detections

  • Solution: Increase fd_nms_thresh_ to 0.05-0.1
  • Alternative: Increase fd_min_wavelength_ to ignore fine noise

Problem: Missing Weak Edges

  • Solution: Set fd_nms_thresh_ to 0.0
  • Alternative: Increase fd_sigma_on_f_ for broader frequency response

Problem: Fragmented Edges

  • Solution: Increase fd_orient_bandwidth_deg_ to 20-30°
  • Alternative: Decrease fd_orientations_ for coarser angular sampling

Problem: Processing Too Slow

  • Solution: Reduce fd_scales_ to 2-3 and fd_orientations_ to 4-6
  • Alternative: Increase fd_min_wavelength_ and fd_mult_

Problem: Missing Fine Details

  • Solution: Decrease fd_min_wavelength_ to 2-3
  • Alternative: Increase fd_scales_ for better multi-scale coverage