private void Start()
        {
            CalibrationDataHelper.Initialize();
            dslrIntrinsics = CalibrationDataHelper.LoadCameraIntrinsics(cameraIntrinsicsPath);
            if (dslrIntrinsics == null)
            {
                throw new Exception("Failed to load the camera intrinsics file.");
            }
            else
            {
                Debug.Log($"Successfully loaded the provided camera intrinsics file: {dslrIntrinsics}");
            }

            networkingService = NetworkingService as INetworkingService;
            if (networkingService != null)
            {
                networkingService.DataReceived += OnDataReceived;
            }

            matchMakingService = MatchMakingService as IMatchMakingService;
            if (matchMakingService != null)
            {
                matchMakingService.Connect();
            }

            if (headsetCalibration != null)
            {
                headsetCalibration.Updated += OnHeadsetCalibrationUpdated;
            }

            var arucoDatasetFileNames = CalibrationDataHelper.GetArUcoDatasetFileNames();

            foreach (var fileName in arucoDatasetFileNames)
            {
                var dslrTexture = CalibrationDataHelper.LoadDSLRArUcoImage(fileName);
                var headsetData = CalibrationDataHelper.LoadHeadsetData(fileName);

                if (dslrTexture == null ||
                    headsetData == null)
                {
                    Debug.LogWarning($"Failed to locate dataset: {fileName}");
                }
                else if (!ProcessArUcoData(headsetData, dslrTexture))
                {
                    Debug.LogWarning($"Failed to process dataset: {fileName}");
                }
                else
                {
                    CalibrationDataHelper.SaveDSLRArUcoDetectedImage(dslrTexture, fileName);
                    CreateVisual(headsetData, fileName);
                }
            }
        }
        private void Start()
        {
            holographicCameraObserver.RegisterCommandHandler(HeadsetCalibration.CalibrationDataReceivedCommandHeader, OnCalibrationDataReceived);
            holographicCameraObserver.RegisterCommandHandler(HeadsetCalibration.UploadCalibrationResultCommandHeader, OnCalibrationResultReceived);
            CalibrationAPI.Instance.Reset();
            CalibrationDataHelper.Initialize();
            dslrIntrinsics = CalibrationDataHelper.LoadCameraIntrinsics(cameraIntrinsicsPath);
            if (dslrIntrinsics == null)
            {
                throw new Exception("Failed to load the camera intrinsics file.");
            }
            else
            {
                Debug.Log($"Successfully loaded the provided camera intrinsics file: {dslrIntrinsics}");
            }

            var arucoDatasetFileNames = CalibrationDataHelper.GetArUcoDatasetFileNames();

            foreach (var fileName in arucoDatasetFileNames)
            {
                var dslrTexture = CalibrationDataHelper.LoadDSLRArUcoImage(fileName);
                var headsetData = CalibrationDataHelper.LoadHeadsetData(fileName);

                if (dslrTexture == null ||
                    headsetData == null)
                {
                    Debug.LogWarning($"Failed to locate dataset: {fileName}");
                }
                else if (!ProcessArUcoData(headsetData, dslrTexture))
                {
                    Debug.LogWarning($"Failed to process dataset: {fileName}");
                }
                else
                {
                    processedDatasetCount++;
                    CalibrationDataHelper.SaveDSLRArUcoDetectedImage(dslrTexture, fileName);
                    CreateVisual(headsetData, fileName);
                }
            }
        }