FIxed a bug for recoverPose function

Hi, this is a bug fix for the recoverPose function I contributed. The previous mask did not work properly.