フィルターのクリア

how to get a good resolution for a binary image from an image, which took through getframe?

1 回表示 (過去 30 日間)
Osama Tabbakh
Osama Tabbakh 2019 年 3 月 9 日
回答済み: Pruthvi Muppavarapu 2019 年 3 月 13 日
Hello everyone,
I have an image, which must be captured from a plot and then resized and converted to a binary image, that's my code:
plot (L(:,1),L(:,2),'k');
axis([min(x) max(x) min(y) max(y)])
drawnow
ax1 = gca;
ax1.YDir = 'normal';
ax1.Units = 'pixels';
pos = ax1.Position;
marg = 5;
rect = [marg, marg, pos(3)-2*marg, pos(4)-2*marg];
F = getframe(gca,rect);
ax1.Units = 'normalized';
[X, Map] = frame2im(F);
Y = imresize (X,[500 500]);
BW = im2bw(Y,Map,0.5);
In fact, I've got a binary image but with very bad resolution, how i can fix that?

回答 (1 件)

Pruthvi Muppavarapu
Pruthvi Muppavarapu 2019 年 3 月 13 日

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by