Mis a jour le 2024-03-17, 13:4

Histogramme des images

Histogramme :
Exemple d'histogramme d'une image : hist = cv2.calcHist([img], [0], None, [256], [0, 256]) pyplot.plot(hist) pyplot.savefig('tmp.png') newImg = cv2.imread('tmp.png')
Egalisation d'une image :
Exemple d'égalisation : img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) newImg = cv2.equalizeHist(img)

Copyright python-simple.com
programmer en python, tutoriel python, graphes en python, Aymeric Duclert