There is a thing called Stereology which is devoted to calculation of 2d and 3d structure parameters, including grain size (of course with simplifying assumptions). You may want to find some books on the subject or someone who remembers it better than I do.
I can add that for Stereo reconstruction (Stereoscopy more generally deals with scale transfer computation of various parameters), you will need to take 2 or 3 pictures of the particles at varying tilt angles, followed by 3D reconstruction using dedicated software (such as Mountains from Digital Surf, MEX from Alicona or others). Another term for Stereo(pair) reconstruction would be Photogrammetry in other fields.
Of course, there are limits, the most annyoing one being that the "thickness" of the object must not be too limited vs. the size of the viewing field (z vs. xy ratio).
See for instance : https://www.youtube.com/watch?v=mzLFVM2EoNM