Track Masking & Edge Detection w/ Angle Calcs#32
Conversation
| @@ -0,0 +1 @@ | |||
| ffmpeg -fflags +genpts -i labeled_video.mp4 -c:v libx264 -preset fast -pix_fmt yuv420p -c:a aac -movflags +faststart fixed.mp4 | |||
There was a problem hiding this comment.
This probably doesn't need to be pushed. Is it called by the kart?
| @@ -0,0 +1,361 @@ | |||
| import cv2 as cv | |||
There was a problem hiding this comment.
This should go in data unless the methods are called by the node, especially the line drawing, labeling, etc. Only the called methods should go in the node + their deps.
| idx = np.argmax(row) | ||
| return (w_start + idx, h_start) | ||
|
|
||
| # O(1) road lookup |
There was a problem hiding this comment.
A comment on how this works would be great. Unsure of how the caching is done.
|
|
||
| # Old algorithm to find the road coord | ||
| # Very optimized but still slower than vectorized operations | ||
| def find_road_coord(img, prev_pixel, right_side: bool, optimize=True, pixel_range=6, pic_offset=5, steps=20): |
There was a problem hiding this comment.
If this is old then worth deleting?
| @@ -0,0 +1,52 @@ | |||
| import label | |||
There was a problem hiding this comment.
Does not belong in the node
| @@ -0,0 +1,21 @@ | |||
| from autonomous_kart.nodes.opencv_pathfinder import label | |||
There was a problem hiding this comment.
When writing tests, ROS2 standards suggest using pytest and having a test suite. Great to write tests, but need them properly or it's not useful. Also, if images are used, they should be pushed (and put into LFS if > 1mb).
No description provided.