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 日間)
FJ
FJ 2018 年 4 月 16 日
回答済み: luqman ahmed 2019 年 10 月 2 日
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 Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by