fixed "import cv" in the new python samples. corrected Python bindings to match the documentation and vice versa (NOTE: in cv2.stereoCalibrate the parameter ordering has been changed)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import numpy as np
|
||||
import cv2, cv
|
||||
import cv2
|
||||
import cv2.cv as cv
|
||||
import os
|
||||
from common import splitfn
|
||||
|
||||
@@ -50,10 +51,7 @@ if __name__ == '__main__':
|
||||
|
||||
print 'ok'
|
||||
|
||||
camera_matrix = np.zeros((3, 3))
|
||||
dist_coefs = np.zeros(4)
|
||||
img_n = len(img_points)
|
||||
rms, camera_matrix, dist_coefs, rvecs, tvecs = cv2.calibrateCamera(obj_points, img_points, (w, h), camera_matrix, dist_coefs)
|
||||
rms, camera_matrix, dist_coefs, rvecs, tvecs = cv2.calibrateCamera(obj_points, img_points, (w, h))
|
||||
print "RMS:", rms
|
||||
print "camera matrix:\n", camera_matrix
|
||||
print "distortion coefficients: ", dist_coefs.ravel()
|
||||
|
Reference in New Issue
Block a user