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

1 view (last 30 days)
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?

Answers (1)

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

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!