Development of a tool for the automated recognition of coarse-grained granitoid rocks