Borrar filtros
Borrar filtros

How to make Operations on video frames?

8 visualizaciones (últimos 30 días)
Christine Ak
Christine Ak el 21 de Dic. de 2013
Comentada: komal el 11 de Jun. de 2019
Hi I have a mp4 video , I turned it into Frames ... but I want to make operations on EACH frame
Can any one help ???

Respuesta aceptada

Walter Roberson
Walter Roberson el 21 de Dic. de 2013
Loop?
for K = 1 : number_of_frames
this_frame = frames{K}; %or however you stored them
now do something with this_frame
end
  3 comentarios
Walter Roberson
Walter Roberson el 21 de Dic. de 2013
That code will apply whatever onto each frame. Your code to do something with the frame is within the loop, so it gets presented with one frame at a time, in sequence.
Perhaps your question has to do with storing the results as you go. In that case have a look at
Christine Ak
Christine Ak el 22 de Dic. de 2013
That's what I did.......Thank You so much :D

Iniciar sesión para comentar.

Más respuestas (2)

Image Analyst
Image Analyst el 21 de Dic. de 2013
See my demo, attached. I calculate a background frame comprised of the last few frames, and then subtract it from the current frame. You can do something similar with whatever operation you want to do.
  5 comentarios
Mustafa Alhandhali
Mustafa Alhandhali el 3 de Abr. de 2019
how you did it??
Image Analyst
Image Analyst el 3 de Abr. de 2019
I doubt she'll answer, after more than 5 years, but I will. Is there something wrong with my code that doesn't work for you? Did you adapt it? Attach your adapted code.

Iniciar sesión para comentar.


komal
komal el 10 de Jun. de 2019
i have converted the videos into frames and now I want to subtract one frame from another like frame 1-frame 2 and then frame 2-frame3 and so on till the video ends.
  2 comentarios
Image Analyst
Image Analyst el 11 de Jun. de 2019
Did you see my answer? That's basically what I do. Adapt it as needed. It should be trivial.
komal
komal el 11 de Jun. de 2019
Yes sir I saw your answer but my question is different.
I want to subtract the frames and continously run the loop for the whole video frames.
ex-frame 1-frame 2 and show the result in graph and then frame 2 - frame 3.Individual ans shown on graph
Sorry if I m unable to explain you clearly

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by