-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
LpMetric in R^d #1388
LpMetric in R^d #1388
Conversation
Should fix #1345 issues |
@rolanddenis : for |
So, the only difference with |
And the fact that |
OK for the BTW, the fix of the |
Yes.. There is a bit of redundancies (Inexact... could inherit from LpMetric) but the Point type is different. Not great but anyway..
^^ |
About that: so making Moreover, looking at how const MetricToPoint metricToPoint = std::bind( *myMetric, myEmbedder( *it ), std::placeholders::_1 ); with typedef std::function< typename Metric::Value ( typename Metric::Point ) > MetricToPoint; and since Is that the wanted behaviour? (it is a real question, I'm not aware of all the usages of this class) |
dvcm-2d needs an "exact" VoronoiMap. Can you spot me where the conversion issue is in the dvcm code ? I'd keep the following principles (maybe it should be clearer un the doc):
Promoting LpMetric to CSeparableMetric would probably be confusing.
I agree.. I was also thinking to force the metric in LocalEstimator.. to be a LpMetric but this would have been less generic (the only requirement is that the metric should be in R^n, and so far we have a unique model of that that is LpMetic) |
It comes from typedef VCMDigitalSurfaceLocalEstimator<DigitalSurfaceContainer,Metric,
KernelFunction, CurvatureFunctor> VCMCurvatureEstimator;
...
VCMCurvatureEstimator estimator( ptrSurface );
estimator.setParams( Pointels, R, r, chi, 3.0, l2, true ); which constructs a {
mySurfelEmbedding = surfelEmbedding;
myVCMOnSurface = CountedConstPtrOrConstPtr<VCMOnSurface>
( new VCMOnSurface( mySurface, mySurfelEmbedding,
R, r, chi_r, t, aMetric, verbose ), true );
myGeomFct.attach( myVCMOnSurface );
} whose constructor uses a typedef LocalEstimatorFromSurfelFunctorAdapter< DigitalSurfaceContainer, Metric, SurfelFunctor, Functor>
NormalEstimator;
...
NormalEstimator estimator;
...
// get rough estimation of normal
normals.trivialNormal = estimator.eval( it ); |
Ok, so if it is necessary, we maybe should check it in |
👌 thx. |
I've pushed an edit in VCM (ping @JacquesOlivierLachaud ) to force the LpMetric in R^n to be used when performing the breath first propagation on surfaces. |
The question is : Should be remove the |
Co-Authored-By: dcoeurjo <david.coeurjolly@liris.cnrs.fr>
@rolanddenis ok for you ? thx |
thanks :) |
Let's merge this one |
Yep! Only a question about the metric passed to |
there are 2 metrics: one for the Voronoi map (must be separable) and one for the breadth first propagation (LocalEst...) qui is fixed to l2 in my edit |
We can imagine to change the Voronoi Map metric to something else for the VCM but it won't make sense to change the propagation IMHO.. |
Ok, my question was about the choice for the propagation, so all right 👍 |
Didn't check the output of dvcm-2d-curvature before: I get a uniformly blue digitalized circle ... shouldn't we get a kind of color gradient depending on the curvature? |
You should get something like this on an ellipse (bottom of page) |
Huh yes, you're right! I found the result too simple and think there were a bug... The output seems correct for an ellipse (but not as contrasted as in the module doc but it should be due to the colormap) |
PR Description
This PR introduces a generic LpMetric class on double (to fix Point<->RealPoint implicit casts when considering the distance between two (integer) Points).
Checklist
cmake
mode (otherwise, Travis C.I. will fail).