Assessing compressive strengths of mortar and concrete from digital images by machine learning techniques