I'm trying to find the translation & rotation of an image with the reference template image.
The template image is one of the following pictures.

Since the resolution is quite small (320*240) we would like to solve the alignment problem with the image registration class of opencv (Image Registration). We don't want to use feature based alignment.
So far I did the following function to align the reference mImageTemplate image and the image to find the rotation and translations image - input:
cv::Mat pixelMapRegistration::align(cv::Mat input)
{
cv::Mat transformed;
cv::Ptr<cv::reg::Map> rot_shift_res;
cv::reg::MapperGradEuclid rot_shift = cv::reg::MapperGradEuclid();
rot_shift_res = rot_shift.calculate(mImageTemplate, input);
cv::reg::Map* res = rot_shift_res.get();
rot_shift_res->inverseWarp(input, transformed);
return transformed;
}
Unfortunately it does not work so far. Does someone see the problem?