Automatic body condition scoring of dairy cows: extracting contour lines