i want to insert a picture in axes using GUI. and i want to specify the position in axes any help ?

답변 (1개)

Walter Roberson
Walter Roberson 2016년 1월 11일

0 개 추천

image(handles.TheDestinationAxes, x, y, TheImageArray)

댓글 수: 6

Hgcvghh Vbbbb
Hgcvghh Vbbbb 2016년 1월 11일
ImageArray=location of the image ?
TheImageArray is the content of the image, not the location of the image. You would need to have read in the image already. For example,
TheImageArray = imread('YourImageFile.bmp');
Hgcvghh Vbbbb
Hgcvghh Vbbbb 2016년 1월 12일
isn't work!!
I have done it myself a number of times, except that I personally am more likely to use the alternate syntax
image(TheImageArray, 'XData', x, 'YData', y, 'Parent', handles.TheDestinationAxes)
which is equivalent.
What difficulty are you encountering? Are you getting an error message? Is the image not showing up? Is the image showing up in a place that is different than you are expecting?
Hgcvghh Vbbbb
Hgcvghh Vbbbb 2016년 1월 15일
편집: Image Analyst 2016년 1월 15일
this is the code :
TheImageArray=imread('Array.jpg')
image(handles.axes1, 1, 1, TheImageArray)
the error: Too many input arguments.
Image Analyst
Image Analyst 2016년 1월 15일
편집: Image Analyst 2016년 1월 19일
If you want it at 1,1, then you don't even need that.
TheImageArray=imread('Array.jpg')
image(handles.axes1, TheImageArray)
Or use
imshow(TheImageArray, 'Parent', handles.axes1);

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

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

질문:

2016년 1월 11일

편집:

2016년 1월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by