Rectangular-shaped object recognition and pose estimation