img = cv2.imread('mandrill.png')
histg = cv2.calcHist([img],[0],None,[256],[0,256])
if len (sys.argv) < 2:
print >>sys.stderr, "Usage:", sys.argv[0], "<image>..."
sys.exit (1)
for fn in sys.argv[1:]:
im = cv2.imread (fn)
histr = cv2.calcHist([im],[0],None,[256],[0,256])
a = cv2.compareHist(histr,histg,cv2.cv.CV_COMP_CORREL)
print a
I am trying to use the code above to compare the correlation between histograms histr
and histg
when I run the code the I get the error
'module' object has no attribute 'cv'
It seems that CV3 the names of the various correlation functions have changed. What are the names of the various correlation functions?