nelsonjchen / op-replay-clipper

📽 Capture and develop clips of openpilot. UI optional. Already deployed on Replicate.com for YOUR immediate use!
https://replicate.com/nelsonjchen/op-replay-clipper
MIT License
86 stars 13 forks source link

Mirrored difference mode for lane centering diagnostics #87

Open simontheflutist opened 3 hours ago

simontheflutist commented 3 hours ago

This is a feature request for the following video postprocessing: given a frame X, return X.roll_compensate() - X.roll_compensate().mirror_left_right(), possibly with rescaling/s-curve postprocessing to look more appealing. (roll_compensate brings the frame into calibrated view)

The reason is to provide an instant visual diagnostic for lane centering accuracy on straight roads. If the Comma is perfectly centered in the lane, the left and right lanelines should overlap. Moreover, because the formula incorporates differencing, the parity of non-overlaps shows whether the car is left or right of center.

nelsonjchen commented 2 hours ago

This would probably require some script or something to get stuff out of the rlogs. Maybe ffmpeg can take an input from some external processing script to do this.