brcutpuw: Branch cut algorithm for phase unwrapping

View source: R/puwalgs.r

brcutpuwR Documentation

Branch cut algorithm for phase unwrapping

Description

Solves a modification of the assignment problem to minimize the total length of branch cuts.

Usage

brcutpuw(phase, pen = 0, details = FALSE)

Arguments

phase

Matrix containing the wrapped phase map

pen

Optional penalty value for connecting a residue to an edge

details

boolean: if TRUE return some extra details for diagnostics

Value

A matrix containing the unwrapped wavefront. If details==TRUE a named list starting with the unwrapped wavefront in puw.

Author(s)

M.L. Peck

See Also

qpuw idiffpuw

Examples

  set.seed(1234)
  PW <- wrap(matrix((0:100)*pi/10,101,101))
  ## need a border of NA's
  PW <- cbind(rep(NA,101), PW, rep(NA,101))
  PW <- rbind(rep(NA,103), PW, rep(NA,103))
  PW <- PW + rnorm(103^2)
  mtext(rmap(PW, plot=TRUE))
  PU <- brcutpuw(PW, details=TRUE)
  image(1:103, 1:103, PU$bcuts, col="blue", add=TRUE)
  X11()
  image(PU$puw, col=grey256, asp=1, useRaster=TRUE)

mlpeck/zernike documentation built on April 19, 2024, 3:16 p.m.