python: 'cv2.' -> 'cv.' via 'import cv2 as cv'
This commit is contained in:
@@ -8,7 +8,7 @@ K-means clusterization test
|
||||
from __future__ import print_function
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
import cv2 as cv
|
||||
from numpy import random
|
||||
import sys
|
||||
PY3 = sys.version_info[0] == 3
|
||||
@@ -58,8 +58,8 @@ class kmeans_test(NewOpenCVTests):
|
||||
|
||||
points, _, clusterSizes = make_gaussians(cluster_n, img_size)
|
||||
|
||||
term_crit = (cv2.TERM_CRITERIA_EPS, 30, 0.1)
|
||||
_ret, labels, centers = cv2.kmeans(points, cluster_n, None, term_crit, 10, 0)
|
||||
term_crit = (cv.TERM_CRITERIA_EPS, 30, 0.1)
|
||||
_ret, labels, centers = cv.kmeans(points, cluster_n, None, term_crit, 10, 0)
|
||||
|
||||
self.assertEqual(len(centers), cluster_n)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user