To compute the flow field, the code performs a hierarchical solve, to find the vector field taking the source signal to the target. In the implementation, the signal can be defined by the texture colors, by the difference of Gaussians (DOG) of the texture colors, or by a weighted combination of the two.
By default, the code uses the difference of Gaussians to provide a solution that is more robust to changes in lighting between the source and target.
In general a base mesh in PLY format (--mesh) with texture coordinates in either PNG or JPEG format (--in) should be provided, with texture coordinates specified either at vertices or at triangle corners. In the former case, the code transforms the texture coordinates to values at corners and merges duplicate vertices.
If no base geometry is specified, the code constructs a single rectangle, with the aspect ratio of the input images, essentially performing optical flow in image-space.
Alternatively, colors can be specified per-vertex, in which case the two input files (--in) should be in PLY format and should represent the same geometry with different color values at the vertices.
To compute the optical flow field, the code needs to solve a set of sparse linear systems of equations. The implementation supports the use of either Eigen or Cholmod. When compiling, the type of solver is specified by defining either the USE_EIGEN or USE_CHOLMOD flag. (This is supported by the two different Makefiles / Visual Studio Projects, and the two different windows executable correspond to implementations with the two different solver libraries.)
As the solution of the linear system accounts for a lion's share of the computation, we recommend using an efficient solver such as the one backed by Intel's MKL library. (Assuming that the libraries exist and are in a library where the linker can find them, Eigen's MKL support can be enabled by defining the EIGEN_USE_MKL_ALL flag.)