2.2. Parameters
All parameters are implemented as
properties (managed attributes).
They are parsed when set: values are clipped to the allowed range and usually several types are accepted,
e.g. bool, int, float for numbers
and additionally list, tuple, numpy.ndarray for sequences.
Note that some attributes have sub-dependencies, hence dependent attributes might change as well. Circular dependencies are resolved automatically.
2.2.1. Video Shape
shape is the standardized shape (
T, Y,
X, C) of the fringe pattern sequence, with
T: number of framesY: height (in pixel units)X: width (in pixel units)C: number of color channels (depends on the coloring and multiplexing schemes activated).
L is the maximum of X and Y and denotes the length (in pixel units) to be encoded.
It can be extended by the factor a to Lext.
2.2.2. Coordinate System
The following coordinate systems can be used by setting grid to:
'image': The top left corner pixel of the grid is the origin (0, 0) and positive directions are right- resp. downwards.
indexing denotes the indexing convention.
Possible values are:
'xy': Cartesian indexing (the default) will index the row first;'ij': matrix indexing will index the colum first.
D denotes the number of directions to be encoded (default is 2).
axis is used to define along which axis of the coordinate system (index 0 or 1)
the fringe pattern is modulated and shifted if D = 1.
2.2.3. Set
Each set consists of the following attributes:
N: number of shiftsl: wavelength (in pixel units)v: spatial frequency, i.e. number of periods (per screen lengthL)f: temporal frequency, i.e. number of periods to shift over
Each is an array with shape (number of directions D, number of sets K).
For example, if N.shape = (2, 3), it means that we encode D = 2 directions with K = 3 sets each.
Changing D or K directly, changes the shape of all set attributes.
When setting a set attribute with a new shape (D’, K’),
D and K are updated as well as the shape of the other set attributes.
If a set attribute is 1D, then it is stacked to match the number of directions D.
If a set attribute is 0D, i.e. a scalar, then all values are simply replaced by the new one.
l and v are related by l = L / v.
When L changes, v is kept constant and only l is changed.
Usually f = 1 and is essentially only changed if frequency division multiplexing FDM is activated.
reverse is a boolean which reverses the direction of the shifts (by multiplying f with -1).
p0 denotes the phase offset, which can be used to
e.g. let the fringe patterns start (at the origin) with a gray value of zero.
2.2.4. Intensity Values
bits is the number of bits.
dtype denotes the data type which can hold \(2\) ^ bits of information.
Possible values are:
'uint8'(the default)'uint16''uint32''float32''float64'
Imax is the maximum gray value and equals 1 for float
and \(2\) ^ bits \(- 1\) for unsigned integers.
A is the offset, also called brightness (of the background).
It is limited by Imax.
B is the amplitude of the cosinusoidal fringes.
It is limited by Imax.
V is the fringe visibility (also called fringe contrast).
V = A / B, with V \(\in [0, 1]\).
E is the exposure (relative brightness) and is within the range \([0, 1]\).
g denotes the gamma correction factor and can be used to compensate non-linearities of the display response curve.
2.2.5. Coloring and Averaging
The fringe patterns can be colorized by setting the hue h to any RGB color triplet within the interval [0, 255].
However, black (0, 0, 0) is not allowed.
h must be in shape (H, 3),
where H is the number of hues and 3 is the length of the RGB color triplet.
The hues h can also be set by assigning any combination of the following characters as a string:
'r': red'g': green'b': blue'c': cyan'm': magenta'y': yellow'w': white
C is the number of color channels required for either the set of hues h
or wavelength division multiplexing.
For example, if all hues are monochromatic, i.e. the RGB values are identical for each hue, C equals 1, else 3.
Repeating hues will be fused by averaging them before decoding.
M is the number of averaged intensity samples.
2.2.6. Multiplexing
The following multiplexing methods can be activated by setting them to True:
SDM: Spatial Division MultiplexingThis results in crossed fringe patterns. It can only be activated if we have two directions
D= 2. The number of framesTis reduced by a factor of 2.WDM: Wavelength Division MultiplexingThe shifts are multiplexed into the color channel, resulting in an RGB fringe pattern. All shifts
Nmust equal 3. The number of framesTis reduced by a factor of 3.FDM: Frequency Division MultiplexingHere, the directions
Dand the setsKare multiplexed. This results in crossed fringe patterns ifD= 2. It can only be activated ifD> 1 orK> 1. If one wants a static pattern, i.e. one that remains congruent when shifted, setstatictoTrue.
SDM and WDM can be used together
(reducing T by a factor of 2 * 3 = 6),
FDM with neither.
For more details, please refer to Multiplex.
2.2.7. Quality Metrics
UMR denotes the unambiguous measurement range.
The coding is only unique within the interval [0, UMR); after that it repeats itself.
The UMR is derived from l and v:
If
l\(\in \mathbb{N}\),UMR= \(lcm(\)l\()\), with \(lcm\) being the least common multiple.Else, if
v\(\in \mathbb{N}\),UMR=L/ \(gcd(\)v\()\), with \(gcd\) being the greatest common divisor.Else, if
v\(\lor\)l\(\in \mathbb{Q}\) , \(lcm\) resp. \(gcd\) are extended to rational numbers.Else, if
v\(\land\)l\(\in \mathbb{R} \setminus \mathbb{Q}\) ,UMR= \(prod(\)l\()\), with \(prod\) being the product operator.
uq denotes the minimum possible positional uncertainty (standard deviation)
of the measurement in pixels when considering only quantization noise.
It is based on the phase noise model from [Sur97]
and propagated through the unwrapping process and the phase fusion.
It is influenced by the parameters
\(1 / \sqrt{12}\): standard deviation of quantization noise of the light source or camera,
B: modulation of the fringe patterns,M: number of averaged intensity samples,N: number of phase shifts,l: wavelengths
SQNR = L / uq
is the signal-to-quantization-noise ratio of the phase shift coding.
It is a measure of how many points can be distinguished at most within the screen length [0, L).
It remains constant if L and hence l is scaled (the scaling factor cancels out).
DRQ = UMR / uq
is the dynamic range of the phase shift coding.
It a measure of how many points can be distinguished at most within the unambiguous measurement range \([0,\) UMR \()\).
Again, it remains constant if L and hence l is scaled (the scaling factor cancels out).
eta = L / UMR
is the spatial coding efficiency
and is a measure of how well the coding range UMR fits the screen length L.
It makes no sense to choose UMR much larger than L,
because then a significant part of the coding range remains unused.