how to use background image
Afficher commentaires plus anciens
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 :)
Réponses (2)
Image Analyst
le 22 Avr 2012
0 votes
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 commentaires
Image Analyst
le 22 Avr 2012
Oh, sorry, that was in reply to your newsgroup posting. Go check there for my answer.
Jan
le 22 Avr 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.
Owais
le 23 Avr 2012
Owais
le 23 Avr 2012
Walter Roberson
le 22 Avr 2012
0 votes
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 commentaires
Image Analyst
le 22 Avr 2012
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
le 23 Avr 2012
I find that imshow() tends to do too much on the user behalf; I find the simpler image() easier to control.
Image Analyst
le 23 Avr 2012
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.
Catégories
En savoir plus sur Image Processing Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!