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

Image Analyst
Image Analyst 2012년 4월 22일
Oh, sorry, that was in reply to your newsgroup posting. Go check there for my answer.
Jan
Jan 2012년 4월 22일
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.
Owais
Owais 2012년 4월 23일
sorry, I am new here so I am not aware of it.
Owais
Owais 2012년 4월 23일
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

Image Analyst
Image Analyst 2012년 4월 22일
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);
Walter Roberson
Walter Roberson 2012년 4월 23일
I find that imshow() tends to do too much on the user behalf; I find the simpler image() easier to control.
Image Analyst
Image Analyst 2012년 4월 23일
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에서 Display Image에 대해 자세히 알아보기

질문:

2012년 4월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by