import numpy as np def imgStats(img): mean = np.zeros(3) std = np.zeros(3) for i in range(img.shape[2]): mean[i] = np.mean(img[:, :, i]) std[i] = np.std(img[:, :, i]) return mean, std