public class BroxWarpingSpacial<T extends boofcv.struct.image.ImageSingleBand> extends DenseFlowPyramidBase<T>
Dense optical flow which adheres to a brightness constancy assumption, a gradient constancy assumption, and a discontinuity-preserving spatio-temporal smoothness constraint. Based on the work of Brox [2] with implementation details taken from [1].
| Modifier and Type | Field and Description |
|---|---|
protected float |
alpha |
protected boofcv.struct.image.ImageFloat32 |
derivFlowUX |
protected boofcv.struct.image.ImageFloat32 |
derivFlowUY |
protected boofcv.struct.image.ImageFloat32 |
derivFlowVX |
protected boofcv.struct.image.ImageFloat32 |
derivFlowVY |
protected boofcv.struct.image.ImageFloat32 |
divD |
protected boofcv.struct.image.ImageFloat32 |
divU |
protected boofcv.struct.image.ImageFloat32 |
divV |
protected boofcv.struct.image.ImageFloat32 |
du |
protected boofcv.struct.image.ImageFloat32 |
dv |
protected boofcv.struct.image.ImageFloat32 |
flowU |
protected boofcv.struct.image.ImageFloat32 |
flowV |
protected float |
gamma |
protected boofcv.struct.image.ImageFloat32 |
psiData |
protected boofcv.struct.image.ImageFloat32 |
psiGradient |
protected boofcv.struct.image.ImageFloat32 |
psiSmooth |
protected boofcv.struct.image.ImageFloat32 |
warpDeriv2X |
protected boofcv.struct.image.ImageFloat32 |
warpDeriv2XX |
protected boofcv.struct.image.ImageFloat32 |
warpDeriv2XY |
protected boofcv.struct.image.ImageFloat32 |
warpDeriv2Y |
protected boofcv.struct.image.ImageFloat32 |
warpDeriv2YY |
protected boofcv.struct.image.ImageFloat32 |
warpImage2 |
interp, pyr1, pyr2| Constructor and Description |
|---|
BroxWarpingSpacial(ConfigBroxWarping config,
boofcv.alg.interpolate.InterpolatePixelS<boofcv.struct.image.ImageFloat32> interp)
Configures flow estimation
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeDivUVD_safe(int x,
int y,
boofcv.struct.image.ImageFloat32 u,
boofcv.struct.image.ImageFloat32 v,
boofcv.struct.image.ImageFloat32 psi,
boofcv.struct.image.ImageFloat32 divU,
boofcv.struct.image.ImageFloat32 divV,
boofcv.struct.image.ImageFloat32 divD) |
protected void |
computePsiDataPsiGradient(boofcv.struct.image.ImageFloat32 image1,
boofcv.struct.image.ImageFloat32 image2,
boofcv.struct.image.ImageFloat32 deriv1x,
boofcv.struct.image.ImageFloat32 deriv1y,
boofcv.struct.image.ImageFloat32 deriv2x,
boofcv.struct.image.ImageFloat32 deriv2y,
boofcv.struct.image.ImageFloat32 deriv2xx,
boofcv.struct.image.ImageFloat32 deriv2yy,
boofcv.struct.image.ImageFloat32 deriv2xy,
boofcv.struct.image.ImageFloat32 du,
boofcv.struct.image.ImageFloat32 dv,
boofcv.struct.image.ImageFloat32 psiData,
boofcv.struct.image.ImageFloat32 psiGradient)
Compute Psi-data using equation 6 and approximation in equation 5
|
boofcv.struct.image.ImageFloat32 |
getFlowX() |
boofcv.struct.image.ImageFloat32 |
getFlowY() |
protected void |
interpolateFlowScale(int widthNew,
int heightNew)
Provides an initial estimate for the flow by interpolating values from the previous layer.
|
void |
process(boofcv.struct.pyramid.ImagePyramid<boofcv.struct.image.ImageFloat32> image1,
boofcv.struct.pyramid.ImagePyramid<boofcv.struct.image.ImageFloat32> image2)
Computes dense optical flow from the provided image pyramid.
|
protected void |
processLayer(boofcv.struct.image.ImageFloat32 image1,
boofcv.struct.image.ImageFloat32 image2,
boofcv.struct.image.ImageFloat32 deriv1X,
boofcv.struct.image.ImageFloat32 deriv1Y,
boofcv.struct.image.ImageFloat32 deriv2X,
boofcv.struct.image.ImageFloat32 deriv2Y,
boofcv.struct.image.ImageFloat32 deriv2XX,
boofcv.struct.image.ImageFloat32 deriv2YY,
boofcv.struct.image.ImageFloat32 deriv2XY)
Computes the flow for a layer using Taylor series expansion and Successive Over-Relaxation linear solver.
|
protected void |
resizeForLayer(int width,
int height)
Resize images for the current layer being processed
|
protected int |
s(int x,
int y) |
imageNormalization, interpolateFlowScale, process, warpImageTaylorprotected float alpha
protected float gamma
protected boofcv.struct.image.ImageFloat32 flowU
protected boofcv.struct.image.ImageFloat32 flowV
protected boofcv.struct.image.ImageFloat32 warpImage2
protected boofcv.struct.image.ImageFloat32 warpDeriv2X
protected boofcv.struct.image.ImageFloat32 warpDeriv2Y
protected boofcv.struct.image.ImageFloat32 warpDeriv2XX
protected boofcv.struct.image.ImageFloat32 warpDeriv2YY
protected boofcv.struct.image.ImageFloat32 warpDeriv2XY
protected boofcv.struct.image.ImageFloat32 derivFlowUX
protected boofcv.struct.image.ImageFloat32 derivFlowUY
protected boofcv.struct.image.ImageFloat32 derivFlowVX
protected boofcv.struct.image.ImageFloat32 derivFlowVY
protected boofcv.struct.image.ImageFloat32 psiSmooth
protected boofcv.struct.image.ImageFloat32 psiData
protected boofcv.struct.image.ImageFloat32 psiGradient
protected boofcv.struct.image.ImageFloat32 divU
protected boofcv.struct.image.ImageFloat32 divV
protected boofcv.struct.image.ImageFloat32 divD
protected boofcv.struct.image.ImageFloat32 du
protected boofcv.struct.image.ImageFloat32 dv
public BroxWarpingSpacial(ConfigBroxWarping config, boofcv.alg.interpolate.InterpolatePixelS<boofcv.struct.image.ImageFloat32> interp)
config - Configuration parametersinterp - Interpolation for image flow between image layers and warping. Overrides selection in config.public void process(boofcv.struct.pyramid.ImagePyramid<boofcv.struct.image.ImageFloat32> image1,
boofcv.struct.pyramid.ImagePyramid<boofcv.struct.image.ImageFloat32> image2)
process in class DenseFlowPyramidBase<T extends boofcv.struct.image.ImageSingleBand>image1 - Pyramid of first imageimage2 - Pyramid of second imageprotected void resizeForLayer(int width,
int height)
protected void interpolateFlowScale(int widthNew,
int heightNew)
protected void processLayer(boofcv.struct.image.ImageFloat32 image1,
boofcv.struct.image.ImageFloat32 image2,
boofcv.struct.image.ImageFloat32 deriv1X,
boofcv.struct.image.ImageFloat32 deriv1Y,
boofcv.struct.image.ImageFloat32 deriv2X,
boofcv.struct.image.ImageFloat32 deriv2Y,
boofcv.struct.image.ImageFloat32 deriv2XX,
boofcv.struct.image.ImageFloat32 deriv2YY,
boofcv.struct.image.ImageFloat32 deriv2XY)
protected void computePsiDataPsiGradient(boofcv.struct.image.ImageFloat32 image1,
boofcv.struct.image.ImageFloat32 image2,
boofcv.struct.image.ImageFloat32 deriv1x,
boofcv.struct.image.ImageFloat32 deriv1y,
boofcv.struct.image.ImageFloat32 deriv2x,
boofcv.struct.image.ImageFloat32 deriv2y,
boofcv.struct.image.ImageFloat32 deriv2xx,
boofcv.struct.image.ImageFloat32 deriv2yy,
boofcv.struct.image.ImageFloat32 deriv2xy,
boofcv.struct.image.ImageFloat32 du,
boofcv.struct.image.ImageFloat32 dv,
boofcv.struct.image.ImageFloat32 psiData,
boofcv.struct.image.ImageFloat32 psiGradient)
protected void computeDivUVD_safe(int x,
int y,
boofcv.struct.image.ImageFloat32 u,
boofcv.struct.image.ImageFloat32 v,
boofcv.struct.image.ImageFloat32 psi,
boofcv.struct.image.ImageFloat32 divU,
boofcv.struct.image.ImageFloat32 divV,
boofcv.struct.image.ImageFloat32 divD)
protected int s(int x,
int y)
public boofcv.struct.image.ImageFloat32 getFlowX()
public boofcv.struct.image.ImageFloat32 getFlowY()