Skip to content

Commit a326430

Browse files
committed
Save imgPoints and objPoints
1 parent 37244b5 commit a326430

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: charuco-pose-estimation.ipynb

+4-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@
212212
"valid, rvec, tvec = cv2.solvePnP(objPoints, imgPoints, cameraMatrix, distCoeffs)\n",
213213
"cv2.drawFrameAxes(imcharuco, cameraMatrix, distCoeffs, rvec, tvec, squareLength * 3)\n",
214214
"\n",
215-
"display(Image.fromarray(cv2.cvtColor(imcharuco, cv2.COLOR_BGR2RGB)))"
215+
"display(Image.fromarray(cv2.cvtColor(imcharuco, cv2.COLOR_BGR2RGB)))\n",
216+
"\n",
217+
"np.savetxt(path / 'imgPoints.txt', imgPoints.reshape(-1, 2))\n",
218+
"np.savetxt(path / 'objPoints.txt', objPoints.reshape(-1, 3))"
216219
]
217220
},
218221
{

0 commit comments

Comments
 (0)