Characterization of structural inhomogeneities in porous media