private void Refresh() { // if (isFisheye) { Calib3d.fisheye_undistortImage(videoCaptureController.RGBMat, rgbMat, cameraMatrix, distCoeffs, newCameraMatrix); } else { Imgproc.remap(videoCaptureController.RGBMat, rgbMat, mapX, mapY, Imgproc.INTER_LINEAR); //Calib3d.undistort(videoCaptureController.RGBMat, rgbMat, cameraMatrix, distCoeffs, newCameraMatrix); } Core.flip(rgbMat, rgbMat, 0); Utils.fastMatToTexture2D(rgbMat, texture); }