【发布时间】:2015-06-29 12:00:56
【问题描述】:
我有以下图片:
我想从这张图片中去除鱼眼镜头失真,所以我使用了以下代码:
[X,map] = imread('Foam_Image.jpg'); % Read the indexed image
options = [size(X,1) size(X,2) 1]; % An array containing the columns, rows and exponent
tf = maketform('custom',2,2,[],... % Make the transformation structure
@fisheye_inverse,options);
newImage = imtransform(X,tf);
imshow(newImage); % show image
但我收到以下错误:
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{:});
我也使用了imwarp 而不是imtransform,但我仍然收到错误消息。任何人都知道为什么我会收到此错误以及如何解决它?
【问题讨论】:
标签: matlab image-processing fisheye