This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
retval, rvec, tvec = aruco.estimatePoseBoard(corners, ids, board, cameraMatrix, distCoeffs, None, None) | |
#rvec, tvec : 3 float vector | |
#ロドリゲス公式で、rvecから回転行列へ変換する | |
Rmatrix, Jacob = cv2.Rodrigues(rvec) | |
# [3 x 4 matrix]で、R|t マトリクスを作成 | |
RTmatrix34_L = np.concatenate([Rmatrix, tvec], axis=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# カメラ内部パラメータ(内部パラメータ行列) | |
# ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, gray.shape[::-1], None, None) | |
# -----reading camera intrinsic matrix | |
cameraMatrix = np.loadtxt("calib/cameraMatrix.csv",delimiter=",") | |
distCoeffs = np.loadtxt("calib/distCoeffs.csv",delimiter=",") | |
# 外部パラメータ行列 | |
# https://gist.github.com/shks/e3cd5fc22ad9f4ddbccd5312a64803c3 |
OlderNewer