MATLAB Answers

Passing data between axes

조회 수: 1(최근 30일)
Ahmad Nor
Ahmad Nor 25 Aug 2014
댓글: Ahmad Nor 26 Aug 2014
I am doing the GUI for image processing. I want to make about 2 axes in the GUI. I already manage to load image in axes 1. To continue, how can I pass the data of the image that I load on axes 1(that show original image) to axes 2(that show processed image) so that I can process the image in axes 2 without messing with the original image in axes 1?

  댓글 수: 0

로그인 to comment.

채택된 답변

Ben11 25 Aug 2014
편집: Ben11 25 Aug 2014
You can:
1) Create a dummy original image and store it in the handles structure of your GUI.
handles.DummyImage = OriginalImage;
2) In axes2, use something like:
imshow(handles.DummyImage); % example to display the image
%... do your processing.
to retrieve it in your axes 2 and do whatever you want with it. Youcan store anything you want in the handles structure of the GUI, so it's easy to pass variables between multiple callbacks.

  댓글 수: 1

Ahmad Nor
Ahmad Nor 26 Aug 2014
I tried based on your suggestion but it seems like not exactly what I want it to be. I want to process images using GUI, so I made a 'load' button and from there I will be able to choose any image in the folder to appear in axes 1 (done). Then the 'process' button will process the same image in axes 1 but make it appear in axes 2 so that I can see the differences (problem). I'm a rookie and just started using MATLAB couple of month ago.

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.

Translated by