how to use image of one axis in other axes

조회 수: 1 (최근 30일)
Anika Bashir
Anika Bashir 2015년 6월 27일
댓글: Image Analyst 2015년 6월 29일
i m creating a GUI, with two axes and a pushbutton, i upload an image of any type using pushbutton, I want to use the same image in other axes, but i cant??
  댓글 수: 1
Azzi Abdelmalek
Azzi Abdelmalek 2015년 6월 27일
[but I can't] what does that mean? please post your code and explain your problem

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2015년 6월 27일
Why not? Just switch axes and put it in the other axes:
axes(handles.axes1);
imshow(yourImage);
axes(handles.axes2);
imshow(yourImage);
  댓글 수: 2
Anika Bashir
Anika Bashir 2015년 6월 29일
편집: Image Analyst 2015년 6월 29일
function pushbutton1_Callback(hObject, eventdata, handles)
[baseFileName,folder]=uigetfile('*.*','Specify an image file');
fullimageFileName=fullfile(folder,baseFileName);
axes1=imread(fullimageFileName);
axes(handles.axes1);
image(axes1)
This is my code which i used to upload image with one push button
Image Analyst
Image Analyst 2015년 6월 29일
I probably would not call your image variable the same name, axes1, as the tag of the axes control you're going to put it into. Call it rgbImage or grayImage or image1 or something descriptive like that, not something misleading like axes1.
Anyway, glad you got it all working using my code, and thanks for Accepting the answer.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by