added debugging to fix quantize features first for gray scale