private async Task StartCapturing() { // Load video config var cameraCalibrationData = await PathIO.ReadBufferAsync("ms-appx:///data/camera_para.dat"); var desiredVideoCameraPosition = await Helper.GetDefaultVideoDeviceLocation(); var videoConfiguration0 = string.Format("-device=WinMC -width={0} -height={1} -format=BGRA -position={2}", DesiredVideoWidth, DesiredVideoHeight, desiredVideoCameraPosition); // Start capturing _isRunning = _arWrapper.arwStartRunningB(videoConfiguration0, cameraCalibrationData.ToArray(), NearPlane, FarPlane); if (!_isRunning) { throw new InvalidOperationException("Failed to start ARToolKit."); } }
private async Task StartCapturing() { // Load video configuration which is deployed with the app in its app-local storage var cameraCalibrationData = await PathIO.ReadBufferAsync("ms-appx:///data/camera_para.dat"); var desiredVideoCameraPosition = await Helper.GetDefaultVideoDeviceLocation(); var videoConfiguration0 = string.Format("-module=WinMC -width={0} -height={1} -format=BGRA -position={2}", DesiredVideoWidth, DesiredVideoHeight, desiredVideoCameraPosition); // Start capturing by passing the the video config and the Near and Far plane for the projection _isRunning = _arWrapper.arwStartRunningB(videoConfiguration0, cameraCalibrationData.ToArray(), NearPlane, FarPlane); if (!_isRunning) { throw new InvalidOperationException("Failed to start ARToolKit."); } }