how to convert webcam inputed code to video inputed code in matlab for tracking object

1 回表示 (過去 30 日間)
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.

採用された回答

Walter Roberson
Walter Roberson 2017 年 4 月 25 日
Convert the webcam() call into a VideoReader() call. Convert the snapshot() calls into readFrame() calls.
  3 件のコメント
rujul mankad
rujul mankad 2017 年 4 月 25 日
編集済み: rujul mankad 2017 年 4 月 25 日
my code is like this
current_camera = webcam(Camera_number);
current_frame = snapshot(current_camera);
previous_frame = current_frame;
gray_current_frame = double(rgb2gray(current_frame));
gray_previous_frame = double(rgb2gray(current_frame));
. . . but when i am using VideoReader and readFrame it gives me below error
Undefined function 'readFrame' for input arguments of type 'VideoReader'.
Walter Roberson
Walter Roberson 2017 年 4 月 25 日
Use the VideoReader read() method.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by