Hello! I read images using imread, remove the lens distortion and then write it to a new created folder.The code works but I don't have the original name of the images anymore. I want that the image name e.g. 20160406.png is the same for the new undistorted image. How can I do that?
This is my code:
z=dir('*.png');NewFolder=mkdir('NewFolder');for k = 1:numel(z) X=imread(z(k).name); Y=undistortImage(X,cameraParams); imwrite(Y,['NewFolder/', num2str(k),'.png']); end
Best Answer