update to be compatiple with the current OpenCV master

* add new Ptr type
* replace default value makePtr with Ptr<>()