Text this: Grain recognition based on colour and shape analysis