imagescount = 4;
threshold = 100;
cropregion = [1,1,639,399];

for imgnum = [1:imagescount]
	filename = [num2str(imgnum), ".jpg"];
	rawimg = imcrop2(imread(filename), cropregion);
	threshimg = rawimg > threshold == 0;
	skel = bwmorph(threshimg, 'thin', Inf);
	imwrite([num2str(imgnum), "-skel.jpg"], skel*255);
	imwrite([num2str(imgnum), "-comb.jpg"], (skel == 0 + threshimg) * 255);
endfor

#I = imread("1.jpg");
#ceil(i * -1 / 255 + 1);

#skel = bwmorph(im>0,'thin',Inf); 
#skel = bwmorph(im,'skel',Inf);