title: Emgu CV - ignore a color while matching template
body: <p>I'm using <code>Image</code> class and it's <code>MatchTemplate</code> method in Emgu CV to detect pattern in pictures. So, my pictures are black-white (with 256 gray variants) and I have to search for white templates, but how do I store them? If I'm using .png with only 2 colors: white for pattern and black for background - then <code>MatchTemplate</code> method considers the background part of template (and that's ruining the results). What color I have to use for background in patterns?</p>
  
  <p>UPD: Images added.</p>
  
  <p>Pattern (only white triangle needed):</p>
  
  <p><a href="https://i.stack.imgur.com/ijlpS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ijlpS.png" alt="Pattern"></a></p>
  
  <p>Image example (a simple one):</p>
  
  <p><a href="https://i.stack.imgur.com/fuuAj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fuuAj.png" alt="Image"></a></p>
  
  <p>Detection (white square is what I get, red one - what I need):
  <a href="https://i.stack.imgur.com/NJrzT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NJrzT.png" alt="Detection"></a></p>