Configure the金宝appEnvironment for HDL Video Processing
About金宝appModel Templates
金宝app®model templates provide common configuration settings and best practices for new models. Instead of the default canvas of a new model, select a template model to help you get started.
For more information on Simulink model templates, seeBuild and Edit a Model Interactively(Simulink).
Create Model UsingVision HDL ToolboxModel Template
To use the Vision HDL Toolbox™ model template:
Click the Simulink button,, or type
金宝app
at the MATLAB®command prompt.On the Simulink start page, find the Vision HDL Toolbox section, and click theBasic Modeltemplate.
A new model, with the template contents and settings, opens in the Simulink Editor. ClickSaveto save the model.
You can also create a new model from the template on the command line.
new_systemmy_visionhdl_modelFromTemplatevisionhdl_basic.sltxopen_systemmy_visionhdl_model
Vision HDL ToolboxModel Template
Basic Model Template
The Vision HDL ToolboxBasic Modeltemplate includes the following features:
Blocks to convert framed video data to a pixel stream, and to convert the output pixel stream back to full-frame video
An empty behavioral model subsystem
An empty HDL-targeted subsystem
Display blocks to compare the results of the two subsystems
Delay blocks on the input and behavioral model data paths. These delays match the one-frame delay introduced by the Pixels To Frame conversion on the HDL model data path.
This template also configures the model for HDL code generation.
This template uses theVideo SourceandVideo Viewerblocks from Computer Vision Toolbox™.
Due to serial processing, Vision HDL Toolbox simulation can be time-consuming for large images. You can work around this limitation by designing and debugging with a small image, and then increasing the size before final testing and HDL code generation. The pixel stream control signals allow most blocks, except for those for frame and pixel conversion, to be independent of image size. To change image size, modify the帧像素and像素帧block parameters only. To simplify a size change, use variables for custom-size image dimensions. This template uses the standard 240p format and also provides image dimension variables in the callback function,InitFcn
. These variables control the sample time on the Video Source and the simulation stop time. To view or edit this function, on theModelingtab, expandModel Settingsand clickModel Properties, select theCallbackstab, and then clickInitFcn*
.
This template includes the following features that assist with HDL code generation:
Configures Solver and HDL Code Generation settings equivalent to calling
visionhdlsetup
Displays data rates and data types in the Model Editor
Creates an instance of
pixelcontrolbus
in the workspace (inInitFcn
)