MATLAB Answers

0

How can i open more images that i have to edit in graphic interface?

Asked by Ioana Toma on 19 Mar 2019
Latest activity Answered by Jan
on 20 Mar 2019
I have to do a graphic interface for image proccesing,in which i have to diplay more images IN this graphic interface so i can switch the images for editing. Now,they open separately from the graphic interface. Can anyone help me?

  2 Comments

Please post the relevant part of the code.

Sign in to comment.

Products

1 Answer

Answer by Jan
on 20 Mar 2019

I'm not sure, what "they open separately from the graphic interface" means. Which part of the code is relevant for your problem?
It is strange, that the callbacks for "open", "new", "save", "load" are doing the same: Get an image file and display it. This looks confusing. But maybe the problem is:
a=imread(strcat(pathname,licenta1));
figure % <-- This opens a new figure
imshow(a);
The figure command opens a new figure. Maybe you want to display the image in the same figure. Then use e.g.:
img = imread(fullfile(pathname, licenta1));
image(handles.axes1, img);
to display the image in the axes called "axes1" (it is a pure guess, that there is such an axes).
By the way, "img" looks nicer than "a" as a name of a variable, which contains an image. fullfile is smarter than strcat, because it considers file separators.

  0 Comments

Sign in to comment.