img = imread('e:\picture\qingxie.jpg');
input_P = [18 5;378 136;11 291;362 446];  %图片中相框的4个顶点
base_P = [1 1;400 1;1 300;400 300];           %图片中相框的4个顶点旋转后的坐标
tform = cp2tform(input_P,base_P,'projective');
img_t = imtransform(img,tform,'XData',[1 400],'YData',[1 300]);
imshow(img); 
figure,imshow(img_t);

  -----------------------------------------------------------------------------------------

效果如下:

图像的透视变换_matlab

--------------------------------------------------------------------------------

参考:

相关文章:

  • 2021-12-16
  • 2022-12-23
  • 2021-11-15
  • 2021-06-30
  • 2021-11-09
  • 2021-06-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-14
  • 2021-12-11
  • 2021-07-29
  • 2021-07-13
  • 2021-11-21
相关资源
相似解决方案