translating an image
translating an image
(OP)
after using imread to get a gif file, how do I tell matlab where on the screen to display it (rather than the default center). I am actually trying to show two different gif files side by side at the same time.
Sorry if this is trivial but I/m a relative novice and can't find a simple function to do it!
Sorry if this is trivial but I/m a relative novice and can't find a simple function to do it!





RE: translating an image
1)get the screen size:
>> D=get(0,'screensize');
2) get the half screen dimensions:
x=D(3)/2;
y=D(4)/2;
3)create a figure in the lower left corner:
4)figure('position',[1 1 x-1 y-1])
load the image into a matrix and display it :
M1=imread('imagename.ext');
imagesc(M1)
5)repeat for the second image (at the upper right corner):
h2=figure('position',[x+1 y+1 x-1 y-1]);
M2=imread('imagenam2.ext');
imagesc(M2)
You can change image position by changing the figure position. For example:
set(h1,'position',[1 y-1 x-1 y-1])
to bring the first image to the upper left corner.
Joe Sababa
BSTeX - Equation viewer for Matlab
http://www.geocities.com/bstex2001/
Joe
BSTeX- Equation viewer for Matlab
http://www.geocities.com/bstex2001