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
+5 -5
View File
@@ -3,18 +3,18 @@
'''
Algorithm serializaion test
'''
import cv2
import cv2 as cv
from tests_common import NewOpenCVTests
class algorithm_rw_test(NewOpenCVTests):
def test_algorithm_rw(self):
# some arbitrary non-default parameters
gold = cv2.AKAZE_create(descriptor_size=1, descriptor_channels=2, nOctaves=3, threshold=4.0)
gold.write(cv2.FileStorage("params.yml", 1), "AKAZE")
gold = cv.AKAZE_create(descriptor_size=1, descriptor_channels=2, nOctaves=3, threshold=4.0)
gold.write(cv.FileStorage("params.yml", 1), "AKAZE")
fs = cv2.FileStorage("params.yml", 0)
algorithm = cv2.AKAZE_create()
fs = cv.FileStorage("params.yml", 0)
algorithm = cv.AKAZE_create()
algorithm.read(fs.getNode("AKAZE"))
self.assertEqual(algorithm.getDescriptorSize(), 1)