Fast Transient Imaging
A Python framework revolving around reconstruction of impulse responses from AMCW lidar measurements.
RelatedWork Namespace Reference

Functions

def TimeToPhase (Time, Frequency)
 This function converts a time of flight in seconds to a phase in radians. More...
 
def PhaseToTime (Phase, Frequency)
 This function converts a phase in radians to a time of flight in seconds. More...
 
def GetPositiveArgument (NonZeroScalar)
 Given an array of non-zero, complex scalars this function returns their argument in radians between zero and two pi. More...
 
def AddNoNoise (X)
 This function returns the given argument unchanged. More...
 
def AddGaussianNoise (X, SignalToNoiseRatio)
 This function contaminates the given vector of positive, real values with noise from a Gaussian normal distribution. More...
 
def GetNoisySinusoidalMeasurements (Distribution, BaseFrequency, FrequencyList, AddNoise)
 This function returns synthetic measurements with sinusoidal modulation (as complex phasor) and noise as specified. More...
 
def RootsToDistribution (DiracDeltaLocations, BaseFrequency, iFrequencyBegin, Measurements)
 This function generates a real distribution (which is not guaranteed to have positive weights) describing the given measurements optimally while only having support at prescribed locations. More...
 
def SPUMIC
 Implements "SPUMIC: Simultaneous Phase Unwrapping and Multipath Interference Cancellation in Time-of-Flight Cameras Using Spectral Methods" by Kirmani et al. More...
 
def BhandariSpectralEstimate (Distribution, BaseFrequency, iFrequencyBegin, iFrequencyEnd, AddNoise)
 Implements "Resolving Multipath Interference in Kinect: An Inverse Problem Approach" by Bhandari et al. More...
 
def SRA
 Implements "SRA: Fast Removal of General Multipath for ToF Sensors" by Freedman et al. More...
 
def ClosedFormInverse (Distribution, BaseFrequency, iFrequencyBegin, AddNoise)
 Implements the technique with the Dirac-delta-based reconstruction in "Closed-form Inverses for the Mixed Pixel/Multipath Interference Problem in AMCW Lidar" by Godbaz et al. More...
 
