Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab 卫星图像的单应图像变换问题_Matlab_Transformation_Homography_Projective Geometry - Fatal编程技术网

Matlab 卫星图像的单应图像变换问题

Matlab 卫星图像的单应图像变换问题,matlab,transformation,homography,projective-geometry,Matlab,Transformation,Homography,Projective Geometry,我想对卫星图像应用单应性。我觉得这很有帮助。所以我决定使用相同的Matlab代码 im = imread('cameraman.tif'); n = [0;0;-1]; d = Inf theta = 60*pi/180; R = [ 1 0 0 ; 0 cos(theta) -sin(theta); 0 sin(theta) cos(theta)]; t = [0

我想对卫星图像应用单应性。我觉得这很有帮助。所以我决定使用相同的Matlab代码

 im = imread('cameraman.tif');
 n = [0;0;-1];
 d = Inf

       theta = 60*pi/180;

       R = [ 1     0           0 ;
           0  cos(theta) -sin(theta);
           0  sin(theta)  cos(theta)];

       t = [0;0;0];

      K=[300 0    0;
            0    300 0;
            0    0    1];

      H=K*R/K-1/d*K*t*n'*K;

     img=imagehomog(im,H','c');
     figure;imshow(img)
但输出只是一个小盒子。 我正在使用Matlab2015b

编辑 使用
imtransform
maketform

n = [0;0;-1];
d = Inf;

im = imread('cameraman.tif');

   theta = 60*pi/180;

   R = [ 1     0           0 ;
       0  cos(theta) -sin(theta);
       0  sin(theta)  cos(theta)];

   t = [0;0;0];

  K=[300 0    0;
        0    300 0;
        0    0    1];

  H=K*R/K-1/d*K*t*n'*K;

  tform = maketform('projective',H');
  imT = imtransform(im,tform);

  imshow(imT)
输出

我怎样才能从中心做到这一点。像这样的

该代码没有运行,它充满了bug
ImageHolog
不是MATLAB函数,它不是MATLAB函数。我使用了帖子中提到的代码。如果是完全错误,那么他是如何在答案中显示输出的?我不知道,因为您的
for
循环没有
end
,因此MATLAB无法运行该代码。你能把
imagehomog
的文档链接起来吗?很抱歉,我已经更正了该代码,该
for
不应该在那里。以下是
imagehomg
的示例。完整的哦,所以它不是MATLAB内部的函数。我建议你看看它给你带来的多种可能性。我不能用你在网上随机找到的代码发表评论。