From: M Paheerathan on 28 Jun 2010 02:20 If I open a Image in MatLAB GUI say for example the resolution is (2000 x 1500) it fit to the axes correctly Then after If I open another Image which has a different resolution (500 x 600), it doesn't fit to the axes and it uses the previous one(2000 x 1500) and display the (500 x 600) Image. So the difference is left as a white space How to tackle this problem? I want to fit to the axis always, If I open a the Images successively. Thank you, Best Regards, Paheerathan
From: ImageAnalyst on 28 Jun 2010 08:07 Paheerathan: Try this code I yanked from one of my m-files: % Display image array in a window on the user interface. axes(handles.axesImage); hold off; % IMPORTANT NOTE: hold needs to be off in order for the "fit" feature to work correctly. imshow(imageArray, [], 'InitialMagnification', 'fit');
From: M Paheerathan on 28 Jun 2010 11:43 Doesn't work, are you missing any pre definitions (such as for InitialMagnification) Please help me Regards, Paaheerathan
From: ImageAnalyst on 28 Jun 2010 12:02 Works fine for me. Show the code that you're using because there are several functions that can display images (imshow, image, imagesc, pcolor, imtool, ...)
From: M Paheerathan on 28 Jun 2010 12:16 This is my code. Please help me [filename, pathname] = uigetfile('*.JPG', 'Pick an JPG file'); %Browse the file loadImage = importdata([pathname,'/',filename]); axes(handles.axesImage) % this gives focus to the axes o hold off; imshow(loadImage, [], 'InitialMagnification', 'fit'); Thanks in Advance, Best Regards, Paheerathan
|
Pages: 1 Prev: Need to Crop Sqaure Images Next: why use sparse matrices in matlab? |