Possibility to dynamically load videofiles with codegeneration?
Mostrar comentarios más antiguos
problem:
There are multiple videos files that need to be read by a video reader. Those videos do not exist before the code generation. That means they must be downloaded and read by the matlab/simulink code/model dynamically. Those videos have the same video dimensions every time. They only vary sometimes in FPS and length. The length variation is just around +/- 2 seconds.
This solution should be able to run in a Simulink model that means the matlab code must be inserted as either a matlab function or system. Also it must be code generatable.
steps that didn't work:
Using enabled subystems to read the video
Using the DSP Video Reader (code generatable in 2017b) Block and adding a static video file path. Then overriding the static video file while the subsystem is disabled is not working. The Block locks the file, so it’s not accessible from i.e. other programs.
Using a matlab function and matlab video reader objects/systems
Same locking problems explained in the first step. Trying to re-initialize the matlab object when a new video arrives is not possible with a matlab function. vision. VideoFileReader (code generatable in 2017b) was used. Here the Handle Object Limitations (https://www.mathworks.com/help/simulink/ug/memory-management-of-handle-objects-in-generated-code.html) hits. In short: it is not possible to re-init a handle object.
This problem is not showing up with the VideoReader object (code generatable in 2019a). There are other problems regarding this object. There is no release function and it is code generatable in 2019a.
Respuestas (0)
Categorías
Más información sobre Computer Vision with Simulink en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!