How to use radio buttons more effectively in a button group?

6 ビュー (過去 30 日間)
Mohan Prasath Thirumalaisamy
Mohan Prasath Thirumalaisamy 2013 年 8 月 20 日
回答済み: student of PU 2014 年 5 月 28 日
Dear MATLAB users,
I have 5 different filters as 5 different radio buttons in MATLAB GUI. I made them into a button group and now when i click the each button the noise image is shown through the axes. But i want to set the button group in such a way to show only one filter (one image), when i click the particular radio button and others shouldn't be selected. So, I followed this (<http://stackoverflow.com/questions/2624875/how-to-pass-function-to-radio-button-in-a-button-group-created-using-guide-in-ma>) which is given by stackoverflow. But how do we "set" image in an axes. Thanks in advance
Regards,
Mohan Prasath Thirumalaisamy

回答 (2 件)

Leah
Leah 2013 年 8 月 20 日
In the radio button group callback you will need to either clear the axes or overwrite the data being displayed inside the object handle.
  2 件のコメント
Mohan Prasath Thirumalaisamy
Mohan Prasath Thirumalaisamy 2013 年 8 月 20 日
function uipanel1_SelectionChangeFcn(hObject, eventdata, handles)
if hObject == handles.gau
mean = str2double(get(handles.mn,'string'));
variance = str2double(get(handles.vn,'string'));
fig_2 = handles.ii;
fig_2 = im2double(rgb2gray(fig_2));
fig_2 = imnoise(fig_2,'gaussian',mean,variance);
axes(handles.ni);
imshow(fig2);
like this, i have done for the rest of the buttons/filters. But its not functioning here in the button group. I have given the same command/code for each button/filter but its working there. I dont know, whts the problem?
Leah
Leah 2013 年 8 月 20 日
right before imshow(fig2) putting
cla

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


student of PU
student of PU 2014 年 5 月 28 日
how to add image in axes on radion button click in radiobutton group ? please clarify ...

カテゴリ

Help Center および File ExchangeImage Processing and Computer Vision についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by