Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions app/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ def parse_args() -> argparse.Namespace:
"--backend",
choices=("uvc", "opencv", "sim"),
default="uvc",
help="Capture backend to use (opencv or sim).",
help="Capture backend to use (uvc, opencv, or sim).",
)
parser.add_argument("--left", default="left", help="Left camera ID or index.")
parser.add_argument("--right", default="right", help="Right camera ID or index.")
return parser.parse_args()
parser.add_argument("--left", default=None, help="Left camera ID or index.")
parser.add_argument("--right", default=None, help="Right camera ID or index.")
args = parser.parse_args()
if args.left is None:
args.left = "0" if args.backend == "opencv" else "left"
if args.right is None:
args.right = "1" if args.backend == "opencv" else "right"
Comment on lines +42 to +45

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Map legacy lane ROIs when defaulting OpenCV IDs

When --backend opencv is used without explicit IDs, these defaults change the runtime camera IDs to 0/1; if the operator still has a legacy configs/lane_roi.json keyed by left/right, load_lane_polygon() only checks the exact runtime IDs and silently falls back to the centered ROI. That makes the newly fixed default OpenCV path ignore saved lane calibration for those rigs, so either map the legacy left/right entries onto the numeric defaults or reuse the existing runtime ROI loader that has that fallback.

Useful? React with 👍 / 👎.

return args


def build_lane_gate(
Expand Down
Loading
Loading