Example based texture synthesis and quantification of texture quality