尝试在我的代码中运行imtransform()行时出错。我得到了:
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
我使用函数tf = maketform()来生成转换本身。 所以,为了弄清楚我的代码有什么问题我尽可能地简化了函数:
function U = fisheye_inverse(X)
U = X;
end
我的代码看起来像这样:
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);
然后代码再次对我大喊这个错误。 我查看了过去发布的类似问题Here,但最后没有人回答这个问题。
先谢谢,Gal:)