Starting contour IDs from 0.