I have a 13 bands image and I want to iterate over each band, is there a way to get the image of each band using a for loop? I am trying with the following structure:
# image is [H, W, 13]
assert image.shape[2] == 13 # 3
#image = image[:, :, 0] # getting rid of 13
#plt.imshow(torch.clip((image) * 255, 0, 255).int()) # here is just messing with the image plotting, just change it by opencv environment and we'll get it
#plt.imshow(image)
fclip = torch.clip((image * imagenet_std + imagenet_mean) * 255, 0, 255)
fclip = fclip.int() # 224, 224, 13
ima = 0
for i in fclip:
ima = ima + fclip[i]
plt.imshow(ima)