Geometrical parameters of natural and crushed aggregates such as grain length, perimeter, area, etc., underline the shape and flakiness indices definition. The latter indices have a measurable effect on the mechanical properties of aggregates–binder mixtures, e.g. concrete, mortar, bituminous mixtures. In this work, digital methods were developed with the mathematical software Matlab, by applying a statistical method called k-means clustering for the exact separation between background and aggregates to compute the aforementioned properties. The overall code can be applied in real time by analysing quickly a large volume of data with accuracy and significant cost reduction. Currently, only the two dimensions of the grains could be measured. Future work will focus on full three-dimensional measurements by comparing paired images taken from different angles but also aggregate segmentation in case of touching particles.