Skip to main content

create_phase_mask

Function create_phase_mask 

Source
pub fn create_phase_mask(
    phase: &[f64],
    mask: &[u8],
    scaling: PhaseScaling,
    strength: f64,
) -> Vec<f64>
Expand description

Create phase mask from filtered phase values

Converts phase to a [0, 1] weighting mask using the specified scaling.

§Arguments

  • phase - High-pass filtered phase
  • mask - Binary mask
  • scaling - Phase scaling type
  • strength - Scaling strength (higher = stronger phase contrast)

§Returns

Phase mask with values in [0, 1]