Package boofcv.alg.flow
Class DenseFlowPyramidBase<T extends ImageGray<T>>
java.lang.Object
boofcv.alg.flow.DenseFlowPyramidBase<T>
- Direct Known Subclasses:
BroxWarpingSpacial
,HornSchunckPyramid
public abstract class DenseFlowPyramidBase<T extends ImageGray<T>> extends Object
Base class for pyramidal dense flow algorithms based on IPOL papers.
-
Field Summary
Fields Modifier and Type Field Description protected InterpolatePixelS<GrayF32>
interp
protected PyramidFloat<GrayF32>
pyr1
protected PyramidFloat<GrayF32>
pyr2
-
Constructor Summary
Constructors Modifier Constructor Description protected
DenseFlowPyramidBase(double scale, double sigma, int maxLayers, InterpolatePixelS<GrayF32> interp)
-
Method Summary
Modifier and Type Method Description protected static <T extends ImageGray<T>>
voidimageNormalization(T image1, T image2, GrayF32 normalized1, GrayF32 normalized2)
Function to normalize the images between 0 and 255.protected void
interpolateFlowScale(GrayF32 prev, GrayF32 curr)
Takes the flow from the previous lower resolution layer and uses it to initialize the flow in the current layer.abstract void
process(ImagePyramid<GrayF32> image1, ImagePyramid<GrayF32> image2)
Computes dense optical flow from the provided image pyramid.void
process(T image1, T image2)
Processes the raw input images.protected void
warpImageTaylor(GrayF32 before, GrayF32 flowX, GrayF32 flowY, GrayF32 after)
Takes the flow from the previous lower resolution layer and uses it to initialize the flow in the current layer.
-
Field Details
-
pyr1
-
pyr2
-
interp
-
-
Constructor Details
-
DenseFlowPyramidBase
protected DenseFlowPyramidBase(double scale, double sigma, int maxLayers, InterpolatePixelS<GrayF32> interp)
-
-
Method Details
-
process
Processes the raw input images. Normalizes them and creates image pyramids from them. -
interpolateFlowScale
Takes the flow from the previous lower resolution layer and uses it to initialize the flow in the current layer. Adjusts for change in image scale. -
warpImageTaylor
Takes the flow from the previous lower resolution layer and uses it to initialize the flow in the current layer. Adjusts for change in image scale. -
process
Computes dense optical flow from the provided image pyramid. Image gradient for each layer should be computed directly from the layer images.- Parameters:
image1
- Pyramid of first imageimage2
- Pyramid of second image
-
imageNormalization
protected static <T extends ImageGray<T>> void imageNormalization(T image1, T image2, GrayF32 normalized1, GrayF32 normalized2)Function to normalize the images between 0 and 255.
-