how to use background image

when i add background image to my program, everything gets inverted, like my ball stars to bounce with the ceiling rather than to floor. what error i am doing ? i am doing it by imread and imshow function. and also how can i set the size of image to that is required?
Thank You :)

Answers (2)

Image Analyst
Image Analyst on 22 Apr 2012
What happened to your original question? Did you delete it? Because I gave my answer in that a few days ago, and now I can't find it. Nothing irks an answerer more than having the questioner delete their prior answers.

4 Comments

Oh, sorry, that was in reply to your newsgroup posting. Go check there for my answer.
Jan
Jan on 22 Apr 2012
An excellent example for the annoying drawbacks of cross-posting.
Please, Owais, if you post a question in different forums, add a link to the other locations to avoid such confusions. Cross-posting wastes the time of the contributors who try to help.
sorry, I am new here so I am not aware of it.
I haven't deleted it, its just that I myself is not able to find that question again :P

Sign in to comment.

Walter Roberson
Walter Roberson on 22 Apr 2012
Watch out for "axis image" being done on your behalf.
Consider using image() instead of imshow().
You might find that you also need to flipud() the image in order for it to look right with everything else.

3 Comments

Why? As far as I know they operate the same way with respect to top/bottom/y-axis direction:
subplot(1,2,1);
grayImage = imread('cameraman.tif');
imshow(grayImage);
subplot(1,2,2);
image(grayImage);
I find that imshow() tends to do too much on the user behalf; I find the simpler image() easier to control.
I think it's actually the opposite. Look at this code:
grayImage = imread('cameraman.tif');
image(grayImage);
WTF! Why did it apply some arbitrary colormap? imshow() doesn't do that - imshow displays gray level images as gray level images as you'd expect. Same thing with imagesc() - it applies some bizarre, arbitrary colormap when you never asked for it or wanted it.

Sign in to comment.

Categories

Asked:

on 22 Apr 2012

Community Treasure Hunt

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

Start Hunting!