Quantitative micro-porosity and orientation analysis in soils and sediments