A common question that you might face after reading the previous section, is why don't we work with MP4 (or other compressed formats) videos so that we do not face as many space issues? The answer is pretty simple if you stop and think about it. The advantages of compressed video files cease to exist the moment we load them in MATLAB. Once they are loaded, the frames contain all the information needed to fill all the elements of a matrix comprising all the loaded frames. Therefore, it is the same thing as loading an uncompressed video.
We can verify this by inspecting the variables testStill
and testMotion
created in the previous section. We will do it using MATLAB function whos
, designed for reporting all information about a given variable. The name of the variable must be given as input, in a string
format. Let's call this function for our two variables. The following line of code gives information for testStill
:
>> whos('testStill')
The output of the...