フィルターのクリア

imagesc - size of figure changes content

1 回表示 (過去 30 日間)
Luca Nagel
Luca Nagel 2019 年 4 月 3 日
コメント済み: Jan 2019 年 4 月 8 日
Hello everybody,
I have been experiencing a weird behaviour in imagesc when changing the size of the figure. It is hard to explain so attached a link to a video demonstrating what's going. I just do a
imagesc(data)
and then change the size of the figure with my mouse. Can anyone explain whats going on?
All the best!
  2 件のコメント
Geoff Hayes
Geoff Hayes 2019 年 4 月 3 日
Luca - perhaps you could describe what is happening and/or attach a screen shot...rather than a link to what may be a video.
Luca Nagel
Luca Nagel 2019 年 4 月 3 日
編集済み: Luca Nagel 2019 年 4 月 3 日
Okay, so I have the dataset data.mat (attached) and visualize it using
imagesc(data)
When I change the size of figure with the mouse, the content of the imagesc changes. It looks like there is an interpolation happening that depends on the size of the figure.
here is another short video showing what's happening, I thought it would become clearer if I show this insteand of explaining. If you have questions please ask.
https://streamable.com/3wyyd

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

回答 (1 件)

Jan
Jan 2019 年 4 月 3 日
編集済み: Jan 2019 年 4 月 3 日
It does not just look like there is an interpolation, when you resize the image, but of course there is in fact an interpolation. Because you cannot change the size of the pixels on the screen, you have to interpolate the data to display it for different sizes of the figure. What do you expect instead?
Maybe you want to modify the kind of the interpolation. Then you have to do the scaling by your own based on imresize . I'm happy with the 'lanczos3' method, which produces small artifacts only.
As far as I can see, the documentation does not mention, how image interpolates the output: https://www.mathworks.com/help/matlab/ref/image.html
I'm going to send an enhancement request to add this in the docs, or maybe to have this as a user-defined property.
[EDITED] I asked a corresponding question at first, because this feature seems to be such important, that it should be implemented already.
  3 件のコメント
Jan
Jan 2019 年 4 月 3 日
@Luca: Which 2 colored lines?
Jan
Jan 2019 年 4 月 8 日
Luca wrote:
The ones at y=29 and =33 from left to right

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

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by