Skip to content

Track Masking & Edge Detection w/ Angle Calcs#32

Open
DanielProano wants to merge 16 commits intomainfrom
dproano/masking
Open

Track Masking & Edge Detection w/ Angle Calcs#32
DanielProano wants to merge 16 commits intomainfrom
dproano/masking

Conversation

@DanielProano
Copy link
Copy Markdown

No description provided.

@DanielProano DanielProano requested a review from ShayManor March 20, 2026 03:08
@@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably doesn't need to be pushed. Is it called by the kart?

@@ -0,0 +1,361 @@
import cv2 as cv
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is old then worth deleting?

@@ -0,0 +1,52 @@
import label
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not belong in the node

@@ -0,0 +1,21 @@
from autonomous_kart.nodes.opencv_pathfinder import label
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants