From f28895cd6bcade173a9765afb08d353e440c3fbf Mon Sep 17 00:00:00 2001 From: Gabriel Nascarella Hishida Date: Tue, 24 Nov 2020 22:14:55 -0300 Subject: [PATCH] doc: Fix example code using deprecated xrange xrange was abandoned and doesn't exist in Python 3. range() works just the same --- doc/py_tutorials/py_calib3d/py_calibration/py_calibration.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/py_tutorials/py_calib3d/py_calibration/py_calibration.markdown b/doc/py_tutorials/py_calib3d/py_calibration/py_calibration.markdown index e337999..bba7b90 100644 --- a/doc/py_tutorials/py_calib3d/py_calibration/py_calibration.markdown +++ b/doc/py_tutorials/py_calib3d/py_calibration/py_calibration.markdown @@ -209,7 +209,7 @@ find the average error, we calculate the arithmetical mean of the errors calcula calibration images. @code{.py} mean_error = 0 -for i in xrange(len(objpoints)): +for i in range(len(objpoints)): imgpoints2, _ = cv.projectPoints(objpoints[i], rvecs[i], tvecs[i], mtx, dist) error = cv.norm(imgpoints[i], imgpoints2, cv.NORM_L2)/len(imgpoints2) mean_error += error -- 2.7.4