To precisely quantify pore space and organic matter (OM) from two-dimensional scanning electron microscope (SEM) images, an efficient and consistent workflow using adaptive local thresholding, Otsu thresholding and Image Calculator are presented. It can offer an automated segmentation of pore space and OM, then differentiates the porosity hosted by OM and minerals. The workflow is demonstrated on a widely distributed set of core samples from Mahantango and Marcellus shale units of the Appalachian basin. The vitrinite reflectance of these samples ranges from 1.36% to 2.89%, covering a spectrum of thermal maturity. Organic matter abundance and mineralogy also vary significantly. The results are compared with routine rock property tests, such as helium porosimeter (Gas Research Institute method), and total OM. The proposed workflow improves quantitative determination of porosity above a certain pore size and OM in shale samples. Advantages of this workflow include improved consistency and speed of analysis of SEM images of shale samples at the nanoscale.