Phase Unwrapping API#

Two-dimensional phase unwrapping is found in different applications like terrain elevation estimation in synthetic aperture radar (SAR), field mapping in magnetic resonance imaging or as a way of finding corresponding pixels in structured light reconstruction with sinusoidal patterns.

Given a phase map, wrapped between [-pi; pi], phase unwrapping aims at finding the “true” phase map by adding the right number of 2*pi to each pixel.

The problem is straightforward for perfect wrapped phase map, but real data are usually not noise-free. Among the different algorithms that were developed, quality-guided phase unwrapping methods are fast and efficient. They follow a path that unwraps high quality pixels first, avoiding error propagation from the start.

In this module, a quality-guided phase unwrapping is implemented following the approach described in [175] .

Classes#

Name

Description

class cv::phase_unwrapping::HistogramPhaseUnwrapping

Class implementing two-dimensional phase unwrapping based on [175] This algorithm belongs to the quality-guided phase unwrapping methods. First, it computes a reliability map from second differences between a pixel and its eight neighbours. Reliability values lie between 0 and 16pipi. Then, this reliability map is used to compute the reliabilities of “edges”. An edge is an entity defined by two pixels that are connected horizontally or vertically. Its reliability is found by adding the the reliabilities of the two pixels connected through it. Edges are sorted in a histogram based on their reliability values. This histogram is then used to unwrap pixels, starting from the highest quality pixel.

class cv::phase_unwrapping::PhaseUnwrapping

Abstract base class for phase unwrapping.

Class cv::phase_unwrapping::HistogramPhaseUnwrapping#

Class implementing two-dimensional phase unwrapping based on [175] This algorithm belongs to the quality-guided phase unwrapping methods. First, it computes a reliability map from second differences between a pixel and its eight neighbours. Reliability values lie between 0 and 16*pi*pi. Then, this reliability map is used to compute the reliabilities of "edges". An edge is an entity defined by two pixels that are connected horizontally or vertically. Its reliability is found by adding the the reliabilities of the two pixels connected through it. Edges are sorted in a histogram based on their reliability values. This histogram is then used to unwrap pixels, starting from the highest quality pixel.

Collaboration diagram for cv::phase_unwrapping::HistogramPhaseUnwrapping:

Public Member Functions#

Public Member Functions inherited from cv::phase_unwrapping::PhaseUnwrapping
Public Member Functions inherited from cv::Algorithm

Return

Name

Description

Algorithm()

~Algorithm()

void

clear()

Clears the algorithm state.

bool

empty()

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.

String

getDefaultName()

void

read(const FileNode & fn)

Reads algorithm parameters from a file storage.

void

save(const String & filename)

void

write(
    const Ptr< FileStorage > & fs,
    const String & name = String() )

void

write(FileStorage & fs)

Stores algorithm parameters in a file storage.

void

write(
    FileStorage & fs,
    const String & name )

Static Public Member Functions#

Static Public Member Functions inherited from cv::Algorithm

Return

Name

Description

static Ptr< _Tp >

load(
    const String & filename,
    const String & objname = String() )

Loads algorithm from the file.

static Ptr< _Tp >

loadFromString(
    const String & strModel,
    const String & objname = String() )

Loads algorithm from a String.

static Ptr< _Tp >

read(const FileNode & fn)

Reads algorithm from the file node.

Additional Inherited Members#

Protected Member Functions inherited from cv::Algorithm

Return

Name

Description

void

writeFormat(FileStorage & fs)

Detailed Description#

class HistogramPhaseUnwrapping : public cv::phase_unwrapping::PhaseUnwrapping#

Class implementing two-dimensional phase unwrapping based on histogramUnwrapping This algorithm belongs to the quality-guided phase unwrapping methods. First, it computes a reliability map from second differences between a pixel and its eight neighbours. Reliability values lie between 0 and 16*pi*pi. Then, this reliability map is used to compute the reliabilities of “edges”. An edge is an entity defined by two pixels that are connected horizontally or vertically. Its reliability is found by adding the the reliabilities of the two pixels connected through it. Edges are sorted in a histogram based on their reliability values. This histogram is then used to unwrap pixels, starting from the highest quality pixel.

