A method for controlling a robot cleaner, the method comprising: acquiring, for a plurality of rooms in a cleaning area, respectively, a plurality of images of the room; characterised in that the method further comprises: calculating a plurality of room-specific feature histograms for the plurality of the rooms, respectively, each of the room-specific feature histograms having scored bins, and each bins of the corresponding room-specific feature histogram representing a feature obtained from the images of a corresponding room, wherein the bins are defined and scored according to a rule defined for the corresponding room; acquiring an image at a current position; calculating a plurality of image-specific feature histograms for the acquired image at the current position, wherein each of the image-specific feature histograms is obtained by applying the rules defined for each room, respectively, to the features obtained from the image at the current position, wherein each of the image-specific feature histograms has scored bins, and each bins of corresponding image-specific feature histogram represents a feature obtained from the images of the corresponding room; and determining a room where the robot cleaner is currently positioned from the plurality of rooms by comparing the plurality of image-specific feature histograms with the plurality of room-specific feature histograms. acquiring, for a plurality of rooms in a cleaning area, respectively, a plurality of images of the room; characterised in that the method further comprises: calculating a plurality of room-specific feature histograms for the plurality of the rooms, respectively, each of the room-specific feature histograms having scored bins, and each bins of the corresponding room-specific feature histogram representing a feature obtained from the images of a corresponding room, wherein the bins are defined and scored according to a rule defined for the corresponding room; acquiring an image at a current position; calculating a plurality of image-specific feature histograms for the acquired image at the current position, wherein each of the image-specific feature histograms is obtained by applying the rules defined for each room, respectively, to the features obtained from the image at the current position, wherein each of the image-specific feature histograms has scored bins, and each bins of corresponding image-specific feature histogram represents a feature obtained from the images of the corresponding room; and determining a room where the robot cleaner is currently positioned from the plurality of rooms by comparing the plurality of image-specific feature histograms with the plurality of room-specific feature histograms. calculating a plurality of room-specific feature histograms for the plurality of the rooms, respectively, each of the room-specific feature histograms having scored bins, and each bins of the corresponding room-specific feature histogram representing a feature obtained from the images of a corresponding room, wherein the bins are defined and scored according to a rule defined for the corresponding room; acquiring an image at a current position; calculating a plurality of image-specific feature histograms for the acquired image at the current position, wherein each of the image-specific feature histograms is obtained by applying the rules defined for each room, respectively, to the features obtained from the image at the current position, wherein each of the image-specific feature histograms has scored bins, and each bins of corresponding image-specific feature histogram represents a feature obtained from the images of the corresponding room; and determining a room where the robot cleaner is currently positioned from the plurality of rooms by comparing the plurality of image-specific feature histograms with the plurality of room-specific feature histograms.