フィルターのクリア

image() function is overwriting old image?

2 ビュー (過去 30 日間)
Anna
Anna 2014 年 1 月 17 日
コメント済み: Image Analyst 2014 年 1 月 17 日
I have a code that goes as follows:
image(uint8(original))
<commands to manipulate image>
image(new)
The problem here is that I want to be able to display the original image (line 1) and the new image (line 3) in two different windows. It currently overwrites the original image with the new one. How can I get it to display the new image in a separate window?

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 1 月 17 日
編集済み: Azzi Abdelmalek 2014 年 1 月 17 日
Use
imshow(im1)
figure
imshow(im2)
  2 件のコメント
Anna
Anna 2014 年 1 月 17 日
Using the imshow command seems to remove the axes which I need. Can I use just the 'figure' command to view both?
Image Analyst
Image Analyst 2014 年 1 月 17 日
The second chunk of code in my answer shows how to do that.

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


Image Analyst
Image Analyst 2014 年 1 月 17 日
Anna, There are a variety of ways. You could use GUIDE and place two axes on there and then so
axes(handles.axes1);
image(originalImage);
axes(handles.axes2);
image(secondImage);
Or you could do it in a new figure with only those two axes on them (both on one figure):
figure; % Create new blank figure
subplot(1,2,1);
image(originalImage);
subplot(1,2,2);
image(secondImage);
Or you could have two separate figures like Azzi showed you. It just depends on how you want it to appear, really.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by