mirror of
https://github.com/opencv/opencv.git
synced 2024-12-18 11:28:02 +08:00
doc: Fix example code using deprecated xrange
xrange was abandoned and doesn't exist in Python 3. range() works just the same
This commit is contained in:
parent
f4f462c50b
commit
f28895cd6b
@ -209,7 +209,7 @@ find the average error, we calculate the arithmetical mean of the errors calcula
|
|||||||
calibration images.
|
calibration images.
|
||||||
@code{.py}
|
@code{.py}
|
||||||
mean_error = 0
|
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)
|
imgpoints2, _ = cv.projectPoints(objpoints[i], rvecs[i], tvecs[i], mtx, dist)
|
||||||
error = cv.norm(imgpoints[i], imgpoints2, cv.NORM_L2)/len(imgpoints2)
|
error = cv.norm(imgpoints[i], imgpoints2, cv.NORM_L2)/len(imgpoints2)
|
||||||
mean_error += error
|
mean_error += error
|
||||||
|
Loading…
Reference in New Issue
Block a user