-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Rotating Caliper in Hull2DHelpers #1052
Conversation
Thanks. |
In fact the PR on alpha thick DSS will use it for a better definition and simpler integration (but almost equivalent form the initial version). It test the integration actually on another branch. |
The width definition was given from the axis diagonal projection, but here we just have two classic def. |
For the review, you can wait I am removing the std::pair<> which is not very convenient to pass in ref... |
@dcoeurjo that ready for review, I tested the integration with the AlphaThickSegment and it works with the two different definition. It could be nice if you have time to review before finishing the AlphaThickSegment update that I start to modify. |
## New Features / Critical Changes | ||
- *Geometry Package* | ||
- Hull2DHelpers: implementation of the rotating caliper algorithm to compute | ||
the width (vertical/horizontal or euclidean) of a convex hull. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
euclidean -> Euclidean
@@ -0,0 +1,271 @@ | |||
#FIG 3.2 Produced by xfig version 3.2.5c | |||
Portrait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure you want to include this file to DGtal ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure very useful ;)
double awaitedThHV = DGtal::functions::Hull2D::getThicknessAntipodalPair(Point(0,0), Point(11,1), Point(2,6), DGtal::functions::Hull2D::HorizontalVerticalThickness ); | ||
double awaitedThE = DGtal::functions::Hull2D::getThicknessAntipodalPair(Point(0,0), Point(11,1), Point(2,6), DGtal::functions::Hull2D::EuclideanThickness ); | ||
trace.info() << "Thickness HV = " << thicknessHV << std::endl; | ||
trace.info() << "Thickness HV awaited = " << awaitedThHV << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awaited-> expected ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Expected Thickness HV = " ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes thanks
very nice PR, though. |
If you want to try Catch based unit test file, it would be nice to have a test file (catch based) only testing the thickness computation.. |
Thanks for all the remarks. |
done with the catch ;) |
Great ! (catch is cool, isn't it ? 😄) |
yes done, I was wondering ;) |
great merging |
Rotating Caliper in Hull2DHelpers
As discussed with Jaco last week, to simplify the alphaThickSegment I add the implementation of the rotating caliper (hamos , 1978) working this horizontal/vertical width or from the euclidean one.