IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
puzzle.piece.BoW Namespace Reference

Bag-of-Words style color matching system using OpenCV K-Means. More...

Detailed Description

Bag-of-Words style color matching system using OpenCV K-Means.

Model building pipeline:

  1. Pool all RGB samples from every group.
  2. Run K-Means++ (OpenCV) to auto-discover a color vocabulary of n_words centroids.
  3. Encode each group as a normalized frequency histogram over the vocabulary.

Implementation:

  1. Match query groups to a database using configurable distance metrics.

Input contract: each group is a (3, N) numpy ndarray with dtype uint8 or float32 in [0, 255] in RGB format and N is the number of pixels/samples (may vary per group).

Date
2026/07/30
Author
Antigravity + Patricio A. Vela, pvela.nosp@m.@gat.nosp@m.ech.e.nosp@m.du