Measurement of the deformation and adhesion of solids in contact