コード例 #1
0
ファイル: CudaConvolution.cs プロジェクト: wtf3505/emgucv
 /// <summary>
 /// Computes a convolution (or cross-correlation) of two images.
 /// </summary>
 /// <param name="image">Source image. Only CV_32FC1 images are supported for now.</param>
 /// <param name="templ">Template image. The size is not greater than the image size. The type is the same as image .</param>
 /// <param name="result">Result image. If image is W x H and templ is w x h, then result must be W-w+1 x H-h+1.</param>
 /// <param name="ccorr">Flags to evaluate cross-correlation instead of convolution.</param>
 /// <param name="stream">Stream for the asynchronous version</param>
 public void Convolve(
     IInputArray image,
     IInputArray templ,
     IOutputArray result,
     bool ccorr,
     Stream stream = null)
 {
     using (InputArray iaImage = image.GetInputArray())
         using (InputArray iaTempl = templ.GetInputArray())
             using (OutputArray oaResult = result.GetOutputArray())
             {
                 CudaInvoke.cudaConvolutionConvolve(_ptr, iaImage, iaTempl, oaResult, ccorr, stream);
             }
 }