why getpts doesn't give the correct points?

4 ビュー (過去 30 日間)
David Armendáriz
David Armendáriz 2019 年 4 月 20 日
回答済み: Walter Roberson 2019 年 4 月 20 日
I have the following image:
car1.PNG
When I plot the points got by getpts, the image is flipped upside down:
car2.PNG
My code is the following:
figure
imshow("carro.png")
[x,y] = getpts;
plot(x,y,'b*')

採用された回答

Walter Roberson
Walter Roberson 2019 年 4 月 20 日
imshow() by default sets YDir reverse so that the "top" of the array (lowest row number) appears at the top of the screen (which would otherwise correspond to highest row number).
When you then plot the points without YDir reverse then they appear upside down.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by