how to calculate "statmoments" and "statxture" of an image by using MATLAB GUI ?

8 views (last 30 days)
Hi, i have two m files in order to calculate STATMOMENTS & STATXTURE of an image. [*statmoments.m & statxture.m*]. the statmoments m file is inside the statxture m file. i need to make a pushbotton with text boxes to display my result of the m files in them. so, the question is HOW TO USE THOES M FILES IN PUSH BOTTON ? AND DISPLAY THE RESULTS IN TEXT BOXES ?
thanks for your time and helping !

Answers (1)

Image Analyst
Image Analyst on 19 Jan 2013
See this:
You can find out how to use GUIDE to build a GUI and put code in so that when you click a button your code executes. You can also use sprintf() and set() to put text onto the GUI in a text control.
% Make a string.
theText = sprintf('Your number = %.3f', theNumber);
% Now, send it to the text control.
set(handles.text1, 'String', theText);
  3 Comments
Image Analyst
Image Analyst on 31 Jan 2013
That's what the last portion of my answer shows you. Did you put that code into your function?
Alisina
Alisina on 13 Feb 2013
wow....i did it:)))) so happy.^_^ i really appreciate your time and kindness to help me. God bless you.
i have another question : i am going to use if/else/then to compare two static boxes together which contains value . and then display the result in sentence form in my GUI.
lets say, first static box contains number 1 and the second static box contain number 2 ... so i am going to write a if/else/then syntax to compare them, and then display in my GUI that 2 is bigger than 1.... can you please guide me on this as well ? really thanks a lot.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!