lk_track.py description

This commit is contained in:
Alexander Mordvintsev
2011-08-30 09:34:06 +00:00
parent 39373cd9f9
commit 785428546b
2 changed files with 22 additions and 8 deletions

View File

@@ -11,6 +11,9 @@ for fn in glob('*.py'):
found |= set(re.findall('cv2?\.\w+', code))
cv2_used = found & cv2_callable
cv2_unused = cv2_callable - cv2_used
with open('unused_api.txt', 'w') as f:
f.write('\n'.join(sorted(cv2_unused)))
r = 1.0 * len(cv2_used) / len(cv2_callable)
print '\ncv2 api coverage: %d / %d (%.1f%%)' % ( len(cv2_used), len(cv2_callable), r*100 )