Automatically Determining the Segmentation Lines between Images of Adherent Rice Grains