vector_field_to_hom_mat2d — Approximate an affine map from a displacement vector field.
vector_field_to_hom_mat2d approximates an affine map from the displacement vector field VectorField. The affine map is returned in HomMat2D.
If the displacement vector field has been computed from the original image Iorig and the second image Ires, the internally stored transformation matrix (see affine_trans_image) contains a map that describes how to transform the first image Iorig to the second image Ires. Note that the VectorField must be in relative coordinates as returned by optical_flow_mg.
Output transformation matrix.