Other major application areas of the BoW method are appearance-based mobile robot localization and SLAM[^2] problems.

The fundamental issue involved with the appearance-based approach to both visual SLAM and global localization is the place recognition. Robot should be able to recognize the places it has visited before to localise itself or refine the map of the environment. This task is performed by matching the current view of the robot to the existing map that contains the images of the previously visited locations. In this paper we consider the problem of appearance-based localization in which the map is known *a priori*.

In large-scale environments maps contain too many images to match. The image search in such a large map is still a challenging and open problem. Matching images by comparing the local features of each image directly to the local features of all other images in the map is not practical. Bag-of-words proposes a more efficient approach; first, rather than matching with a pool of million visual features extracted from many thousands of images, the local features are mapped to a smaller number of vocabulary words that are built in an offline phase. This process is called vector-quantization. Once the visual 