Problem using Videoplayer in AppDesigner Standalone-App

1 次查看(过去 30 天)
I use the Appdesigner to generate a standalone Application to analyse a videofile for certain objects.
When opening the file and generating the VideoPlayer it gives me the following error:
Warning: Configuration file not found. Property assignment is not allowed when the object is empty. Use subscripted assignment to create an array element.
Error in matlabshared.scopes.UnifiedSystemScope/launchScope (line 145)
Error in matlabshared.scopes.UnifiedSystemScope (line 23)
Error in vision.VideoPlayer
Error in combined/StartTrackingButtonPushed (line 287)
Error in appdesigner.internal.service.AppManagementService/tryCallback (line 368)
Error in matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 37)
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 386) Error while evaluating Button PrivateButtonPushedFcn.
The line calling the VideoPlayer is:
videoPlayer=vision.VideoPlayer('Position',[0,0,app.videoReader.Width,app.videoReader.Height]);
The error only occurs when running the exported standalone application and not when running the application in the AppDesigner or as an internal Matlab App.
How can I fix this error? Thanks in advance!

回答(1 个)

Sachin Lodhi
Sachin Lodhi 2024-4-29
Hello Florian,
I understand that you are facing an error while using "vision.VideoPlayer" in a stand-alone application. It is because, "vision.VideoPlayer" object is not deployable. The following documentation lists all the functions that can be deployed on a stand-alone application:
As it is stated in the documentation that "vision.DeployableVideoPlayer" is deployable on stand-alone application, you can use it in place of "vision.VideoPlayer" to resolve this issue.
videoPlayer = vision.DeployableVideoPlayer('Position', [0, 0, app.videoReader.Width, app.videoReader.Height]);
For more information on "vision.DeployableVideoPlayer" please refer to the following documentation:
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by