when i use this code matlab even hangs or give me constant blue screen any ideas ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
if true
clear all
clc
cd c:\try
a=0;
obj = videoinput('winvideo', 1);
preview(obj);
frame =rgb2gray(getsnapshot(obj));
while a<1
% for i = 1:1000
frame1 = rgb2gray(getsnapshot(obj));
x= frame-frame1;
border = edge(x,'canny');
image(border);
end
end
0 Kommentare
Antworten (2)
Image Analyst
am 31 Dez. 2012
Step through it with the debugger. Which line causes the problems?
0 Kommentare
Walter Roberson
am 31 Dez. 2012
You never change "a" so it will always be less than 1.
Also you should add
drawnow()
after the image() call.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Preview and Device Configuration finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!