Segmentation.hpp: adapt the code to OpenCV 3
authorAntonio Ospite <ao2@ao2.it>
Thu, 22 Feb 2018 14:15:48 +0000 (15:15 +0100)
committerAntonio Ospite <ao2@ao2.it>
Thu, 22 Feb 2018 14:41:51 +0000 (15:41 +0100)
commit79d57b3dedad2f0ae675bacc63470a5af1a176e6
treec7f0ab06c8f29a1f1cc48f74bc1fef9519ee4b78
parent7555c94ede06439d70ea34dca41947c0caf2fa95
Segmentation.hpp: adapt the code to OpenCV 3

In OpenCV 3 the public cv::BackgroundSubtractorMOG2() is now abstract so
we cannot inherit directly from it.

The concrete class would be BackgroundSubtractorMOG2Imp from
modules/video/src/bgfg_gaussmix2.cpp but it is private so we cannot
inherit from it either.

Use the factory method as documented to get a cv::BackgroundSubtractor
instance of the desired type and use is as a property in the
MOG2Segmentation class.
Segmentation.hpp