Bonjour,
j'ai un petit soucis , j'ai realiser une interface graphique afin de realiser une capture d'image a partir d'une webcam mais cela ne fonctionne pas, quelqu'un pourrait t-il m'orienter.
Deplus j'ai reussi a realiser un programme pour capturer des images mais les images recuperer son rouges apres l'acquisition.
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 % --- Executes on button press in pushbutton1. 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) background=getsnapshot(obj); imwrite(background,'filename3.bmp') % --- 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) close all info = imaqhwinfo('winvideo'); %%capture d image obj = videoinput('winvideo', 1); preview(obj)
Partager