Image import in -y axis

1 回表示 (過去 30 日間)
Luis Jimenez Sanchez
Luis Jimenez Sanchez 2020 年 5 月 25 日
回答済み: Image Analyst 2020 年 5 月 25 日
Hi,
So I am importing an image that I want to later trace points on and generate a Lagrange polynomial curve but the image is imported into the -y axis. While this may not affect my curve it can affect my constants in the curve. This is my code.
bottle=imread('bottle.png');
imshow(bottle)
hold on
i=1;
n=15;
x0=0;
y0=0;
[x0,y0]=ginput(1);
while (i<n+1)
[x,y]=ginput(1);
plot(x,y,'*r')
xi(i,1)=x;
yi(i,1)=y;
i=i+1;
end
display (xi);
display (yi);
axis on;

回答 (1 件)

Image Analyst
Image Analyst 2020 年 5 月 25 日
Please attach 'bottle.jpg'
Also use
axis ij
to flip the direction of plotting with plot(). Or else (# of rows - y) instead of y.

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by