microsoft / opencv

Open Source Computer Vision Library
opencv.org
Apache License 2.0
144 stars 92 forks source link

Core_Matx.fromMat_ Windows 8.0 failure #40

Closed EvgenyAgafonchikov closed 9 years ago

EvgenyAgafonchikov commented 9 years ago

Windows 8.0 has CoreMatx.fromMat test failure.

Initial check based on test-contrib branch. Also reproduced on Windows 8.0 for Itseez master

Repro:

Itseez master
  1. Generate projects for Visual Studio 2012 (cmake -G "Visual Studio 11 2012" <path to src> w/o additional parameters should be enough)
  2. Build solution
  3. Start opencv_test_core.exe. You may use parameter --gtest_filter=*fromMat_ to reduce execution time
    test-contrib branch
  4. Set all environment variables and install required tools from this readme
  5. Run the following command from platforms\winrt to generate solution: setup_winrt.bat WS 8.0 x86 -G "Visual Studio 11 2012"
  6. Build solution
  7. Start opencv_test_core.exe. You may use parameter --gtest_filter=*fromMat_ to reduce execution time

Log:

[----------] 1 test from Core_Matx
[ RUN      ] Core_Matx.fromMat_
..\..\..\..\..\..\modules\core\test\test_mat.cpp(1217): error: Value of: 0.
  Actual: 0
Expected: norm(a, b, NORM_INF)
Which is: 13
[  FAILED  ] Core_Matx.fromMat_ (0 ms)
[----------] 1 test from Core_Matx (0 ms total)

Additional info:

 TEST(Core_Matx, fromMat_)
 {
     Mat_<double> a = (Mat_<double>(2,2) << 10, 11, 12, 13);
     cout << " MatA: " << a; // a is correct there
     Matx22d b(a);
     cout << " MatB: " << b; // b is [0, 0; 0, 0]
     ASSERT_EQ( norm(a, b, NORM_INF), 0.);
 }

Say, replacing of Matx22d b(a); with explicit initialization via pointer Matx22d b((double *)a.ptr()); makes the test pass. However I think this cannot be considered as fix because test checks work of the constructor b(a)

EvgenyAgafonchikov commented 9 years ago

No repro on the latest rebase