Hi,
I'm using OpenCV 3.3 running on Linux and bumped into following error:
Ptr create_model()
{
Ptr model = Boost::create();
model->setBoostType(Boost::DISCRETE);
}
int main()
{
Ptr model = create_model().dynamicCast<Boost>()
}
I've used dynamicCast successfully with other classes (SVM, trees, logistic regression), however, casting to boost returns Segmentation fault. Backtracking is not very helpful either:
#0 0x0000ffffb6c625d4 in __dynamic_cast () from /usr/lib/libstdc++.so.6
#1 0x00000000004066e8 in cv::Ptr<cv::ml::Boost> cv::Ptr<cv::ml::StatModel>::dynamicCast<cv::ml::Boost>() const ()
Is it a bug? Or bad compilation?
Many thanks!