Unable to use functions from the Computer Vision Toolbox in Simulink MATLAB function block
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rafid Javid
am 2 Feb. 2022
Beantwortet: Qu Cao
am 2 Feb. 2022
Hello,
Im currently trying to implement a Simulink function block for matlab code. The block is for object detection and uses functions from the Computer Vision Toolbox, such as [bboxes,scores] = detect(detector,I). But these fucntions are are not defined or found. They do work when I run them normally in matlab but do not in the Simulink fcn block. Is there a way to use functions from a toolbox in the MATLAB Function block or in any other block that allows me to run matlab code?
Thank you in advance for your help!
0 Kommentare
Akzeptierte Antwort
Qu Cao
am 2 Feb. 2022
A workaround is to declare the function as an extrinsic function so that it will be essentially executed in MATLAB:
https://www.mathworks.com/help/coder/ref/coder.extrinsic.html?s_tid=doc_ta
0 Kommentare
Weitere Antworten (1)
Benjamin Thompson
am 2 Feb. 2022
See the documentation article "MATLAB Function" for more details about what functions can be used in the code that you put in the block. Since most of the Computer Vision Toolbox functions are not code generatable to C/C++, then it is not surprising that few of them work in your example.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Computer Vision with Simulink finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!