程序报错退出,错误提示:

M = cv2.getRotationMatrix2D(eyesCenter, angle, scale)
TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type

查询后发现问题出在这行:

        eyesCenter = (leftEyeCenter[0] + rightEyeCenter[0] // 2,
            leftEyeCenter[1] + rightEyeCenter[1] // 2)
好像是由于软件包版本不兼容导致的
修改为:
        eyesCenter = (leftEyeCenter[0] + rightEyeCenter[0] // 2.0,
            leftEyeCenter[1] + rightEyeCenter[1] // 2.0)
即可完美运行!