Infinite Loop? findHomography() never finish its calculation on Linux (Bug #76)
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
Associated revisions
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 ([email protected]) (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 ([email protected]) (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