processing grayscale sample