I am using OpenCV (4.5.2) on an i.MX8MQ. I am having slow performance using the matchTemplate function. I see there is a GPU hardware accelerated TemplateMatching version in the cv::cuda namespace. I am building w/YOCTO linux L5.10.35_2.2.0 using the imx-image-full which pretty much builds in everything including OpenCV 4.5.2. I can see a few cuda headers in the /usr/include/opencv4/opencv2/core/cuda but not the cuda based imageproc ones.
Is this incomplete? Is it possible to build in the additional cuda libraries? will they be GPU accelerated?