hello guys...my problem is how can i do background subtraction from the function rgb2gray?

this is my code
trafficObj = VideoReader('left.avi'); get(trafficObj) implay('left.avi');
A = trafficObj.NumberOfFrames; for i = 1:A firstVideo=rgb2gray(trafficObj.read(i)); imshow(firstVideo); title('rgb2gray');
secondVideo=imsubtract(trafficObj.read(1),trafficObj.read(i));
imshow(secondVideo)
title('subtraction');
drawnow;
end

Antworten (0)

Diese Frage ist geschlossen.

Gefragt:

am 5 Mai 2017

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by