Various Python samples updated for Python 2/3 compatibility.
This commit is contained in:
@@ -15,6 +15,9 @@ Keys:
|
||||
ESC - exit
|
||||
'''
|
||||
|
||||
# Python 2/3 compatibility
|
||||
from __future__ import print_function
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
from common import Sketcher
|
||||
@@ -26,11 +29,11 @@ if __name__ == '__main__':
|
||||
except:
|
||||
fn = '../data/fruits.jpg'
|
||||
|
||||
print __doc__
|
||||
print(__doc__)
|
||||
|
||||
img = cv2.imread(fn)
|
||||
if img is None:
|
||||
print 'Failed to load image file:', fn
|
||||
print('Failed to load image file:', fn)
|
||||
sys.exit(1)
|
||||
|
||||
img_mark = img.copy()
|
||||
|
Reference in New Issue
Block a user