Facies and permeability prediction based on analysis of core images