딥러닝 모델 설계/Python 공통
MatPlotlib를 이용한 히스토그램 그리기
hellobird
2019. 6. 17. 17:28
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import matplotlib.pyplot as plt def histoImage() : global window, canvas, paper, filename, inImage, outImage, inH, inW, outH, outW incountList = [0] * 256 outcountList = [0] * 256 for i in range(inH): for k in range(inW): incountList[inImage[i][k]] += 1 for i in range(outH): for k in range(outW): outcountList[outImage[i][k]] += 1 plt.plot(incountList) plt.plot(outcountList) plt.show() | cs |