bonjour
cette fonction transforme une image en couleur a une image noir et blanc, mon probleme dans l'execution j'ai un erreur pouvez vous me aidez

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global Y3
global fo
global ind
global ind3
fn='';
fc='';
fo='';
Y3=' ';
if (ind==0)
    msgbox('lire une image original avant!','Avertissement','warn');
else
    ind3=1
    Y3=im2bw(fo);
    axes(handles.axes3);cla;
    imshow(Y3);
end
merci