def MaximumEntropySpectralEstimate (Distribution, BaseFrequency, nMoment, AddNoise, PhaseSampling=np.linspace(0.0, 2.0 *np.pi)
 Implements our proposed method for continuous reconstruction, i.e. More...
 
def PisarenkoEstimate (Distribution, BaseFrequency, nMoment, AddNoise)
 Implements our proposed method for sparse reconstruction, i.e. More...
 

Function Documentation

def RelatedWork.TimeToPhase (   Time,
  Frequency 
)

This function converts a time of flight in seconds to a phase in radians.

The frequency has to be given in Hertz.

See also
PhaseToTime()
def RelatedWork.PhaseToTime (   Phase,
  Frequency 
)

This function converts a phase in radians to a time of flight in seconds.

The frequency has to be given in Hertz.

See also
TimeToPhase()
def RelatedWork.GetPositiveArgument (   NonZeroScalar)

Given an array of non-zero, complex scalars this function returns their argument in radians between zero and two pi.

def RelatedWork.AddNoNoise (   X)

This function returns the given argument unchanged.

It can be passed as functor to techniques to test them with unperturbed input.

def RelatedWork.AddGaussianNoise (   X,
  SignalToNoiseRatio 
)

This function contaminates the given vector of positive, real values with noise from a Gaussian normal distribution.

The noise is independent for the various scalars. The returned signal has the given signal to noise ratio, i.e. the input is multiplied by a Gaussian with mean one and standard deviation 1.0/SignalToNoiseRatio.

Returns
A copy of X contaminated with noise.
def RelatedWork.GetNoisySinusoidalMeasurements (   Distribution,
  BaseFrequency,
  FrequencyList,
  AddNoise 
)

This function returns synthetic measurements with sinusoidal modulation (as complex phasor) and noise as specified.

Parameters
DistributionThe ground truth as CFiniteDistribution parameterized over time of flight in seconds.
BaseFrequencyThe modulation frequency implied by iFrequencyBegin==1 in hertz.
FrequencyListA list giving the used multiples of the base frequency.
AddNoiseA function that can be applied to an array of positive, real scalars holding brightness values measured by the virtual sensor to perturbate it. The perturbed array is returned.
Returns
An array of iFrequencyEnd-iFrequencyBegin entries where the i-th entry provides a noisy correlation between the given distribution and np.exp(1.0j*(iFrequencyBegin+i)*Phase).
def RelatedWork.RootsToDistribution (   DiracDeltaLocations,
  BaseFrequency,
  iFrequencyBegin,
  Measurements 
)

This function generates a real distribution (which is not guaranteed to have positive weights) describing the given measurements optimally while only having support at prescribed locations.

Parameters
DiracDeltaLocationsThe admitted locations of points of support of the resulting distribution as complex values, i.e. the phases of the actual points of support are the positive arguments of these complex values and the magnitude is ignored.
BaseFrequencyThe base frequency used to define phase.
iFrequencyBeginThe beginning of the range of frequencies found in Measurements. The end is implicitly defined by the shape of Measurements.
MeasurementsThe (possibly noisy) measurements for the specified frequencies. See GetNoisySinusoidalMeasurements() for details.
Returns
A CFiniteDistribution with support at the prescribed locations expressed as time of flight in seconds and with weights minimizing the least-squares error with respect to the given measurements. The weights may be negative.
def RelatedWork.SPUMIC (   Distribution,
  BaseFrequency,
  iFrequencyBegin,
  iFrequencyEnd,
  AddNoise,
  nDiracDelta = 2 
)

Implements "SPUMIC: Simultaneous Phase Unwrapping and Multipath Interference Cancellation in Time-of-Flight Cameras Using Spectral Methods" by Kirmani et al.

Parameters
Distribution,BaseFrequency,iFrequencyBegin,iFrequencyEnd,AddNoiseForward to GetNoisySinusoidalMeasurements(). FrequencyList is range(iFrequencyBegin,iFrequencyEnd).
nDiracDeltaThe number of Dirac-delta pulses to be reconstructed. In the paper the technique is only formulated for two Dirac-deltas so no other values should be used for evaluation of the technique.
Returns
A CFiniteDistribution providing the reconstruction. It consists of the requested number of Dirac-deltas and is parameterized over time in seconds.
def RelatedWork.BhandariSpectralEstimate (   Distribution,
  BaseFrequency,
  iFrequencyBegin,
  iFrequencyEnd,
  AddNoise 
)

Implements "Resolving Multipath Interference in Kinect: An Inverse Problem Approach" by Bhandari et al.

Parameters
Distribution,BaseFrequency,iFrequencyBegin,iFrequencyEnd,AddNoiseForward to GetNoisySinusoidalMeasurements(). FrequencyList is range(iFrequencyBegin,iFrequencyEnd) and must have an odd number of entries.
Returns
A CFiniteDistribution providing the reconstruction. It consists of (iFrequencyEnd-iFrequencyBegin-1)/2 Dirac-deltas and is parameterized over time in seconds.
Warning
This implementation of the method is rather naive. It is very sensitive to noise. Probably this could be improved by using matrix pencils for inversion of the Vandermonde system as suggested in the paper.
def RelatedWork.SRA (   Distribution,
  BaseFrequency,
  FrequencyList,
  AddNoise,
  nSample = 1000,
  CovarianceMatrix = None,
  ErrorTolerance = 0.05 
)

Implements "SRA: Fast Removal of General Multipath for ToF Sensors" by Freedman et al.

Parameters
Distribution,BaseFrequency,FrequencyList,AddNoiseSee GetNoisySinusoidalMeasurements().
nSampleThe number of sample points to use for optimization of the impulse response.
CovarianceMatrixIf given this has to be a Hermitian positive-definite matrix inducing the norm that is used to measure deviations from a perfect reconstruction in the data term. It must be real with twice as many rows and columns as there are entries in FrequencyList. The first half refers to cosine measurements, the second half to sine measurements. If no matrix is given, the identity matrix is used.
ErrorToleranceThe scalar governing the relative error tolerance of the data term.
Returns
A CFiniteDistribution with nSample points of support providing the reconstruction parameterized over time in seconds.
def RelatedWork.ClosedFormInverse (   Distribution,
  BaseFrequency,
  iFrequencyBegin,
  AddNoise 
)

Implements the technique with the Dirac-delta-based reconstruction in "Closed-form Inverses for the Mixed Pixel/Multipath Interference Problem in AMCW Lidar" by Godbaz et al.

Parameters
Distribution,BaseFrequency,iFrequencyBegin,AddNoiseForward to GetNoisySinusoidalMeasurements(). FrequencyList is range(iFrequencyBegin,iFrequencyBegin+4).
Returns
The reconstruction which consists of two Dirac-delta distributions parameterized over time in seconds.
def RelatedWork.MaximumEntropySpectralEstimate (   Distribution,
  BaseFrequency,
  nMoment,
  AddNoise,
  PhaseSampling = np.linspace(0.0,2.0*np.pi,
  MinNormalizedEigenvalue = 4.0e-3 
)

Implements our proposed method for continuous reconstruction, i.e.

the maximum entropy spectral estimate going back to John Parker Burg.

Parameters
Distribution,BaseFrequency,nMoment,AddNoiseForward to GetNoisySinusoidalMeasurements(). FrequencyList is range(nMoment+1), i.e. nMoment does not count the zeroth moment.
PhaseSamplingA sampling of the interval from zero to two pi defining the locations where the returned distribution should be sampled. The returned distribution uses these values converted to time with respect to the given base frequency (see PhaseToTime()). If this sampling is not dense enough, this can lead to severe distortions of cumulative density for nearly sparse distributions.
MinNormalizedEigenvalueIf necessary, the zeroth moment is biased to ensure that the smallest eigenvalue of the Toeplitz matrix divided by the zeroth moment has this value.
Returns
A CFiniteDistribution with values defined by PhaseToTime(PhaseSampling,BaseFrequency) sampling the density with minimal Burg entropy and prescribed trigonometric moments. If the Pisarenko estimate is used, the distribution only has nMoment freely placed points of support.
def RelatedWork.PisarenkoEstimate (   Distribution,
  BaseFrequency,
  nMoment,
  AddNoise 
)

Implements our proposed method for sparse reconstruction, i.e.

the Pisarenko estimate.

Parameters
Distribution,BaseFrequency,nMoment,AddNoiseForward to GetNoisySinusoidalMeasurements(). iFrequencyBegin is one, iFrequencyEnd is nMoment+1, i.e. nMoment does not count the zeroth moment.
Returns
A CFiniteDistribution with nMoment freely placed points of support parameterized over time in seconds.