Contextual action recognition and target localization with an active allocation of attention on a humanoid robot