RANSAC producing too large planes

Feel free to ask any question here
westergu
Posts: 25
Joined: Tue Oct 24, 2017 8:52 am

RANSAC producing too large planes

Post 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
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: RANSAC producing too large planes

Post by daniel »

Indeed! I haven't been able to test it myself. I'll try it ASAP.
Daniel, CloudCompare admin
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: RANSAC producing too large planes

Post 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):
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: RANSAC producing too large planes

Post 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.
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: RANSAC producing too large planes

Post 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.
westergu
Posts: 25
Joined: Tue Oct 24, 2017 8:52 am

Re: RANSAC producing too large planes

Post 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
Attachments
RANSAC_old-version.JPG
RANSAC_old-version.JPG (244.64 KiB) Viewed 9681 times
RANSAC_new-version.JPG
RANSAC_new-version.JPG (261.95 KiB) Viewed 9681 times
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: RANSAC producing too large planes

Post by WargodHernandez »

What is the initial file type your using? is that a mesh applying ransac to the vertices?
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: RANSAC producing too large planes

Post by WargodHernandez »

Can you provide a small sample file that the issue presents itself (The smallest subset of a file that exhibits the issue)?
westergu
Posts: 25
Joined: Tue Oct 24, 2017 8:52 am

Re: RANSAC producing too large planes

Post 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
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: RANSAC producing too large planes

Post by WargodHernandez »

I was able to replicate the issue with the file you provided :)
Thank you!
I'll dig into this now
Post Reply