I\'m trying to take a noise pattern which consists of black and white (and grey where there is a smooth transition between the two) and I am trying to map it to two differen