Hello,
I have a crash problem sometimes when I use RANSAC in sphere detection. It doesn't happen everytime, maybe because it is a random-based algorithm and depending on the point cloud data.
According the debug information, it concerns the method Optimize() of the file "LowStretchSphereParametrization.h".
It crashed on the line 137 in the file ( float maxGap = vangles.front() + 2 * float(M_PI) - vangles.back(); ), when "vangles" is empty.
I don't know if it's normal that "vangles" can happen to be empty, so I'd like to remark it here. Since my plugin uses RANSAC lib, it will be greatly appreciated that if it can be fixed.
Ps:
CC Version: 2.10.2 (Zephyrus).
For now, my solution is adding a line before that to verify"vangles" like:
if (vangles.size() < 2) return;
Thanks
Plugin RANSAC crash problem
Re: Plugin RANSAC crash problem
Frankly, this code is the original code provided by the author of the RansacSD library (in 2008!)
So feel free to debug it ;)
So feel free to debug it ;)
Daniel, CloudCompare admin
Re: Plugin RANSAC crash problem
I tried to contact the author, but I don't succeed.
So, if I modify the codes for the bug in RANSAC, is it possible to ask you to verify and publish it on CC?
What's your way in general for fixing the bugs?
Thanks
So, if I modify the codes for the bug in RANSAC, is it possible to ask you to verify and publish it on CC?
What's your way in general for fixing the bugs?
Thanks
Re: Plugin RANSAC crash problem
Oh yes of course. You can make a Pull Request (PR) on github and we'll happily review it and merge it.
Daniel, CloudCompare admin