フィルターのクリア

How change Image/2d array proportions?

1 回表示 (過去 30 日間)
Eduardo Santos
Eduardo Santos 2019 年 5 月 5 日
コメント済み: Eduardo Santos 2019 年 5 月 6 日
Let`s say that I have a image (100x500) (a simple 2D-array)
But I know that this image has a real-world size as 25.4 cm heigh and 210 cm wide, i.e. the proportion are different.
How can I plot this image with the (real-world) proportion and also showing the labels from (0...25.4 cm) x (0...210 cm) ?
Thanks in advance.

採用された回答

Image Analyst
Image Analyst 2019 年 5 月 5 日
Use imresize():
[rows, columns, numberOfColorChannels] = size(yourImage)
newWidth = round(columns * (210/25.4))
yourImage = imresize(yourImage, [rows, newWidth]);
  1 件のコメント
Eduardo Santos
Eduardo Santos 2019 年 5 月 6 日
Thanks!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by