mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-20 12:40:31 +08:00
fixed camera calibration to 4-vec for opencv 1 support
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user