LIVE video object detection
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I found this example in matlab which is used on avi files. % EXAMPLE: Tracking cars hsrc = vision.VideoFileReader('viptraffic.avi', ... 'ImageColorSpace', 'Intensity', ... 'VideoOutputDataType', 'uint8'); hfg = vision.ForegroundDetector(... 'NumTrainingFrames', 5, ... % 5 because of short video 'InitialVariance', 30*30); % initial standard deviation of 30 hblob = vision.BlobAnalysis(... 'CentroidOutputPort', false, 'AreaOutputPort', false, ... 'BoundingBoxOutputPort', true, 'MinimumBlobArea', 250);
hsnk = vision.VideoPlayer();
while ~isDone(hsrc)
frame = step(hsrc);
fgMask = step(hfg, frame);
bbox = step(hblob, fgMask);
% draw bounding boxes around cars
out = insertShape(frame, 'Rectangle', bbox, 'Color', 'White');
step(hsnk, out); % view results in the video player
end
release(hsnk);
release(hsrc);
I want it to process this code on LIVE webcam video feed. please suggest a way to achieve this.
0 Kommentare
Antworten (1)
Dima Lisin
am 1 Jul. 2014
You would either need to have the Image Acquisition Toolbox, or MATLAB version R2014a, which includes support for getting video from a webcam in base MATLAB.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Computer Vision Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!