Graph-based View Motion Planning for Fruit Detection