The functionality was put into ximgproc namespace. Some refactoring. Fixed some warnings.