The wrapped phase map and the unwrapped result are stored in CV_32FC1 Mat.

Member Function Documentation#

create()#

static Ptr< HistogramPhaseUnwrapping > cv::phase_unwrapping::HistogramPhaseUnwrapping::create(const HistogramPhaseUnwrapping::Params & parameters = HistogramPhaseUnwrapping::Params())

Python:

cv.phase_unwrapping.HistogramPhaseUnwrapping.create([, parameters]) -> retval
cv.phase_unwrapping.HistogramPhaseUnwrapping_create([, parameters]) -> retval

Constructor.

Parameters

getInverseReliabilityMap()#

void cv::phase_unwrapping::HistogramPhaseUnwrapping::getInverseReliabilityMap(OutputArray reliabilityMap)

Python:

cv.phase_unwrapping.HistogramPhaseUnwrapping.getInverseReliabilityMap([, reliabilityMap]) -> reliabilityMap

Get the reliability map computed from the wrapped phase map.

Parameters

  • reliabilityMap — Image where the reliability map is stored.

Source file#

The documentation for this class was generated from the following file:

Class cv::phase_unwrapping::PhaseUnwrapping#

Abstract base class for phase unwrapping.

Collaboration diagram for cv::phase_unwrapping::PhaseUnwrapping:

Public Member Functions#

Public Member Functions inherited from cv::Algorithm

Return

Name

Description

Algorithm()

~Algorithm()

void

clear()

Clears the algorithm state.

bool

empty()

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.

String

getDefaultName()

void

read(const FileNode & fn)

Reads algorithm parameters from a file storage.

void

save(const String & filename)

void

write(
    const Ptr< FileStorage > & fs,
    const String & name = String() )

void

write(FileStorage & fs)

Stores algorithm parameters in a file storage.

void

write(
    FileStorage & fs,
    const String & name )

Static Public Member Functions#

Static Public Member Functions inherited from cv::Algorithm

Return

Name

Description

static Ptr< _Tp >

load(
    const String & filename,
    const String & objname = String() )

Loads algorithm from the file.

static Ptr< _Tp >

loadFromString(
    const String & strModel,
    const String & objname = String() )

Loads algorithm from a String.

static Ptr< _Tp >

read(const FileNode & fn)

Reads algorithm from the file node.

Additional Inherited Members#

Protected Member Functions inherited from cv::Algorithm

Return

Name

Description

void

writeFormat(FileStorage & fs)

Detailed Description#

Abstract base class for phase unwrapping.

Member Function Documentation#

unwrapPhaseMap()#

void cv::phase_unwrapping::PhaseUnwrapping::unwrapPhaseMap(
InputArray wrappedPhaseMap,
OutputArray unwrappedPhaseMap,
InputArray shadowMask = noArray() )

Python:

cv.phase_unwrapping.PhaseUnwrapping.unwrapPhaseMap(wrappedPhaseMap[, unwrappedPhaseMap[, shadowMask]]) -> unwrappedPhaseMap

Unwraps a 2D phase map.

Parameters

  • wrappedPhaseMap — The wrapped phase map of type CV_32FC1 that needs to be unwrapped.

  • unwrappedPhaseMap — The unwrapped phase map.

  • shadowMask — Optional CV_8UC1 mask image used when some pixels do not hold any phase information in the wrapped phase map.

Here is the call graph for this function:

cv::phase_unwrapping::PhaseUnwrapping::unwrapPhaseMap Node1 cv::phase_unwrapping ::PhaseUnwrapping::unwrapPhaseMap Node2 cv::noArray Node1->Node2

cv::phase_unwrapping::PhaseUnwrapping::unwrapPhaseMap Node1 cv::phase_unwrapping ::PhaseUnwrapping::unwrapPhaseMap Node2 cv::noArray Node1->Node2

Source file#

The documentation for this class was generated from the following file: