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 views (last 30 days)
Show older comments
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 Comments
Answers (1)
luqman ahmed
on 2 Oct 2019
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 Comments
See Also
Categories
Find more on Interpolation 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!