Infinite Loop? findHomography() never finish its calculation on Linux (Bug #76)


Added by takuya minagawa about 15 years ago. Updated almost 15 years ago.


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

0%

Category:imgproc, video
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

In some cases and environments, "findHomography()" function seems to take very long time for calculation, like infinite loop.

Please run the following code with attached file "vec_3.xml" on Linux.

    FileStorage cvfs("vec_3.xml", [[FileStorage]]::READ);
    FileNode cvfn(cvfs.fs,NULL);
    vector<Point2f>    reg_vec, query_vec;
    Point2f    pt;
    FileNode qfn = cvfn[[query_vec]];
    FileNodeIterator    it = qfn.begin();
    while(it != qfn.end()){
        pt.x = (float)(*it);
        it++;
        pt.y = (float)(*it);
        query_vec.push_back(pt);
        it++;
    }
    FileNode rfn = cvfn[[reg_vec]];
    FileNodeIterator    it2 = rfn.begin();
    while(it2 != rfn.end()){
        pt.x = (float)(*it2);
        it2++;
        pt.y = (float)(*it2);
        reg_vec.push_back(pt);
        it2++;
    }
    Mat poseMat = findHomography(reg_vec, query_vec, CV_RANSAC, 5);

Strange to say, this problem did not occur on Windows environment (Win XP, VC++2008 express). At Windows, findHomography() returned array filled with "0".

We found this phenomenon at the following environment:

[[CentOS]] release 5.4 (Final)
Linux version 2.6.18-164.10.1.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Jan 7 20:00:41 EST 2010
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
CPU:Quad-Core AMD Opteron(tm) Processor 1352 2.1G 64bit
RAM: 1G

[[CentOS]] release 5.4 (Final)
Linux version 2.6.18-164.10.1.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Jan 7 20:00:41 EST 2010
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
CPU:Intel(R) Pentium(R) 4 CPU 3.20GHz 32bit
RAM: 1G


vec_3.xml (3.1 kB) takuya minagawa, 2010-01-19 10:17 am

err2.xml (2.5 kB) takuya minagawa, 2010-01-25 07:41 am

err3.xml (4.1 kB) takuya minagawa, 2010-01-25 07:41 am

err4.xml (3.1 kB) takuya minagawa, 2010-01-25 07:41 am

err5.xml (4.1 kB) takuya minagawa, 2010-01-25 07:41 am


Associated revisions

Revision 22e352d9
Added by Andrey Kamaev over 12 years ago

Merge pull request #76 vpisarev/test_fixes_1

History

Updated by takuya minagawa about 15 years ago

I found this could happen frequently, so I changed the priority from major to critical.
Anyway, I attached more examples which cause problem.

takmin

Updated by anonymous - about 15 years ago

the bug can not be reproduced. Can you, please, specify the distribution, architecture, compiler, configuration?

Updated by anonymous - about 15 years ago

Here is the environment:
------
CentOS release 5.4 (Final)
Linux version 2.6.18-164.10.1.el5 () (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Jan 7 20:00:41 EST 2010
compiler: g++
CPU:Quad-Core AMD Opteron(tm) Processor 1352 2.1G 64bit
RAM: 1G
------
CentOS release 5.4 (Final)
Linux version 2.6.18-164.10.1.el5 () (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Jan 7 20:00:41 EST 2010
compiler: g++
CPU:Intel(R) Pentium(R) 4 CPU 3.20GHz 32bit
RAM: 1G
------
At the first post, I wrote wrong compiler. We compiled it by "g++".
Unfortunately, I can't specify its version soon.

Updated by anonymous - almost 15 years ago

The bug is possibly fixed in r2812. Please, check it with your data (with vec_3.xml it now produces meaningful results)

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

Also available in: Atom PDF