【问题标题】:how to crop image and save the position in matlab [closed]如何在matlab中裁剪图像并保存位置[关闭]
【发布时间】:2015-03-02 03:50:49
【问题描述】:

我想在 matlab 中裁剪图像,所以我构建了一个 gui。当我单击按钮例如 select region 时,用户可以在imagA 中输入点。之后单击名为 crop 的按钮,图像已被裁剪。如何裁剪另一个名为imagB 的图像,与imagA 具有相同的位置?

谢谢

【问题讨论】:

    标签: image matlab image-processing crop


    【解决方案1】:

    您可以使用imcrop 裁剪图像取回裁剪后的矩形。
    假设您有两张图片(imagAimagB)要以相同的方式裁剪:

    figure;
    imshow( imagA );title('please crop');
    [cA rect] = imcrop; %// interactive cropping of imagA
    cB = imcrop( imagB, rect ); %// non-interactive way to crop imagB using same crop rect as imagA
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-05
      • 1970-01-01
      • 2012-05-21
      相关资源
      最近更新 更多