Granulometry by morphological opening and closing
When you use the opening, the overall operation is called a granulometry. However, when you use a closing, it's called an anti-granulometry. It's the dual operation. Combined together, they form the Pattern Spectrum.

In your case, if you apply a closing, you will certainly measure the structures between the marbles.

However, it is definitely not recommended to apply a smoothing first, because it will smooth the edges and small particles. Consequently, the particles detection will be less accurate.