Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for gp3 algorithm #1879

Merged
merged 1 commit into from
Jun 5, 2017
Merged

Conversation

puzzlepaint
Copy link
Contributor

Line 229: The intention of the code seems to be to check whether any edge leads to visibility == false and then break. The visibility check seems to be inverted in this line, though. Compare this to lines 225, 472, and 478.

Line 423: angleR is computed from angles_[i].angle, which is computed using atan2. This function's return value range is [-M_PI, M_PI]. angleR is later compared to angleMin and angleMax, which are computed from angle1 and angle2, which are also computed using atan2. Therefore I think that the wrap-around check should be at M_PI, not 2*M_PI.

Line 1482: There seems to be a typo where a = is missing in a comparison such that an assignment is done instead. Compare this to the analogous line 1459.

I think there may also be a bug where the connectPoint function adds a triangle in a place which is designated as a gap by the triangulation function, and then the ffn_/sfn_ are not updated correctly there, but I'm not sure and I don't have a fix for that.

I tested the changes using test_gp3. The result is nearly identical to before.

Original result: https://drive.google.com/open?id=0Bxrkk2CLB8MbQXdZWDBDNHJ1UlU
With this PR: https://drive.google.com/open?id=0Bxrkk2CLB8MbVTVDYnR3czUtV00
(Image upload to github did not work for some reason.)

@puzzlepaint
Copy link
Contributor Author

It seems like some unrelated tests are failing in the CI.

97% tests passed, 2 tests failed out of 67

Total Test time (real) = 349.47 sec

The following tests FAILED:
	 16 - common_io (Failed)
	 30 - feature_shot_estimation (Failed)
Errors while running CTest
make[3]: *** [test/CMakeFiles/tests] Error 8
make[2]: *** [test/CMakeFiles/tests.dir/all] Error 2
make[1]: *** [test/CMakeFiles/tests.dir/rule] Error 2
make: *** [tests] Error 2
91% tests passed, 2 tests failed out of 23

Total Test time (real) =  99.23 sec

The following tests FAILED:
	 11 - a_registration_test (Failed)
	 12 - registration_api (Failed)
Errors while running CTest
make[3]: *** [test/CMakeFiles/tests] Error 8
make[2]: *** [test/CMakeFiles/tests.dir/all] Error 2
make[1]: *** [test/CMakeFiles/tests.dir/rule] Error 2
make: *** [tests] Error 2

@taketwo
Copy link
Member

taketwo commented Jun 2, 2017

Hi, thanks for the fixes. I'm not familiar with the algorithm, but I had a close look at your changes and they all make sense to me. Since the unit test still passes (though it's coverage is probably not complete) I'd vote for merging. @jspricke @SergioRAgostinho your opinion?

@jspricke jspricke merged commit 79d5a7d into PointCloudLibrary:master Jun 5, 2017
@SergioRAgostinho
Copy link
Member

Sorry I was late to the party but I agree on the changes proposed and the explanations provided, albeit also being unfamiliar with the original implementation.

@puzzlepaint Thank you for the images. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants