answered Jan 14 '18
I just moved opencv includes and using namespace cv next to all includes and before functions and main and its solved