I am running Python 3.7 and using a single USB synchronized stereo camera delivering side by side images in single frames. I set devices to 0 0 to indicate both frames come from the same camera.
In stereo_cameras.py the function get_frames_singleimage is supposed to slice the single frame into a left and right frame. It returns the error:
Library code:
left_frame = frame[:, :width/2, :]
TypeError: slice indices must be integers or None or have an index method.
The code works properly if changed to make width an integer as below.
left_frame = frame[:, :int(width / 2), :]
right_frame = frame[:, int(width / 2):, :]
I am running Python 3.7 and using a single USB synchronized stereo camera delivering side by side images in single frames. I set devices to 0 0 to indicate both frames come from the same camera.
In stereo_cameras.py the function get_frames_singleimage is supposed to slice the single frame into a left and right frame. It returns the error:
Library code: left_frame = frame[:, :width/2, :] TypeError: slice indices must be integers or None or have an index method.
The code works properly if changed to make width an integer as below. left_frame = frame[:, :int(width / 2), :] right_frame = frame[:, int(width / 2):, :]