Various Python samples updated for Python 2/3 compatibility.
This commit is contained in:
@@ -6,6 +6,13 @@ Simple "Square Detector" program.
|
||||
Loads several images sequentially and tries to find squares in each image.
|
||||
'''
|
||||
|
||||
# Python 2/3 compatibility
|
||||
import sys
|
||||
PY3 = sys.version_info[0] == 3
|
||||
|
||||
if PY3:
|
||||
xrange = range
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
|
||||
|
Reference in New Issue
Block a user