From 91511c1521470d10b6a824b2c053bf47a02d948c Mon Sep 17 00:00:00 2001 From: JinoBetti Date: Thu, 27 Mar 2014 16:28:40 +0100 Subject: [PATCH 1/7] Update out.cpp Fixed a bug with the cv::format(cv::Mat, ...) method for matrices with only one row see http://answers.opencv.org/question/21201/cvformat-does-not-format-the-way-it-should/?answer=23945#post-id-23945 for details --- modules/core/src/out.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/core/src/out.cpp b/modules/core/src/out.cpp index 65190c50e3..a2894b7006 100644 --- a/modules/core/src/out.cpp +++ b/modules/core/src/out.cpp @@ -148,7 +148,7 @@ public: void write(std::ostream& out, const Mat& m, const int*, int) const { out << "["; - writeMat(out, m, ';', ' ', m.cols == 1); + writeMat(out, m, ';', ' ', m.rows == 1); out << "]"; } @@ -165,7 +165,7 @@ public: void write(std::ostream& out, const Mat& m, const int*, int) const { out << "["; - writeMat(out, m, m.cols > 1 ? '[' : ' ', '[', m.cols*m.channels() == 1); + writeMat(out, m, m.cols > 1 ? '[' : ' ', '[', m.rows*m.channels() == 1); out << "]"; } @@ -187,7 +187,7 @@ public: "uint8", "int8", "uint16", "int16", "int32", "float32", "float64", "uint64" }; out << "array(["; - writeMat(out, m, m.cols > 1 ? '[' : ' ', '[', m.cols*m.channels() == 1); + writeMat(out, m, m.cols > 1 ? '[' : ' ', '[', m.rows*m.channels() == 1); out << "], type='" << numpyTypes[m.depth()] << "')"; } @@ -204,7 +204,7 @@ public: virtual ~CSVFormatter() {} void write(std::ostream& out, const Mat& m, const int*, int) const { - writeMat(out, m, ' ', ' ', m.cols*m.channels() == 1); + writeMat(out, m, ' ', ' ', m.rows*m.channels() == 1); if(m.rows > 1) out << "\n"; } @@ -223,7 +223,7 @@ public: void write(std::ostream& out, const Mat& m, const int*, int) const { out << "{"; - writeMat(out, m, ',', ' ', m.cols==1); + writeMat(out, m, ',', ' ', m.rows==1); out << "}"; } From 6d368dc1e7d0da08316c35e453917d8b7a83a583 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Sun, 30 Mar 2014 18:02:03 -0700 Subject: [PATCH 2/7] increase epsilon for MOG2::getBackgroundImage test: it uses float arithmetics --- modules/gpu/test/test_bgfg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gpu/test/test_bgfg.cpp b/modules/gpu/test/test_bgfg.cpp index 6ef93c51b4..e08bfb399b 100644 --- a/modules/gpu/test/test_bgfg.cpp +++ b/modules/gpu/test/test_bgfg.cpp @@ -336,7 +336,7 @@ GPU_TEST_P(MOG2, getBackgroundImage) cv::Mat background_gold; mog2_gold.getBackgroundImage(background_gold); - ASSERT_MAT_NEAR(background_gold, background, 0); + ASSERT_MAT_NEAR(background_gold, background, 1); } INSTANTIATE_TEST_CASE_P(GPU_Video, MOG2, testing::Combine( From 7df92bbb77c2b213e9fd634246450bfcc5b78f11 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 31 Mar 2014 17:30:08 +0400 Subject: [PATCH 3/7] fixed C4505 --- modules/nonfree/perf/perf_main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/nonfree/perf/perf_main.cpp b/modules/nonfree/perf/perf_main.cpp index c9872a49ce..d46a36a13a 100644 --- a/modules/nonfree/perf/perf_main.cpp +++ b/modules/nonfree/perf/perf_main.cpp @@ -31,7 +31,9 @@ static const char * impls[] = { int main(int argc, char **argv) { ::perf::TestBase::setPerformanceStrategy(::perf::PERF_STRATEGY_SIMPLE); -#if defined(HAVE_CUDA) +#if defined(HAVE_CUDA) && defined(HAVE_OPENCL) + CV_PERF_TEST_MAIN_INTERNALS(nonfree, impls, perf::printCudaInfo(), dumpOpenCLDevice()); +#elif defined(HAVE_CUDA) CV_PERF_TEST_MAIN_INTERNALS(nonfree, impls, perf::printCudaInfo()); #elif defined(HAVE_OPENCL) CV_PERF_TEST_MAIN_INTERNALS(nonfree, impls, dumpOpenCLDevice()); From 9b9769169f4d30666af19ecb63329b7a04492877 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 31 Mar 2014 19:45:55 +0400 Subject: [PATCH 4/7] doc typos --- doc/tutorials/tutorials.rst | 2 +- .../video/table_of_content_video/table_of_content_video.rst | 2 +- modules/contrib/doc/facerec/facerec_api.rst | 2 +- .../doc/facerec/tutorial/facerec_gender_classification.rst | 2 +- modules/gpu/doc/introduction.rst | 2 +- modules/legacy/src/blobtrackanalysishist.cpp | 4 ++-- modules/legacy/src/levmar.cpp | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/tutorials/tutorials.rst b/doc/tutorials/tutorials.rst index 54cc91acb8..3c4e9213e6 100644 --- a/doc/tutorials/tutorials.rst +++ b/doc/tutorials/tutorials.rst @@ -102,7 +102,7 @@ As always, we would be happy to hear your comments and receive your contribution .. cssclass:: toctableopencv =========== ======================================================= - |Video| Look here in order to find use on your video stream algoritms like: motion extraction, feature tracking and foreground extractions. + |Video| Look here in order to find use on your video stream algorithms like: motion extraction, feature tracking and foreground extractions. =========== ======================================================= diff --git a/doc/tutorials/video/table_of_content_video/table_of_content_video.rst b/doc/tutorials/video/table_of_content_video/table_of_content_video.rst index a2521d6956..ddcad0c700 100644 --- a/doc/tutorials/video/table_of_content_video/table_of_content_video.rst +++ b/doc/tutorials/video/table_of_content_video/table_of_content_video.rst @@ -3,7 +3,7 @@ *video* module. Video analysis ----------------------------------------------------------- -Look here in order to find use on your video stream algoritms like: motion extraction, feature tracking and foreground extractions. +Look here in order to find use on your video stream algorithms like: motion extraction, feature tracking and foreground extractions. .. include:: ../../definitions/noContent.rst diff --git a/modules/contrib/doc/facerec/facerec_api.rst b/modules/contrib/doc/facerec/facerec_api.rst index 3100cfd8f9..2aa3dcfa00 100644 --- a/modules/contrib/doc/facerec/facerec_api.rst +++ b/modules/contrib/doc/facerec/facerec_api.rst @@ -75,7 +75,7 @@ Moreover every :ocv:class:`FaceRecognizer` supports the: Setting the Thresholds +++++++++++++++++++++++ -Sometimes you run into the situation, when you want to apply a threshold on the prediction. A common scenario in face recognition is to tell, wether a face belongs to the training dataset or if it is unknown. You might wonder, why there's no public API in :ocv:class:`FaceRecognizer` to set the threshold for the prediction, but rest assured: It's supported. It just means there's no generic way in an abstract class to provide an interface for setting/getting the thresholds of *every possible* :ocv:class:`FaceRecognizer` algorithm. The appropriate place to set the thresholds is in the constructor of the specific :ocv:class:`FaceRecognizer` and since every :ocv:class:`FaceRecognizer` is a :ocv:class:`Algorithm` (see above), you can get/set the thresholds at runtime! +Sometimes you run into the situation, when you want to apply a threshold on the prediction. A common scenario in face recognition is to tell, whether a face belongs to the training dataset or if it is unknown. You might wonder, why there's no public API in :ocv:class:`FaceRecognizer` to set the threshold for the prediction, but rest assured: It's supported. It just means there's no generic way in an abstract class to provide an interface for setting/getting the thresholds of *every possible* :ocv:class:`FaceRecognizer` algorithm. The appropriate place to set the thresholds is in the constructor of the specific :ocv:class:`FaceRecognizer` and since every :ocv:class:`FaceRecognizer` is a :ocv:class:`Algorithm` (see above), you can get/set the thresholds at runtime! Here is an example of setting a threshold for the Eigenfaces method, when creating the model: diff --git a/modules/contrib/doc/facerec/tutorial/facerec_gender_classification.rst b/modules/contrib/doc/facerec/tutorial/facerec_gender_classification.rst index 770083170d..95c821298e 100644 --- a/modules/contrib/doc/facerec/tutorial/facerec_gender_classification.rst +++ b/modules/contrib/doc/facerec/tutorial/facerec_gender_classification.rst @@ -71,7 +71,7 @@ You really don't want to create the CSV file by hand. And you really don't want Fisherfaces for Gender Classification -------------------------------------- -If you want to decide wether a person is *male* or *female*, you have to learn the discriminative features of both classes. The Eigenfaces method is based on the Principal Component Analysis, which is an unsupervised statistical model and not suitable for this task. Please see the Face Recognition tutorial for insights into the algorithms. The Fisherfaces instead yields a class-specific linear projection, so it is much better suited for the gender classification task. `http://www.bytefish.de/blog/gender_classification `_ shows the recognition rate of the Fisherfaces method for gender classification. +If you want to decide whether a person is *male* or *female*, you have to learn the discriminative features of both classes. The Eigenfaces method is based on the Principal Component Analysis, which is an unsupervised statistical model and not suitable for this task. Please see the Face Recognition tutorial for insights into the algorithms. The Fisherfaces instead yields a class-specific linear projection, so it is much better suited for the gender classification task. `http://www.bytefish.de/blog/gender_classification `_ shows the recognition rate of the Fisherfaces method for gender classification. The Fisherfaces method achieves a 98% recognition rate in a subject-independent cross-validation. A subject-independent cross-validation means *images of the person under test are never used for learning the model*. And could you believe it: you can simply use the facerec_fisherfaces demo, that's inlcuded in OpenCV. diff --git a/modules/gpu/doc/introduction.rst b/modules/gpu/doc/introduction.rst index eacfd61a8f..776ed2fb48 100644 --- a/modules/gpu/doc/introduction.rst +++ b/modules/gpu/doc/introduction.rst @@ -43,7 +43,7 @@ Utilizing Multiple GPUs ----------------------- In the current version, each of the OpenCV GPU algorithms can use only a single GPU. So, to utilize multiple GPUs, you have to manually distribute the work between GPUs. -Switching active devie can be done using :ocv:func:`gpu::setDevice()` function. For more details please read Cuda C Programing Guide. +Switching active devie can be done using :ocv:func:`gpu::setDevice()` function. For more details please read Cuda C Programming Guide. While developing algorithms for multiple GPUs, note a data passing overhead. For primitive functions and small images, it can be significant, which may eliminate all the advantages of having multiple GPUs. But for high-level algorithms, consider using multi-GPU acceleration. For example, the Stereo Block Matching algorithm has been successfully parallelized using the following algorithm: diff --git a/modules/legacy/src/blobtrackanalysishist.cpp b/modules/legacy/src/blobtrackanalysishist.cpp index 0e349f9f4e..c75c954912 100644 --- a/modules/legacy/src/blobtrackanalysishist.cpp +++ b/modules/legacy/src/blobtrackanalysishist.cpp @@ -730,12 +730,12 @@ private: m_pFViVarRes = (int*)cvAlloc(sizeof(int)*m_Dim); m_Sizes = (int*)cvAlloc(sizeof(int)*m_Dim); - { /* Create init sparce matrix: */ + { /* Create init sparse matrix: */ int i; for(i=0;i Date: Mon, 31 Mar 2014 09:23:56 -0700 Subject: [PATCH 5/7] OpenCV version++. OpenCV Manager version++. --- .../android_binary_package/O4A_SDK.rst | 14 +++++++------- .../dev_with_OCV_on_Android.rst | 14 +++++++------- modules/core/include/opencv2/core/version.hpp | 2 +- .../generator/src/java/android+OpenCVLoader.java | 5 +++++ .../android/service/engine/AndroidManifest.xml | 4 ++-- .../engine/jni/BinderComponent/OpenCVEngine.cpp | 2 +- .../org/opencv/engine/manager/ManagerActivity.java | 2 +- platforms/android/service/readme.txt | 12 ++++++------ 8 files changed, 30 insertions(+), 25 deletions(-) diff --git a/doc/tutorials/introduction/android_binary_package/O4A_SDK.rst b/doc/tutorials/introduction/android_binary_package/O4A_SDK.rst index ef9337aae2..a70a98d52a 100644 --- a/doc/tutorials/introduction/android_binary_package/O4A_SDK.rst +++ b/doc/tutorials/introduction/android_binary_package/O4A_SDK.rst @@ -48,10 +48,10 @@ The structure of package contents looks as follows: :: - OpenCV-2.4.8-android-sdk + OpenCV-2.4.9-android-sdk |_ apk - | |_ OpenCV_2.4.8_binary_pack_armv7a.apk - | |_ OpenCV_2.4.8_Manager_2.16_XXX.apk + | |_ OpenCV_2.4.9_binary_pack_armv7a.apk + | |_ OpenCV_2.4.9_Manager_2.18_XXX.apk | |_ doc |_ samples @@ -157,10 +157,10 @@ Get the OpenCV4Android SDK .. code-block:: bash - unzip ~/Downloads/OpenCV-2.4.8-android-sdk.zip + unzip ~/Downloads/OpenCV-2.4.9-android-sdk.zip -.. |opencv_android_bin_pack| replace:: :file:`OpenCV-2.4.8-android-sdk.zip` -.. _opencv_android_bin_pack_url: http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.4.8/OpenCV-2.4.8-android-sdk.zip/download +.. |opencv_android_bin_pack| replace:: :file:`OpenCV-2.4.9-android-sdk.zip` +.. _opencv_android_bin_pack_url: http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.4.9/OpenCV-2.4.9-android-sdk.zip/download .. |opencv_android_bin_pack_url| replace:: |opencv_android_bin_pack| .. |seven_zip| replace:: 7-Zip .. _seven_zip: http://www.7-zip.org/ @@ -295,7 +295,7 @@ Well, running samples from Eclipse is very simple: .. code-block:: sh :linenos: - /platform-tools/adb install /apk/OpenCV_2.4.8_Manager_2.16_armv7a-neon.apk + /platform-tools/adb install /apk/OpenCV_2.4.9_Manager_2.18_armv7a-neon.apk .. note:: ``armeabi``, ``armv7a-neon``, ``arm7a-neon-android8``, ``mips`` and ``x86`` stand for platform targets: diff --git a/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.rst b/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.rst index bc9ff7a4a8..6fe8f6b941 100644 --- a/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.rst +++ b/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.rst @@ -55,14 +55,14 @@ Manager to access OpenCV libraries externally installed in the target system. :guilabel:`File -> Import -> Existing project in your workspace`. Press :guilabel:`Browse` button and locate OpenCV4Android SDK - (:file:`OpenCV-2.4.8-android-sdk/sdk`). + (:file:`OpenCV-2.4.9-android-sdk/sdk`). .. image:: images/eclipse_opencv_dependency0.png :alt: Add dependency from OpenCV library :align: center #. In application project add a reference to the OpenCV Java SDK in - :guilabel:`Project -> Properties -> Android -> Library -> Add` select ``OpenCV Library - 2.4.8``. + :guilabel:`Project -> Properties -> Android -> Library -> Add` select ``OpenCV Library - 2.4.9``. .. image:: images/eclipse_opencv_dependency1.png :alt: Add dependency from OpenCV library @@ -128,27 +128,27 @@ described above. #. Add the OpenCV library project to your workspace the same way as for the async initialization above. Use menu :guilabel:`File -> Import -> Existing project in your workspace`, press :guilabel:`Browse` button and select OpenCV SDK path - (:file:`OpenCV-2.4.8-android-sdk/sdk`). + (:file:`OpenCV-2.4.9-android-sdk/sdk`). .. image:: images/eclipse_opencv_dependency0.png :alt: Add dependency from OpenCV library :align: center #. In the application project add a reference to the OpenCV4Android SDK in - :guilabel:`Project -> Properties -> Android -> Library -> Add` select ``OpenCV Library - 2.4.8``; + :guilabel:`Project -> Properties -> Android -> Library -> Add` select ``OpenCV Library - 2.4.9``; .. image:: images/eclipse_opencv_dependency1.png :alt: Add dependency from OpenCV library :align: center #. If your application project **doesn't have a JNI part**, just copy the corresponding OpenCV - native libs from :file:`/sdk/native/libs/` to your + native libs from :file:`/sdk/native/libs/` to your project directory to folder :file:`libs/`. In case of the application project **with a JNI part**, instead of manual libraries copying you need to modify your ``Android.mk`` file: add the following two code lines after the ``"include $(CLEAR_VARS)"`` and before - ``"include path_to_OpenCV-2.4.8-android-sdk/sdk/native/jni/OpenCV.mk"`` + ``"include path_to_OpenCV-2.4.9-android-sdk/sdk/native/jni/OpenCV.mk"`` .. code-block:: make :linenos: @@ -221,7 +221,7 @@ taken: .. code-block:: make - include C:\Work\OpenCV4Android\OpenCV-2.4.8-android-sdk\sdk\native\jni\OpenCV.mk + include C:\Work\OpenCV4Android\OpenCV-2.4.9-android-sdk\sdk\native\jni\OpenCV.mk Should be inserted into the :file:`jni/Android.mk` file **after** this line: diff --git a/modules/core/include/opencv2/core/version.hpp b/modules/core/include/opencv2/core/version.hpp index 25e5892b6c..63c2935282 100644 --- a/modules/core/include/opencv2/core/version.hpp +++ b/modules/core/include/opencv2/core/version.hpp @@ -49,7 +49,7 @@ #define CV_VERSION_EPOCH 2 #define CV_VERSION_MAJOR 4 -#define CV_VERSION_MINOR 8 +#define CV_VERSION_MINOR 9 #define CV_VERSION_REVISION 0 #define CVAUX_STR_EXP(__A) #__A diff --git a/modules/java/generator/src/java/android+OpenCVLoader.java b/modules/java/generator/src/java/android+OpenCVLoader.java index 0892e3af3c..13cd428494 100644 --- a/modules/java/generator/src/java/android+OpenCVLoader.java +++ b/modules/java/generator/src/java/android+OpenCVLoader.java @@ -42,6 +42,11 @@ public class OpenCVLoader */ public static final String OPENCV_VERSION_2_4_8 = "2.4.8"; + /** + * OpenCV Library version 2.4.9. + */ + public static final String OPENCV_VERSION_2_4_9 = "2.4.9"; + /** * Loads and initializes OpenCV library from current application package. Roughly, it's an analog of system.loadLibrary("opencv_java"). * @return Returns true is initialization of OpenCV was successful. diff --git a/platforms/android/service/engine/AndroidManifest.xml b/platforms/android/service/engine/AndroidManifest.xml index 7cae6ce8a0..3ada75d0a2 100644 --- a/platforms/android/service/engine/AndroidManifest.xml +++ b/platforms/android/service/engine/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="218@ANDROID_PLATFORM_VERSION_CODE@" + android:versionName="2.18" > diff --git a/platforms/android/service/engine/jni/BinderComponent/OpenCVEngine.cpp b/platforms/android/service/engine/jni/BinderComponent/OpenCVEngine.cpp index 359906406e..2b113b4e22 100644 --- a/platforms/android/service/engine/jni/BinderComponent/OpenCVEngine.cpp +++ b/platforms/android/service/engine/jni/BinderComponent/OpenCVEngine.cpp @@ -15,7 +15,7 @@ using namespace android; const int OpenCVEngine::Platform = DetectKnownPlatforms(); const int OpenCVEngine::CpuID = GetCpuID(); -const int OpenCVEngine::KnownVersions[] = {2040000, 2040100, 2040200, 2040300, 2040301, 2040302, 2040400, 2040500, 2040600, 2040700, 2040701, 2040800}; +const int OpenCVEngine::KnownVersions[] = {2040000, 2040100, 2040200, 2040300, 2040301, 2040302, 2040400, 2040500, 2040600, 2040700, 2040701, 2040800, 2040900}; bool OpenCVEngine::ValidateVersion(int version) { diff --git a/platforms/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java b/platforms/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java index 8d40242033..0cd2fd58ef 100644 --- a/platforms/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java +++ b/platforms/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java @@ -117,7 +117,7 @@ public class ManagerActivity extends Activity } else { - HardwarePlatformView.setText("Tegra 5"); + HardwarePlatformView.setText("Tegra K1"); } } else diff --git a/platforms/android/service/readme.txt b/platforms/android/service/readme.txt index 65678093de..51853c24e5 100644 --- a/platforms/android/service/readme.txt +++ b/platforms/android/service/readme.txt @@ -14,20 +14,20 @@ manually using adb tool: .. code-block:: sh - adb install OpenCV-2.4.8-android-sdk/apk/OpenCV_2.4.8_Manager_2.16_.apk + adb install OpenCV-2.4.9-android-sdk/apk/OpenCV_2.4.9_Manager_2.18_.apk Use the table below to determine proper OpenCV Manager package for your device: +------------------------------+--------------+----------------------------------------------------+ | Hardware Platform | Android ver. | Package name | +==============================+==============+====================================================+ -| armeabi-v7a (ARMv7-A + NEON) | >= 2.3 | OpenCV_2.4.8_Manager_2.16_armv7a-neon.apk | +| armeabi-v7a (ARMv7-A + NEON) | >= 2.3 | OpenCV_2.4.9_Manager_2.18_armv7a-neon.apk | +------------------------------+--------------+----------------------------------------------------+ -| armeabi-v7a (ARMv7-A + NEON) | = 2.2 | OpenCV_2.4.8_Manager_2.16_armv7a-neon-android8.apk | +| armeabi-v7a (ARMv7-A + NEON) | = 2.2 | OpenCV_2.4.9_Manager_2.18_armv7a-neon-android8.apk | +------------------------------+--------------+----------------------------------------------------+ -| armeabi (ARMv5, ARMv6) | >= 2.3 | OpenCV_2.4.8_Manager_2.16_armeabi.apk | +| armeabi (ARMv5, ARMv6) | >= 2.3 | OpenCV_2.4.9_Manager_2.18_armeabi.apk | +------------------------------+--------------+----------------------------------------------------+ -| Intel x86 | >= 2.3 | OpenCV_2.4.8_Manager_2.16_x86.apk | +| Intel x86 | >= 2.3 | OpenCV_2.4.9_Manager_2.18_x86.apk | +------------------------------+--------------+----------------------------------------------------+ -| MIPS | >= 2.3 | OpenCV_2.4.8_Manager_2.16_mips.apk | +| MIPS | >= 2.3 | OpenCV_2.4.9_Manager_2.18_mips.apk | +------------------------------+--------------+----------------------------------------------------+ From f8d922ad3ee26f8e3f0f01d9b41ab45497034dc5 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Fri, 4 Apr 2014 10:31:33 +0400 Subject: [PATCH 6/7] disable gpu::GeneralizedHough compilation on gcc 4.7 --- modules/gpu/src/cuda/generalized_hough.cu | 4 ++++ modules/gpu/src/generalized_hough.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/modules/gpu/src/cuda/generalized_hough.cu b/modules/gpu/src/cuda/generalized_hough.cu index 5e2041eae4..b07ef0f6b9 100644 --- a/modules/gpu/src/cuda/generalized_hough.cu +++ b/modules/gpu/src/cuda/generalized_hough.cu @@ -40,6 +40,10 @@ // //M*/ +#if defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ == 47) +# define CUDA_DISABLER +#endif + #if !defined CUDA_DISABLER #include diff --git a/modules/gpu/src/generalized_hough.cpp b/modules/gpu/src/generalized_hough.cpp index a92c37d1a5..6f48161c9e 100644 --- a/modules/gpu/src/generalized_hough.cpp +++ b/modules/gpu/src/generalized_hough.cpp @@ -46,6 +46,10 @@ using namespace std; using namespace cv; using namespace cv::gpu; +#if defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ == 47) +# define CUDA_DISABLER +#endif + #if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) Ptr cv::gpu::GeneralizedHough_GPU::create(int) { throw_nogpu(); return Ptr(); } From d822d6f1013badd5c48531c0f1e27f0eb2f27129 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Mon, 7 Apr 2014 09:49:17 +0400 Subject: [PATCH 7/7] disable GeneralizedHough tests on gcc 4.7 --- modules/gpu/perf/perf_imgproc.cpp | 4 ++++ modules/gpu/test/test_hough.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/modules/gpu/perf/perf_imgproc.cpp b/modules/gpu/perf/perf_imgproc.cpp index fa0a42cfef..01327d2a93 100644 --- a/modules/gpu/perf/perf_imgproc.cpp +++ b/modules/gpu/perf/perf_imgproc.cpp @@ -1832,6 +1832,8 @@ PERF_TEST_P(Sz_Dp_MinDist, ImgProc_HoughCircles, ////////////////////////////////////////////////////////////////////// // GeneralizedHough +#if !defined(__GNUC__) || (__GNUC__ * 10 + __GNUC_MINOR__ != 47) + CV_FLAGS(GHMethod, GHT_POSITION, GHT_SCALE, GHT_ROTATION) DEF_PARAM_TEST(Method_Sz, GHMethod, cv::Size); @@ -1918,3 +1920,5 @@ PERF_TEST_P(Method_Sz, DISABLED_ImgProc_GeneralizedHough, CPU_SANITY_CHECK(positions); } } + +#endif diff --git a/modules/gpu/test/test_hough.cpp b/modules/gpu/test/test_hough.cpp index f876a7a2b0..4ae00cfd08 100644 --- a/modules/gpu/test/test_hough.cpp +++ b/modules/gpu/test/test_hough.cpp @@ -185,6 +185,8 @@ INSTANTIATE_TEST_CASE_P(GPU_ImgProc, HoughCircles, testing::Combine( /////////////////////////////////////////////////////////////////////////////////////////////////////// // GeneralizedHough +#if !defined(__GNUC__) || (__GNUC__ * 10 + __GNUC_MINOR__ != 47) + PARAM_TEST_CASE(GeneralizedHough, cv::gpu::DeviceInfo, UseRoi) { }; @@ -252,4 +254,6 @@ INSTANTIATE_TEST_CASE_P(GPU_ImgProc, GeneralizedHough, testing::Combine( ALL_DEVICES, WHOLE_SUBMAT)); +#endif + #endif // HAVE_CUDA