http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11710
Revision: 11710 Author: drtrigon Date: 2013-07-02 20:55:33 +0000 (Tue, 02 Jul 2013) Log Message: ----------- follow up; to r11709, r11707 since the we have in fact different behaviour for different OpenCV versions
Modified Paths: -------------- trunk/pywikipedia/catimages.py
Modified: trunk/pywikipedia/catimages.py =================================================================== --- trunk/pywikipedia/catimages.py 2013-07-02 20:39:58 UTC (rev 11709) +++ trunk/pywikipedia/catimages.py 2013-07-02 20:55:33 UTC (rev 11710) @@ -1031,8 +1031,12 @@ # detectMultiScale(img, hit_threshold=0, win_stride=Size(), # padding=Size(), scale0=1.05, group_threshold=2) enable_recovery() # enable recovery from hard crash - found, w = hog.detectMultiScale(img, 0.25, (8,8), (32,32), 1.05, 2) + ret = hog.detectMultiScale(img, 0.25, (8,8), (32,32), 1.05, 2) disable_recovery() # disable since everything worked out fine + if cv2.__version__ == '$Rev: 4557 $': # TS + found = ret + else: #'2.4.5' or else (e.g. on fedora 18) + found, w = ret found = list(found)
# people haar/cascaded classifier
pywikipedia-svn@lists.wikimedia.org