From: Andrey Kamaev Date: Fri, 11 Nov 2011 14:45:53 +0000 (+0000) Subject: Tegra-optimized Canny X-Git-Tag: accepted/2.0/20130307.220821~1633 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4136855ba84ba3d55a08f93ff45e5434ed25ade8;p=profile%2Fivi%2Fopencv.git Tegra-optimized Canny --- diff --git a/modules/imgproc/perf/perf_canny.cpp b/modules/imgproc/perf/perf_canny.cpp index c351659..31939b2 100644 --- a/modules/imgproc/perf/perf_canny.cpp +++ b/modules/imgproc/perf/perf_canny.cpp @@ -11,10 +11,10 @@ typedef perf::TestBaseWithParam Img_Aperture_L2_th PERF_TEST_P( Img_Aperture_L2_thresholds, canny, testing::Combine( - testing::Values( "cv/shared/lena.jpg", "stitching/b1.jpg" ), + testing::Values( "cv/shared/lena.jpg", "stitching/b1.jpg", "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png" ), testing::Values( 3, 5 ), testing::Bool(), - testing::Values( make_tuple(50.0, 100.0), make_tuple(0.0, 50.0) ) + testing::Values( make_tuple(50.0, 100.0), make_tuple(0.0, 50.0), make_tuple(100.0, 120.0) ) ) ) { diff --git a/modules/imgproc/src/canny.cpp b/modules/imgproc/src/canny.cpp index d02c038..fdbe03f 100644 --- a/modules/imgproc/src/canny.cpp +++ b/modules/imgproc/src/canny.cpp @@ -45,6 +45,11 @@ CV_IMPL void cvCanny( const void* srcarr, void* dstarr, double low_thresh, double high_thresh, int aperture_size ) { +#ifdef HAVE_TEGRA_OPTIMIZATION + if (tegra::canny(cv::cvarrToMat(srcarr), cv::cvarrToMat(dstarr), low_thresh, high_thresh, + aperture_size & ~CV_CANNY_L2_GRADIENT, (aperture_size & CV_CANNY_L2_GRADIENT) == CV_CANNY_L2_GRADIENT)) + return; +#endif cv::Ptr dx, dy; cv::AutoBuffer buffer; std::vector stack; diff --git a/modules/ts/misc/concatlogs.py b/modules/ts/misc/concatlogs.py index 502bcfa..af95bac 100644 --- a/modules/ts/misc/concatlogs.py +++ b/modules/ts/misc/concatlogs.py @@ -1,5 +1,5 @@ from optparse import OptionParser -import glob, sys, os +import glob, sys, os, re if __name__ == "__main__": parser = OptionParser() @@ -29,7 +29,7 @@ if __name__ == "__main__": continue idx1 = text.find("") + len("") idx2 = html.rfind("") - html = html[:idx2] + text[idx1:] + html = html[:idx2] + re.sub(r"[ \t\n\r]+", " ", text[idx1:]) except: pass