clear all
close all
clc
canalVideo=videoinput('winvideo');
FirstActiveLine=21;
FirstActivePixel=140;
preview(canalVideo);
start(canalVideo);
imgAdq=getsnapshot(canalVideo);
imwrite(imgAdq,'figure2.jpg');
I = imread('figure2.jpg');
J = rgb2gray(I);
BW1=J>=20;
imwrite(BW1,'figure2BW1.jpg')
imshow(BW1)
disp (BW1)
m=288;
n=352;
for m=1:288
for n=1:352
end
end