Text this: A Pixel-Wise k-Immediate Neighbour-Based Image Analysis Approach for Identifying Rock Pores and Fractures from Grayscale Image Samples