Hello everyone!
I need your help! Can anyone please tell me why, the Y1 becomes empty and its size changes when I input a true color image ?
X1 = double(imread('true_color_image'));Y1 = padarray(X1(end-1:end,end-1:end),[1 1],'replicate','pre')size(X1)size(Y1)Y1 = 0 0 0 0 0 0 0 0 0ans = 120 120 3ans = 3 3
While when I use input data, as shown below, Y1 does not change:
X2 = [1 2 3; 4 5 6; 7 8 9]Y2 = padarray(X2(end-1:end,end-1:end),[1 1],'replicate','pre')size(X2)size(Y2)X2= 1 2 3 4 5 6 7 8 9Y2= 5 5 6 5 5 6 8 8 9ans = 3 3ans = 3 3
What can I do so that the size of Y1 does not change (i.e. remains same as X1) ?
Thank you!
Best Answer