-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Hi, thanks for sharing the code. Your solution has been really helpful for me!
However, I found a small issue. You can replicate it by changing line 20:
self.FOV = [0.45, 0.45]
to
self.FOV = [0.3, 0.3]
and line 113:
center_point = np.array([0.5, .5])
to
center_point = np.array([0.5, .9])
It triggers the exception at line 76, in _bilinear_interpolation.
IndexError: index 8389700 is out of bounds for size 8388608
To solve it, I added the following, after line 64:
x2 = np.minimum(x2, self.frame_width-1)
y2 = np.minimum(y2, self.frame_height-1)
I think the error occurs because for the interpolation, you take pixel i and pixel i+1, and in some specific cases, pixel i is already the last pixel (either in width or height).
Hope it helps.
chalmersgit, Giogia, piranha771, remorsecs and ChenryZ
Metadata
Metadata
Assignees
Labels
No labels