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

1 vue (au cours des 30 derniers jours)
Ioana Toma
Ioana Toma le 19 Mar 2019
Réponse apportée : Jan le 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 commentaires
Jan
Jan le 19 Mar 2019
Please post the relevant part of the code.
Ioana Toma
Ioana Toma le 20 Mar 2019
This is the code

Connectez-vous pour commenter.

Réponses (1)

Jan
Jan le 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.

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by