cvSVD() sometimes fails with CV_32FC1 on 64 bit Linux (Bug #136)


Added by Robert Huitl about 15 years ago. Updated almost 15 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:- % Done:

0%

Category:core
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Depending on the input data, cvSVD() sometimes fails to calculate the correct results when CV_32FC1 matrices are used. Instead, the eigenvalues and eigenvectors come back as all-zeroes. Using CV_64FC1 works as expected.

I observe this bug on an OpenSUSE 11.0 machine with
gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux)
I don't have access to a 64 bit machine with a different OS, so I couldn't rule out the compiler as the culprit.

I attached a test case. It consists of a 64x64 float matrix stored in a file, a .c file and a Makefile.

On my 32 bit laptop the output is:
Eigenvalues: 0.007886 0.006874 0.006036 ...
Eigenvalues: 0.007886 0.006874 0.006036 ...

On the 64 bit machine, I get:
Eigenvalues: 0.007886 0.006874 0.006036 ...
Eigenvalues: 0.000000 0.000000 0.000000 ...

It doesn't matter whether I use OpenCV 2.0.0 or SVN. Disabling optimization doesn't help either.


cvsvd-bug.tar.gz (12.8 kB) Robert Huitl, 2010-02-21 12:33 am


Associated revisions

Revision 09383580
Added by Andrey Kamaev over 12 years ago

Merge pull requests #136, #142, #150, #152 from asmorkalov/new_framework_tutorial, asmorkalov/fd_package_fix, asmorkalov/java_test_fix and asmorkalov/engine_build_fix

Revision 6cd071f9
Added by Andrey Pavlenko about 11 years ago

Merge pull request #136 from KonstantinMatskevich:ocl_test_cascade

History

Updated by Robert Huitl about 15 years ago

We updated to OpenSUSE 11.2. I rebuilt OpenCV and the test case, but the problem persists. So this rules out the compiler.

gcc version 4.4.1 [gcc-4_4-branch revision 150839] (SUSE Linux)

Updated by anonymous - almost 15 years ago

possibly fixed in r2868. It was likely related to SSE2, rather than 32-bit vs 64-bit issue.

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF