phase_congruency_pc — IMGMETRICS perceptual op

• Data kinds: image2d → image2d

• Call: import fullseye as fs; fs.ledger.phase_congruency_pc(img, data_range: 'float' = 255.0, nscale: 'int' = 4, norient: 'int' = 4, min_wavelength: 'float' = 6.0, mult: 'float' = 2.0, sigma_onf: 'float' = 0.55, dtheta_on_sigma: 'float' = 1.2, k: 'float' = 2.0, epsilon: 'float' = 0.0001) -> 'np.ndarray' (to call the implementation directly, import iqafsim; iqafsim.phase_congruency_pc(img, data_range: 'float' = 255.0, nscale: 'int' = 4, norient: 'int' = 4, min_wavelength: 'float' = 6.0, mult: 'float' = 2.0, sigma_onf: 'float' = 0.55, dtheta_on_sigma: 'float' = 1.2, k: 'float' = 2.0, epsilon: 'float' = 0.0001) -> 'np.ndarray'; from the registry, opsimgmetrics.get("phase_congruency_pc"))

Usage

Phase congruency PC(x) = Σ_o E_o(x) / Σ_o Σ_s A_{s,o}(x) ∈ [0, 1] (Kovesi 1999; convention of Eq. 4 of the FSIM paper: log-Gabor with 4 scales × 4 orientations).

It is a different thing from the existing phase_congruency (backends_transform2, Riesz/monogenic version, no orientation, knobs a/b), hence the suffix _pc. From E_o = Σ_s [e ē + o ō − |e ō − o ē|] (ē, ō = unit direction of the summed vector for that orientation; ε = 1e-4 enters only this unit-vector normalisation), subtract Kovesi's noise threshold T and clip at 0: median of |EO|² at the smallest scale → Rayleigh mean −median/ln 0.5 → noise power → including filter overlap, mean noise energy + k σ, finally divided by 1.7 (Kovesi's rule of thumb). The sigmoid weighting for frequency spread is not applied (it is not in equation 4 of FSIM). Gain invariant: multiplying the input by a constant does not change PC -- except for the ε contribution (max 3e-5 at ε = 1e-4, strictly proportional to ε). Input (H, W) ((H, W, 3) uses Y). Defaults follow the FSIM paper §IV-A (λ_min = 6, mult = 2, σ_r = 0.55, σ_θ = π/4/1.2, k = 2). Raises ValueError: smaller than 2×2, non-finite, data_range ≤ 0.

Detailed usage guide

• image_difference_metrics family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_iqa_fsim_gmsd_vif — py -3.11 examples/poc_iqa_fsim_gmsd_vif.py

Ops the type connects to (they accept image2d as input)

mse · rmse · psnr · ssim · ms_ssim · ssim_map · image_entropy · joint_entropy

Same category (perceptual)

fsim · fsimc · fsim_pair · gmsd · gmsd_map · vifp


*Provenance: iqafsim.py — IMGMETRICS operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.