MATLAB: Image is not coming on particular axis but on the upper left hand side of the another axis

axis

Please help. I have created a GUI where 2 axis and 2 push buttons are there.One push button will browse the image and will load on axes1 and second push button will apply some function on loaded image and will show it on axes2. But after clicking the second push button, the image is not coming on axes, but a small black blurred image is appearing on the corner upper left-hand side of the already loaded image.

Best Answer

Call "cla reset" before you call imshow() to display the image in the second axes.
axes(handles.axes1);
cla reset;
imshow(originalImage);
axes(handles.axes2);
cla reset;
imshow(processedImage);
I recommend you be nicer to your users and list the input images in a listbox rather than forcing them to browse for them with an open dialog box. See MAGIC for a nice framework.