Add Tegra optimization for fastNlMeansDenoising
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Fri, 28 Sep 2012 14:56:36 +0000 (18:56 +0400)
committerAndrey Kamaev <andrey.kamaev@itseez.com>
Fri, 28 Sep 2012 14:56:36 +0000 (18:56 +0400)
modules/photo/src/denoising.cpp
modules/photo/src/precomp.hpp

index 770df13..02d7a6f 100644 (file)
@@ -52,6 +52,11 @@ void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, float h,
     _dst.create(src.size(), src.type());
     Mat dst = _dst.getMat();
 
+#ifdef HAVE_TEGRA_OPTIMIZATION
+    if(tegra::fastNlMeansDenoising(src, dst, h, templateWindowSize, searchWindowSize))
+        return;
+#endif
+
     switch (src.type()) {
         case CV_8U:
             parallel_for(cv::BlockedRange(0, src.rows),
index 4c912fa..3185a18 100644 (file)
 #ifndef __OPENCV_PRECOMP_H__
 #define __OPENCV_PRECOMP_H__
 
-#ifdef HAVE_CVCONFIG_H 
+#ifdef HAVE_CVCONFIG_H
 #include "cvconfig.h"
 #endif
 
 #include "opencv2/photo/photo.hpp"
 
+#ifdef HAVE_TEGRA_OPTIMIZATION
+#include "opencv2/photo/photo_tegra.hpp"
+#endif
+
 #endif