title: Black and white (not grayscale) filter in svg, ideally snap.svg
body: <p><strong>Edit 1:</strong> Rewrote question so it is clearer to understand.</p>
  
  <p>This one really split my mind.</p>
  
  <p>I would like to apply a filter to an image such that values over a certain threshold are displayed as completely white, and all the values that are equal or less than the threshold are completely black.</p>
  
  <p>here's a map representing RGB values of a 3x3 pixel image:</p>
  
  <pre><code>|(255,255,255)|(220,220,220)|(100,100,100)|  
  |(254,254,254)|(12 ,12 ,12 )|(38 ,38 ,38 )|  
  |(201,201,201)|(105,105,105)|(60 ,60 ,60 )|
  </code></pre>
  
  <p>After applying my filter I wish to receive an image where all values greater than 200 are converted to (255,255,255) and all values equal or less than 200 are converted to (0,0,0) such:</p>
  
  <pre><code>|(255,255,255)|(255,255,255)|(0  ,0  ,0  )|
  |(255,255,255)|(0  ,0  ,0  )|(0  ,0  ,0  )|
  |(255,255,255)|(0  ,0  ,0  )|(0  ,0  ,0  )|
  </code></pre>
  
  <p>Any ideas for where I should start? Is that even possible in svg?
  I know I can create matrix multiplications in filters in svg but I don't know how to approach this issue.</p>
  
  <p>thank you!</p>
  
  <p><strong>Edit 1:</strong>
  Related question I posted in math exchange:
  <a href="https://math.stackexchange.com/questions/2087482/creating-binary-matrix-for-threshold-as-a-result-of-matrix-multiplcation">https://math.stackexchange.com/questions/2087482/creating-binary-matrix-for-threshold-as-a-result-of-matrix-multiplcation</a></p>
  
  <p><strong>Edit 2:</strong>: Extracted from the Snap.svg code: this matrix will transform a color image to a grayscale:</p>
  
  <pre><code>&lt;feColorMatrix type="matrix" values="0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"/&gt;
  </code></pre>
  
  <p>Instead of getting grayscale, I would like to modify the values here to get Black and White. And I would like to choose the threshold above which values are returned as white, and below are returned as black</p>
  
  <p><strong>Additional Info</strong>: According to MSDN, this is how the multiplication occurs:</p>
  
  <pre><code>Resulting vector   my coveted matrix     original vector
      | R' |     | a00 a01 a02 a03 a04 |   | R |
      | G' |     | a10 a11 a12 a13 a14 |   | G |
      | B' |  =  | a20 a21 a22 a23 a24 | * | B |
      | A' |     | a30 a31 a32 a33 a34 |   | A |
      | 1  |     |  0   0   0   0   1  |   | 1 |
  </code></pre>
  
  <p>This in turn is applied to every pixel of the inputed image. </p>