Grain-size based on image processing