【发布时间】:2015-10-10 17:45:17
【问题描述】:
I = imread('data1.jpg')
[p3, p4] = size(I);
q1 = 50; % size of the crop box
i3_start = floor((p3-q1)/2); % or round instead of floor; using neither gives warning
i3_stop = i3_start + q1;
i4_start = floor((p4-q1)/2);
i4_stop = i4_start + q1;
I = I(i3_start:i3_stop, i4_start:i4_stop, :);
figure ,imshow(I);
我已运行此代码并收到此错误“索引超出矩阵尺寸。
==> 在 10 I = I(i3_start:i3_stop, i4_start:i4_stop, :);"
谁能帮我解决这个错误?我想在中心裁剪图像
【问题讨论】:
标签: matlab image-processing handwriting-recognition