I got an error when trying to run the imtransform() line in my code. I got:
Error using imtransform>parse_inputs (line 438)
XData and YData could not be automatically determined.
Try specifying XData and YData explicitly in the call to
IMTRANSFORM.
Error in imtransform (line 265)
args = parse_inputs(varargin{:});
Error in main (line 9)
newImage = imtransform(rgbImage,tf); %# Transform the image
I used the function tf = maketform() to generate the transformation itself. So, in order to figure out what wrong with my code i simplified as much as I can the function:
function U = fisheye_inverse(X)
U = X;
end
and my code looked like this:
rgbImage = imread('IMG-20150622-WA0046.jpg'); %# Read the image
tf = maketform('custom',2,2,[],... %# Make the transformation structure
@fisheye_inverse,options);
newImage = imtransform(rgbImage,tf); %# Transform the image
imshow(newImage);
and still the code yell at me this error again. I looked at a similar problem Here that posted here in the past, but no one answer the question in the end.
Thanks in advance, Gal :)