added some constants to python cv2 api

This commit is contained in:
Alexander Mordvintsev
2011-06-06 14:18:25 +00:00
parent cd2f3786f0
commit 6dc7ae0ff6
4 changed files with 21 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
import numpy as np
from numpy import random
import cv2, cv
import cv2
def make_gaussians(cluster_n, img_size):
@@ -22,7 +22,7 @@ def draw_gaussain(img, mean, cov, color):
w, u, vt = cv2.SVDecomp(cov)
ang = np.rad2deg( np.arctan2(u[1, 0], u[0, 0]) )
s1, s2 = np.sqrt(w)*3.0
cv2.ellipse(img, (x, y), (s1, s2), ang, 0, 360, color, 1, cv.CV_AA)
cv2.ellipse(img, (x, y), (s1, s2), ang, 0, 360, color, 1, cv2.CV_AA)
if __name__ == '__main__':