mpatacchiola / deepgaze

Computer Vision library for human-computer interaction. It implements Head Pose and Gaze Direction Estimation Using Convolutional Neural Networks, Skin Detection through Backprojection, Motion Detection and Tracking, Saliency Map.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A bit issue that i fixed for you use in opencv v3

Angeloabrita opened this issue · comments

[Erro] = comparison = cv2.compareHist(hist_1, hist_2, cv2.cv.HISTCMP_INTERSECT)
AttributeError: module 'cv2.cv2' has no attribute 'cv'

I changed the Color_classification.py line 123 - 129

from:

comparison = cv2.compareHist(hist_1, hist_2, cv2.cv.HISTCMP_INTERSECT)
          elif(method=="correlation"):
              comparison = cv2.compareHist(hist_1, hist_2, cv2.cv.CV_COMP_CORREL)
          elif(method=="chisqr"):
              comparison = cv2.compareHist(hist_1, hist_2, cv2.cv.CV_COMP_CHISQR)
          elif(method=="bhattacharyya"):
              comparison = cv2.compareHist(hist_1, hist_2, cv2.cv.CV_COMP_BHATTACHARYYA)

To:

comparison = cv2.compareHist(hist_1, hist_2, cv2.HISTCMP_INTERSECT)
          elif(method=="correlation"):
              comparison = cv2.compareHist(hist_1, hist_2, cv2.HISTCMP_CORREL)
          elif(method=="chisqr"):
              comparison = cv2.compareHist(hist_1, hist_2, cv2.HISTCMP_CHISQR)
          elif(method=="bhattacharyya"):
              comparison = cv2.compareHist(hist_1, hist_2, cv2.HISTCMP_BHATTACHARYYA)

Now it work for me.

Hi @Angeloabrita thank you for pointing this out. Are you using the branch master or the branch 2.0 of the repository? This issue should have been fixed on branch 2.0 (which is compatible with OpenCV 3).