The Computer Vision Toolbox™ OpenCV Interface for Simulink®simplifies converting programs created with OpenCV, an open source computer vision library, into Simulink blocks that can be used to integrate computer vision capabilities into a control system. The interface needs Computer Vision Toolbox and can be installed as an add-on.
接口有选项名称the blocks being created, select various functions, specify whether the arguments are inputs or outputs, and set the default parameters. From this information, the interface automatically creates Simulink blocks that can be integrated into any Simulink model.
使用微笑检测OPENCV代码显示了一个示例The Mona Lisa’ssmile. For more information, various discovery pages and documentation pages are available.
Welcome to a video on the OpenCV Interface in Simulink.
OpenCV is an open source computer vision library. This video shows you the ease of converting programs created with OpenCV into Simulink blocks that you can use to integrate computer vision capabilities into your control system.
要使用Simulink附加组件中的OPENCV接口,您将需要计金宝app算机视觉工具箱。要安装此附加组件,请单击“ HOME”中的“附加组件”,打开“附加探索器”。搜索“在Simulink中的OpenCV”,金宝app然后单击“ Simulink中的OpenCV的计算机视觉工具箱接口”以打开它。安装它。
To show you how to use the interface, “let’s use an example to detect if someone is smiling in an image. To run the interface, you can open it from the “APPS” tab or run it from the command window by entering the command to open the app. Enter a project name such as “SmileDetectionDemo”, select “Start a new import”, and click the “next” button. Specify the information on where the files are located and click “next” twice to start the parsing. Parsing analyzes the files to find functions and types that may be imported. Once the parsing is complete, open the next page and select the functions you want to import and click “next”.
Specify whether an argument is an input, output or both. This is done to define the inputs and outputs for the Simulink block being created.For this example, we change the “img” argument to an “Input” and click next.
Finally, we change the default parameters as needed and click next. A new window with newly created blocks should appear. These are Simulink blocks of the OpenCV SmileDetection code. Close the interface window. To test the newly created block, open “smileDetect.slx”. This is a model that uses the newly created block to identify whether a person in an image is smiling. We will use this model to identify whether the Mona Lisa is really smiling. Integrate the subsystem block into it and change the image parameters and click run. A window pops up with Looks like she isn’t smiling.
For more information on the Add-on tool and to see various examples, please refer to the documentation page: “OpenCV Interface Support for Simulink”.
谢谢您的观看。
Featured Product
您还可以从以下列表中选择一个网站:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.