Ask Your Question
0

Video analysis is possible in OpenCV

asked 2015-05-06 03:46:40 -0600

I am new to openCV, i want to generate a histogram graph from already recorded video with respect to RGB value. I have seen the histogram generation for images in openCV but is the same possible with videos???

edit retag flag offensive close merge delete

Comments

sure, no difference. see e.g. here

berak gravatar imageberak ( 2015-05-06 03:54:13 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-05-06 10:06:37 -0600

pklab gravatar image

A video is just a stream of images usually called frames. All you can do on images you can do on video frames.

Reading your question I suppose you will find useful some clarification about video, would you apologize me if I'm wrong.

Consideration should be done about timing, especially when your video is coming from a real time source like cameras.

In a few word, with video stream you have to consider that processing on a frame should terminate before of next frame is come.

Using buffering, threads, queues you can relax a bit and say that: the average processing time should be less than receiving frame rate.

You can choose to process only last frame received or process any frame from the stream. It's up to you to decide if frame lost is acceptable ! as is your choice to use FIFO or LIFO frame processing.

If your application is time critical, you have to consider also the general load of your system because the frame processing time depends from it too. If your computer runs just only your application, frame processing time is totally under your control. But if your computer hosts other critical or intensive application you might have same unpredictable short latency in your control loop.

Another question to be considered is User Interface. In real video application you need thread behind your GUI and this might a bit hard (not so hard) if you are newbie...

Finally a video is not just a stream of images, you can consider it a dynamic scene system where the video is like a plot chart and each frame is like a point in the chart. For example subtracting two consecutive frame is like calculate a first derivative of your scene and you will catch motion. Motion calculation is basic for video compression ...1hr of static video could be stored using 1st frame + 1 integer for duration.

This is just a single bit of information about video processing..I hope you will find useful

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-05-06 03:46:40 -0600

Seen: 193 times

Last updated: May 06 '15