MATLAB: How to use image as global in push button(GUI) and a file in which all calculation applied on that image?

globalguiguideimage processing

i made gui(push button),which consist of load image,
i declare image as global in callback, now a file.m which consist of all calculation applied on image, image is loaded perfectly,
but i want to know how can i access that image which i have loaded in push button,want to access in file that included all calculations.????????
although, i put global in image discription in callback…
i placed global both side in callback and file ,but not working.
remember i am workin on image ,not a varible.

Best Answer

Let's say you read your image into a variable called "rgbImage". So for that GUI pushbutton function and any other functions that need to access that variable, you just put this line as one of the first in the function:
global rgbImage;
Related Question