perform var(image(:)) operation in gui

please,provide me a demo code for 5 images read in GUI using popup menu and perform var(image(:)) operation in gui

2 Comments

What part should the pop-up menu play in this?
What do you want to have happen with the result of the variance calculation?
suppose 5 images are a,b,c,d,e.
if i select in pop-up menu 'b',then image 'b' should display in GUI and var(b(:)) should display in box.

Sign in to comment.

 Accepted Answer

foo = get(hObject, 'String');
bar = imread(foo{get(hObject, 'Value')});
msgbox(num2str(var(bar(:))));

More Answers (0)

Categories

Find more on Images 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!