I want to have a good control to images shown in a subplot figure using a right click of the mouse.
My code as follows:
handles.f = figure;
handles.a = subplot(2,1,1)
handles.b = subplot(2,1,2)
function imageX_ButtonDownFcn(hObject, eventdata, handles)
switch lower(get(handles.f, 'selectiontype'))
I = gcf
BW = im2bw(I)
I want of I made a right click to the upper subplot then the image in this subplot will be binarized. Same thing for the lower subplot.
I think the above code is not working because I am not having access to the subplot handles. So I have two subplot.
Any idea how to make it works?
Thank you very much.