{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "vscode": {
     "languageId": "plaintext"
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "\n",
    "# 假设棋盘格尺寸为8x6，方格尺寸为25mm（0.025m）\n",
    "chessboard_size = (8, 6)\n",
    "square_size = 0.025  # 25mm = 0.025m\n",
    "\n",
    "# 生成棋盘格每个角点的世界坐标（二维坐标），Z坐标设为0\n",
    "objp = np.zeros((chessboard_size[0] * chessboard_size[1], 3), np.float32)\n",
    "objp[:, :2] = np.mgrid[0:chessboard_size[0], 0:chessboard_size[1]].T.reshape(-1, 2) * square_size\n",
    "objp = objp[:, :2]  # 只保留 X 和 Y 坐标，忽略 Z 坐标"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
