Skip to content

Commit

Permalink
now tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlib committed Dec 6, 2024
1 parent 514bae0 commit 7130ef6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions py_bind/optv/correspondences.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions py_bind/optv/orientation.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion py_bind/optv/tracking_framebuf.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
8 changes: 1 addition & 7 deletions py_bind/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit 7130ef6

Please sign in to comment.