diff --git a/py_bind/optv/correspondences.pyx b/py_bind/optv/correspondences.pyx index 88ecc8b..92c33b6 100644 --- a/py_bind/optv/correspondences.pyx +++ b/py_bind/optv/correspondences.pyx @@ -84,7 +84,7 @@ cdef class MatchedCoords: """ cdef: np.ndarray[ndim=2, dtype=np.float64_t] positions - np.ndarray[ndim=1, dtype=np.int32_t] point_numbers + np.ndarray[ndim=1, dtype=np.int64_t] point_numbers int pt positions = np.empty((self._num_pts, 2)) @@ -97,7 +97,7 @@ cdef class MatchedCoords: return positions, point_numbers - def get_by_pnrs(self, np.ndarray[ndim=1, dtype=np.int32_t] pnrs): + def get_by_pnrs(self, np.ndarray[ndim=1, dtype=np.int64_t] pnrs): """ Return the flat positions of points whose pnr property is given, as an (n,2) flat position array. Assumes all pnrs are to be found, otherwise @@ -160,7 +160,7 @@ def correspondences(list img_pts, list flat_coords, list cals, num_cams * sizeof(coord_2d *)) frame frm - np.ndarray[ndim=2, dtype=np.int32_t] clique_ids + np.ndarray[ndim=2, dtype=np.int64_t] clique_ids np.ndarray[ndim=3, dtype=np.float64_t] clique_targs # Return buffers: diff --git a/py_bind/optv/orientation.pyx b/py_bind/optv/orientation.pyx index 473689b..bba606f 100644 --- a/py_bind/optv/orientation.pyx +++ b/py_bind/optv/orientation.pyx @@ -263,7 +263,7 @@ def full_calibration(Calibration cal, cdef: vec3d *ref_coord np.ndarray[ndim=2, dtype=pos_t] ret - np.ndarray[ndim=1, dtype=np.int32_t] used + np.ndarray[ndim=1, dtype=np.int64_t] used np.ndarray[ndim=1, dtype=pos_t] err_est orient_par *orip double *residuals @@ -298,7 +298,7 @@ def full_calibration(Calibration cal, raise ValueError("Orientation iteration failed, need better setup.") ret = np.empty((len(img_pts), 2)) - used = np.empty(len(img_pts), dtype=np.int_) + used = np.empty(len(img_pts), dtype=np.int64) for ix in range(len(img_pts)): ret[ix] = (residuals[2*ix], residuals[2*ix + 1]) diff --git a/py_bind/optv/tracking_framebuf.pyx b/py_bind/optv/tracking_framebuf.pyx index 06b5f3f..2cb0559 100644 --- a/py_bind/optv/tracking_framebuf.pyx +++ b/py_bind/optv/tracking_framebuf.pyx @@ -71,7 +71,7 @@ cdef class Target: return self._targ[0].pnr def set_pnr(self, pnr): - self._targ[0].pnr = pnr + self._targ[0].pnr = np.int32(pnr) def pos(self): """ diff --git a/py_bind/setup.py b/py_bind/setup.py index 834847c..7af2452 100644 --- a/py_bind/setup.py +++ b/py_bind/setup.py @@ -154,10 +154,4 @@ def mk_ext(name, files): package_data={ 'optv': ['*.pxd', '*.c', '*.h'], }, - version='0.3.0', - install_requires=[ - 'numpy', - 'pyyaml', - ], - setup_requires=['numpy'], -) + version='0.3.0')