フィルターのクリア

Diplaying values in GUI

2 ビュー (過去 30 日間)
Rob
Rob 2012 年 4 月 27 日
Hello,
I am creating my first simple GUI using matlab in which I uplaod an image, calculte its max R, G, B values and display them. I have a load push botton which works fine and a second one for calculating the maximum R,G and B values. What I want to do is to have the values displayed in three separate 'static text'buttons and below the callback function i used:
function DisplayValues_Callback(hObject, eventdata, handles)
set(handles.Rvalue, 'string',Rmax);
set(handles.Gvalue, 'string',Gmax);
set(handles.Bvalue, 'string',Bmax);
Unfortunately, it did not work, anyone can help me out please. Thank you very much. Remy

採用された回答

Sean de Wolski
Sean de Wolski 2012 年 4 月 27 日
Rmax, Gmax and Bmax have to be strings. If the are represented as numbers, use num2str() to convert to string:
doc num2str
and
set(handles.Bvalue, 'string',num2str(Bmax));
  3 件のコメント
Image Analyst
Image Analyst 2012 年 4 月 27 日
WHERE are they calculated? If they aren't calculated inside that function, they won't be seen. Please copy the error message (all the red text) so we can see what "didn't work" means. I suspect it will say Rmax is undefined.
Rob
Rob 2012 年 4 月 27 日
I just had it working and read your answer.
Is what I did, I included the calculation in the DisplayVAlues function. In fact,I wrote a code that does various processing to the image. When representing them in a GUI it is not as straight forward as putting each process in diffent callback function.
So my question is how do I link the result of one function to
the next one? i.e:
1st function: I read 1st image and apply so stuff to it, I extract parameters,
2nd function: use the above parameters and apply them to another image,
3rd function: call for a 3rd image and run some convolution the above too image
ect ...
Many thanks for your help!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by