1
$\begingroup$

I'm not a huge programmer, but if it'll save me lots of time, that's when I code (given that it's possible).

I know MATLab has a Computer Vision Toolbox, so my question is: is it possible to program MATLab to find a picture within a video, without actually playing the video?

I have hundreds of 2 hour videos of participants viewing pictures. The problem is, the images are randomized in the videos, so finding reactions to certain images is rather tedious because it means searching the video for a while. I wanted to know if I could program MATLab to find a given picture within the video, without playing the video, and if possible export the time at which the image appeared in the video. This would save us quite a great deal of time in searching.

Thanks!

$\endgroup$
1

1 Answer 1

1
$\begingroup$

Take a look at this example showing how to detect objects in cluttered scenes in matlab. This should work well for finding a picture in a video.

I am not sure I understand what you mean by "without playing the video". This can be done without you having to look at the video yourself, but your program would still have to read the video file frame by frame, and search for the object of interest in each frame.

$\endgroup$
4
  • $\begingroup$ Please summarize the information linked in your answer. Over time, links may get broken and it's much more useful to the OP to incorporate an explanation with your answer. $\endgroup$
    – Paul
    Commented Mar 4, 2015 at 16:13
  • $\begingroup$ Thanks for the help. What I mean is, if the picture occurs at say one hour into the video, would MATLab take an hour to play the video before it finds the image? Or, would it be able to search the video file at a faster rate than the speed it's played (30fps)? If it still took an hour to search for the photos, it wouldn't save any time, but actually take longer. $\endgroup$
    – Eric
    Commented Mar 4, 2015 at 22:43
  • $\begingroup$ That all depends on how long it takes to match the features between your object of interest and each video frame, which in turn depends on the resolution of the video and on its content. Also, you probably do not need to search every frame. If the picture is present, it will be present in multiple frames, so you may only need to look at every n-th frame. $\endgroup$
    – Dima
    Commented Mar 4, 2015 at 22:55
  • $\begingroup$ Also, since you have hundreds of videos, you can process them in parallel on multiple computers or in separate instances of matlab on a single multi-core machine. This becomes much easier if you have the Parallel Computing Toolbox. Even if your processing on any individual video is slower than 30fps, it still beats doing it manually. It is about your time vs. the machine time. While the machine is doing work, you can do other things. $\endgroup$
    – Dima
    Commented Mar 4, 2015 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.