Hello.
I want to classify videos using optical flow.
After using this code, I got this result.
Which data can I save as matrix for classification?
I think that I can use optical flow data, but there are 4 matrix(Vx, Vy, Orientation, Magnitude). How can I deal with these data?
I will save the data of opticalFlow and use dimensionality reduction. However, I don't know which property can be used for this process.
clear allclose allvidReader = VideoReader('shahar_walk.avi');opticFlow = opticalFlowFarnebackh = figure;movegui(h);hViewPanel = uipanel(h,'Position',[0 0 1 1],'Title','Plot of Optical Flow Vectors');hPlot = axes(hViewPanel);while hasFrame(vidReader) frameRGB = readFrame(vidReader); frameGray = rgb2gray(frameRGB); flow = estimateFlow(opticFlow,frameGray); imshow(frameRGB) hold on plot(flow,'DecimationFactor',[5 5],'ScaleFactor',2,'Parent',hPlot); hold off pause(10^-3)end
Best Answer