Can I apply griddedinterpolant to a binary image to resize it back? What I want to achieve. Below. Error: Invalid arguments specified in evaluating the interpolant.
5 次查看(过去 30 天)
显示 更早的评论
F1 = griddedInterpolant(double(G)); %G is binary
xq = (0:6/5:sx)';
yq = (0:6/5:sy)';
zq = (1:sz)';
vq1 = uint8(F1({xq,yq,zq}));
figure(2)
imshow(vq1)
title('Lower Resolution')
0 个评论
回答(1 个)
luqman ahmed
2019-10-2
yes you can
A = imread('image1.jpg');
imshow(A);
F = griddedInterpolant(double(A));% create interpolation
[sx,sy,sz] = size(A);
xq = (0:3/6:sx)';
yq = (0:3/6:sy)';
vq = uint8(F({xq,yq})); %change to two argument to avoid error in grayscale or binary image
figure
imshow(vq)
title('Higher Resolution')
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!