How can I track the disappearance of a TV logo in a certain area in a frame (ROI)?

asked 2020-12-02 01:42:44 -0500

AndrewM gravatar image

updated 2020-12-09 09:16:30 -0500

Hi! I have a TV logo image and a rect where the logo is placed on almost all video frames. But there are also frames where the logo completely disappears (at least 10 consecutive seconds of running frames). TV logo is placed only in only one place throughout the video (ROI = full logo rect), so I don't need to analyze full frame. How can I track when there is no logo in this area?

Example: image description

from this i can extract: image description

now i want to check when tv logo disappears without using matchTemplate().

edit retag flag offensive close merge delete

Comments

I think I can check if two images (TV logo and cropped from the frame with logo rect) are almost similar. But I don't know how to do this :S

AndrewM gravatar imageAndrewM ( 2020-12-02 03:20:56 -0500 )edit

please provide some pictures

crackwitz gravatar imagecrackwitz ( 2020-12-02 14:25:34 -0500 )edit

what approaches have you tried so far?

crackwitz gravatar imagecrackwitz ( 2020-12-02 14:26:15 -0500 )edit

I added example

AndrewM gravatar imageAndrewM ( 2020-12-07 02:08:29 -0500 )edit

okay so what's the question? you stated that you "want to check using matchTemplate"

crackwitz gravatar imagecrackwitz ( 2020-12-07 12:55:14 -0500 )edit

Sorry for my eng, but i don't wanna use matchTemplate:) It works, but I think there is an easier way to compare two images. If the image of a tv logo (image, cropped from every frame. That image contains only tv logo region) is almost similar (about 85 - 90%) to the template extracted before (like grayscale image in my example), so logo is displaying on that frame. If similarity is less than 85-90 %, so there is no tv logo in ROI. I want to compare only FULL cropped images (tv logo vs tv logo). Not to find my template in a subimage of a ROI like matchTemplate can do. Finally, i have tv logo and a zone(coords and size) where it is located. So i can crop subimage from every frame and compare it to my template. My purpose is to compare 2 images (with same sizes) if ...(more)

AndrewM gravatar imageAndrewM ( 2020-12-09 00:22:02 -0500 )edit