python: 'cv2.' -> 'cv.' via 'import cv2 as cv'

This commit is contained in:
Alexander Alekhin
2017-12-11 12:55:03 +03:00
parent 9665dde678
commit 5560db73bf
162 changed files with 2083 additions and 2084 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
from __future__ import print_function
import numpy as np
import cv2
import cv2 as cv
from cv2 import dnn
import timeit
@@ -11,7 +11,7 @@ def get_class_list():
with open('synset_words.txt', 'rt') as f:
return [x[x.find(" ") + 1:] for x in f]
blob = dnn.blobFromImage(cv2.imread('space_shuttle.jpg'), 1, (224, 224), (104, 117, 123), False)
blob = dnn.blobFromImage(cv.imread('space_shuttle.jpg'), 1, (224, 224), (104, 117, 123), False)
print("Input:", blob.shape, blob.dtype)
net = dnn.readNetFromCaffe('bvlc_googlenet.prototxt', 'bvlc_googlenet.caffemodel')