Clear Filters
Clear Filters

grid overlay on live video

6 views (last 30 days)
gerard ditaranto
gerard ditaranto on 30 Mar 2012
Anyone have experience with overlaying simple line graphics on live video? I tried using the line command to create a 10x10 grid of lines, while this worked it slowed my frame rate from 30 hz to about 1.8 hz. If I instead use the rectangle function multiple times I can draw any number of rectangles and my frame rate stays the same. It just seemed very odd that the line function behaved so differently than the rectangle function. Since the are both built in functions you can see what they do, I would expect that rectangle uses the line function 4 times, but that is just me.
Any other perspectives would be appreciated. GDT

Answers (1)

Ross
Ross on 23 Apr 2012
Gerard,
I would actually be curious as to how you applied your line graphics to live video. It's something I've been trying to do and have not been able to figure it out...
In regards to why the grid of lines slowed your frame rate from 30hz to 1.8hz may relate to the order the steps were applied. If the grid was applied prior to starting the video, the grid may refresh every time the video refreshes (i.e. at a rate of 30 Hz), which may cause it to slow considerably. However, when you draw the rectangles on after the video has started, they may not refresh at the same rate. I would have to play around with it some myself to see whether or not that is true.
-RM

Products

Community Treasure Hunt

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

Start Hunting!