Novel segmentation method and measurement system for various grains with complex touching