added getGrayArray

for use in canny edge detector