Reposted since the previous post didn't get resolved!
I have a script that creates a video from image files, as below:
RawImages = [vidFolders(i).folder '\' vidFolders(i).name];
videoName = [RawImages '\' vidFolders(i).name '.avi'];
imageFolder = [RawImages '\Images\'];
files = dir([imageFolder '*.tif']);
numImages = length(files);
writerObj = VideoWriter(videoName);
writerObj.FrameRate = 10;
imagePath = [imageFolder files(j).name];
image = imread(imagePath);
Each frame of the video is a temperature increment of 1 degree. For each video created, there is a plot that describes the video, as such:
where each point along the line is a degree increment, as with each frame in the video.
My question is: can I overlay the graph onto the video, such that the plot evolves with each frame? In other words, can I append the graph to the video and have the line extend along the X axis with each frame of the video?
I have tried videofig from the File Exchange and I can't get it to work as per:
vid = VideoReader('rhinos.avi');
videofig(vid.NumFrames, @(frm) redraw(frm, vid));
function redraw(frame, vidObj)
f2 = edge(rgb2gray(f), 'canny');
f3 = bsxfun(@plus, f, uint8(255*f2));
image(f3); axis image off