Ikkster Ikkster - 7 months ago 16
Python Question

How do you delete an entire column of values from an ndarray obtained from misc.imread()?

I am reading a png image and it is in RGBA format and i would like to remove the 'A' part. The shape of my image is (694, 1077, 4) but I would like it to be (694, 1077, 3). I'd like to remove the last column in the array so I only have RGB values.


Simply do this:

im_without_A = im[:, :, :3]