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 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. |
|
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
Return |
Name |
Description |
|---|---|---|
|
Unwraps a 2D phase map. |
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
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
parameters— HistogramPhaseUnwrapping parameters HistogramPhaseUnwrapping::Params: width,height of the phase map and histogram characteristics.
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:
opencv2/phase_unwrapping/histogramphaseunwrapping.hpp
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 |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
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:
Source file#
The documentation for this class was generated from the following file:
opencv2/phase_unwrapping/phase_unwrapping.hpp