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.

조회 수: 4 (최근 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')

답변 (1개)

luqman ahmed
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')

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by