Learning a dense multi-view representation for detection, viewpoint classification and synthesis of object categories