/// <summary> /// Release the unmanaged resources associated with the HistogramPhaseUnwrapping /// </summary> protected override void DisposeObject() { if (IntPtr.Zero != _ptr) { PhaseUnwrappingInvoke.cveHistogramPhaseUnwrappingRelease(ref _ptr, ref _sharedPtr); } }
/// <summary> /// Unwraps a 2D phase map. /// </summary> /// <param name="wrappedPhaseMap">The wrapped phase map that needs to be unwrapped.</param> /// <param name="unwrappedPhaseMap">The unwrapped phase map.</param> /// <param name="shadowMask">Optional parameter used when some pixels do not hold any phase information in the wrapped phase map.</param> public void UnwrapPhaseMap( IInputArray wrappedPhaseMap, IOutputArray unwrappedPhaseMap, IInputArray shadowMask = null) { using (InputArray iaWrappedPhaseMap = wrappedPhaseMap.GetInputArray()) using (OutputArray oaUnwrappedPhaseMap = unwrappedPhaseMap.GetOutputArray()) using (InputArray iaShadowMask = shadowMask == null ? InputArray.GetEmpty() : shadowMask.GetInputArray()) { PhaseUnwrappingInvoke.cveHistogramPhaseMapUnwrappingUnwrapPhaseMap(_ptr, iaWrappedPhaseMap, oaUnwrappedPhaseMap, iaShadowMask); } }
/// <summary> /// Create a HistogramPhaseUnwrapping instance /// </summary> /// <param name="width">Phase map width.</param> /// <param name="height">Phase map height.</param> /// <param name="histThresh">Bins in the histogram are not of equal size. Default value is 3*pi*pi. The one before "histThresh" value are smaller.</param> /// <param name="nbrOfSmallBins">Number of bins between 0 and "histThresh". Default value is 10.</param> /// <param name="nbrOfLargeBins">Number of bins between "histThresh" and 32*pi*pi (highest edge reliability value). Default value is 5.</param> public HistogramPhaseUnwrapping( int width = 800, int height = 600, float histThresh = (float)(3 * Math.PI * Math.PI), int nbrOfSmallBins = 10, int nbrOfLargeBins = 5) { _ptr = PhaseUnwrappingInvoke.cveHistogramPhaseUnwrappingCreate( width, height, histThresh, nbrOfSmallBins, nbrOfLargeBins); }
public HistogramPhaseUnwrapping( int width, int height, float histThresh, int nbrOfSmallBins, int nbrOfLargeBins) { _ptr = PhaseUnwrappingInvoke.cveHistogramPhaseUnwrappingCreate( width, height, histThresh, nbrOfSmallBins, nbrOfLargeBins); }
/// <summary> /// Get the reliability map computed from the wrapped phase map. /// </summary> /// <param name="reliabilityMap">Image where the reliability map is stored.</param> public void GetInverseReliabilityMap(IOutputArray reliabilityMap) { using (OutputArray oaReliabilityMap = reliabilityMap.GetOutputArray()) PhaseUnwrappingInvoke.cveHistogramPhaseUnwrappingGetInverseReliabilityMap(_ptr, oaReliabilityMap); }