Active recognition and pose estimation of rigid and deformable objects in 3D space