EV5_Beeldherk_Bomen/src/helpers/statistics.py

9 lines
216 B
Python
Raw Normal View History

2023-09-25 14:57:34 +02:00
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