title: Detect framed video content using python
body: <p>I would like to detect framed video content (frequently used in TV advertising and referred to as single split, program split etc.)</p>
  
  <p><strong>Example 1:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/GWAck.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GWAck.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Example 2 (3 screen captures, 2 seconds offset):</strong></p>
  
  <p><a href="https://i.stack.imgur.com/5w6vO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5w6vO.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/27n0i.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/27n0i.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/E7SU6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E7SU6.jpg" alt="enter image description here"></a></p>
  
  <p>I have the video sequence as well as 3 screen captures available to analyze (middle, middle between middle and end, end).</p>
  
  <p>To get started, I already tried a few methods like bounding box detection, and autocrop algorithms on the screen captures using opencv, imagemagick and PIL. This works to some extent, but not reliably.</p>
  
  <ul>
  <li>Every TV station uses their own artwork for the surrounding frame</li>
  <li>They sometimes animate the surrounding frame in the first few seconds</li>
  <li>The background of the surrounding frame can be static but also animated, changing colors, etc</li>
  </ul>
  
  <p>What would be an effective method to get a rather precise true/false reading on the media examples above? I would appreciate some ideas to build a suitable algorithm.</p>
  
  <p>Thanks</p>