Using Raspberry Pi computers, Mr Hughes varied the amount of water given to plants and recorded their weight gain, before studying the heads via the scanning technology - usually used in hospitals - to look at differences in development.

Usually at this stage, individual grains would be studied by hand, but Mr Hughes' technique means 3,000 grains can be analysed in an hour.

The findings were found to be 97% accurate.

Mr Hughes will present his work to the Genetics Society in Edinburgh at the end of August.