Skip to content

Commit

Permalink
doc: Fix example code using deprecated xrange
Browse files Browse the repository at this point in the history
xrange was abandoned and doesn't exist in Python 3. range() works just the same
  • Loading branch information
Gabriel Nascarella Hishida authored and gabrielnhn committed Nov 25, 2020
1 parent f4f462c commit f28895c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f28895c

Please sign in to comment.