Hi everybody ! I'm writting a simple program to undistort images. I'm working with matlab 2015b (Computer Vision System included). No problem to get the images (9 reference images with a checkboard in total, all extracted from the same video sequence), to generate the camera parameters, but each time i'm using the undistortImage function, Matlab crashes. I tried by using the cameraCalibration App and by writting all the code, results are the same.
Any idea of the problem ?
Here is my code :
clear all
close al
clc
images = imageSet(fullfile('C:\Users\Lise\Documents\MATLAB'));
[imagePoints, boardSize, imagesUsed] = detectCherckerboardPoints(images.ImageLocation);
squareSize = 50;
workdPoints = generateCheckerboardPoints(boardSize, squareSize);
cameraParams = estimateCameraParameters(imagePoints, worldPoints);
I = image.read(1);
[J, newOrigin] = undistortImage(I, cameraParams);
The matlab message before closing : (this window opens 2 times)
MATLAB Sysem Error
Matlab has encounted an internal problem and needs to close. The unsaved information you were working on may be lost. We are sorry for the inconvenience. Click Never Send to disable sending information to MathWorks (saved un preference). Click Send to send this information to MathWorks. Click End Now to close MATLAB now. Click Attemps to continue to try return briefly to MATLAB. You might be able to save your work. Do not continue your MATLAB session after trying to save your work. Further operations are unreliable. You must close and restart MATLAB in order for the program to operate correctly. Click Details to see what will be sent to MathWorks if the Send button is clicked.
Thx !! :)