-
Notifications
You must be signed in to change notification settings - Fork 322
Open
Description
Thanks for your awesome work. It does help!
But I got confused about a line in code. Could you give me some help? Thanks in advance!
according to the slides (02 single view geometry, 24th):
However, in the code below,
So in my opinion, the code is supposed to be:
3dv_tutorial/examples/object_localization.py
Lines 54 to 64 in f295338
while True: | |
img_copy = img.copy() | |
if mouse_state['xy_e'][0] > 0 and mouse_state['xy_e'][1] > 0: | |
# Calculate object location and height | |
c = R.T @ [mouse_state['xy_s'][0] - cx, mouse_state['xy_s'][1] - cy, f] | |
h = R.T @ [mouse_state['xy_e'][0] - cx, mouse_state['xy_e'][1] - cy, f] | |
if c[1] < 1e-6: # Skip the degenerate case (beyond the horizon) | |
continue | |
X = c[0] / c[2] * L # Object location X [m] | |
Z = c[2] / c[1] * L # Object location Y [m] | |
H = (c[1] / c[2] - h[1] / h[2]) * Z # Object height [m] |
Metadata
Metadata
Assignees
Labels
No labels