public class BroxWarpingSpacial<T extends boofcv.struct.image.ImageGray> 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.GrayF32 |
derivFlowUX |
protected boofcv.struct.image.GrayF32 |
derivFlowUY |
protected boofcv.struct.image.GrayF32 |
derivFlowVX |
protected boofcv.struct.image.GrayF32 |
derivFlowVY |
protected boofcv.struct.image.GrayF32 |
divD |
protected boofcv.struct.image.GrayF32 |
divU |
protected boofcv.struct.image.GrayF32 |
divV |
protected boofcv.struct.image.GrayF32 |
du |
protected boofcv.struct.image.GrayF32 |
dv |
protected boofcv.struct.image.GrayF32 |
flowU |
protected boofcv.struct.image.GrayF32 |
flowV |
protected float |
gamma |
protected boofcv.struct.image.GrayF32 |
psiData |
protected boofcv.struct.image.GrayF32 |
psiGradient |
protected boofcv.struct.image.GrayF32 |
psiSmooth |
protected boofcv.struct.image.GrayF32 |
warpDeriv2X |
protected boofcv.struct.image.GrayF32 |
warpDeriv2XX |
protected boofcv.struct.image.GrayF32 |
warpDeriv2XY |
protected boofcv.struct.image.GrayF32 |
warpDeriv2Y |
protected boofcv.struct.image.GrayF32 |
warpDeriv2YY |
protected boofcv.struct.image.GrayF32 |
warpImage2 |
interp, pyr1, pyr2| Constructor and Description |
|---|
BroxWarpingSpacial(ConfigBroxWarping config,
boofcv.alg.interpolate.InterpolatePixelS<boofcv.struct.image.GrayF32> interp)
Configures flow estimation
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeDivUVD_safe(int x,
int y,
boofcv.struct.image.GrayF32 u,
boofcv.struct.image.GrayF32 v,
boofcv.struct.image.GrayF32 psi,
boofcv.struct.image.GrayF32 divU,
boofcv.struct.image.GrayF32 divV,
boofcv.struct.image.GrayF32 divD) |
protected void |
computePsiDataPsiGradient(boofcv.struct.image.GrayF32 image1,
boofcv.struct.image.GrayF32 image2,
boofcv.struct.image.GrayF32 deriv1x,
boofcv.struct.image.GrayF32 deriv1y,
boofcv.struct.image.GrayF32 deriv2x,
boofcv.struct.image.GrayF32 deriv2y,
boofcv.struct.image.GrayF32 deriv2xx,
boofcv.struct.image.GrayF32 deriv2yy,
boofcv.struct.image.GrayF32 deriv2xy,
boofcv.struct.image.GrayF32 du,
boofcv.struct.image.GrayF32 dv,
boofcv.struct.image.GrayF32 psiData,
boofcv.struct.image.GrayF32 psiGradient)
Compute Psi-data using equation 6 and approximation in equation 5
|
boofcv.struct.image.GrayF32 |
getFlowX() |
boofcv.struct.image.GrayF32 |
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.GrayF32> image1,
boofcv.struct.pyramid.ImagePyramid<boofcv.struct.image.GrayF32> image2)
Computes dense optical flow from the provided image pyramid.
|
protected void |
processLayer(boofcv.struct.image.GrayF32 image1,
boofcv.struct.image.GrayF32 image2,
boofcv.struct.image.GrayF32 deriv1X,
boofcv.struct.image.GrayF32 deriv1Y,
boofcv.struct.image.GrayF32 deriv2X,
boofcv.struct.image.GrayF32 deriv2Y,
boofcv.struct.image.GrayF32 deriv2XX,
boofcv.struct.image.GrayF32 deriv2YY,
boofcv.struct.image.GrayF32 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.GrayF32 flowU
protected boofcv.struct.image.GrayF32 flowV
protected boofcv.struct.image.GrayF32 warpImage2
protected boofcv.struct.image.GrayF32 warpDeriv2X
protected boofcv.struct.image.GrayF32 warpDeriv2Y
protected boofcv.struct.image.GrayF32 warpDeriv2XX
protected boofcv.struct.image.GrayF32 warpDeriv2YY
protected boofcv.struct.image.GrayF32 warpDeriv2XY
protected boofcv.struct.image.GrayF32 derivFlowUX
protected boofcv.struct.image.GrayF32 derivFlowUY
protected boofcv.struct.image.GrayF32 derivFlowVX
protected boofcv.struct.image.GrayF32 derivFlowVY
protected boofcv.struct.image.GrayF32 psiSmooth
protected boofcv.struct.image.GrayF32 psiData
protected boofcv.struct.image.GrayF32 psiGradient
protected boofcv.struct.image.GrayF32 divU
protected boofcv.struct.image.GrayF32 divV
protected boofcv.struct.image.GrayF32 divD
protected boofcv.struct.image.GrayF32 du
protected boofcv.struct.image.GrayF32 dv
public BroxWarpingSpacial(ConfigBroxWarping config, boofcv.alg.interpolate.InterpolatePixelS<boofcv.struct.image.GrayF32> 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.GrayF32> image1,
boofcv.struct.pyramid.ImagePyramid<boofcv.struct.image.GrayF32> image2)
process in class DenseFlowPyramidBase<T extends boofcv.struct.image.ImageGray>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.GrayF32 image1,
boofcv.struct.image.GrayF32 image2,
boofcv.struct.image.GrayF32 deriv1X,
boofcv.struct.image.GrayF32 deriv1Y,
boofcv.struct.image.GrayF32 deriv2X,
boofcv.struct.image.GrayF32 deriv2Y,
boofcv.struct.image.GrayF32 deriv2XX,
boofcv.struct.image.GrayF32 deriv2YY,
boofcv.struct.image.GrayF32 deriv2XY)
protected void computePsiDataPsiGradient(boofcv.struct.image.GrayF32 image1,
boofcv.struct.image.GrayF32 image2,
boofcv.struct.image.GrayF32 deriv1x,
boofcv.struct.image.GrayF32 deriv1y,
boofcv.struct.image.GrayF32 deriv2x,
boofcv.struct.image.GrayF32 deriv2y,
boofcv.struct.image.GrayF32 deriv2xx,
boofcv.struct.image.GrayF32 deriv2yy,
boofcv.struct.image.GrayF32 deriv2xy,
boofcv.struct.image.GrayF32 du,
boofcv.struct.image.GrayF32 dv,
boofcv.struct.image.GrayF32 psiData,
boofcv.struct.image.GrayF32 psiGradient)
protected void computeDivUVD_safe(int x,
int y,
boofcv.struct.image.GrayF32 u,
boofcv.struct.image.GrayF32 v,
boofcv.struct.image.GrayF32 psi,
boofcv.struct.image.GrayF32 divU,
boofcv.struct.image.GrayF32 divV,
boofcv.struct.image.GrayF32 divD)
protected int s(int x,
int y)
public boofcv.struct.image.GrayF32 getFlowX()
public boofcv.struct.image.GrayF32 getFlowY()