imgProcessor.equations package

Submodules

imgProcessor.equations.defocusThroughDepth module

imgProcessor.equations.defocusThroughDepth.defocusThroughDepth(u, uf, f, fn, k=2.355)[source]

return the defocus (mm std) through DOF

u -> scene point (depth value) uf -> in-focus position (the distance at which the scene point should be placed in order to be focused) f -> focal length k -> camera dependent constant (transferring blur circle to PSF), 2.335 would be FHWD of 2dgaussian fn –> f-number (relative aperture)

equation taken from http://linkinghub.elsevier.com/retrieve/pii/S0031320312004736

all parameter should be in [mm]

!! assumes spatial invariant blur

imgProcessor.equations.gaussian module

imgProcessor.equations.gaussian.gaussian(x, a, b, c, d=0)[source]

a -> height of the curve’s peak b -> position of the center of the peak c -> standard deviation or Gaussian RMS width d -> offset

imgProcessor.equations.gaussian2d module

imgProcessor.equations.gaussian2d.gaussian2d()[source]

see http://en.wikipedia.org/wiki/Multivariate_normal_distribution # probability density function of a vector [x,y] sx,sy -> sigma (standard deviation) mx,my: mue (mean position) rho: correlation between x and y

imgProcessor.equations.poisson module

imgProcessor.equations.poisson.poisson(x, a, b, c, d=0)[source]

Poisson function a -> height of the curve’s peak b -> position of the center of the peak c -> standard deviation d -> offset

imgProcessor.equations.vignetting module

imgProcessor.equations.vignetting.guessVignettingParam(arr)[source]
imgProcessor.equations.vignetting.tiltFactor()[source]

this function is extra to only cover vignetting through perspective distortion

f - focal length tau - tilt angle of a planar scene Xi - rotation angle of a planar scene

imgProcessor.equations.vignetting.vignetting()[source]

Vignetting equation using the KANG-WEISS-MODEL see http://research.microsoft.com/en-us/um/people/sbkang/publications/eccv00.pdf

f - focal length alpha - coefficient in the geometric vignetting factor tilt - tilt angle of a planar scene rot - rotation angle of a planar scene cx - image center, x cy - image center, y