Error using .' TRANSPOSE does not support N-D arrays. Use PAGETRANSPOSE/PAGECTRANSPOSE to transpose pages or PERMUTE to reorder dimensions of N-D arrays.
Show older comments
I=imread('Medidas2._preview_rev_1.png');
I=double(I);
[m, n]=size(I)
[x,y]=meshgrid(1:n, 1:m); %grid initial image
r=0.5; %scale factor
[p,q]=meshgrid(1:r:n, 1:r:m); %grid final image
I2=interp2(x,y,I,p,q,'nearest'); %interpolation
figure
subplot(1,2,1),imagesc(I),axis image
title('Original','FontSize',18)
subplot(1,2,2),imagesc(I2),axis image
title('Interpolador NN ','FontSize',18)
colormap("gray")
Error using .'
TRANSPOSE does not support N-D arrays. Use PAGETRANSPOSE/PAGECTRANSPOSE to transpose pages or
PERMUTE to reorder dimensions of N-D arrays.
Error in interp2 (line 128)
V = V.';
Error in Interpolacion (line 11)
I2=interp2(x,y,I,p,q,'nearest');
Accepted Answer
More Answers (1)
Matt J
on 4 Aug 2023
0 votes
I is an RGB image. Perhaps you meant to convert it to grayscale.
1 Comment
Farah M'hamed
on 4 Aug 2023
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!