How are world coordinates and extrinsic parameters defined in camera_calibration.cpp?

I am using OpenCV’s camera_calibration.cpp sample for camera calibration with a CIRCLES_GRID.

I am trying to understand how the world (object) coordinate system and the extrinsic parameters are determined in this sample.

In calcBoardCornerPositions(), the object points for CIRCLES_GRID are generated as:

Point3f(j * squareSize, i * squareSize, 0)

I have the following questions:

  1. Does this mean that the first circle is defined as the origin (0, 0, 0), and the X and Y axes are defined along the circle grid?
  2. Are these objectPoints the world coordinates used for camera calibration?
  3. How does calibrateCameraRO() use objectPoints and imagePoints to determine rvecs and tvecs?
  4. Do rvecs and tvecs represent the transformation from this object/world coordinate system to the camera coordinate system?

I would especially like to understand how the world coordinate system is defined before the extrinsic parameters are calculated.

Thank you.

I am using OpenCV’s camera_calibration.cpp sample for camera calibration with a CIRCLES_GRID.

I am trying to understand how the world (object) coordinate system and the extrinsic parameters are determined in this sample.

In calcBoardCornerPositions(), the object points for CIRCLES_GRID are generated as:

Point3f(j * squareSize, i * squareSize, 0)

I have the following questions:

  1. Does this mean that the first circle is defined as the origin (0, 0, 0), and the X and Y axes are defined along the circle grid?
  2. Are these objectPoints the world coordinates used for camera calibration?
  3. How does calibrateCameraRO() use objectPoints and imagePoints to determine rvecs and tvecs?
  4. Do rvecs and tvecs represent the transformation from this object/world coordinate system to the camera coordinate system?

I would especially like to understand how the world coordinate system is defined before the extrinsic parameters are calculated.

Thank you.