Reputation: 11
I have a simulink model which uses inputs from 6 webcams for live video processing. For that I use 6 'From Video Device' blocks. The output from these blocks are processed upon to generate output in the form of (x,y) co-ordinates. All 6 webcam outputs are processed at a time in parallel. However matlab hangs and stops simulation if I use more than 3 webcams. I want to divide the 6 processing blocks among two processor cores using Parallel Computing Toolbox. But couldn't find suitable instructions anywhere for distributing a single simulink model among multiple processor cores. I am using Matlab R2011a.
Well, I cannot post my code or my model, but I can tell you what my model does. It takes input from 6 usb camera, tracks a moving object in each frame of each camera and gives me the location of the moving object in (x,y) co-ordinates. Thus, I get 6 (x,y) co-ordinates as output at a time. My model works well till I use 3 cameras and generate 3 (x,y) outputs. Adding fourth camera hangs the matlab and stops the simulation.
Upvotes: 1
Views: 1948
Reputation: 87
I'm afraid the reason you haven't found instructions for spreading a Simulink model across multiple cores is because these instructions do not currently exist (up to and including R2012b). The Parallel Computing Toolbox only allows you to conduct multiple, seperate simulations simultaneously across the different cores (i.e. to investigate the effects of parameter changes and such like).
For your application, you will likely be better off using Matlab "proper" and writing everything in m-functions and/or scripts. That way you will be able to leverage you multi-core processor by using commands such as parfor
.
Upvotes: 1