removed duplicated output, added the print of first and last points always
removed duplicated output, added the print of first and last points always

opencv/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv