Measuring approach for density distributions in granular media