Video processing to detect a logo in frames
If you know where the logo is then you can detect its presence, fairly quickly, with cross-correlation...with a little bit more work.

Detecting the presence of "things" using cross-correlation is a way to do template matching, where we are trying to find a specific pattern in a longer "duration" signal.

In this case, the logo is the pattern and the longer "duration" (or surface in the case of an image) is the whole frame.

The question now becomes, how do you recover the pattern? How do you recover the logo, so that you can then search for that particular target?

There are two ways to do this:


It is already available: In which case, you just download a copy of the logo, resize it to the approximate size you expect the logo to be in the frame and then use cross-correlation to find it.
It is not available and it has to be recovered by the frame itself: To recover the logo, use averaging. Take a large number of frames (say 30-50 seconds of video), and average their pixel values. The key idea here is that the logo does not "move" from its position. Therefore, the pixels that correspond to the logo will have a stable value while the pixels that correspond to the background will be taking "random" values from whatever the camera happens to pan to. When you average, the stable values will retain their magnitude and the random values will have considerable lower values. The reason I am telling you to average such a long duration is because the second image is showing a frame from a talk-show. In that one, the camera, the subject or its background are not expected to move too much, therefore, it is likely that if you average for a short duration you might "pick up" a bit of the background too. In that case, you might have to recover the logo from a different part of the video. The bottom line is that this process will give you the form of the logo. You might have to apply thresholding to get rid of those "background" pixels to get a proper "mask" image.


Once you have that small "logo" image, you can then pick up a random frame from your video feed, crop it around the approximate location of the logo and then take that part of the frame and cross-correlate it with the logo. If the logo IS present in the frame, you will get a much stronger cross-correlation peak at its approximate centre than if the logo is not present. You can then apply a threshold to detect this strong peak. If the peak is above that threshold then the logo is present, if not, then the logo is not present. That's the concept and different platforms will have different implementations (e.g. here is the same thing in Python).

Hope this helps.