1. A computer-implemented method for an image-based analysis of a geological thin section, comprising: (i) acquiring a plurality of images from a geological thin section of a rock sample from a subterranean zone; (ii) manipulating the plurality of images to derive a composite image; (iii) optimizing the composite image to derive a seed image; (iv) identifying, in the seed image, a particular seed pixel of a plurality of contiguous pixels that comprise an image of a grain of a plurality of grains of the rock sample in the seed image; (v) determining, with a specified algorithm, a shape of the grain based on the seed pixel; (vi) determining, based on the shape of the grain, a size of the grain; and (vii) preparing the determination of the size of the grain for presentation to a user.