image processing to video processing

1 view (last 30 days)
hello everyone, I am dealing with image processing. I have written short simple code that can detect some regions in an area.
But how can i make the same code suitable for video processing?
Instead of working with jpg ( imread(asdf.jpg) ), i want to take a video about 30 sec. The size of video will be 320x240 or 480x640. Then i want to apply my code on this video? Do i need computer vision toolbox?
Am i supposed to do something like that?
Thanks in advance.

Accepted Answer

Image Analyst
Image Analyst on 1 Aug 2012
You don't need the computer vision toolbox necessarily - it depends on what you want to do. If your program runs now without using any of the CV toolbox functions then you don't need it. Just take your video and extract frames from it with VideoReader() and read(), and do your process. You can post process your video read back in from a video file. Depending on what your algorithm does, you may not be able to do it in real time on streaming video. For example, if your algorithm takes 1 second to do, then you can't take snapshots out of a live video stream at 30 frames per second and get them done in 1/30th of a second, because it takes 1 second of course.
  2 Comments
selim
selim on 1 Aug 2012
Edited: selim on 1 Aug 2012
Sir, it is Matlab code not CV. I take 640x480 jpg then narrow the jpg about 300x150. And after doing that, i measured my algorithm with ''tic toc'' . It shows 0.32, 0.26 and sometimes 0.50 sec. I will not do it in real time. I will record video beforehand then process it. It is enough for me if i am able to process one frame in 1 sec. What i want to do using video is,for example, i have a camera in my hand and take one pic. every second and process it. Do i have problems when doing it considering my tic toc time?
Image Analyst
Image Analyst on 1 Aug 2012
I figured it was MATLAB code, but when you asked if you needed the CV (Computer Vision) Toolbox, I just thought I'd give my opinion. By the way, I consider any toolbox code MATLAB code, even though you don't. (You didn't think I meant OpenCV rather than MATLAB's CVT, did you?) Anyway, sure, go ahead. I have several video analysis apps. Just do it and see.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!