From 06e7101795110278b27952152e29cf33cb29f5ae Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Fri, 28 Sep 2012 18:56:36 +0400 Subject: [PATCH] Add Tegra optimization for fastNlMeansDenoising --- modules/photo/src/denoising.cpp | 5 +++++ modules/photo/src/precomp.hpp | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/photo/src/denoising.cpp b/modules/photo/src/denoising.cpp index 770df13..02d7a6f 100644 --- a/modules/photo/src/denoising.cpp +++ b/modules/photo/src/denoising.cpp @@ -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), diff --git a/modules/photo/src/precomp.hpp b/modules/photo/src/precomp.hpp index 4c912fa..3185a18 100644 --- a/modules/photo/src/precomp.hpp +++ b/modules/photo/src/precomp.hpp @@ -43,10 +43,14 @@ #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 -- 2.7.4