简体   繁体   English

八度选择图像的一部分

[英]Octave select part of image

我有一个 512x512 的二维图像,我想显示中间部分,即A(256-50:256+50,256-50:256+50)但无法使用imshow开始工作。

You can use imcrop function您可以使用 imcrop 功能

pkg load image

x = 256-50;  // starting position (x cordinate)
y = 256-50;  // starting position (y cordinate)
a = 100;
b = 100;

B = imcrop(A, [x y a b]);
imshow(B);

This will crop the image starting from x,y by 100 pixels这将从 x,y 开始裁剪图像 100 像素

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM