The interleaving in the processed image is most likely created by a view or reshape operation using a wrong memory layout (channels-last vs. channels-first).
I assume this operation might cause the trouble:
im_np = im_np.reshape((im_rh, im_rw, 3))

Could you check the shape of im_np before applying the reshape operation? If the channels are in dim0, either change the reshaping opertation or permute the dimensions first.