MATLAB: How to convert webcam inputed code to video inputed code in matlab for tracking object

MATLABtracking

i have a code that works perfectly for motion detection and tracking using webcam. But now i want to convert this code in which we can give video (mp4,avi etc) as an input. i have attached zip file of whole code. Run GUI and code will execute properly.

Best Answer

Convert the webcam() call into a VideoReader() call. Convert the snapshot() calls into readFrame() calls.