twitchslam
twitchslam copied to clipboard
ValueError: ndarray is not C-contiguous
*** frame 2/628 ***
Matches: 1581 -> 1581 -> 1215 -> 1214
Culled: 0 points
Pose: 0.022129
Traceback (most recent call last):
File "./slam.py", line 218, in
@robelkebede44
in slam.py add
projs = projs.copy(order='C')
on line 77 after the good_pts declaration
Will look something like this:
` projs = projs[:, 0:2] / projs[:, 2:]
# only the points that fit in the frame
good_pts = (projs[:, 0] > 0) & (projs[:, 0] < self.W) & \
(projs[:, 1] > 0) & (projs[:, 1] < self.H)
projs = projs.copy(order='C')
for i, p in enumerate(self.mapp.points):
if not good_pts[i]:
# point not visible in frame
continue`