New answers tagged overlay
4
To get a rolling plot you can change the PlotRange with time, something like this:
(* fake movie frames *)
image[t_] := RandomImage[{0, 1}, {150, 150}]~Blur~3
(* make up some data to plot *)
data = Accumulate[RandomReal[{-1, 1}, {100}]];
range = {Min[data], Max[data]};
(* define the rolling plot *)
rollingplot[t_, n_] := ListLinePlot[data[[;; t]],
...
5
I present a solution qualitatively similar to belisarius's, but done somewhat differently:
(* import an AVI frame-by-frame *)
imgs = ExampleData /@ ExampleData[{"TestAnimation", "ToyVehicles"}, "Frames"];
(* some plots *)
plots = Table[Plot[Sin[x], {x, -$MachineEpsilon, u}, Axes -> None, Frame -> True,
Epilog -> ...
8
k = Import["traffic.avi", "ImageList"];
a = RandomReal[{0, 1}, 10];
s[n_] := ListLinePlot[a[[1 ;; n]], PlotStyle ->{Thick, White}, PlotRange ->{{1, 10}, {0, 1}}]
Table[ImageCompose[k[[n]], s[n]], {n, 10}]
4
If you import the avi using the option GraphicsList then you immediately have a variable which is a list with all the frames. For instance:
imagelist = Import["...file.avi","GraphicsList"]
You can then create an animation with this imagelist and superpose the frame numbers (or whatever other numbers you want using Show inside the Animate function):
...
Top 50 recent answers are included