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

1 visualización (últimos 30 días)
Ioana Toma
Ioana Toma el 19 de Mzo. de 2019
Respondida: Jan el 20 de Mzo. de 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?

Respuestas (1)

Jan
Jan el 20 de Mzo. de 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.

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by