Skip to content

Instantly share code, notes, and snippets.

@viewpointsa
Created July 9, 2020 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viewpointsa/1c1ad65890d3b615dbd21238e2ea0be1 to your computer and use it in GitHub Desktop.
Save viewpointsa/1c1ad65890d3b615dbd21238e2ea0be1 to your computer and use it in GitHub Desktop.
import cv2
import numpy as np
cameraMatrix = np.array([
2117.598861472505,
0.0,
517.602819121056,
0.0,
2117.6945788309686,
647.6170255017,
0.0,
0.0,
1.0
], dtype=np.float32).reshape(3,3)
distCoeffs = np.array([
-1.4094355927704236,
2.2898844133510323,
0.003102451134638497,
-0.007310615282179743,
0.0
], dtype=np.float32)
p = np.array([[[ 100.0, 100.0 ]]], dtype=np.float32)
pp = cv2.undistortPoints( p, cameraMatrix, distCoeffs)
print(pp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment