How do I use an image as a global variable?

3 views (last 30 days)
I need to pass my image from the GUI where I load it with this:
[path,user_cancel] = imgetfile();
if user_cancel
msgbox(sprintf('Trebuie sa selectati o imagine!'),'Error','Error');
return
end
img = imread(path);
axes(handles.axsImg_2);
imshow(img);
to another .m file where I apply some modifications to it. Using just the "global imgV" won't do it.

Accepted Answer

Image Analyst
Image Analyst on 10 Jun 2015
No, but using
global img;
should do it.

More Answers (0)

Categories

Find more on Read, Write, and Modify Image in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!