This reminds me of the infamous barometer problem. Ask the guy in the picture. He might know.
Or you can use imdistline() or improfile. Also see my attached spatial calibration demo. I'm not sure exactly what you're calling a grain, but if it's like the size of salt grains, then those are not resolvable in that photo.