Solved by ptrblck in post #2 
              
              
                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 applyin…