Electro-optical measurement of clay shrinkage