http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11709
Revision: 11709 Author: drtrigon Date: 2013-07-02 20:39:58 +0000 (Tue, 02 Jul 2013) Log Message: ----------- bug fix; ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() (is a follow-up to r11707)
Modified Paths: -------------- trunk/pywikipedia/catimages.py
Modified: trunk/pywikipedia/catimages.py =================================================================== --- trunk/pywikipedia/catimages.py 2013-07-02 13:37:22 UTC (rev 11708) +++ trunk/pywikipedia/catimages.py 2013-07-02 20:39:58 UTC (rev 11709) @@ -1031,9 +1031,9 @@ # detectMultiScale(img, hit_threshold=0, win_stride=Size(), # padding=Size(), scale0=1.05, group_threshold=2) enable_recovery() # enable recovery from hard crash - found = list(hog.detectMultiScale(img, 0.25, (8,8), (32,32), 1.05, 2)) + found, w = hog.detectMultiScale(img, 0.25, (8,8), (32,32), 1.05, 2) disable_recovery() # disable since everything worked out fine - found = [item for item in found if item] + found = list(found)
# people haar/cascaded classifier # use 'haarcascade_fullbody.xml', ... also (like face detection)