MATLAB: Is there a way i can classify videos

pattern recognition video recognition classification pca train

I have some videos which i need to train so that i can classify them. I was able to train the first frame of each video and classify them using PCA successfully.But the problem is that some of these frames from a particular video are completely different from the frame i trained so my result is not that accurate.Is there a way i can train all the frames in all the video and when i pick a video it will classify it successfully?attached here is one of the video

Best Answer

Yes. You can read the entire video into an array, and then you can reshape() the resulting multidimensional array into a vector. You do the same thing with all the other videos, producing a column from each one, putting all the columns together to make a singe array. Note that you would need to pad out all of the vectors to the same length.