Skip to content

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

  1. Run the ONNX model (640×640 blob)
  2. Keep detections above confidence_threshold
  3. Accept a detection only when the projected pixel lies in its box
  4. On overlaps, box_heuristic picks by confidence, center distance, or expected height
  5. 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.

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

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.