Is there anything I can do to speed this up ONLY by changing the Matlab code? Specifically looking for alternatives to the videowriter, print(), or patch().ĮDIT/UPDATE! I ran the profiler, and I'm definitely spending all of my time in the Patch function. Right now, this is taking roughly 3s a frame. I can't use getframe for a number of reasons, some of which are verified MATLAB bugs. WriteVideo(VR,im2frame(imread('TMP.bmp','BMP'))) %THIS LINE could be a problem Print(gcf,'TMP.bmp','-noui','-r140','-dbmp','-opengl') %THIS LINE could be a problem Patch('Vertex',vertices,'Face',faces) %THIS LINE could be a problem Just the length of the movie.įor i = 1:numberOfFrames %do some math, but its really fast VR.FrameRate = 10 %though the number of frames doesn't change. open (v) writeVideo (v,A) Close the video file.
![matlab 2009 videowriter matlab 2009 videowriter](https://getintopc.today/wp-content/uploads/2021/07/Matlab-2009-150x150.png)
Heres basically what Im doing, in a combination of matlab and pseudocode, with notes about speed of each line.
![matlab 2009 videowriter matlab 2009 videowriter](https://covers.zlibcdn2.com/covers200/books/8b/a4/8d/8ba48de3a4492574e78e85fb766bca9e.jpg)
MATLAB 2009 VIDEOWRITER MOVIE
Draw a series of plots for the function y xn for different values of n. Im making an animation from an obj file using MATLAB 2012a, but the movie writing process is very slow. An animated GIF contains a series of images all combined into one file. VideoReader won’t read videos created by VideoWriter Am I unable to open the AVI-file in MATLAB 7.0. Then, write the image data in A to the file. Posted: (2 days ago) Use the 'imwrite' function to create an animated GIF. VR = VideoWriter('filename.mp4','MPEG-4') v VideoWriter ( 'myFile', 'Archival' ) Verify the type of video compression for the new file. = readOBJ('filename') %really fast, occurs once Here's basically what I'm doing, in a combination of matlab and pseudocode, with notes about speed of each line.
![matlab 2009 videowriter matlab 2009 videowriter](https://images.slideplayer.com/24/7510291/slides/slide_2.jpg)
I'm making an animation from an obj file using MATLAB 2012a, but the movie writing process is very slow.