please please help histogram!

asked 2018-01-30 22:03:16 -0500

faraz gravatar image

plt.hist(img1.ravel()) #plotting using special matplotlib function, this commands converts image to histogram and directly plots it.therefore, no need of calchist() #check output 1

other way using calchist()

H1=cv2.calcHist([img1],[0],None,[256],[0,256])
x=range(256) plt.plot(x,H1) #plotting using regular matplotlib function #output 2

What I want is to make 2nd output instead of a line to bar shape

edit retag flag offensive close merge delete

Comments

please please improve text formatted

LBerger gravatar imageLBerger ( 2018-01-31 01:33:08 -0500 )edit