Raspberry Pi matlab support
3 次查看(过去 30 天)
显示 更早的评论
I need to do an object detection based on the CascadeObjectDetector and deploy it into raspberry pi B+ and when it detects the object, sends signal to GPIO.
So there are two situations that I need help and your comments about:
- If I use Simulink to deploy it into raspberry pi and use s-fuction and "coder.extrinsic('vision.CascadeObjectDetector');" to use CascadeObjectDetector in Simulink, it says the CascadeObjectDetector is not deploy-able.
- If I use .m file and want make an standalone file by using Application Compiler and use it in raspberry pi with windows IOT, can make .exe file but while running it it makes error about the command "mypi=raspi();" for making the connection to raspberry pi. Although the code itself runs as .m file without any errors (I copied it here). Here is an example of .m file that can run as .m file but cannot be run after making .exe file
clear mypi;
mypi=raspi();
configureDigitalPin(mypi,4,'output');
while 1>0
writeDigitalPin(mypi,4,1);
pause(0.0001);
writeDigitalPin(mypi,4,0);
pause(0.0001)
end
So do you have any suggestion, how I can solve any of these problems? Or is there any other developer boards except Raspberry Pi that the communication commands with board can have possibility to be changed to the standalone files?
And a general question: Can a Matlab file be deployed in Raspberry Pi like the Simulink file?
Thanks, Arash
0 个评论
回答(1 个)
Cindy Solomon
2015-7-28
编辑:Cindy Solomon
2015-7-28
Hi Arash,
In regards to your first question regarding the CascadeObjectDetector, the vision.CascadeObjectDetector is only supported in simulation modes (so you won't be able to generate code for this object outside of Simulink and therefore cannot deploy it). You can tell this by the "coder.extrinisic" before the function call. For more information on what it means to declare something extrinisic, see this doc link.
For your question regarding connecting to a Raspberry Pi, there is a Simulink support package for Raspberry Pi hardware that you can download to run Simulink models as standalone applications. I would highly recommend taking a look at this page, which will help you get started with doing so and check that the communication is working properly. I'm not quite sure what you mean by "Application Compiler." How are you generating a .exe file currently? There is also a MATLAB support package for the Raspberry Pi and a corresponding "Getting Started" guide here .
I hope this helps!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Support Package for Raspberry Pi Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!