%function [vid, vid_src]=setupCamera()
% getSnapshot Get Snapshot from camera
vid = videoinput('winvideo', 1, 'YUY2_176x144');
vid.ReturnedColorSpace = 'grayscale';
vid_src = getselectedsource(vid);
%vid_src.Contrast = 28;
vid_src.Contrast = 35;
vid.FramesPerTrigger=8;
vid.FrameGrabInterval=1;
vid.TriggerRepeat=Inf;
set(vid,'StartFcn',@imaqcallback)
set(vid,'TriggerFcn',{@trackCentroidsLive,s})
set(vid,'StopFcn',@imaqcallback)