Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

KeypointBasedMotionEstimator - C++

Hello everyone !

I'm having problems with the KeypointBasedMotionEstimator class.

I don't understand how to instanciate that class. The constructor is :

KeypointBasedMotionEstimator(Ptr<MotionEstimatorBase> estimator)

And this is my main :

int main(int argc, char **argv)
{
  MotionModel mm = MM_AFFINE;
  Ptr<MotionEstimatorBase> estimator;
  estimator->setMotionModel(mm);
  KeypointBasedMotionEstimator kbme = KeypointBasedMotionEstimator(estimator);

  return 0; 
}

I get "segmentation fault (core dumped)"

I think the error comes from Ptr<MotionEstimatorBase> estimator , my initialization is probably bad and I'm not familiar with abstract class.

Any ideas is welcome.

Thank you in advance !!