Page 1 of 2

RANSAC producing too large planes

Posted: Mon Mar 30, 2020 4:12 am
by westergu
Hi,
Has there been an update in the RANSAC shape detection code? The plugin does not produce planes that it used to do in the CC version from February and earlier. The planes seems to be way to large, and some planes are actually completely outside the point cloud. I have been using the same search parameters that I have been using before, that generated nice results.

Best regards,
Gustav

Re: RANSAC producing too large planes

Posted: Mon Mar 30, 2020 7:42 pm
by daniel
Indeed! I haven't been able to test it myself. I'll try it ASAP.

Re: RANSAC producing too large planes

Posted: Mon Mar 30, 2020 8:14 pm
by WargodHernandez
There have been updates to the qRansac plugin mostly from me, I want to get info from you about your setup. I have tested with files I have on hand, but I obviously can't test all possible files :), do you have an example file that evaluates differently that I can try out?

please supply the following at minimum
Your environment
•CC Version (or git hash/tag):
•OS & Version:
•Graphics card:
•Qt Version (if compiling):

Re: RANSAC producing too large planes

Posted: Mon Mar 30, 2020 8:25 pm
by WargodHernandez
also what file types are you starting with, I am wondering if the issue is related to shift and scale items.
the new version should be cloning the original points rather than using the ones generated by RANSAC.
All of my testing was starting with .BIN files with nothing set for shift/scale.

Re: RANSAC producing too large planes

Posted: Mon Mar 30, 2020 11:28 pm
by WargodHernandez
The only other change that I can think of that might impact this is switching from

Code: Select all

prim = new ccPlane(dX, dY, &glMat); 
to

Code: Select all

prim = new ccPlane(std::abs(dX), std::abs(dY), &glMat);
I don't honestly see why this could cause a sizing issue, this just makes it so you can actually look at the size and center points correctly inside of the CC interface which didn't handle negative plane dimensions correctly.

Re: RANSAC producing too large planes

Posted: Tue Mar 31, 2020 4:11 am
by westergu
Hi,
I tried to remove the global shift scale by setting X and Y to 0, but that did not help. I'm running CloudCompare 2.11.beta - 26/03/2020, but I noticed this issue already in the 03/03/2020 downloaded version. My computer has the following specs:
- Windows 10 Pro for workstations ver. 1803
- Graphic cads: Intel UHD Graphics P630
NVIDIA Quadro P4200

The cloud that I have tested on is a scanned rock tunnel, containing 2.45 milj points with a subsampled spacing of 0.01 m. The RANSCAC parameters are the following:
Primitives=Planes
Min support points = 100
e = 0.02
b = 0.01
a = 5°
overlooking probability = 0.000001

Attached is also two images, that show how the planes were generated with the "old" RANSAC code vs. "new" code. Approximately same RANSAC parameters have been used for both runs.

Best regards,
Gustav

Re: RANSAC producing too large planes

Posted: Tue Mar 31, 2020 4:11 pm
by WargodHernandez
What is the initial file type your using? is that a mesh applying ransac to the vertices?

Re: RANSAC producing too large planes

Posted: Tue Mar 31, 2020 4:41 pm
by WargodHernandez
Can you provide a small sample file that the issue presents itself (The smallest subset of a file that exhibits the issue)?

Re: RANSAC producing too large planes

Posted: Tue Mar 31, 2020 6:08 pm
by westergu
Hi,
Attached is a link to .bin file with scan data that produces false ransac planes when using the parameters that I described earlier. The initial file type is pts point cloud from laser scanner to witch I have calculated normals with the triangulation method. As I said in my first post, this used to work in the CC version from February and earlier.

https://wetransfer.com/downloads/d15b80 ... 055/c1d336

Re: RANSAC producing too large planes

Posted: Tue Mar 31, 2020 6:47 pm
by WargodHernandez
I was able to replicate the issue with the file you provided :)
Thank you!
I'll dig into this now