-
Notifications
You must be signed in to change notification settings - Fork 1
Reprojection equation function commits #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
thedavidchu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Jason, just leaving some comments!
| import time | ||
|
|
||
| img_pth = '/Users/jasonyuan/Desktop/Test9.png' | ||
| img_pth = '/Users/jasonyuan/Desktop/Test2.png' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please upload your test images so that we can run it out of the box!
If you know the path relative to the script, but not the cwd, then this may help
| y_width = abs(sorted_points_y[-1][0] - sorted_points_y[0][0]) | ||
|
|
||
| if (x_width < 15) or (y_width < 15): # Hard-coded parameter, update maybe | ||
| if (y_width < 15) or ((x_width < 15) and (y_width < 15)): # Hard-coded parameter, update maybe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need the outer brackets
| y_width = abs(sorted_points_y[-1][0] - sorted_points_y[0][0]) | ||
|
|
||
| if (x_width < 15) or (y_width < 15): # Hard-coded parameter, update maybe | ||
| if (y_width < 15) or ((x_width < 15) and (y_width < 15)): # Hard-coded parameter, update maybe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need the outer brackets
|
|
||
| if (x_width < 15) or (y_width < 15): # Hard-coded parameter, update maybe | ||
| if (y_width < 15) or ((x_width < 15) and (y_width < 15)): # Hard-coded parameter, update maybe | ||
| print(y_width) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need the print statements?
|
|
||
| if (x_width < 15) or (y_width < 15): # Hard-coded parameter, update maybe | ||
| if (y_width < 15) or ((x_width < 15) and (y_width < 15)): # Hard-coded parameter, update maybe | ||
| print(y_width) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need the print statements?
| print(x_width) | ||
| return [[],[]] | ||
|
|
||
| # print(sorted_points) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code
| tck,u = interpolate.splprep([x,y],k=3,s=32) | ||
| # print(u) | ||
| u = np.linspace(u[0]-0.25,u[-1]+0.25,500) | ||
| # print(tck) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code
| tck,u = interpolate.splprep([x,y],k=3,s=32) | ||
| # print(u) | ||
| u = np.linspace(u[0]-0.25,u[-1]+0.25,500) | ||
| # print(tck) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code
| import cv2 | ||
| import numpy as np | ||
|
|
||
| def project_2D_to_3D_camera(x_array, y_array, depth_to_y_map, f_x, f_y, o_x, o_y): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: if you could add type hints to these, that would be amazing! tbh idk if this is rly necessary if you just call it all in a specific pipeline and don't expect anyone else to use it.
| import cv2 | ||
| import numpy as np | ||
|
|
||
| def project_2D_to_3D_camera(x_array, y_array, depth_to_y_map, f_x, f_y, o_x, o_y): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: if you could add type hints to these, that would be amazing! tbh idk if this is rly necessary if you just call it all in a specific pipeline
No description provided.