1.
I would recommend OpenCV for real-time image analysis. I assume that in real time you mean the ability to support the frame rate of the TV (for example, NTSC (29.97 frames per second) or PAL (25 frames per second)). Of course, as mentioned in the comments, it certainly depends on the equipment you have, as well as the image size of SD (480p) and HD (720p or 1080p). FFmpeg probably has its own quirks, but it will be difficult for you to find the best free alternative. Its power and flexibility are quite impressive; I am sure that this is one of the reasons why OpenCV developers decided to use it as an internal one for decoding / encoding video using OpenCV.
2.
I have not seen high latency problems when using OpenCV for decoding. How long can your system have? If you need to improve performance, consider using separate streams for capturing / decoding and image analysis. Since you mentioned the availability of multiprocessor systems, this should increase the efficiency of your processing capabilities. I definitely recommend using the latest Intel Core-i7 architecture (or perhaps the equivalent of Xeon) as this will give you the best performance available today.
I used OpenCV for several embedded systems, so I am well acquainted with your desire for maximum performance. I have found many times that there is no need to process a full frame (especially when defining masks). I would strongly recommend dropping images if you do not properly process the resulting video streams. This can sometimes instantly give you 4-8X acceleration (depending on your sampling factor). Also on the performance front, I definitely recommend using Intel IPP . Since OpenCV was originally a project of Intel, IPP and OpenCV combine very well.
Finally, since image processing is one of those โproblematicโ parallel problem fields, do not forget about the possibility of using GPUs as a hardware accelerator for your problems, if necessary. OpenCV has been working a lot on this area lately, so you need to have these tools if necessary.
3.
I think FFmpeg will be a good starting point; most of the alternatives that I can think of (Handbrake, mencoder, etc.) tend to use ffmpeg as a backend, but it looks like you could probably roll your IPP Video Coding if you want.
4.
OpenCV's internal color representation is BGR unless you use something like cvtColor to convert it. If you want to see a list of pixel formats supported by FFmpeg, you can run
ffmpeg -pix_fmts
to see what it can input and output.
source share