- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was looking at the Video and Imaging examples on the Altera design examples page:
e.g., http://www.altera.com/support/examples/dsp-builder/exm-scaler.html#figure1. and they seem to have a neat way of hooking up external functions into Simulink blocks. More specifically, how they accomplish file I/O to and from the Simulink model via a pair of blocks labeled : "Input AVI to Binary" and "Output Binary to AVI". It took a bit of digging around to figure this out, so I thought I might post it for the benefit of those that were also wondering how this works: This is really a Simulink block called "Subsystem"; you can find it under the generic Simulink blockset under "Ports and Subsystems". Instantiate one of these in your model, double click to see Block Properties and and go to the "Callbacks" tab: scroll on the left box under "Callback functions List" to "OpenFcn": this code is hooked into the OpenFcn callback, as you can see: "system('avi-is-avi input.avi input.bin 176 144 AVItoIS -c RGB -v')". Hope that helps!:) -Z.Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page