1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
img = imread('poza1.jpg'); %lire cette image quand on press le button %load image
imshow(img); %afficher l'image dans axes1
% --- Executes on button press in pushbutton2.
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)
%l'elimination du bruit de l'image photo1.jpg quand on presse le bouton2
removenoise = filter2(fspecial('average',3),removenoise)/255;
figure, imshow(removenoise)
set(handles.axes2,'string'); %stoquage de l'image sans bruit en axes2
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%l'ajout du bruit de l'image photo1.jpg quand on press le button3
addnoise = imnoise(img,'salt & pepper',0.02);
figure, imshow(addnoise)
set(handles.axes3,'string'); %stoquage de l'image avec du bruit en axes3 |
Partager