based on delaunay2.cpp in the cpp OpenCV's examples