开发者

Stop automatic resize in axes

I use this code to load an image into matlab axes in gui :

[FileName,PathName] = uigetfile('*.jpg','PLease select an image');

axes(handles.axes1)
rgb = imread(strcat(PathName,FileName));
imagesc(200,200,rgb)

my problem is that when i load the image the axes automatically resizes to the image size , any way to stop this ? "i googled alot" !

and when it comes to big images (like 1 MB) it takes about 30 seconds to load and display it !!! any workaround for faster l开发者_开发问答oading ?

i want to make edge detection for the loaded image and display it in second axes , any sources/code to do it ?

am a beginner in matlap can you please help ?

Thanks .


If you set the axes limits using xlim() and ylim() matlab will set the 'XLimMode' and 'YLimMode' properties of the axes to 'manual' so the limits will not change later.

figure;
hold all;
xlim([1 2.5]);
ylim([3 4]);
plot([1 2], [3 4]);
plot([2 3], [3 4]);

For edge detection, take a look at the matlab help in the Image Processing Toolbox to get started.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