Added White Frame/Background when using imread()
Show older comments
Hi,
when i do
image_og = imread('image.png');
image(image_og);
MATLAB always automaticallty adds a white frame for me. (The original graph does not have the white frame)
I don't see other people encountering this when they use imread(), so is there a way for me to remove the white frame?

2 Comments
Adam Danz
on 26 Jul 2019
Check that you're not setting the xlim() or ylim() or holding the axes prior to plotting the image. If so, remove those commands until after the image is plotted.
If none of those are happening, you can always set the axis limits to fit the image
xlim([100,800]) % or whatever your image requires
ylim([50, 600]) % ditto
Vanessa You
on 26 Jul 2019
Accepted Answer
More Answers (0)
Categories
Find more on GigE Vision Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!