<ul dir="auto">
<li>OpenCV =&gt; 3.4.0</li>
<li>Operating System / Platform =&gt; Windows 64 Bit</li>
<li>Compiler =&gt; Visual Studio 2015</li>
<li>Graphic card =&gt;Nvidia RTX 2080</li>
<li>CUDA =&gt;10.1</li>
</ul>
<p dir="auto">hello everyone.<br>
when I execute the cuda template match fuction , something wrong happens.<br>
here is my test code from another issue here:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#include &quot;cuda_runtime.h&quot;
#include &quot;opencv2/opencv.hpp&quot;
#include &lt;stdio.h&gt;

int main()
{
	cv::cuda::GpuMat image_h(1080, 1920, CV_8UC1);
	cv::cuda::GpuMat templ_h(64, 64, CV_8UC1);
	cv::cuda::GpuMat result(1080 - 64 + 1, 1920 - 64 + 1, CV_32FC1);

	cv::Ptr&lt;cv::cuda::TemplateMatching&gt; alg;
	printf(&quot;before create\n&quot;);
	alg = cv::cuda::createTemplateMatching(templ_h.type(), CV_TM_CCOEFF_NORMED);
	printf(&quot;before match\n&quot;);
	alg-&gt;match(image_h, templ_h, result);
	printf(&quot;finished\n&quot;);
	cudaDeviceSynchronize();
	return 0;
}
"><pre class="notranslate"><code class="notranslate">#include "cuda_runtime.h"
#include "opencv2/opencv.hpp"
#include &lt;stdio.h&gt;

int main()
{
	cv::cuda::GpuMat image_h(1080, 1920, CV_8UC1);
	cv::cuda::GpuMat templ_h(64, 64, CV_8UC1);
	cv::cuda::GpuMat result(1080 - 64 + 1, 1920 - 64 + 1, CV_32FC1);

	cv::Ptr&lt;cv::cuda::TemplateMatching&gt; alg;
	printf("before create\n");
	alg = cv::cuda::createTemplateMatching(templ_h.type(), CV_TM_CCOEFF_NORMED);
	printf("before match\n");
	alg-&gt;match(image_h, templ_h, result);
	printf("finished\n");
	cudaDeviceSynchronize();
	return 0;
}

</code></pre></div>
<p dir="auto">when it executes the alg-&gt;match() fuction, the procedure doesn't go further,as belows:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/20158014/54416018-19055a80-4739-11e9-93c2-8041db535cee.jpg"><img src="https://user-images.githubusercontent.com/20158014/54416018-19055a80-4739-11e9-93c2-8041db535cee.jpg" alt="pic" style="max-width: 100%;"></a></p>
<p dir="auto">this fuction works well when I using Nvidia GTX 1070 and the cuda version is 9.1. I don't know why update to RTX 2080 and cuda version updates to 10.1,this function doesn't work. I haven't test other cuda functions .I recompile the opencv ,but it still doesn't work.</p>
<p dir="auto">so I want to know how to solve this problem.I am new to opencv and cuda.some issues has seem to explain something  about that.However I still don't know how to solve it.So someone can give me some direct methods .thank you very much.</p>
<h5 dir="auto">System information (version)</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- OpenCV =&gt; 3.3.1,  3.4.4,  4.0.0
- Operating System / Platform =&gt; Jetson Xavier (Ubuntu 18.04, CUDA 10)
- Compiler =&gt; g++ 7.3.0"><pre class="notranslate"><code class="notranslate">- OpenCV =&gt; 3.3.1,  3.4.4,  4.0.0
- Operating System / Platform =&gt; Jetson Xavier (Ubuntu 18.04, CUDA 10)
- Compiler =&gt; g++ 7.3.0
</code></pre></div>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">"cuda::createTemplateMatching" not work with CUDA10.0.<br>
Although compiling the program works well, if you execute it,<br>
the process stops while the process is activated.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cv::Ptr&lt;cv::cuda::TemplateMatching&gt; alg;
alg = cv::cuda::createTemplateMatching(templ_h.type(), CV_TM_CCOEFF_NORMED);
alg-&gt;match(image_h, templ_h, result);"><pre class="notranslate"><code class="notranslate">cv::Ptr&lt;cv::cuda::TemplateMatching&gt; alg;
alg = cv::cuda::createTemplateMatching(templ_h.type(), CV_TM_CCOEFF_NORMED);
alg-&gt;match(image_h, templ_h, result);
</code></pre></div>