gray2binary is modified to LUT convert.