I have an image of size 240x320. I want to calculate single affine parameter vector (6 parameter vector) for whole image using pyramids based Lukas and Kanade. The routine availbale in opencv calculates the dense model parameters, i.e. the parameters for all pixels separately, But i want one affine model for whole image. I have written my own routine but it slower, is there a builtin method in opencv..?