how to add logo/scale plate to video

1 view (last 30 days)
Dear all, I am working on image/video processing.I want to add a self-made distance/depth scale plate or logo to a series of videos. I have a relatively big data bank, i.e.22 videos of 45 minutes, respectively. My question is: is there samrt matlab function, which can quickly and easily achieve this function? (self-wrote programm,reading each frame from video, adding logo to each frame and then writing all frames in a video file looks "stupid" and lasts long.) I will be grateful for your answer. PP

Accepted Answer

Walter Roberson
Walter Roberson on 19 May 2015
No, going frame by frame is the method. If you have the Computer Vision Toolkit, and MATLAB Compiler, you could probably generate an executable for the purpose.
Computer Vision Toolkit does have some useful routines for adding various markers, labels, or polygons to images, but it does not have routines for adding arbitrary images.
  3 Comments
Walter Roberson
Walter Roberson on 19 May 2015
Adding the logo messes up the prediction vector information for the P frames and B frames, as the areas being covered no longer move and also become unavailable as sources of information for copying. So you need to decode all of the frames and re-encode them anyhow.
The Computer Vision Toolbox just might contain some optimizations to avoid bringing the entire frame to workspace memory when not needed; I don't know. But it's still manipulating at the MATLAB internal data structure level. So about the best you could hope to do with MATLAB is use the Computer Vision Toolbox together with the MATLAB Compiler, to produce C code to do this very specialized task. If it was something to be done regularly then one might as well write C code that calls upon MPEG libraries. And if one is going to do that then one might as well look around to see if someone has already written an application for the purpose. Something like here
Peipei Liu
Peipei Liu on 19 May 2015
I really intend to do all in Matlab, rather than other tools. Anyway, thanks a lot for your information.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!