Porosity

Porosity is defined as the ratio of the void volume in the rock to the total volume of the rock.

Sediments are porous.  This fact is practically important, because the pores may be filled with natural resources, such as oil, gas, and/or fresh water.
 
Porosity is measured in percents or fractions of one.  For example, if one cubic centimeter of rock contains 0.25 cubic centimeters of void, the porosity is 25% or 0.25.
 
Freshly deposited sand on an ocean beach or a river bank has porosity about 0.40.  As this sand is buried under a column of other sediments delivered by wind or water, its grains are pressed together and compacted, such that the porosity may reduce down to about 0.3.  Further porosity reduction occurs due to chemical dissolution of the minerals and their redeposition in the original large pores.
 
 
Left: High-porosity sand (Porosity 0.39)   Right: Tight gas sandstone. Pores are dark, quartz is gray, and heavier minerals (calcite) are white. (Porosity 0.05)
 
The porosity of freshly deposited silt or clay may be as large as 0.60 and more.  This sediment quickly compacts during geologic burial, such that even at small depths its porosity reaches 0.30 and may become much smaller.  The pores in shale are usually much smaller than in sand. 
 
 
 Shale - The pores are green.  (Porosity 0.08)
 
 
If sand is deposited together with silt and clay, its original porosity may be much smaller than 0.4, simply because the small silt and shale particles occupy the pore space inside the large-porosity framework formed by large sand grains. 
 
 
Poorly sorted sand.  The grains are light-gray while the pores are dark.
 
Porosity strongly depends on the source of mineral that builds the solid part of rock.  The source of carbonate sediment is hollow skeletons of water organisms, as well as coral reefs.  This is why the porosity of oil-producing chalk may reach 0.50.  The same is true for diatomaceous rock that carries silica skeletons.  Such sediments are very reactive with water.  As a result, their minerals can rapidly dissolve and fill the pores thus reducing porosity to 0.30 and lower. 
 
Porosity is directly calculated from high resolution digital images such as those shown above.  This calculation is the ratio of the number of voxels that fall into the pore space (black and dark-gray) to the total number of voxels in a 3D image. 
 
The task of separating the pores from grains in such 3D objects is called image segmentation.  The main technical challenge in image segmentation is the gradual transition from dark to light shade of gray at the edges of the pore space. Ingrain uses proprietary image-processing algorithms that include statistical analysis of the gray-scale images.  As a result, the pore space is accurately separated from the mineral matrix and the porosity is computed.

 
Segmented nano-resolution image of tight sandstone.  The pore space is blue. (Porosity 0.02)