MATLAB: Change Read Only Properties to writable

cameraparamsComputer Vision ToolboxImage Acquisition ToolboxImage Processing ToolboxMATLABparamsread-onlyvision

Using the vision toolbox for camera calibration you get the cameraParams out. These params are only read. How is it possible to do some changes in these params or a good way to by pass these limia
cameraParams=estimateCameraParameters(imagePoints, worldPoints)
Why I want to change it, I want to use a different radial and tangential distortion which I found in C+ with OpenCV and create a undistorted image and it's undistorted points.

Best Answer

Hi Joep,
You can create another cameraParameters object using the constructor, and pass in all the parameters using name-value pairs. Fore example, let's say you have cameraParams1, and you want to replace its radial and tangential distortion coefficients. You can do the following:
cameraParams2 = cameraParameters('IntrinsicMatrix', ...
cameraParams1.IntrinsicMatrix, 'RadialDistortion', [0.2, -0.1], ...
'TangentialDistortion', [0.1, 0.1]);
Out of curiosity, what makes you think that the distortion coefficients you found using OpenCV are better?