cudabgsegm module was not compiling.  Changing all references of opencv2/legacy.hpp to opencv2/cudalegacy.hpp seemed to work.
I'm new at this so it would be good to have someone familiar with the build system confirm the change.
calibrateDebevec index fix (issue 3664)
removed ERFilter (to be moved to opencv_contrib/modules/text) and lineMOD (to be moved to opencv_contrib/modules/rgbd)
fixed doc builder warnings
Fixed typo in OpenNI2 cmake file
Another typo in comment inside OpenNI2 cmake file
Merge pull request #3016 from fradelg:master
Merge pull request #3012 from vpisarev:clean_objdetect
Merge pull request #2991 from kovand11:calibrateDebevecFix
Merge pull request #2940 from davembradley:master