Trying to run 'vision/Mo​tionBasedM​ultiObject​TrackingEx​ample' but can't open provided video file (atrium.mp4)

10 vues (au cours des 30 derniers jours)
Hey guys, I am completely new to matlab. I am using matlab because I found this tutorial (https://www.mathworks.com/help/vision/examples/motion-based-multiple-object-tracking.html) on tracking objects throughout a video, which I want to integrate into an existing application.
So I have downloaded and installed matlab and the vision library, and opened the example using:
openExample('vision/MotionBasedMultiObjectTrackingExample')
However, in this example they reference a sample video file atrium.mp4. Every time I try to run the example I get the following sequence of errors
Error using coder.internal.errorIf (line 8)
Invalid input file.
Error in vision.VideoFileReader/setFileInfoProps
Error in vision.VideoFileReader/set.Filename
Error in matlab.system.SystemProp/parseInputs
Error in matlab.system.SystemProp/setProperties
Error in vision.VideoFileReader
Error in MotionBasedMultiObjectTrackingExample/setupSystemObjects (line 84)
obj.reader = vision.VideoFileReader('atrium.mp4');
Error in MotionBasedMultiObjectTrackingExample (line 51)
obj = setupSystemObjects();
Not sure if it unable to find the video file or it does not like the format.. I see the file in /Matlab/toolbox/vision/visiondata/atrium.mp4, but I also tried copying the video to my home directory and used
vision.VideoFileReader('/home/steven/atrium.mp4');
but did not make a difference..
I am using ubuntu16.04 and have matlab installed to my home folder. I have not changed anything at all so I am really unsure why this example is not working. I also tried changing the video file to a different video file but I get the same error.
Does anyone know what the issue is here? Thanks

Réponses (1)

Walter Roberson
Walter Roberson le 8 Fév 2018
I predict that you are using a version before R2017b and that you are having gstreamer problems as Ubuntu 16.04 provides gstreamer 1.0 but MATLAB before the current one needs gstreamer 0.1

Catégories

En savoir plus sur Computer Vision Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by