Learning Short Binary Codes for Large-scale Image Retrieval