Quantifying Porosity through Automated Image Collection and Batch Image Processing: Case Study of Three Carbonates and an Aragonite Cemented Sandstone