the code I used for the article I posted to Qiita.
template matching with CUDA enabled OpenCV https://qiita.com/Ikwus/items/0a978edcd24148a188cb (Japanese only)
affine transformation with CUDA enabled OpenCV https://qiita.com/Ikwus/items/616dc84f7af82cf55d14 (Japanese only)