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 :)

回答(2 个)

Image Analyst
Image Analyst 2012-4-22

0 个投票

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 个评论

Oh, sorry, that was in reply to your newsgroup posting. Go check there for my answer.
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

请先登录,再进行评论。

Walter Roberson
Walter Roberson 2012-4-22

0 个投票

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 个评论

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.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Image Processing Toolbox 的更多信息

提问:

2012-4-22

Community Treasure Hunt

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

Start Hunting!

Translated by