Reputation: 259
I am working on a project wherein I need to process video 1 by one and run my algorithm to extract scores from it. The problem is videos are taking too much time to process. I tried to parallelize code using parfor in few places but performance is still bad. How can I improve perfromance? Is there any way of caching frames? I am reading each frame and processing it. Any suggestion is welcome.
Upvotes: 0
Views: 205
Reputation: 10708
Caching is certainly an option, but it may not help. It's very hard to speed up code if you don't know what is slow. Use Matlab's profiler to find the slow parts, then work on speeding those parts up. After that, profile again to see what effect your changes had.
Here's the basic way to use the profiler:
profile on
% call your function here
profile off
profile report
Upvotes: 1
Reputation: 13
first,do you make sure your code is support parallel , and you had run matlabpool to open CPU parallel computation
second, maybe you need to optimized your code
thirdly, you can try GPU parallel computation
Upvotes: 1