Cone Color Classification
Each projected LiDAR centroid needs a class: blue, yellow, orange, or unknown. Image boxes alone do not create 3D cones; a detection counts only if the projected pixel falls inside its box (YOLO) or ROI (HSV).
- Run the ONNX model (640×640 blob)
- Keep detections above
confidence_threshold - Accept a detection only when the projected pixel lies in its box
- On overlaps,
box_heuristicpicks by confidence, center distance, or expected height - Map class IDs through
yolo_class_blue/yellow/orange/big_orange
Crop an ROI around the projected pixel, build HSV masks for yellow/blue/orange, pick a color that clears confidence_threshold and beats other masks by RATIO_THRESHOLD. Sensitive to exposure and white balance.
Stereo merge
Section titled “Stereo merge”Left and right classify the same cone index independently. merge_classifications_lr keeps the higher valid confidence. One valid side wins alone. Neither valid → unknown (history may still assign color later).
Parameters
Section titled “Parameters”YOLO: yolo_model_path, yolo_backend, class ID map, confidence_threshold, optional depth_to_box_heuristic_const.
HSV: *_filter_low/high (from color_calibrate.py, not spatial calibration).
Projection on cone but wrong class → map / confidence / lighting. One camera only → that side’s path. Code: cones/coloring.cpp.
