3D image processing pipeline based on X-ray CT and trait extraction. (a) Original CT image. (b) Binary image obtained using global adaptive threshold segmentation based on Otsu. (c) Detection of inner edges slice by slice. (d) Finding the inner edge of the holder by an appropriate size threshold. (e) Filling to get binary image. (f) Morphological closing operation. (g) Mask generation. (h) Obtaining a grayscale image of the panicle obtained by steps a, b, and g. (i) Grayscale histogram. (j) Grain segmentation by the global adaptive segmentation method based on Otsu. (k) Separation of overlapping grains by the improved watershed algorithm based on the Euclidean distance transform. (l) Segmented image. (m) Single grain image. (n) Grain image after PCA transform. (o) Triangle patching on the grain surface. (p) Trait extraction.