patch-wise mean subtraction and std division