When I run the code, the Calibration work but it cannot load the arucoMarker camera parameters in to the exe windows.
When I debug the code
The cmd get error DynamicLib::libraryload …\opencv_videoio_gstreamer452_64d.dll every time it get into
vid.isOpened()
vid.read(frame)
Here is the full code of the function
void cameraCalibrationProcess(Mat& cameraMatrix, Mat& distortionCoefficients)
{
    Mat frame;
    Mat drawtoframe;
    vector<Mat> savedImages;
    vector<vector<Point2f>> markerCorners, rejectedCandidates; //for aruco marker
    VideoCapture vid(0);
    if (!vid.isOpened())
    {
        return;
    }
    int framepersecond = 20;
    namedWindow("Webcam", WINDOW_AUTOSIZE);
    while (true)
    {
        if (!vid.read(frame))
            break;
        vector<Vec2f> foundpoints;
        bool found = false;
        found = findChessboardCorners(frame, checkerboard, foundpoints, CALIB_CB_ADAPTIVE_THRESH | CALIB_CB_NORMALIZE_IMAGE | CALIB_CB_FAST_CHECK);
        frame.copyTo(drawtoframe);
        drawChessboardCorners(drawtoframe, checkerboard, foundpoints, found);
        if (found)
        {
            imshow("Webcam", drawtoframe);
        }
        else
            imshow("Webcam", frame);
        char character = waitKey(1000 / framepersecond);
}
int main(int argv, char** argc)
{
Mat cameraMatrix = Mat::eye(3, 3, CV_64F);
Mat distortionCoefficients;
//createArucoMarker();
cameraCalibrationProcess(cameraMatrix, distortionCoefficients);
//loadCamera("CalibrationOutput", cameraMatrix, distortionCoefficients);
//startWebcam(cameraMatrix, distortionCoefficients, arucoSquareDimension);
return 0;
}