Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I was able to solve the issue like this:

After

MapAffine* mapAff = dynamic_cast<MapAffine>(mapPtr.get);

I create a MapAffine object using the parameterised constructor where I multiply the shift component by the integer factor:

MapAffine mapAff2 = cv::reg::MapAffine(ampAff->getLinTr(), alpha * mapAff->getShift());
// alpha is the integer factor

Then I call inversewarp() using mapAff2:

mapAff2.inversewarp(source, destination);

If there's a more efficient way of doing it please let me know

Thanks