I am performing smoke detection using optical flow. How can we find the starting point of acting?
vidReader = VideoReader('test1.avi', 'CurrentTime', 1);% opticFlowLK = opticalFlowLK('NoiseThreshold', 0.009);
% opticFlowFarneback = opticalFlowFarneback;
opticFlow = opticalFlowHS;opticFlowLKDoG = opticalFlowLKDoG('NumFrames', 3);while hasFrame(vidReader) frameRGB = readFrame(vidReader); frameGray = rgb2gray(frameRGB); flow = estimateFlow(opticFlow, frameGray); m = flow.Magnitude; figure(1); imshow(frameRGB); hold on plot(flow,'DecimationFactor',[5 5],'ScaleFactor', 100); hold off %pause(0.1);
end
Best Answer