Using two axes in one GUI
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Christos Stefos
el 2 de Feb. de 2014
Editada: Christos Stefos
el 4 de Feb. de 2014
%I would like display the image (I) that the user selects in the axis with name axis1 and graph %the values of handle.perc_nu from different images in axis2 with hold on(while keeping previous %plots).A segment of my code follows. I am doing something wrong and it wont work!Can you please %help
function varargout = cell_confluency_calc(varargin)
varargout{1} = handles.output;
--- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
handles.output = hObject;
[fn, pn] = uigetfile('*.jpg','Please select your image file');
impath = strcat(pn,fn);
set(handles.edit1,'string',impath);
I = imread(impath);
imshow(I,[]);
pause(5)
handles.BI = I;%backup gia toggle buttpn
run('grayklim.m');
CI= I;
run('filterit.m');
run ('gemiseholes.m');
imshow(I,[]);
pause(5)
level= graythresh(I)- 0.22;
blackwhite= im2bw(I,level);
blackwhite= bwareaopen(blackwhite,100);
imshow(blackwhite,[] )
handles.bw= blackwhite;
mask =uint8 (blackwhite);
handles.blackcell= CI.*mask;
imshow (handles.blackcell, [] )
pause(5)
guidata(hObject, handles);
-- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
A = sum(sum(handles.bw));
cell_pixels = A;
all_pixels= numel(handles.bw);
handles.perc_nu=(cell_pixels/all_pixels*100)
handles.perc = [num2str(cell_pixels/all_pixels*100) '%'];
set(handles.edit2,'string',handles.perc )
hold
plot(axes2, handles.perc_nu)
0 comentarios
Respuesta aceptada
Walter Roberson
el 2 de Feb. de 2014
1 comentario
Christos Stefos
el 4 de Feb. de 2014
Editada: Christos Stefos
el 4 de Feb. de 2014
Más respuestas (0)
Ver también
Categorías
Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!