How to resolve error of simulink

2 views (last 30 days)
azan
azan on 27 Sep 2012
Hi everyone! I am trying to deal with videos in simulink which are giving me quite tough time. I have read a avi video from 'from multimedia file block'. I want to do some processing on it so I have written a matlab function named as 'vidfunc' for that; in which I am reading every frame comming from multimedia file block and then extracting some area of it.Then I used 'matlab function block' to incorporate that function in my simulink model.Firstly it was giving me error at 'from multimedia file block' that it can't propagate a 3D signal. Then I used 'color space conversion block' just after 'from multimedia file block'. It resolved the problem but now its giving me error 'Unable to determine the file format'& 'Error in 'workonvid/MATLAB Fcn' while evaluating expression: Unable to determine the file format'. any guidance?
  2 Comments
Ryan G
Ryan G on 27 Sep 2012
Is the function being called one that you wrote? If so you may be able to put a breakpoint in it and debug as you would any other function. You need to determine what line of code is giving you the issue for anyone to figure this out.
Given your application a quick google search shows IMREAD gives this error when trying to send in an unsupported file type.
azan
azan on 27 Sep 2012
Edited: azan on 27 Sep 2012
As we know that multimedia file block reads one frame at a time so when I will attach it with matlab function block it should read one frame at a time with imread command. If I double click the matlab function block (as shown at http://tinypic.com/view.php?pic=dggujd&s=6) then you will see that I have to give the name of the function as written in matlab mfile along with the input which in this case is video(named as convid.avi). I am reading one frame at a time but I have given the whole video as an argument to the matlab function.This is the problem how can I resolve it.What should be given as an argument in matlab function block rather than the whole video.

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!