modified main.cpp maskContourDetector.cpp and .h