1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Drop Python2 support.

This commit is contained in:
Alexander Smorkalov
2023-07-13 16:07:10 +03:00
parent cea26341a5
commit 1a3523d2d8
51 changed files with 65 additions and 344 deletions
+1 -9
View File
@@ -1,13 +1,5 @@
#!/usr/bin/env python
# Python 2/3 compatibility
from __future__ import print_function
import sys
PY3 = sys.version_info[0] == 3
if PY3:
xrange = range
import numpy as np
import cv2 as cv
@@ -16,7 +8,7 @@ from numpy import random
def make_gaussians(cluster_n, img_size):
points = []
ref_distrs = []
for _i in xrange(cluster_n):
for _i in range(cluster_n):
mean = (0.1 + 0.8*random.rand(2)) * img_size
a = (random.rand(2, 2)-0.5)*img_size*0.1
cov = np.dot(a.T, a) + img_size*0.05*np.eye(2)