fixed camera calibration to 4-vec for opencv 1 support

This commit is contained in:
sccolbert
2009-10-24 13:06:52 +02:00
parent d2697df064
commit d6f524830f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1054,7 +1054,7 @@ def cvCalibrateCamera2(np.ndarray object_points, np.ndarray image_points,
# Allocate a new distortion array
cdef np.npy_intp distortion_shape[2]
distortion_shape[0] = <np.npy_intp> 1
distortion_shape[1] = <np.npy_intp> 5
distortion_shape[1] = <np.npy_intp> 4
cdef np.ndarray distortion = new_array(2, distortion_shape, FLOAT64)
cdef IplImage ipl_distortion
populate_iplimage(distortion, &ipl_distortion)
+1 -1
View File
@@ -223,7 +223,7 @@ class TestCalibrateCamera2(object):
np.array([16, 16, 16], dtype=np.int32), (4, 4)
)
assert_almost_equal(distortions, np.array([0., 0., 0., 0., 0.]))
assert_almost_equal(distortions, np.array([0., 0., 0., 0.,]))
# The intrinsics will be strange, but we can at least check
# for known zeros and ones
assert_almost_equal( intrinsics[0,1], 0)