get image contour function done.