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
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
2012-4-22
Oh, sorry, that was in reply to your newsgroup posting. Go check there for my answer.
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
2012-4-23
Owais
2012-4-23
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
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
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
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 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!